/* watch.css — the "look up" screens: reveal, fight, winner, results. */

.watch {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #0d0c11;
  overflow: hidden;
  z-index: 1;
}
.watch-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 64px 8px 12px; /* the app's menu button lives in the top-right corner */
  min-height: 60px;
  background: linear-gradient(#1b1a21, #141319);
  border-bottom: 3px solid #000;
  flex-wrap: wrap;
  position: relative;
  z-index: 3;
}
.watch-top .grow { flex: 1; }
.skip-btn { min-height: 38px; font-size: 16px; padding: 4px 12px; }

.audio-pill {
  appearance: none;
  border: 2px solid #000;
  border-radius: 999px;
  background: var(--panel2);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-pill.on { background: var(--ok); color: #031a05; }

.confetti-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

/* ── reveal ─────────────────────────────────────────────────────────────── */
.rv-body { flex: 1; display: flex; min-height: 0; }
.rv-stage { position: relative; flex: 1.35; min-width: 0; min-height: 0; background: #121118; border-right: 3px solid #000; }
.rv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rv-test-label { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: clamp(22px, 4vw, 40px); pointer-events: none; }
.rv-test-label .stamp { display: inline-block; animation: slam 0.45s cubic-bezier(0.2, 1.4, 0.5, 1) both, wobble 1.6s 0.5s ease-in-out infinite; }
.rv-sheet {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vh, 14px);
  padding: clamp(10px, 2.2vh, 26px) clamp(12px, 2.5vw, 30px);
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px),
    #1a1920;
}
.rv-row { display: flex; align-items: center; gap: 12px; }
.rv-namebox { margin-bottom: 4px; }
.rv-name { font-size: clamp(40px, 7.5vw, 110px); word-break: break-word; }
.rv-label {
  flex: none;
  background: var(--hazard);
  color: #111;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: clamp(13px, 1.7vw, 22px);
  padding: 3px 10px;
  border: 2px solid #000;
  transform: rotate(-1.5deg);
  min-width: 7.5em;
  text-align: center;
}
.rv-value { font-family: var(--font-display); font-size: clamp(22px, 3.6vw, 52px); line-height: 1; text-transform: uppercase; }
.rv-desc { color: var(--ink-dim); font-size: clamp(13px, 1.5vw, 20px); margin-top: 2px; }
.rv-thumb { width: clamp(46px, 7vw, 96px) !important; height: clamp(46px, 7vw, 96px) !important; transform: rotate(2deg); }
.rv-credits { margin-top: auto; }
.rv-summary { display: none; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-credits .rv-label { display: inline-block; margin-bottom: 6px; }
.rv-credit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; font-size: clamp(12px, 1.5vw, 19px); }
.rv-credit { display: flex; gap: 6px; justify-content: space-between; border-bottom: 1px dashed var(--line); overflow: hidden; white-space: nowrap; }
.rv-credit b { overflow: hidden; text-overflow: ellipsis; }
.rv-hide { visibility: hidden; }
.rv-in { animation: rv-in 0.42s cubic-bezier(0.2, 1.3, 0.5, 1) both; }
.rv-namebox.rv-in { animation: slam 0.5s cubic-bezier(0.2, 1.4, 0.5, 1) both; }
@keyframes rv-in { 0% { transform: translateX(60px) scale(1.25); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rv-testing .rv-desc { display: none; }
.rv-testing .rv-thumb { width: 44px !important; height: 44px !important; }
.rv-testing .rv-name { font-size: clamp(32px, 5vw, 80px); }

@media (max-aspect-ratio: 1/1) {
  .rv-body { flex-direction: column; }
  .rv-stage { flex: none; height: 42%; border-right: none; border-bottom: 3px solid #000; }
  .rv-testing .rv-stage { height: 48%; }
  .rv-name { font-size: clamp(36px, 12vw, 80px); }
  .rv-label { font-size: 14px; }
  .rv-value { font-size: clamp(20px, 6vw, 36px); }
  .rv-desc { font-size: 14px; }
  .rv-thumb { width: 54px !important; height: 54px !important; }
  .rv-credit-list { font-size: 13px; }
  .rv-testing .rv-row:not(.rv-namebox) { display: none; }
  .rv-testing .rv-summary { display: flex; }
  .rv-testing .rv-credits { margin-top: 4px; }
}

/* short landscape screens (phones on their side) */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .watch-top { min-height: 60px; padding: 4px 64px 4px 10px; }
  .rv-sheet { gap: 5px; padding: 8px 14px; }
  .rv-name { font-size: clamp(26px, 12vh, 60px); }
  .rv-value { font-size: clamp(16px, 7vh, 32px); }
  .rv-thumb { width: 11vh !important; height: 11vh !important; }
  .rv-label { font-size: 12px; min-width: 6.5em; padding: 2px 8px; }
  .rv-desc { display: none; }
  .rv-credit-list { font-size: 11px; }
  .rv-testing .rv-row:not(.rv-namebox) { display: none; }
  .rv-testing .rv-summary { display: flex; }
  .fight-roster { padding: 3px 64px; gap: 4px; min-height: 60px; }
  .ros-thumb { width: 24px !important; height: 24px !important; }
  .ros-name { font-size: 12px; }
}

/* ── fight / winner ─────────────────────────────────────────────────────── */
.fight-roster {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px 64px;
  min-height: 60px;
  align-items: center;
  background: #141319;
  border-bottom: 3px solid #000;
  z-index: 2;
}
.ros-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 2px solid #000;
  border-radius: 10px;
  padding: 3px 8px 3px 3px;
  min-width: 0;
  transition: opacity 0.4s, filter 0.4s;
}
.ros-item.dead { opacity: 0.4; filter: grayscale(1); }
.ros-item.dead .ros-name { text-decoration: line-through; }
.ros-thumb { width: 34px !important; height: 34px !important; border-width: 2px; border-radius: 7px; }
.ros-info { display: flex; flex-direction: column; gap: 3px; min-width: 64px; }
.ros-name { font-family: var(--font-display); font-size: 15px; line-height: 1; letter-spacing: 0.03em; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.ros-bar { height: 6px; background: #000; border-radius: 3px; overflow: hidden; }
.ros-bar-fill { height: 100%; width: 100%; background: var(--ok); transition: width 0.15s linear; }
.fight-canvas { flex: 1; width: 100%; min-height: 0; display: block; }
.fight-overlay { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; z-index: 5; }
.fo-center { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 16px; }
.fo-enter { font-size: clamp(36px, 8vw, 110px); }
.fo-leave { font-size: clamp(24px, 5vw, 64px); }
.fo-chip { font-size: 16px; background: var(--danger); color: #1a0500; }
.fo-count {
  font-family: var(--font-display);
  font-size: clamp(120px, 38vmin, 360px);
  color: var(--paper);
  line-height: 1;
  text-shadow: 0 8px 0 #000, 6px 6px 0 #000, -4px 6px 0 #000;
}
.fo-fight {
  font-family: var(--font-display);
  font-size: clamp(90px, 26vmin, 280px);
  color: var(--danger);
  line-height: 1;
  text-shadow: 0 8px 0 #000, 6px 6px 0 #000, -4px 6px 0 #000;
}
.fo-winner {
  background: radial-gradient(circle, rgba(13, 12, 17, 0.9) 0%, rgba(13, 12, 17, 0.75) 60%, rgba(13, 12, 17, 0) 100%);
  padding: 30px 40px;
  border-radius: 40px;
}
.fo-crown { font-size: clamp(40px, 9vmin, 90px); animation: slam 0.5s both, wobble 1.4s 0.5s ease-in-out infinite; }
.fo-win-art { width: clamp(120px, 34vmin, 260px) !important; height: clamp(120px, 34vmin, 260px) !important; transform: rotate(-3deg); box-shadow: var(--shadow); animation: pulse 1.4s ease-in-out infinite; }
.fo-win-name { font-size: clamp(44px, 11vw, 140px); }
.fo-sub { font-size: clamp(16px, 2.6vw, 30px); color: var(--ink-dim); font-weight: 700; }
.fight-bottom { position: absolute; left: 0; right: 0; bottom: calc(8px + var(--safe-b)); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; pointer-events: none; z-index: 6; }
.fight-bottom > * { pointer-events: auto; }
.rotate-hint { background: rgba(0, 0, 0, 0.7); color: var(--ink-dim); border: 2px solid #000; border-radius: 999px; font-size: 13px; font-weight: 700; padding: 5px 12px; animation: pulse 2s ease-in-out infinite; }

/* ── results ────────────────────────────────────────────────────────────── */
.results { background: var(--bg); }
.res-dots { display: flex; gap: 6px; }
.res-dot { width: 12px; height: 12px; border-radius: 50%; background: #000; border: 2px solid var(--line); }
.res-dot.done { background: var(--ink-faint); }
.res-dot.on { background: var(--hazard); border-color: #000; transform: scale(1.2); }
.res-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.aw-card {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(12px, 3vh, 36px) 16px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.aw-kicker { color: var(--ink-faint); font-weight: 800; letter-spacing: 0.12em; font-size: 14px; }
.aw-title { font-size: clamp(42px, 8vw, 120px); }
.aw-main { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 40px); flex-wrap: wrap; }
.aw-thumb { width: clamp(110px, 20vmin, 200px) !important; height: clamp(110px, 20vmin, 200px) !important; transform: rotate(-3deg); box-shadow: var(--shadow); }
.aw-info { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; max-width: 520px; }
.aw-subject { font-size: clamp(30px, 5.5vw, 76px); text-shadow: 0 4px 0 #000; word-break: break-word; }
.aw-text { font-size: clamp(18px, 2.6vw, 34px); font-weight: 800; }
.aw-replay-box { position: relative; width: min(100%, 980px); aspect-ratio: 16 / 8.6; border: 3px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #0d0c11; }
.aw-replay { width: 100%; height: 100%; display: block; }
.aw-replay-tag { position: absolute; top: 8px; left: 8px; background: var(--danger); color: #1a0500; font-family: var(--font-display); letter-spacing: 0.06em; padding: 2px 10px; border: 2px solid #000; border-radius: 6px; animation: pulse 1.2s ease-in-out infinite; }
@media (min-aspect-ratio: 16/10) and (min-width: 900px) {
  .aw-card.with-replay { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; text-align: left; justify-items: start; }
  .aw-card.with-replay .aw-kicker, .aw-card.with-replay .aw-title { grid-column: 1 / -1; justify-self: center; }
  .aw-card.with-replay .aw-main { flex-direction: column; align-items: flex-start; }
  .aw-card.with-replay .aw-replay-box { grid-column: 2; grid-row: 3; }
  .aw-card.with-replay .aw-main { grid-column: 1; grid-row: 3; }
}

.gallery { max-width: 1400px; margin: 0 auto; padding: 16px 16px calc(40px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.shift-panel { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.shift-panel h1 { font-size: clamp(38px, 7vw, 80px); }
.shift-winner { font-weight: 800; color: var(--hazard); font-size: 18px; }
.shift-btns { gap: 12px; }
.shift-wait { font-size: 17px; }
.gal-title { text-align: center; font-size: clamp(26px, 5vw, 48px); margin-top: 6px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.mcard {
  --mc: var(--hazard);
  background: var(--panel);
  border: 3px solid #000;
  border-top: 10px solid var(--mc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mcard.won { box-shadow: 0 0 0 4px var(--hazard), var(--shadow); }
.mc-head { display: flex; align-items: center; gap: 8px; justify-content: center; }
.mc-crown { font-size: 28px; }
.mc-name { font-size: 34px; color: var(--mc); text-shadow: 0 3px 0 #000; word-break: break-word; text-align: center; }
.mc-art { display: flex; justify-content: center; align-items: center; min-height: 160px; }
.mc-thumb { cursor: pointer; transform: rotate(-2deg); }
.mc-anim { width: 100%; aspect-ratio: 16 / 9.5; display: block; border: 3px solid #000; border-radius: 10px; background: #0d0c11; }
.mc-btns { gap: 6px; }
.mc-btns .btn { font-size: 15px; min-height: 38px; padding: 4px 10px; }
.mc-spec { display: flex; flex-direction: column; gap: 8px; }
.mc-line { display: flex; align-items: center; gap: 10px; }
.mc-mini { width: 48px !important; height: 48px !important; border-width: 2px; flex: none; }
.mc-k { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.mc-v { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.03em; line-height: 1.05; }
.mc-d { font-size: 13px; color: var(--ink-dim); }
.mc-trait { padding-left: 2px; }
.mc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; background: #1d1b24; border: 2px solid #000; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.mc-stat { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px dashed var(--line); }
.mc-stat b { font-family: var(--font-display); font-weight: 400; font-size: 17px; letter-spacing: 0.03em; }
.mc-credits { font-size: 14px; }
.fo-winner h2.fo-sub { font-weight: 400; }
