/* =========================================================
   /credits/ 選歌手頁 — 選歌手 ＋ 對戰（2026-11-29 建）
   沿用 /css/styles.css 的色票、字型、.btn、.console-bar；這裡只放本頁的東西。
   ========================================================= */

.cr { overflow-x: hidden; }
.cr [hidden] { display: none !important; }

/* ---------- top bar ---------- */
.cr-bar__home {
  color: var(--brass-light);
  text-decoration: none;
  font-family: var(--pixel-tc);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: none;
}
.cr-bar__home:hover { color: var(--paper); }
.cr-bar .console-bar__brand { color: var(--paper); }

.cr-main {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px var(--pad-x) 56px;
}

/* ---------- select: head ---------- */
.cr-head { text-align: center; margin-bottom: 28px; }
.cr-head .section__rule { margin-bottom: 18px; }
.cr-title { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 400; }
.cr-title__en {
  font-family: var(--pixel-en);
  font-size: clamp(16px, 3.2vw, 30px);
  letter-spacing: .14em;
  line-height: 1.4;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--brass-light);
}
.cr-title__zh {
  font-family: var(--pixel-tc);
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: .3em;
  color: var(--brass-deep);
  -webkit-font-smoothing: none;
}
.cr-count {
  margin: 12px 0 0;
  font-family: var(--pixel-tc);
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--ink-soft);
}
.cr-count b { color: var(--rec-red); font-weight: 400; font-family: var(--pixel-en); font-size: 13px; padding: 0 2px; }

/* ---------- select: stage layout ---------- */
.cr-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "board panel";
  gap: 28px;
  align-items: start;
}
.cr-board { grid-area: board; min-width: 0; }
.cr-panel { grid-area: panel; }

/* ---------- select: the grid ---------- */
.cr-grid {
  --tile: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr));
  gap: 3px;
  padding: 6px;
  background: var(--ink);
  box-shadow:
    0 0 0 var(--px) var(--brass-deep),
    0 0 0 calc(var(--px) * 2) var(--ink),
    8px 8px 0 calc(var(--px) * 2) var(--paper-edge);
  margin: calc(var(--px) * 2);
}
.cr-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  margin: 0;
  background: #3a2c1a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.cr-tile canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: saturate(.75) brightness(.82);
  transition: filter .1s steps(1);
}
.cr-tile.is-cursor, .cr-tile.is-locked { z-index: 3; }
.cr-tile.is-cursor canvas, .cr-tile.is-locked canvas { filter: none; }

/* 2-frame blinking cursor frame */
.cr-tile.is-cursor::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 4px solid #fff3c4;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px var(--ink);
  animation: cr-blink .52s steps(1) infinite;
  pointer-events: none;
}
@keyframes cr-blink {
  0%   { border-color: #fff3c4; }
  50%  { border-color: var(--brass-light); }
}
/* locked = steady red frame + tag */
.cr-tile.is-locked::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 4px solid var(--rec-red);
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px var(--ink);
  animation: none;
  pointer-events: none;
}
.cr-tile.is-locked::before {
  content: "OK";
  position: absolute;
  z-index: 4;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 4px 2px;
  font-family: var(--pixel-en);
  font-size: 7px;
  line-height: 1;
  color: var(--paper);
  background: var(--rec-red);
  box-shadow: 0 0 0 2px var(--ink);
}

/* name strip under the grid */
.cr-strip {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 8px 0;
  padding: 10px 14px;
  background: var(--paper-soft);
  box-shadow: 0 0 0 3px var(--ink), 5px 5px 0 3px var(--paper-edge);
  min-height: 46px;
}
.cr-strip__arrow { font-family: var(--pixel-en); font-size: 10px; color: var(--brass); animation: cr-blink-o 1s steps(1) infinite; }
@keyframes cr-blink-o { 50% { opacity: 0; } }
.cr-strip__name { font-family: var(--pixel-tc); font-size: 18px; letter-spacing: .06em; color: var(--ink); -webkit-font-smoothing: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cr-strip__meta { margin-left: auto; font-family: var(--mono); font-size: 19px; color: var(--ink-soft); white-space: nowrap; }

.cr-keys {
  margin: 14px 8px 0;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--ink-mute);
  letter-spacing: .04em;
}
@media (hover: none) { .cr-keys { display: none; } }

.cr-updated {
  margin: 36px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--ink-mute);
}

/* ---------- select: locked panel ---------- */
.cr-panel {
  position: sticky;
  top: 72px;
  background: var(--paper-soft);
  box-shadow:
    0 0 0 var(--px) var(--ink),
    0 0 0 calc(var(--px) * 2) var(--paper),
    0 0 0 calc(var(--px) * 3) var(--ink),
    10px 10px 0 calc(var(--px) * 3) var(--paper-edge);
  margin: calc(var(--px) * 3);
  padding: 18px 18px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.cr-panel__tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--pixel-en);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--ink-mute);
}
.cr-panel__tag b { color: var(--paper); background: var(--quest); padding: 4px 6px 3px; font-weight: 400; }
.cr-panel.is-locked .cr-panel__tag b { background: var(--rec-red); }
.cr-panel__face {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--ink);
  padding: 6px;
  box-shadow: 0 0 0 3px var(--brass-deep);
}
.cr-panel__face canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
/* 有角色圖：電腦面板放全身（硬邊），手機面板放頭（見下方 media query） */
.cr-panel__bodies { display: none; width: 100%; height: 100%; align-items: flex-end; justify-content: center; }
.cr-panel__body { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; object-position: 50% 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.cr-panel__bodies.is-duo .cr-panel__body { width: 50%; height: 92%; }
.cr-panel__bodies.is-duo .cr-panel__body:first-child { object-position: 100% 100%; }
.cr-panel__bodies.is-duo .cr-panel__body:last-child { object-position: 0% 100%; }
.cr-panel__face.has-body { background: linear-gradient(#3a2c1a 0 82%, #2a1f12 82% 100%); }
.cr-panel__face.has-body .cr-panel__head { display: none; }
.cr-panel__face.has-body .cr-panel__bodies { display: flex; }
.cr-panel__name.is-long { font-size: 20px; }
.cr-panel__face--empty {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(45deg, #3a2c1a 0 6px, #33271a 6px 12px);
}
.cr-panel__face--empty span { font-family: var(--pixel-en); font-size: 42px; color: var(--ink-soft); animation: cr-blink-o 1.2s steps(1) infinite; }
.cr-panel.is-locked .cr-panel__face { animation: cr-pop .28s steps(4); }
@keyframes cr-pop { 0% { transform: scale(.86); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

.cr-panel__name {
  margin: 0;
  font-family: var(--pixel-tc);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: .04em;
  color: var(--ink);
  -webkit-font-smoothing: none;
  word-break: break-word;
}
.cr-panel__hint { margin: 0; font-family: var(--pixel-tc); font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.cr-stats { margin: 0; display: grid; gap: 6px; }
.cr-stats > div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.cr-stats dt { white-space: nowrap; }
.cr-stats dt { font-family: var(--pixel-tc); font-size: 12px; color: var(--ink-mute); letter-spacing: .06em; }
.cr-stats dd { margin: 0; font-family: var(--pixel-tc); font-size: 15px; color: var(--ink); -webkit-font-smoothing: none; }
.cr-stats dd b { font-family: var(--pixel-en); font-weight: 400; font-size: 14px; color: var(--rec-red); margin-right: 4px; }
.cr-ready { width: 100%; font-family: var(--pixel-tc); font-size: 16px; letter-spacing: .08em; padding: 13px 16px 12px; text-transform: none; }
.cr-ready span { font-family: var(--pixel-en); font-size: 10px; margin-left: 6px; }
.cr-ready:focus-visible, .cr-tile:focus-visible { outline: none; }
.cr-ready:focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--brass-light); }

.cr-panel__cta { font-size: 13px; color: var(--brass-deep); }
.cr-panel.is-preview .cr-panel__face canvas { filter: saturate(.85); }

/* ---------- VS view ---------- */
.vs-title {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--pixel-tc);
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: .08em;
  color: var(--ink);
  -webkit-font-smoothing: none;
}
.vs-title__n { display: inline-block; max-width: 100%; }
.vs-title.is-long { font-size: clamp(16px, 2vw, 22px); }
.vs-title i { font-style: normal; color: var(--rec-red); font-family: var(--pixel-en); font-size: .7em; margin: 0 .5em; vertical-align: .12em; }

.vs-cabinet {
  max-width: 780px;   /* 電腦：舞台＋播放器＋「聽完整首」一個畫面內看得到 */
  margin: 0 auto;
  background: var(--ink);
  padding: 8px;
  box-shadow:
    0 0 0 var(--px) var(--brass-deep),
    0 0 0 calc(var(--px) * 2) var(--ink),
    10px 10px 0 calc(var(--px) * 2) var(--paper-edge);
}
/* HUD 疊在舞台上方：90 年代街機格鬥的通用語言（粗黑框血條＋拖紅殘量＋中間大顆倒數），不照任何一款遊戲 */
.vs-hud {
  position: absolute;
  z-index: 3;
  top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px 16px 0;
  line-height: 1.2;
  pointer-events: none;
}
.vs-side { min-width: 0; }
.vs-side--r { text-align: right; }
.hp {
  position: relative;
  height: 30px;
  background: linear-gradient(#6e140e 0 30%, #4a0a07 30% 100%);   /* 底色：深紅 */
  border: 4px solid #0b0705;                                         /* 黑色粗外框 */
  box-shadow: 0 4px 0 rgba(0,0,0,.45);
  overflow: hidden;
}
.hp::after {                                                         /* 內側一圈亮邊（蓋在血量上面） */
  content: "";
  position: absolute; inset: 0;
  border: 2px solid #fff4cf;
  box-shadow: inset 0 0 0 1px rgba(11,7,5,.55);
  pointer-events: none;
}
.hp__trail, .hp__fill { position: absolute; top: 0; bottom: 0; width: 100%; will-change: transform; }
/* 兩條都往外側掉：左條靠左錨定、右條靠右錨定，缺口從中間那端長出來 */
.vs-side--l .hp__trail, .vs-side--l .hp__fill { left: 0; transform-origin: left center; }
.vs-side--r .hp__trail, .vs-side--r .hp__fill { right: 0; transform-origin: right center; }
.hp__trail {                                                         /* 紅色殘量：先停一下，再慢慢縮 */
  background: linear-gradient(#ff7a52 0 28%, #e0331d 28% 72%, #a81d10 72% 100%);
  transition: transform .9s linear .5s;
}
.hp__fill {                                                          /* 目前血量：亮黃，被打瞬間扣掉 */
  background: linear-gradient(#fff6b0 0 26%, #ffd21f 26% 70%, #d69a0c 70% 100%);
  transition: none;
}
.vs-name {
  margin-top: 6px;
  padding: 3px 4px;
  font-family: var(--pixel-tc);
  font-size: 17px;
  letter-spacing: .08em;
  color: #fff4cf;
  -webkit-font-smoothing: none;
  text-shadow:
    2px 0 0 #0b0705, -2px 0 0 #0b0705, 0 2px 0 #0b0705, 0 -2px 0 #0b0705,
    2px 2px 0 #0b0705, -2px 2px 0 #0b0705, 2px -2px 0 #0b0705, -2px -2px 0 #0b0705,
    3px 4px 0 rgba(0,0,0,.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-timer {
  min-width: 2.4em;
  text-align: center;
  margin-top: -4px;
  font-family: var(--pixel-en);
  font-size: 38px;
  line-height: 1;
  color: #ffe9a3;
  text-shadow:
    3px 0 0 #0b0705, -3px 0 0 #0b0705, 0 3px 0 #0b0705, 0 -3px 0 #0b0705,
    3px 3px 0 #0b0705, -3px 3px 0 #0b0705, 3px -3px 0 #0b0705, -3px -3px 0 #0b0705,
    5px 6px 0 rgba(0,0,0,.5);
}
.vs-timer.is-low { color: #ff8a66; animation: vs-timer-blink .5s steps(1) infinite; }
@keyframes vs-timer-blink { 50% { opacity: .2; } }

/* 舞台背景：耗耗核可的巷口圖（不要再調色）。圖是 3:2，舞台也 3:2；手機 4:3，左右裁、以中間偏左為主 */
.vs-arena {
  position: relative;
  line-height: 0;
  background-color: #2a1f12;
  background-image: url("/credits/stage-alley.jpg");
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.vs-arena.is-nophoto { background-image: none; }
.vs-arena > canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: transparent;
}
.vs-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; line-height: 1.2; }

.vs-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--pixel-tc);
  font-size: clamp(14px, 2.6vw, 24px);
  color: #fff3c4;
  -webkit-font-smoothing: none;
  text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 3px 3px 0 var(--rec-red);
  animation: vs-pop .7s steps(7) forwards;
  white-space: nowrap;
}
@keyframes vs-pop {
  0%   { transform: translate(-50%, -30%) scale(.6); opacity: 1; }
  25%  { transform: translate(-50%, -70%) scale(1.15); }
  80%  { opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(1); opacity: 0; }
}
.vs-banner {
  position: absolute;
  left: 0; right: 0; top: 42%;
  transform: translateY(-50%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.vs-banner__en {
  font-family: var(--pixel-en);
  font-size: clamp(16px, 4.4vw, 40px);
  letter-spacing: .1em;
  color: #fff3c4;
  text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 5px 5px 0 var(--rec-red);
}
.vs-banner__zh {
  font-family: var(--pixel-tc);
  font-size: clamp(14px, 2.6vw, 22px);
  letter-spacing: .2em;
  color: var(--ink);
  background: #fff3c4;
  padding: 4px 12px 3px;
  box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 3px var(--brass-deep);
  -webkit-font-smoothing: none;
}
.vs-banner.is-in { animation: vs-banner .36s steps(4); }
@keyframes vs-banner { 0% { transform: translateY(-50%) scaleY(0); } 100% { transform: translateY(-50%) scaleY(1); } }

.vs-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin: 30px auto 0;
  max-width: 780px;
}
.vs-actions .btn { font-family: var(--pixel-tc); font-size: 15px; letter-spacing: .06em; text-transform: none; padding: 12px 18px 11px; width: auto; }
.vs-dna { color: var(--quest); }
.vs-actions .btn:focus-visible, .cr-bar__home:focus-visible { outline: 3px solid var(--brass-light); outline-offset: 3px; }

.vs-music { max-width: 640px; margin: 40px auto 0; }
.vs-music__head {
  margin: 0 0 16px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-weight: 400;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 8px;
}
.vs-music__en { font-family: var(--pixel-en); font-size: 13px; letter-spacing: .14em; color: var(--ink); text-shadow: 2px 2px 0 var(--brass-light); }
.vs-music__zh { font-family: var(--pixel-tc); font-size: 15px; color: var(--ink-soft); letter-spacing: .06em; }
/* 播放器在機台裡、緊貼舞台下方 */
.vs-player {
  margin-top: 8px;
  background: #1a130c;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  min-height: 152px;
}
.vs-player iframe { display: block; width: 100%; border: 0; }
.vs-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 4px 4px;
}
.vs-full__note { margin: 0; font-family: var(--pixel-tc); font-size: 13px; letter-spacing: .04em; color: #cdb98d; }
.vs-full .btn.vs-full__btn {
  font-family: var(--pixel-tc); font-size: 14px; letter-spacing: .06em; text-transform: none;
  padding: 10px 14px 9px; width: auto; margin: 0 4px 4px 0;
  box-shadow: var(--px) var(--px) 0 #000, inset -4px -4px 0 rgba(0,0,0,.18), inset 4px 4px 0 rgba(255,255,255,.18);
}

/* 開場：ROUND n → FIGHT!（自己的像素字樣式；FIGHT! 停著等歌出聲） */
.vs-intro {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.vs-intro span {
  font-family: var(--pixel-en);
  font-size: clamp(26px, 7vw, 64px);
  letter-spacing: .08em;
  line-height: 1;
  color: #fff4cf;
  text-shadow:
    4px 0 0 #0b0705, -4px 0 0 #0b0705, 0 4px 0 #0b0705, 0 -4px 0 #0b0705,
    4px 4px 0 #0b0705, -4px 4px 0 #0b0705, 4px -4px 0 #0b0705, -4px -4px 0 #0b0705,
    7px 7px 0 #1f5b8b;
}
.vs-intro.is-fight span { color: #ffd21f; font-size: clamp(34px, 9vw, 84px); text-shadow:
    4px 0 0 #0b0705, -4px 0 0 #0b0705, 0 4px 0 #0b0705, 0 -4px 0 #0b0705,
    4px 4px 0 #0b0705, -4px 4px 0 #0b0705, 4px -4px 0 #0b0705, -4px -4px 0 #0b0705,
    8px 8px 0 #b83a2a; }
.vs-intro span.is-pop { animation: vs-intro-pop .32s steps(4); }
@keyframes vs-intro-pop { 0% { transform: scale(2.4); opacity: 0; } 50% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1); } }

/* 0 秒：K.O.（自己的像素字樣式）＋閃白＋震動 */
.vs-ko {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.vs-ko span {
  font-family: var(--pixel-en);
  font-size: clamp(34px, 9vw, 84px);
  letter-spacing: .08em;
  line-height: 1;
  color: #fff4cf;
  text-shadow:
    4px 0 0 #0b0705, -4px 0 0 #0b0705, 0 4px 0 #0b0705, 0 -4px 0 #0b0705,
    4px 4px 0 #0b0705, -4px 4px 0 #0b0705, 4px -4px 0 #0b0705, -4px -4px 0 #0b0705,
    8px 8px 0 #b83a2a;
  animation: vs-ko-in .3s steps(3);
}
@keyframes vs-ko-in { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.vs-arena.is-ko { animation: vs-shake .42s steps(6); }
.vs-arena.is-ko::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: #fff8e0; animation: vs-flash .38s steps(3) forwards;
}
@keyframes vs-shake {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6px, 3px); } 33% { transform: translate(5px, -4px); }
  50% { transform: translate(-4px, 2px); } 67% { transform: translate(3px, -2px); } 83% { transform: translate(-2px, 1px); } 100% { transform: translate(0, 0); }
}
@keyframes vs-flash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* 勝利畫面：整個舞台換成黑底 */
.vs-win {
  position: absolute; inset: 0; z-index: 7;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 100%;
  align-items: center;
  gap: 4%;
  padding: 5% 6%;
  background: #0b0705;
  line-height: 1.3;
  animation: vs-win-in .3s steps(3);
}
@keyframes vs-win-in { 0% { opacity: 0; } 100% { opacity: 1; } }
.vs-win.is-duo { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.vs-win__stage {
  height: 100%;
  min-height: 0;
  display: flex; align-items: flex-end; justify-content: center;
  border-bottom: 4px solid #3a2c1a;      /* 站的地板 */
  box-shadow: 0 4px 0 #1a130c;
}
.vs-win__char {
  width: 100%;
  height: 94%;
  object-fit: contain;
  object-position: 50% 100%;     /* 腳踩在地板上 */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: vs-win-bounce .9s steps(1) infinite;
}
@keyframes vs-win-bounce { 0% { transform: translateY(0); } 25% { transform: translateY(-6%); } 50% { transform: translateY(0); } 75% { transform: translateY(-3%); } }
.vs-win__info { min-width: 0; }
.vs-win__title { margin: 0 0 10px; color: #fff4cf; -webkit-font-smoothing: none; }
.vs-win__name {
  display: block;
  font-family: var(--pixel-tc);
  font-size: clamp(18px, 3.6vw, 34px);
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.vs-win__seg { display: inline-block; max-width: 100%; word-break: keep-all; overflow-wrap: normal; }   /* 段內只在空白處換行，不把「米咻」拆開 */
.vs-win__name.is-long { font-size: clamp(14px, 2.6vw, 24px); }
.vs-win__en {
  display: block;
  margin-top: 8px;
  font-family: var(--pixel-en);
  font-weight: 400;
  font-size: clamp(22px, 5.4vw, 52px);
  color: #ffd21f;
  text-shadow: 4px 4px 0 #b83a2a;
}
.vs-win__song {
  margin: 0 0 16px;
  font-family: var(--pixel-tc);
  font-size: clamp(12px, 1.8vw, 17px);
  color: #cdb98d;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.vs-win__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.vs-win .btn.vs-win__btn {
  font-family: var(--pixel-tc); font-size: clamp(12px, 1.7vw, 15px); letter-spacing: .06em; text-transform: none;
  padding: 10px 14px 9px; width: auto; margin: 0 4px 4px 0;
  box-shadow: var(--px) var(--px) 0 #000, inset -4px -4px 0 rgba(0,0,0,.18), inset 4px 4px 0 rgba(255,255,255,.18);
}

/* 還沒播放：舞台中央的提示 */
.vs-prompt {
  position: absolute;
  z-index: 4;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 9px;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  font-family: var(--pixel-tc);
  font-size: clamp(14px, 2.2vw, 20px);
  line-height: 1.3;
  letter-spacing: .08em;
  color: #fff4cf;
  background: rgba(11,7,5,.82);
  box-shadow: 0 0 0 3px #0b0705, inset 0 0 0 2px #ffd21f, 5px 5px 0 3px rgba(0,0,0,.35);
  -webkit-font-smoothing: none;
  pointer-events: none;
}
.vs-prompt__arrow { color: #ffd21f; animation: cr-blink-o 1s steps(1) infinite; }
/* 暫停＝定格：連特效動畫一起停 */
.vs-arena.is-paused .vs-fx *, .vs-arena.is-paused .vs-timer { animation-play-state: paused; }

.vs-songs { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.vs-song {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 3px var(--paper-edge);
  margin: 3px;
  width: calc(100% - 10px);
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.vs-song:hover { background: var(--paper); }
.vs-song:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--brass-light); }
.vs-song[aria-current="true"] { background: #f1d27a; }
.vs-song__no { font-family: var(--pixel-en); font-size: 11px; color: var(--ink-mute); }
.vs-song[aria-current="true"] .vs-song__no { color: var(--rec-red); }
.vs-song__title { font-family: var(--pixel-tc); font-size: 17px; letter-spacing: .04em; -webkit-font-smoothing: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-song__state { font-family: var(--pixel-tc); font-size: 12px; color: var(--ink-mute); white-space: nowrap; }
.vs-song[aria-current="true"] .vs-song__state { color: var(--ink); }
.vs-song__roles { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px; }
.vs-role {
  font-family: var(--pixel-tc);
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px 3px;
  color: var(--paper);
  background: var(--quest);
  -webkit-font-smoothing: none;
}
.vs-role--lead { background: var(--brass-deep); }

.cr-foot { position: relative; z-index: 2; }
.cr-noscript { font-family: var(--pixel-tc); text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .cr-stage { grid-template-columns: 1fr; grid-template-areas: "panel" "board"; gap: 22px; }
  .cr-panel {
    top: 46px;
    z-index: 20;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "tag tag" "face info" "btn btn";
    gap: 8px 14px;
    padding: 10px 12px 12px;
    box-shadow:
      0 0 0 var(--px) var(--ink),
      0 0 0 calc(var(--px) * 2) var(--paper),
      0 0 0 calc(var(--px) * 3) var(--ink),
      6px 6px 0 calc(var(--px) * 3) var(--paper-edge);
  }
  .cr-panel__hint { font-size: 13px; line-height: 1.6; }
  .cr-stats dt, .cr-stats dd { font-size: 13px; }
  .cr-ready { padding: 11px 14px 10px; }
  .cr-panel__tag { grid-area: tag; }
  .cr-panel__face { grid-area: face; padding: 4px; }
  .cr-panel__info { grid-area: info; min-width: 0; display: grid; gap: 6px; align-content: center; }
  .cr-panel__ready { grid-area: btn; }
  .cr-panel__name { font-size: 21px; }
  .cr-panel__name.is-long { font-size: 16px; }
  .cr-panel__face.has-body { background: #3a2c1a; }
  .cr-panel__face.has-body .cr-panel__head { display: block; }
  .cr-panel__face.has-body .cr-panel__bodies { display: none; }
  .cr-panel__face--empty span { font-size: 26px; }
  .cr-stats > div { grid-template-columns: 5em minmax(0, 1fr); gap: 6px; }
  .cr-panel__songs { display: none; }
}
@media (max-width: 600px) {
  .cr-main { padding: 26px 16px 48px; }
  .cr-head { margin-bottom: 20px; }
  .cr-grid { --tile: 46px; gap: 2px; padding: 4px; }
  .cr-tile.is-cursor::after, .cr-tile.is-locked::after { inset: -4px; border-width: 3px; }
  .cr-strip { margin-top: 18px; }
  .cr-strip__name { font-size: 16px; }
  .cr-bar__home { font-size: 12px; }
  .cr-bar .console-bar__brand, .cr-bar .console-bar__sep { display: none; }
  .cr-bar .console-bar__ver { display: inline; font-size: 8px; }
  .cr-grid { margin: 8px 8px 8px; box-shadow: 0 0 0 var(--px) var(--brass-deep), 0 0 0 calc(var(--px) * 2) var(--ink), 5px 5px 0 calc(var(--px) * 2) var(--paper-edge); }
  .vs-hud { gap: 8px; padding: 8px 8px 0; }
  .hp { height: 16px; border-width: 3px; }
  .hp::after { border-width: 1px; box-shadow: none; }
  .vs-name {
    font-size: 13px; margin-top: 3px; padding: 2px 3px;
    text-shadow:
      1px 0 0 #0b0705, -1px 0 0 #0b0705, 0 1px 0 #0b0705, 0 -1px 0 #0b0705,
      1px 1px 0 #0b0705, -1px 1px 0 #0b0705, 1px -1px 0 #0b0705, -1px -1px 0 #0b0705,
      2px 2px 0 rgba(0,0,0,.5);
  }
  .vs-timer { font-size: 22px; margin-top: -2px; }
  .vs-arena { background-image: url("/credits/stage-alley-768.jpg"); background-position: 38% 50%; }
  .vs-arena > canvas { aspect-ratio: 4 / 3; }
  .vs-cabinet { padding: 5px; margin: 0 8px; box-shadow: 0 0 0 var(--px) var(--brass-deep), 0 0 0 calc(var(--px) * 2) var(--ink), 5px 5px 0 calc(var(--px) * 2) var(--paper-edge); }
  .vs-actions { gap: 14px; }
  .vs-actions .btn { width: 100%; }
  .vs-player { margin-top: 5px; }
  .vs-full { padding: 8px 2px 2px; }
  .vs-full .btn.vs-full__btn { width: calc(100% - 8px); }
  .vs-full__note { font-size: 12px; }
  .vs-win { padding: 4% 4%; gap: 3%; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .vs-win.is-duo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .vs-win__title { margin-bottom: 6px; }
  .vs-win__en { margin-top: 4px; text-shadow: 3px 3px 0 #b83a2a; }
  .vs-win__song { margin-bottom: 10px; }
  .vs-win__btns { gap: 8px; flex-direction: column; align-items: flex-start; }
  .vs-win .btn.vs-win__btn { padding: 8px 10px 7px; width: auto; }
  .vs-song { padding: 11px 12px; grid-template-columns: 30px minmax(0, 1fr) auto; }
  .vs-song__title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cr-tile.is-cursor::after, .cr-strip__arrow, .cr-panel__face--empty span { animation: none; }
  .cr-panel.is-locked .cr-panel__face, .vs-banner.is-in, .vs-pop, .vs-prompt__arrow { animation: none; }
  .vs-ko span, .vs-arena.is-ko, .vs-arena.is-ko::after, .vs-win, .vs-win__char, .vs-intro span.is-pop { animation: none; }
  .vs-arena.is-ko::after { display: none; }
  .hp__trail, .hp__fill { transition: none; }
  .vs-timer.is-low { animation: none; }
}

/* =========================================================
   角色標籤（2026-11-30：「巷弄在這首做了什麼」當主角）
   製作類＝銅棕底；詞曲演唱類＝藍底。字型沿用 Cubic 11
   ========================================================= */
.role-chips { display: flex; flex-wrap: wrap; gap: 7px 7px; padding: 2px; }
.role-chip {
  display: inline-block;
  font-family: var(--pixel-tc);
  font-size: 13px;
  line-height: 1;
  letter-spacing: .06em;
  padding: 5px 7px 4px;
  color: #fff4cf;
  background: var(--brass-deep);
  box-shadow: 0 0 0 2px var(--ink), 2px 2px 0 2px rgba(42,31,18,.35);
  -webkit-font-smoothing: none;
  white-space: nowrap;
}
.role-chip--write { background: var(--quest); }
.role-chips--sm { gap: 6px; }
.role-chips--sm .role-chip { font-size: 12px; padding: 4px 6px 3px; box-shadow: 0 0 0 2px var(--ink); }
.role-chips--lg { gap: 9px 10px; }
.role-chips--lg .role-chip { font-size: 16px; padding: 7px 10px 6px; box-shadow: 0 0 0 2px #0b0705, inset 0 2px 0 rgba(255,255,255,.16), 3px 3px 0 2px rgba(0,0,0,.45); }

/* 選歌手面板：合作幾首＋角色聯集 */
.cr-panel__count { margin: 2px 0 0; font-family: var(--pixel-tc); font-size: 15px; color: var(--ink-soft); letter-spacing: .06em; -webkit-font-smoothing: none; }
.cr-panel__count b { font-family: var(--pixel-en); font-weight: 400; font-size: 18px; color: var(--rec-red); margin: 0 2px; }
.cr-panel__roles { display: grid; gap: 6px; margin-top: 2px; }
.cr-panel__roles-label { font-family: var(--pixel-tc); font-size: 12px; color: var(--ink-mute); letter-spacing: .08em; }

/* 對戰畫面正下方：「這首巷弄做了：」 */
.vs-did {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 8px;
  padding: 12px 12px 12px 14px;
  background: #1a130c;
  box-shadow: inset 0 0 0 2px #3a2c1a;
}
.vs-did__label { font-family: var(--pixel-tc); font-size: 15px; letter-spacing: .06em; color: #ffd21f; -webkit-font-smoothing: none; white-space: nowrap; }

/* 勝利畫面：歌名下面一排角色 */
.vs-win__chips { margin: -6px 0 16px; }
.vs-win__chips:empty { display: none; }
.vs-win__chips .role-chip { font-size: 14px; }

@media (max-width: 600px) {
  .vs-did { padding: 10px; gap: 8px; margin-top: 5px; }
  .vs-did__label { font-size: 14px; width: 100%; }
  .role-chips--lg { gap: 8px; }
  .role-chips--lg .role-chip { font-size: 14px; padding: 6px 8px 5px; }
  .cr-panel__count { font-size: 14px; }
  .role-chip { font-size: 12px; padding: 4px 6px 3px; }
  .vs-win__chips { margin: -2px 0 10px; }
  .vs-win__chips .role-chip { font-size: 11px; padding: 3px 5px 2px; }
}
