/* 見た目（段階3）。色は試作の夜空と金色を引き継ぐ（A区分。Codex の絵が採用されたら決め直す）。
   縦向きは1列、横向きは左に三角形・右に操作の2列（docs/design/段階3_三角形ステージの画面.md 3章） */
:root {
  color-scheme: dark;
  --night: #0b1020;
  --panel: #131b36;
  --line: #2a3560;
  --ink: #ece6d6;
  --mute: #9aa2bd;
  --gold: #e0b85c;
  --ok: #86dcb6;
  --warn: #e7907f;
  --body: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 9%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 32%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 72%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 81%, #fff6 50%, transparent 51%),
    radial-gradient(120% 80% at 50% 0%, #182246 0%, var(--night) 60%);
  background-color: var(--night);
  color: var(--ink);
  font-family: var(--body);
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- タイトル ---------- */
@font-face {
  font-family: 'Root Montserrat';
  src: url('../../public/fonts/montserrat-500.ttf') format('truetype');
  font-weight: 500;
  font-display: block;
}
@font-face {
  font-family: 'Root Montserrat';
  src: url('../../public/fonts/montserrat-600.ttf') format('truetype');
  font-weight: 600;
  font-display: block;
}
.title {
  --title-ink: #f1e9d7;
  --title-gold: #d9c293;
  height: 100dvh;
  overflow-y: auto;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: stretch center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  background: #042120;
  color: var(--title-ink);
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}
.title-background { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.title-background img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.title-inner { position: relative; z-index: 1; width: min(1000px, 100%); min-height: 0; display: grid; grid-template-rows: minmax(250px, 1fr) auto; gap: clamp(8px, 2vh, 24px); }
.title-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding-bottom: clamp(16px, 4vh, 40px); }
.title .series { display: grid; grid-template-columns: auto auto; gap: 0 8px; margin: 0 0 6px; font: 600 10px/1.15 'Root Montserrat', sans-serif; letter-spacing: 0.14em; color: var(--title-gold); text-align: center; }
.title .series span { grid-column: 1; }
.title .series b { grid-column: 2; grid-row: 1/3; align-self: center; border-left: 1px solid #bba775; padding-left: 8px; font-size: 17px; letter-spacing: 0; }
.title .logo { width: min(360px, 90%); margin: 0; line-height: 1; font-family: 'Root Montserrat', sans-serif; font-size: 30px; color: #f4ecd8; }
.title .logo svg { display: block; width: 100%; max-height: 25vh; fill: currentColor; }
.title .logo-root { font-size: 240px; font-weight: 600; letter-spacing: 30px; text-anchor: middle; }
.title .logo-notes { font-size: 90px; font-weight: 500; letter-spacing: 50px; text-anchor: middle; }
.title .lead { margin: 12px 0; color: #f2e9d8; font-size: 13px; text-shadow: 0 1px 3px #000; }
.title-symbol-space { width: min(380px, 100%); height: clamp(42px, 13vh, 112px); }
.title-menu { width: min(430px, 100%); justify-self: center; text-align: center; }
.title-buttons { display: grid; gap: 8px; width: 100%; }
.title-menu button, .title-help summary { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; min-height: 44px; padding: 1px 6px; border-radius: 9px; border: 1px solid #c2b697; background: #062522ed; color: #f2e9d8; font: 500 15px/1.45 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif; cursor: pointer; white-space: nowrap; }
.title-menu button.big { background: linear-gradient(110deg, #ecd083, #c8a556); border-color: #dcc28c; color: #18231c; }
.title-menu .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.title-menu .pair button { height: 48px; }
.title .foot { position: static; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin: 8px auto 0; padding: 4px 8px; width: max-content; max-width: 100%; border-radius: 7px; background: #041d1cc7; font-size: 11px; color: #cfccb9; }
.title-help { position: relative; }
.title-help summary { list-style: none; }
.title-help summary::-webkit-details-marker { display: none; }
.title-help summary:focus-visible { outline: 2px solid var(--title-gold); outline-offset: 2px; }
.title-help-body { position: absolute; bottom: calc(100% + 8px); left: 0; width: 100%; max-height: min(50dvh, 340px); overflow-y: auto; padding: 16px; border: 1px solid #c2b697; border-radius: 9px; background: #062522; text-align: left; box-shadow: 0 4px 20px #0007; }
.title-help-body h2 { margin: 0 0 10px; font-size: 16px; color: var(--title-gold); }
.title-help-body p { margin: 0 0 10px; font-size: 13px; }
.title-help-body .title-help-close { margin-bottom: 0; color: #cfccb9; font-size: 11px; }
@media (min-aspect-ratio: 1/1) {
  .title-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 24px; }
  .title-hero { padding-bottom: 0; }
  .title .logo svg { max-height: 40vh; }
  .title-symbol-space { height: clamp(42px, 20vh, 112px); }
}
@media (max-aspect-ratio: 1/1) and (max-height: 650px) {
  .title-inner { grid-template-rows: minmax(180px, 1fr) auto; gap: 6px; }
  .title-hero { padding-bottom: 8px; }
  .title-symbol-space { display: none; }
}

/* ---------- 遊ぶ画面：縦向き（1列） ---------- */
.app {
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  grid-template-areas: "head" "stars" "sub" "board" "sticks" "actions";
  padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.head { grid-area: head; display: flex; align-items: center; gap: 8px; }
.stars { grid-area: stars; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.sub { grid-area: sub; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--mute); min-height: 1.4em; }
.board { grid-area: board; }
.sticks { grid-area: sticks; }
.actions { grid-area: actions; }

.brand { flex: 1; margin: 0; font-size: 1.1rem; letter-spacing: 0.12em; color: var(--gold); white-space: nowrap; }
.chip { border: 1px solid var(--gold); border-radius: 999px; background: color-mix(in srgb, var(--gold) 12%, transparent); font-size: 0.78rem; padding: 6px 12px; min-height: 34px; cursor: pointer; white-space: nowrap; }
.icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; }

.star { background: transparent; border: 1px solid var(--line); border-radius: 9px; color: var(--mute); padding: 2px; font-size: 0.72rem; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; cursor: pointer; }
.star .glyph { font-size: 0.95rem; }
.star.gap { margin-left: 6px; }
.star.on { border-color: var(--gold); color: var(--ink); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.star.lit .glyph { color: var(--gold); text-shadow: 0 0 8px var(--gold); }
.star.play { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.star.twinkle .glyph { color: var(--gold); text-shadow: 0 0 12px var(--gold); }
.star:disabled { cursor: default; }
.sub b { color: var(--ink); }
.gem { color: var(--gold); font-size: 0.7rem; margin-left: 1px; }
.gem.lost { color: var(--line); }

.board { min-height: 120px; position: relative; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 70%, transparent); display: flex; flex-direction: column; overflow: hidden; }
#tri { flex: 1; min-height: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
#tri-fill { fill: var(--gold); fill-opacity: 0.06; transition: fill-opacity 0.6s ease; }
#tri-fill.lit { fill-opacity: 0.5; }
.tri-hint { fill: var(--mute); font-size: 13px; }
.tri-label { font-size: 15px; font-weight: 700; pointer-events: none; }
.tri-vertex { fill: var(--ink); pointer-events: none; }
.hit { cursor: pointer; }
.side.ring { animation: ring 0.09s linear infinite; }
@keyframes ring { 50% { transform: translateY(0.7px); } }

.status { padding: 0 10px 8px; display: flex; flex-direction: column; gap: 2px; }
#msg { font-size: 0.84rem; margin: 0; min-height: 1.3em; }
#msg.ok { color: var(--ok); font-weight: 700; }
#msg.warn { color: var(--warn); }
#msg .now { color: var(--gold); font-weight: 700; }
#info { font-size: 0.76rem; color: var(--mute); margin: 0; font-variant-numeric: tabular-nums; min-height: 1.2em; }
#info b { color: var(--ink); }
.meter { display: flex; gap: 10px; align-items: center; font-size: 0.76rem; font-variant-numeric: tabular-nums; color: var(--mute); }
.meter .m { display: flex; align-items: center; gap: 4px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mute); }
.dot[data-level="clear"] { background: var(--ok); }
.dot[data-level="near"] { background: var(--gold); }
.dot[data-level="far"] { background: var(--warn); }
[id^="beat"][data-level="clear"] { color: var(--ok); }
[id^="beat"][data-level="near"] { color: var(--gold); }
[id^="beat"][data-level="far"] { color: var(--warn); }

.sticks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; }
.stick { position: relative; background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 62px; }
.stick .num { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stick .bar { height: 4px; border-radius: 2px; opacity: 0.55; }
.stick.sel { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.stick.sel .bar { opacity: 1; }
.stick .ord { position: absolute; top: 4px; right: 6px; font-size: 0.66rem; color: var(--gold); }
.stick:disabled { opacity: 0.45; cursor: default; }

.actions { display: flex; gap: 6px; }
.btn { flex: 1; min-height: 62px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-size: 0.9rem; font-weight: 700; cursor: pointer; padding: 4px 6px; line-height: 1.25; }
.btn.primary { background: var(--gold); color: #1a1405; border-color: var(--gold); flex: 1.3; }
.btn.dim { opacity: 0.5; }
.btn:disabled { opacity: 0.4; cursor: default; }
/* 回答する：三角形ができるまでは押せない見た目（灰色）、できたら金色 */
.btn.primary:disabled { background: var(--panel); color: var(--mute); border-color: var(--line); opacity: 0.7; }
/* お題を聞く：ステージの始まりに2回光らせ（前作 AQUA の開始の合図と同じ時間割り：0.7秒待って、0.7秒の光を0.35秒あけて2回）、
   聞くまでは金色の縁を残す */
.btn.guide { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.btn.cue { animation: cue 1.75s ease 0.7s 1 both; }
@keyframes cue {
  0%, 60%, 100% { background: var(--panel); box-shadow: 0 0 0 1px var(--gold) inset; }
  7%, 24% { background: color-mix(in srgb, var(--gold) 55%, var(--panel)); box-shadow: 0 0 18px var(--gold); }
  40% { background: var(--panel); box-shadow: 0 0 0 1px var(--gold) inset; }
  67%, 84% { background: color-mix(in srgb, var(--gold) 55%, var(--panel)); box-shadow: 0 0 18px var(--gold); }
}

/* 導線：次に触る所を2回光らせる（stage-screen.js の guide）。棒の並び・三角形・ボタンに使う */
.flash { animation: flash 1.75s ease 1 both; }
.sticks { border-radius: 14px; }
@keyframes flash {
  0%, 40%, 60%, 100% { box-shadow: 0 0 0 0 transparent; }
  7%, 24%, 67%, 84% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px var(--gold); }
}
.result-toast p.sub-line { color: var(--mute); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
/* 結果のトースト（位置と高さの上限は stage-screen.js が操作欄に合わせて決める） */
.result-toast { position: fixed; z-index: 15; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); overflow-y: auto; animation: toast-in 0.2s ease-out; }
.result-toast.ok { border-color: var(--ok); }
.result-toast.ng { border-color: var(--warn); }
.result-head { display: flex; align-items: center; gap: 8px; }
.result-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.result-head .replay { flex: none; align-self: center; min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--panel)); font-size: 0.84rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.result-head h3 { margin: 0; font-size: 1.15rem; }
.result-toast.ok h3 { color: var(--ok); }
.result-toast.ng h3 { color: var(--warn); }
.result-head .close { flex: none; width: 38px; height: 38px; border-radius: 19px; border: 1px solid var(--line); background: transparent; color: var(--mute); font-size: 1.1rem; cursor: pointer; }
.result-toast p { margin: 0; font-size: 0.9rem; color: var(--ink); line-height: 1.5; }
.result-actions { display: flex; gap: 8px; }
.result-actions .btn { min-height: 54px; font-size: 0.95rem; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.shake { animation: shake 0.4s ease; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ---------- 遊ぶ画面：横向き（左に三角形、右に操作の2列） ---------- */
@media (orientation: landscape) {
  .app {
    max-width: 1100px;
    column-gap: 14px;
    row-gap: 6px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head stars" "board sub" "board sticks" "board actions";
  }
  .stars { align-self: center; }
  .sub { align-self: end; }
}
/* 横向きで高さが低いとき（スマホの横向き）は、部品を少し小さくする */
@media (orientation: landscape) and (max-height: 500px) {
  .app { padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .brand { font-size: 0.95rem; }
  .chip { min-height: 30px; padding: 4px 10px; }
  .icon { width: 32px; height: 32px; }
  .star { min-height: 34px; font-size: 0.66rem; }
  .star .glyph { font-size: 0.8rem; }
  .stick { min-height: 48px; padding: 4px 8px; gap: 4px; }
  .stick .num { font-size: 1.15rem; }
  .btn { min-height: 50px; font-size: 0.8rem; }
  .result-actions .btn { min-height: 44px; }
  .board { min-height: 0; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .title { height: 100dvh; overflow-y: auto; }
}
/* 縦に十分な高さがある縦向き（Pixel 9a など）は、操作する部品をもう一段大きくする（三角形の場所は残りの高さで縮む） */
@media (orientation: portrait) and (min-height: 760px) {
  .star { min-height: 54px; font-size: 0.8rem; }
  .star .glyph { font-size: 1.1rem; }
  .stick { min-height: 74px; }
  .stick .num { font-size: 1.6rem; }
  .btn { min-height: 74px; font-size: 1rem; }
  .sticks, .actions { gap: 8px; }
}
@media (orientation: portrait) and (max-height: 640px) {
  .stick { min-height: 50px; }
  .btn { min-height: 52px; }
}

/* ---------- 引き出し・知らせ ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; }
.sheet-back { position: absolute; inset: 0; background: rgba(5, 8, 18, 0.6); }
.sheet-body {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; overflow: auto;
  background: var(--panel); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
  padding: 14px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto;
}
.sheet h2 { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--mute); margin: 0; }
.sheet p { font-size: 0.84rem; color: var(--mute); margin: 0; }
.sheet p b { color: var(--ink); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.modes button, .seg button { min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--mute); font-size: 0.84rem; cursor: pointer; }
.modes button.on, .seg button.on { border-color: var(--gold); color: var(--ink); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.found { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.found li { font-size: 0.84rem; border-left: 3px solid var(--line); padding: 2px 0 2px 10px; color: var(--mute); }
.found li.got { border-color: var(--gold); color: var(--ink); }
.found li b { display: block; }
.sheet-foot { display: flex; justify-content: center; gap: 1em; font-size: 0.75rem; color: var(--mute); }
.sheet-buttons { display: flex; gap: 8px; }

.toast {
  position: fixed; left: 50%; top: calc(56px + env(safe-area-inset-top)); transform: translateX(-50%);
  background: var(--gold); color: #1a1405; font-weight: 700; padding: 8px 14px; border-radius: 999px; font-size: 0.86rem;
  z-index: 20; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; white-space: nowrap;
}
.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .side.ring, .shake, .btn.cue, .result-toast, .flash { animation: none; }
  .flash { box-shadow: 0 0 0 3px var(--gold); }
  #tri-fill, .toast { transition: none; }
}

/* ---------- 五線譜（曲を流すとき。三角形の場所の上部に重ねる） ---------- */
.staff-panel { position: absolute; inset: 6px; z-index: 2; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 2px; }
#staff { display: block; width: 100%; height: 100%; }
#staff .octave { fill: var(--mute); font-size: 11px; font-weight: 700; }
#staff .staff-line, #staff .bar-line, #staff .ledger { stroke: var(--mute); stroke-width: 1; }
#staff .ledger { stroke-width: 1.4; }
#staff .clef { fill: var(--ink); font-family: "Segoe UI Symbol", "Noto Music", "Noto Sans Symbols 2", serif; }
#staff .keysig, #staff .acc { fill: var(--ink); font-size: 17px; }
#staff .head { fill: var(--ink); }
#staff .deg { fill: var(--mute); font-size: 13px; text-anchor: middle; font-weight: 700; }
#staff .name { fill: var(--ink); font-size: 13px; text-anchor: middle; }
#staff .halo { fill: transparent; }
#staff .col.now .halo { fill: color-mix(in srgb, var(--gold) 22%, transparent); }
#staff .col.now .head, #staff .col.now .acc { fill: var(--gold); }
#staff .col.now .ledger { stroke: var(--gold); }
#staff .col.now .deg, #staff .col.now .name { fill: var(--gold); }
#staff .barno { fill: var(--mute); font-size: 9px; }
#staff .col.now .barno { fill: var(--gold); }

/* 辺に触れると鳴る印（三角形ができて、その星でまだ辺に触れていないとき） */
.tap-hint { pointer-events: none; }
.tap-dot { fill: var(--gold); opacity: 0.85; }
.tap-ring { fill: none; stroke: var(--gold); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: tap-ring 1.4s ease-out infinite; }
.tap-text { fill: var(--gold); font-size: 13px; font-weight: 700; }
@keyframes tap-ring { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tap-ring { animation: none; transform: scale(2); opacity: 0.6; } }
.result-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-badge { font-size: 0.78rem; font-weight: 700; color: var(--ink); border: 1px solid var(--gold); border-radius: 999px; padding: 1px 9px; background: color-mix(in srgb, var(--gold) 14%, transparent); }
.result-toast p.first-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 選んでいる棒（選ぶ → もう一度タップで使う／外す。2026-11-14 発案者） */
.sticks { touch-action: manipulation; } /* ダブルタップで画面が拡大されないように */
.stick .act { position: absolute; right: 6px; bottom: 6px; font-size: 0.72rem; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
/* 使う＝金色、外す＝赤みのある色、そろっている＝灰色（2026-11-14 発案者：使うときと外すときで色を変える） */
.stick.to-use { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.stick.to-use .act { background: var(--gold); color: #1a1405; }
.stick.to-remove { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn) inset; }
.stick.to-remove .act { background: var(--warn); color: #2a0d08; }
.stick.to-full { border-color: var(--mute); box-shadow: 0 0 0 2px var(--mute) inset; }
.stick.to-full .act { background: var(--line); color: var(--ink); }
.seg.seg3 { grid-template-columns: 1fr 1fr 1fr; }
/* 選択が外れる前の1秒：枠と札を少しずつ薄くする（2026-11-14 発案者） */
.stick.to-use, .stick.to-remove, .stick.to-full { transition: box-shadow 1s linear, border-color 1s linear; }
.stick .act { transition: opacity 1s linear; }
.stick.fading { box-shadow: 0 0 0 2px transparent inset; border-color: var(--line); }
.stick.fading .act { opacity: 0; }
.stick.sel.fading { border-color: var(--gold); }
