/* =====================================================================================
   W68 POLISH (the 0.9.5 "make it smooth" pass - docs/notes/W68-polish.md).
   One stylesheet, linked LAST in <head> so a same-specificity rule here wins over the inline
   <style> block, hud.css and home.css without anyone else's file being edited. Presentation
   only: nothing here can move a fight, a reward or a save.
   Every animation below has a calm version: `body.cc-rm` (the engine sets it for SETTINGS ->
   REDUCED MOTION and for the OS preference) and the paired @media query (the pre-boot fallback).
   Sections:
     1  boot cover (H1)                       9  result card chest row (M7)
     2  press squish on every control (F1)     10 thumb-sized hit boxes (M8)
     3  cards that pop in and out (F4)         11 SETTINGS lower rows (M12, L3)
     4  top BACK pill + header scrim (F7, L2)  12 small copy/size fixes (L4-L8)
     5  battle HUD fixes (M1, M6, L8)          13 floats: refusal reasons, +1, coins (F8, F10, F29)
     6  beta welcome card (M5)                 14 wheel, carousel, season pass (F11, F12, F28, F41)
     7  leave-this-run card (H2)               15 toast queue (F13), tap-to-skip (F30)
     8  tap-to-see HUD chips (F20)
   ===================================================================================== */

/* ---------------------------------------------------------------- 1 BOOT COVER (H1, F2)
   #ccBoot is the first child of <body> (inline-styled so it paints even before this sheet),
   lifted by public/js/polish.js once every boot script has run. While it stands, the legacy
   #menu underneath (its old yellow button list) never shows. */
#ccBoot{position:fixed;inset:0;z-index:2147483000;background:#1b1430;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:22px;transition:opacity .18s ease-out;}
#ccBoot img{width:min(250px,68vw);height:auto;filter:drop-shadow(0 6px 0 rgba(0,0,0,.35));}
#ccBoot .ccBootInk{display:flex;gap:9px;}
#ccBoot .ccBootInk i{width:11px;height:11px;border-radius:50%;background:#ffd23f;border:2px solid #0d0920;
  animation:ccBootDot 900ms ease-in-out infinite;}
#ccBoot .ccBootInk i:nth-child(2){animation-delay:150ms;}
#ccBoot .ccBootInk i:nth-child(3){animation-delay:300ms;}
@keyframes ccBootDot{0%,80%,100%{transform:scale(.55);opacity:.45;}40%{transform:scale(1);opacity:1;}}
#ccBoot.ccBootOut{opacity:0;pointer-events:none;}
@media (prefers-reduced-motion:reduce){#ccBoot .ccBootInk i{animation:none;opacity:.8;}#ccBoot{transition:none;}}
body.cc-rm #ccBoot .ccBootInk i{animation:none;opacity:.8;}
body.cc-rm #ccBoot{transition:none;}

/* ---------------------------------------------------------------- 2 PRESS SQUISH (F1, M9)
   Every control dips a little when pressed. The whole selector is inside :where(), so it has
   ZERO specificity: any existing press rule, filter or transform on a control still wins, and
   the independent `scale` property composes with (never replaces) a control's own transform.
   REDUCED MOTION keeps the brightness dip only. */
:where(button,[role=button],.ch-card,.alCover,.tuCard,.abub,.whHub):where(:not(:disabled)){
  transition-property:scale,filter;transition-duration:80ms;transition-timing-function:ease-out;}
:where(button,[role=button],.ch-card,.alCover,.tuCard,.abub,.whHub):where(:not(:disabled)):where(:active){
  scale:.955;filter:brightness(.9);}
:where(canvas#cv,#cv){scale:none;}
@media (prefers-reduced-motion:reduce){
  :where(button,[role=button],.ch-card,.alCover,.tuCard,.abub,.whHub):where(:active){scale:none;}}
:where(body.cc-rm) :where(button,[role=button],.ch-card,.alCover,.tuCard,.abub,.whHub):where(:active){scale:none;}

/* ---------------------------------------------------------------- 3 CARDS POP IN AND OUT (F4, M4)
   IN: the card springs from .9 to 1 while the scrim fades - the same beat #pauseCard's pauseIn
   gives the pause card. OUT: polish.js keeps a closing overlay on screen for ~150 ms with
   .ccClosing (it is already .hidden, so every check the game makes sees it closed at once) and
   the card shrinks away; #netOv's card is emptied as it closes, so it leaves as a .ccGhost copy. */
@keyframes ccCardIn{0%{transform:scale(.9);opacity:0;}70%{transform:scale(1.02);opacity:1;}100%{transform:none;opacity:1;}}
@keyframes ccCardOut{to{transform:scale(.94);opacity:0;}}
@keyframes ccScrimIn{from{opacity:0;}to{opacity:1;}}
@keyframes ccScrimOut{from{opacity:1;}to{opacity:0;}}
@keyframes ccFadeIn{from{opacity:0;}to{opacity:1;}}
#netOv:not(.hidden),#checkinOv:not(.hidden),#vmOv:not(.hidden),#betaWelOv:not(.hidden),#rewroteOv:not(.hidden){
  animation:ccScrimIn 150ms ease-out both;}
#netOv:not(.hidden) #netCard,#checkinOv:not(.hidden) #checkinCard,#vmOv:not(.hidden) #vmCard,
#betaWelOv:not(.hidden) #betaWelCard,#rewroteOv:not(.hidden) #rewroteCard{
  animation:ccCardIn 210ms cubic-bezier(.2,.9,.3,1.15) both;}
/* Release the finished entrance's transform/opacity so the existing downward swipe can own them. */
#vmOv:not(.hidden) #vmCard,#chestRcptCard{animation-fill-mode:backwards;}
/* the exit: still laid out for one short beat, never tappable */
#checkinOv.hidden.ccClosing,#vmOv.hidden.ccClosing,#betaWelOv.hidden.ccClosing,#rewroteOv.hidden.ccClosing{
  display:flex !important;pointer-events:none !important;animation:ccScrimOut 150ms ease-in both;}
#checkinOv.ccClosing #checkinCard,#vmOv.ccClosing #vmCard,#betaWelOv.ccClosing #betaWelCard,#rewroteOv.ccClosing #rewroteCard{
  animation:ccCardOut 140ms ease-in both;}
.ccGhost{pointer-events:none !important;animation:ccScrimOut 150ms ease-in both;}
.ccGhost>.ccGhostCard{animation:ccCardOut 140ms ease-in both;}
@media (prefers-reduced-motion:reduce){
  #netOv #netCard,#checkinOv #checkinCard,#vmOv #vmCard,#betaWelOv #betaWelCard,#rewroteOv #rewroteCard{animation-name:ccFadeIn !important;animation-duration:120ms !important;}
  .ccGhost>.ccGhostCard,#checkinOv.ccClosing #checkinCard,#vmOv.ccClosing #vmCard,#betaWelOv.ccClosing #betaWelCard,#rewroteOv.ccClosing #rewroteCard{animation-name:ccScrimOut !important;}}
body.cc-rm #netOv #netCard,body.cc-rm #checkinOv #checkinCard,body.cc-rm #vmOv #vmCard,body.cc-rm #betaWelOv #betaWelCard,body.cc-rm #rewroteOv #rewroteCard{
  animation-name:ccFadeIn !important;animation-duration:120ms !important;}
body.cc-rm .ccGhost>.ccGhostCard,body.cc-rm #checkinOv.ccClosing #checkinCard,body.cc-rm #vmOv.ccClosing #vmCard,
body.cc-rm #betaWelOv.ccClosing #betaWelCard,body.cc-rm #rewroteOv.ccClosing #rewroteCard{animation-name:ccScrimOut !important;}

/* ---------------------------------------------------------------- 4 TOP BACK PILL + HEADER SCRIM (F7, M3, L2)
   .ccScrim sits in each screen's own stacking context (.screen is fixed, z 20) one step under the
   pill (z 60): a band that fades in once the screen has scrolled, so the pill reads on a clean
   ground and never on a line of text. */
.ccScrim{position:fixed;left:0;right:0;top:0;height:calc(52px + var(--sa-top,0px));z-index:59;pointer-events:none;
  background:linear-gradient(180deg,rgba(27,20,48,.97) 0%,rgba(27,20,48,.92) 62%,rgba(27,20,48,0) 100%);
  opacity:0;transition:opacity .16s ease-out;}
.screen.ccScrolled>.ccScrim{opacity:1;}
@media (prefers-reduced-motion:reduce){.ccScrim{transition:none;}}
body.cc-rm .ccScrim{transition:none;}
/* the pill itself: a fuller thumb target (paint unchanged: 36 px tall, the hit box 48) */
.topBack{position:fixed;}
.topBack::after{content:'';position:absolute;inset:-6px -6px -6px -8px;border-radius:999px;}

/* ---------------------------------------------------------------- 5 BATTLE HUD (M1, M6, L8)
   M1: in Clash and Co-op the #ccRivals row exists for the SHARED countdown (hud.css 6.3), but the
   one rival chip it builds sat exactly under it ("NEXT W[10]E IN 1"). The rival's lives already
   show on the rival pill and the board's heart, so the chip goes - unless it is CARRYING leftovers
   into the shared next wave, and then it prints that alone, just under the countdown. */
body.cc-hud[data-cc-mode="pvp"] #ccRivals .cc-rival,
body.cc-hud[data-cc-mode="coop"] #ccRivals .cc-rival{display:none;}
body.cc-hud[data-cc-mode="pvp"] #ccRivals .cc-rival:not([hidden]):has(.cc-rival-carry:not([hidden])),
body.cc-hud[data-cc-mode="coop"] #ccRivals .cc-rival:not([hidden]):has(.cc-rival-carry:not([hidden])){
  display:flex;position:absolute;left:50%;top:22px;transform:translateX(-50%);min-width:0;padding:0 7px;}
body.cc-hud[data-cc-mode="pvp"] #ccRivals .cc-rival .cc-rival-dot,body.cc-hud[data-cc-mode="pvp"] #ccRivals .cc-rival .cc-rival-n,
body.cc-hud[data-cc-mode="coop"] #ccRivals .cc-rival .cc-rival-dot,body.cc-hud[data-cc-mode="coop"] #ccRivals .cc-rival .cc-rival-n{display:none;}
body.cc-hud[data-cc-mode="pvp"] #ccRivals .cc-rival-carry,body.cc-hud[data-cc-mode="coop"] #ccRivals .cc-rival-carry{margin-left:0;}
/* M6: "BOSS IN 3" - the number IS the news, so the boss chip never ellipsizes; the twist chip
   (it has its own tap-to-read, section 8) takes whatever width is left. */
body.cc-hud .cc-boss{flex:0 0 auto;max-width:none;}
body.cc-hud .cc-boss-t{overflow:visible;text-overflow:clip;}
body.cc-hud .cc-mut{max-width:none;}
@media (max-height:700px){ body.cc-hud .cc-mut-name{max-width:none;} }
/* L8: the tray's long hero names had dropped to 6.6 px at 360 wide; the floor is 7.2 px now, with
   the letters pulled a little tighter so GRAVETAKER / WONDER LAD still fit their 58 px card. */
@media (max-height:700px){
  body.cc-hud #lineupBar .slot .nm.nmLong{font-size:7.2px;letter-spacing:-.35px;}
}

/* ---------------------------------------------------------------- 6 BETA WELCOME CARD (M5)
   Four short lines (BETA_WELCOME_NOTES) and an OK that is always in view: a sticky footer inside
   the card's own scroll, the same trick SEND FEEDBACK's SEND uses (W48). */
#bwOk{position:sticky;bottom:0;z-index:2;display:block;width:100%;min-height:46px;margin-top:6px;
  font-size:19px !important;padding:8px 16px !important;margin-bottom:4px;}
#betaWelCard .bwTitle{font-size:24px;}
#betaWelCard .bwList{font-size:12px;line-height:1.42;}
#betaWelCard .bwList li{margin:0 0 5px;}

/* ---------------------------------------------------------------- 9 RESULT CARD CHEST ROW (M7)
   One gold button (it goes to the chest vault - the chevron says so) and, under it, a plain
   caption instead of a second gold pill that looked like another button. */
#overChest button.resChestPill::after{content:'\203A';font-family:'Bangers',cursive;font-size:1.35em;line-height:.8;margin-left:6px;}
#overChest .resLvPill,#overPvp .resLvPill.resDoorHint{background:none !important;border:0 !important;box-shadow:none !important;
  color:#bdb3d8 !important;font-size:11px;font-weight:800;letter-spacing:.4px;padding:1px 6px 0;min-height:0;margin-top:2px;}
#overChest .resLvPill .ci,#overPvp .resLvPill.resDoorHint .ci{display:none;}

/* ---------------------------------------------------------------- 13 FLOATS (F8, F47)
   A short word that rises off a control and fades: WHY a tap was refused. */
.ccFloat{position:fixed;z-index:88;transform:translate(-50%,-100%);pointer-events:none;white-space:nowrap;
  display:inline-flex;align-items:center;gap:3px;padding:3px 9px;border-radius:10px;border:2px solid #1b1430;
  background:#ffd23f;color:#1b1430;font-family:'Bangers',cursive;font-size:15px;letter-spacing:.8px;line-height:1.1;
  box-shadow:0 3px 0 #1b1430;animation:ccFloatUp 1150ms cubic-bezier(.2,.8,.3,1) both;}
.ccFloat.ccFloatNo{background:#ff8787;color:#2a0f0f;}
.ccFloat.ccFloatSm{font-size:12px;padding:2px 6px;}
.ccFloat .ci{width:13px;height:13px;}
@keyframes ccFloatUp{0%{opacity:0;transform:translate(-50%,-70%) scale(.8);}14%{opacity:1;transform:translate(-50%,-100%) scale(1.06);}
  24%{transform:translate(-50%,-100%) scale(1);}72%{opacity:1;}100%{opacity:0;transform:translate(-50%,-150%);}}
@keyframes ccFloatCalm{0%,70%{opacity:1;}100%{opacity:0;}}
@media (prefers-reduced-motion:reduce){.ccFloat{animation-name:ccFloatCalm;transform:translate(-50%,-100%);}}
body.cc-rm .ccFloat{animation-name:ccFloatCalm;transform:translate(-50%,-100%);}

/* ---------------------------------------------------------------- 14 WHEEL, CAROUSEL, SEASON PASS (M11, F11, F12, F28, F41, L9)
   The hub is a real button now (it spins); the pointer clacks on every tick; a newly centred mode card
   settles with a small bounce; the pass opens on your own level and marks the next prize. */
#whHub{cursor:pointer;}
#whHub:focus-visible{outline:3px solid #fff8e7;outline-offset:3px;}
#wheelScr .whPin.ccClack{animation:ccClack 130ms ease-out;}
@keyframes ccClack{0%{transform:translateX(-50%) rotate(0);}35%{transform:translateX(-50%) rotate(-9deg);}100%{transform:translateX(-50%) rotate(0);}}
#chCarousel .ch-card.ccSettle{animation:ccSettle 240ms cubic-bezier(.2,1.4,.4,1);}
@keyframes ccSettle{0%{scale:1;}40%{scale:1.035;}100%{scale:1;}}
#passList .passRow.now{position:relative;box-shadow:0 0 0 2px #ffd23f,0 0 14px 2px rgba(255,210,63,.45);}
#passList .passRow.now::after{content:'NEXT';position:absolute;top:-8px;right:10px;padding:1px 7px;border-radius:7px;
  background:#ffd23f;color:#1b1430;border:2px solid #1b1430;font-family:'Bangers',cursive;font-size:11px;letter-spacing:1px;line-height:1.2;}
#passHead .pfPassTop{flex-wrap:wrap;row-gap:2px;}
#passHead .pfPassTop .pfPassNext{flex:1 0 100%;text-align:left;}

/* ---------------------------------------------------------------- 15 RESULT CARD: TAP TO SKIP (F30)
   Shown only while the tally runs; it fades the moment the buttons arrive. */
.ccSkipCap{position:absolute;left:0;right:0;bottom:4px;text-align:center;pointer-events:none;font-family:'Bangers',cursive;
  font-size:12px;letter-spacing:1.5px;color:rgba(255,248,231,.55);opacity:0;transition:opacity .25s ease;}
.ccSkipCap.on{opacity:1;}
.overCard{position:relative;}
/* a screen's own sticky header (LINEUP's count pill) rides above the scrim, beside the BACK pill */
.screen #lineupCount{z-index:61;}

/* ---------------------------------------------------------------- 11 SETTINGS: THE LOWER ROWS (M12, L3)
   The rows other waves place under the settings skin (.setRowW35/36/38: comic text, online, show me
   online, match emotes, online account, send feedback, beta info, privacy) wore an older style -
   plain-font labels, a tiny ON chip, ~9 px READ buttons. They now read like the skin's own rows:
   Bangers labels, a 24 px icon, a real switch for ON/OFF (polish.js tags those .ccTog) and a
   thumb-sized pill for everything else. Their text, ids and listeners are untouched. */
#capeSettings .setRowW35,#capeSettings .setRowW36,#capeSettings .setRowW38{
  width:auto;max-width:none;margin:0;padding:9px 4px;min-height:48px;gap:10px;border-radius:0;background:none;
  border:0;border-bottom:1px solid rgba(255,255,255,.06);}
#capeSettings .setRowW35 label,#capeSettings .setRowW36 label,#capeSettings .setRowW38 label{
  display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;text-align:left;
  font-family:'Bangers',cursive;font-weight:400;font-size:15px;letter-spacing:1px;text-transform:none;color:var(--paper,#fff8e7);line-height:1.1;}
#capeSettings .setRowW35 label .ci,#capeSettings .setRowW36 label .ci,#capeSettings .setRowW38 label .ci{width:24px;height:24px;flex:0 0 24px;}
#capeSettings .setRowW35 .tinyBtn,#capeSettings .setRowW36 .tinyBtn,#capeSettings .setRowW38 .tinyBtn{
  position:relative;min-height:36px;min-width:74px;padding:6px 14px;border-radius:12px;font-size:15px;letter-spacing:1px;
  color:#1b1430;background:var(--pow,#ffd23f);border:2px solid #1b1430;box-shadow:0 3px 0 #1b1430;flex:0 0 auto;}
#capeSettings .setRowW35 .tinyBtn::before,#capeSettings .setRowW36 .tinyBtn::before,#capeSettings .setRowW38 .tinyBtn::before{
  content:'';position:absolute;inset:-6px -4px;}
#capeSettings .setRowW36 #setNetDel{background:#e03131;color:#fff;}
/* the ON/OFF ones become the skin's switch: 52x30 track, a knob, gold when on */
#capeSettings .tinyBtn.ccTog{width:52px;min-width:52px;height:30px;min-height:30px;padding:0;border-radius:15px;font-size:0;
  background:var(--panel2,#2e2358);border:2px solid #4a3d85;box-shadow:none;transition:background .18s ease,border-color .18s ease;}
#capeSettings .tinyBtn.ccTog::after{content:'';position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;
  box-sizing:border-box;background:#cfc4ff;border:2px solid #1b1430;transition:transform .18s cubic-bezier(.2,1.4,.4,1),background .18s ease;}
#capeSettings .tinyBtn.ccTog.ccOn{background:var(--pow,#ffd23f);border-color:#1b1430;}
#capeSettings .tinyBtn.ccTog.ccOn::after{transform:translateX(22px);background:#1b1430;}
@media (prefers-reduced-motion:reduce){#capeSettings .tinyBtn.ccTog,#capeSettings .tinyBtn.ccTog::after{transition:none;}}
body.cc-rm #capeSettings .tinyBtn.ccTog,body.cc-rm #capeSettings .tinyBtn.ccTog::after{transition:none;}
#capeSettings .setHint{width:auto;max-width:none;margin:-2px 4px 6px 38px;font-size:11.5px;font-weight:700;color:#d8d2f0;opacity:.78;line-height:1.3;}
/* L3: the build stamp keeps "build 2026-09-25.w67b" on one line (polish.js wraps that half) */
#setVer .ccNoWrap{white-space:nowrap;}

/* ---------------------------------------------------------------- 16 HOME: PURSE, LEVEL, CHEST DOOR (F9, F29, F36)
   home.js adds these one-shot classes; every one is skipped under REDUCED MOTION by home.js itself. */
#chCoins.ch-pop{animation:ccChipPop 300ms cubic-bezier(.2,1.5,.4,1);}
@keyframes ccChipPop{0%{scale:1;}45%{scale:1.16;}100%{scale:1;}}
#chChestMark.ch-bump{animation:ccBump 400ms cubic-bezier(.2,1.6,.4,1);}
@keyframes ccBump{0%{scale:1;}35%{scale:1.45;}100%{scale:1;}}
#chLevel{position:relative;}
#chLevel.ch-lvburst{animation:ccLvBurst 700ms cubic-bezier(.2,1.5,.4,1);}
#chLevel.ch-lvburst::after{content:'';position:absolute;left:50%;top:50%;width:64px;height:64px;margin:-32px 0 0 -32px;pointer-events:none;
  background:#ffd23f;clip-path:polygon(50% 0,59% 30%,90% 20%,70% 45%,100% 55%,68% 62%,78% 95%,50% 74%,22% 95%,32% 62%,0 55%,30% 45%,10% 20%,41% 30%);
  animation:ccLvStar 700ms ease-out both;z-index:-1;}
@keyframes ccLvBurst{0%{scale:1;}30%{scale:1.3;}100%{scale:1;}}
@keyframes ccLvStar{0%{transform:scale(.2) rotate(0);opacity:.95;}100%{transform:scale(1.6) rotate(40deg);opacity:0;}}

/* ---------------------------------------------------------------- 17 COINS FLY INTO THE PURSE (F10) */
.ccCoinFly{position:fixed;z-index:97;width:20px;height:20px;margin:-10px 0 0 -10px;pointer-events:none;
  display:flex;align-items:center;justify-content:center;color:#ffd23f;filter:drop-shadow(0 2px 0 rgba(0,0,0,.45));
  animation:ccCoinFly 560ms cubic-bezier(.45,0,.55,1) both;}
.ccCoinFly .ci{width:20px;height:20px;}
@keyframes ccCoinFly{
  0%{transform:translate(0,0) scale(.6);opacity:0;}
  12%{opacity:1;transform:translate(0,var(--arc)) scale(1.1);}
  100%{transform:translate(var(--dx),var(--dy)) scale(.7);opacity:.9;}}

/* ---------------------------------------------------------------- 18 TAP A BOARD HERO / HOLD A TRAY CARD (F15, F16, L8) */
.ccUnitTag,.ccPeek{position:fixed;z-index:66;transform:translate(-50%,-100%);pointer-events:none;box-sizing:border-box;
  max-width:min(236px,78vw);padding:6px 10px 7px;border-radius:12px;background:#fff8e7;color:#1b1430;border:2.5px solid #1b1430;
  box-shadow:0 4px 0 #1b1430,0 8px 18px rgba(0,0,0,.35);text-align:center;display:flex;flex-direction:column;gap:1px;
  animation:ccTagIn 180ms cubic-bezier(.2,1.3,.4,1) both;}
.ccUnitTag.below{transform:translate(-50%,0);}
.ccUnitTag b,.ccPeek b{font-family:'Bangers',cursive;font-size:16px;letter-spacing:.8px;line-height:1.05;}
.ccUnitTag i,.ccPeek i{font-style:normal;font-size:10px;font-weight:900;letter-spacing:.6px;color:#6b5fa0;}
.ccUnitTag span,.ccPeek span{font-size:11px;font-weight:800;line-height:1.25;margin-top:2px;}
.ccUnitTag em{font-style:normal;font-family:'Bangers',cursive;font-size:12.5px;letter-spacing:.6px;color:#c2255c;margin-top:3px;}
.ccUnitTag::after,.ccPeek::after{content:'';position:absolute;left:50%;bottom:-8px;width:12px;height:12px;margin-left:-6px;
  background:#fff8e7;border-right:2.5px solid #1b1430;border-bottom:2.5px solid #1b1430;transform:rotate(45deg);}
.ccUnitTag.below::after{bottom:auto;top:-8px;transform:rotate(225deg);}
@keyframes ccTagIn{from{opacity:0;scale:.85;}to{opacity:1;scale:1;}}
@media (prefers-reduced-motion:reduce){.ccUnitTag,.ccPeek{animation:ccFadeIn 120ms ease-out both;}}
body.cc-rm .ccUnitTag,body.cc-rm .ccPeek{animation:ccFadeIn 120ms ease-out both;}
.slot.ccPeeked{filter:brightness(1.12);}
/* W146 / D32: the ONE small chip a held board hero (or a held tray card) shows in a fight - a line, never a card */
.ccUnitChip,.ccPeek.ccPeek1{position:fixed;z-index:66;transform:translate(-50%,-100%);pointer-events:none;box-sizing:border-box;
  white-space:nowrap;padding:2px 9px 3px;border-radius:999px;background:#fff8e7;color:#1b1430;border:2px solid #1b1430;
  box-shadow:0 2px 0 #1b1430,0 4px 10px rgba(0,0,0,.3);font-family:'Bangers',cursive;font-size:12.5px;letter-spacing:.7px;line-height:1.15;
  animation:ccTagIn 140ms cubic-bezier(.2,1.3,.4,1) both;display:block;max-width:92vw;}
.ccUnitChip.below{transform:translate(-50%,0);}
.ccPeek.ccPeek1::after{display:none;}
@media (prefers-reduced-motion:reduce){.ccUnitChip,.ccPeek.ccPeek1{animation:ccFadeIn 120ms ease-out both;}}
body.cc-rm .ccUnitChip,body.cc-rm .ccPeek.ccPeek1{animation:ccFadeIn 120ms ease-out both;}
/* the twist / boss chips answer a tap (F20): a pointer, and a hit box a thumb can find */
body.cc-hud .cc-mut,body.cc-hud .cc-boss{cursor:pointer;pointer-events:auto;position:relative;}
body.cc-hud .cc-mut::before{content:'';position:absolute;inset:-10px -3px;}
.ccChipTag{z-index:67;}

/* ---------------------------------------------------------------- 10 THUMB-SIZED HIT BOXES (M8)
   The paint stays the size it is; an invisible ::after makes the box a thumb lands in ~44 px tall
   (the .stPagePill::before / .cc-nw-hit pattern). Two controls simply grow a little instead. */
.hsortBtn,.encySortBtn,.pfNameDisp{position:relative;}
.hsortBtn::after,.encySortBtn::after{content:'';position:absolute;inset:-8px -2px;}
.pfNameDisp::after{content:'';position:absolute;inset:-8px -6px;}
.chpBtn{position:relative;min-height:36px;}
.chpBtn::after{content:'';position:absolute;inset:-5px -1px;}
@media (max-height:660px){.chpBtn{min-height:34px;}}
.ucPick{min-height:40px;}
.shopRefresh{min-height:44px;}

/* ---------------------------------------------------------------- 12 SMALL FIXES (L1, L4-L7)
   L1 / F38: the first-launch WELCOME card wears the same logo art HOME does (it still slams in with
   onbPop); the old text wordmark stays in the page for screen readers only. */
#onbFlash{width:min(270px,72vw);aspect-ratio:2/1;background:url(../art/ui/logo-cape-clash.svg) center/contain no-repeat;}
#onbFlash h1.logo{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;}
@media (max-height:700px){#onbFlash{width:min(210px,60vw);}}
/* L4: HQ offline - TRY AGAIN reads at a real size */
#hqScr .tinyBtn.netBtn{font-size:16px;letter-spacing:1px;}
/* L5: SEND FEEDBACK chips - bigger labels, a filled gold pick */
#netCard .fbPick>button{font-size:14px;min-height:44px;}
#netCard .fbPick>button.on,#netCard .fbPick>button[aria-pressed="true"]{background:var(--pow,#ffd23f);color:#1b1430;border-color:#1b1430;}
/* L6: the voicemail card's REPLAY is a real 44 px button beside OK */
#vmReplay{min-height:44px;min-width:44px;padding:8px 14px;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:6px;}
/* L7: CODEX hub counters wrap as balanced lines, never a one-word orphan */
.encyN,#encyEndless{text-wrap:balance;}
/* L12: the tutorial's first card shows itself once GO! has had its moment (it is up - and the fight
   held - the whole time; only its entrance waits). */
#tutCard.ccAfterGo{animation:tutIn .3s cubic-bezier(.2,1.6,.4,1) .6s both;}
@media (prefers-reduced-motion:reduce){#tutCard.ccAfterGo{animation:ccFadeIn .15s ease-out .6s both;}}
body.cc-rm #tutCard.ccAfterGo{animation:ccFadeIn .15s ease-out .6s both;}

/* ---------------------------------------------------------------- 19 SCREENS THAT OPEN FAST (M10, F18)
   The long card grids (LINEUP, PROFILE's collection, the CODEX lists) lay out only the cards on or
   near the screen; the rest keep a remembered size until they scroll up. */
#heroGrid>.unitCard,#pfGrid>.unitCard,#encyGrid>.unitCard{content-visibility:auto;contain-intrinsic-size:auto 215px;}
#pfGrid>.unitCard{contain-intrinsic-size:auto 238px;}

/* ---------------------------------------------------------------- 20-26 IN THE FIGHT AND ON HOME (F17, F22, F23, F32, F44)
   3-2-1 after RESUME; PAST YOUR BEST!; the idle nudge ring and SUMMON bounce; the CALLS empty
   state; the PLAY sheen. Every one has its REDUCED MOTION calm version below. */
.ccResume{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);z-index:62;min-width:120px;text-align:center;
  font-family:'Bangers',cursive;font-size:84px;line-height:1;color:#ffd23f;-webkit-text-stroke:3px #1b1430;
  text-shadow:5px 5px 0 #1b1430;cursor:pointer;user-select:none;-webkit-user-select:none;}
.ccResume.go{animation:ccResumeN 290ms cubic-bezier(.2,1.4,.4,1) both;}
@keyframes ccResumeN{0%{scale:1.6;opacity:0;}45%{scale:.95;opacity:1;}100%{scale:1;opacity:1;}}
.ccBest{position:absolute;left:50%;top:33%;transform:translate(-50%,-50%) rotate(-3deg);z-index:61;pointer-events:none;white-space:nowrap;
  padding:6px 16px;border:3px solid #1b1430;border-radius:12px;background:#ffd23f;color:#1b1430;box-shadow:0 5px 0 #1b1430;
  font-family:'Bangers',cursive;font-size:28px;letter-spacing:1.5px;animation:ccBestIn 2.2s cubic-bezier(.2,1.4,.4,1) both;}
@keyframes ccBestIn{0%{scale:.3;opacity:0;}12%{scale:1.12;opacity:1;}20%{scale:1;}80%{opacity:1;}100%{opacity:0;}}
.ccNudge{position:fixed;z-index:30;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  box-shadow:0 0 0 3px #ffd23f,0 0 16px 4px rgba(255,210,63,.65);animation:ccNudge 1.4s ease-in-out both;}
@keyframes ccNudge{0%{opacity:0;scale:1.3;}25%{opacity:1;scale:1;}60%{opacity:1;scale:1.06;}100%{opacity:0;scale:1;}}
#summonBtn.ccNudgeBtn{animation:ccNudgeBtn 650ms cubic-bezier(.2,1.5,.4,1);}
@keyframes ccNudgeBtn{0%,100%{translate:0 0;}30%{translate:0 -7px;}55%{translate:0 0;}75%{translate:0 -3px;}}
.vmLogEmpty::before{content:'';display:block;width:56px;height:56px;margin:0 auto 10px;opacity:.9;
  background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffd23f' stroke='%231b1430' stroke-width='1.2' d='M6.6 2.8l2.6-.6 2 4.6-1.7 1.4a11.6 11.6 0 0 0 5.3 5.3l1.4-1.7 4.6 2-.6 2.6c-.2.9-1 1.5-1.9 1.5C10.9 18 6 13.1 5.1 4.7c0-.9.6-1.7 1.5-1.9z'/%3E%3C/svg%3E");}
.vmLogEmpty{font-size:13px;}
#chPlayBtn{position:relative;overflow:hidden;}
/* W69 POLISH-2: the sweep moves by transform (the compositor runs it), not by `left` (a layout every frame) */
#chPlayBtn.ccSheen::after{content:'';position:absolute;top:-10%;bottom:-10%;left:0;width:34%;pointer-events:none;
  background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 100%);
  transform:translateX(-118%) skewX(-18deg);animation:ccSheen 1s ease-in-out both;}
@keyframes ccSheen{from{transform:translateX(-118%) skewX(-18deg);}to{transform:translateX(353%) skewX(-18deg);}}
@media (prefers-reduced-motion:reduce){.ccResume.go,.ccBest,.ccNudge,#summonBtn.ccNudgeBtn,#chPlayBtn.ccSheen::after{animation:none;}
  .ccNudge{opacity:1;}}
body.cc-rm .ccResume.go,body.cc-rm .ccBest,body.cc-rm .ccNudge,body.cc-rm #summonBtn.ccNudgeBtn,body.cc-rm #chPlayBtn.ccSheen::after{animation:none;}
body.cc-rm .ccNudge{opacity:1;}
body.cc-rm #chPlayBtn.ccSheen::after{display:none;}
/* F21: a quest claimed right on the result card turns into a green CLAIMED stamp */
#overQuest .resQuest.ccClaimed{background:linear-gradient(180deg,#9be15d,#5fb62c) !important;color:#1b1430 !important;
  border-color:#1b1430 !important;box-shadow:0 3px 0 #1b1430 !important;cursor:default;}
#overQuest .resQuest.ccClaimed .rqN{color:#1b1430 !important;}
#overQuest .resQuest.ccClaimed::after{display:none;}

/* =====================================================================================
   W69 POLISH-2 (docs/notes/W69-polish2.md) - the round-1 leftovers. Same rules: presentation
   only, every motion has its REDUCED MOTION version (body.cc-rm + the @media query).
   ===================================================================================== */

/* ---------------------------------------------------------------- 30 CLAIM ALL (L11, F21)
   Two or more finished quests fold into one gold bar; after the tap it is a green stamp. */
#overQuest .resQuest.ccFolded{display:none;}
#overQuest .resQuest.ccClaimAll .rqTxt{font-family:'Bangers',cursive;letter-spacing:1px;font-size:1.12em;}
#overQuest .resQuest.ccClaimAll.ccClaimAllDone{background:linear-gradient(180deg,#9be15d,#5fb62c) !important;color:#1b1430 !important;
  border-color:#1b1430 !important;box-shadow:0 3px 0 #1b1430 !important;cursor:default;}
#overQuest .resQuest.ccClaimAll.ccClaimAllDone .rqN{color:#1b1430 !important;}
#overQuest .resQuest.ccClaimAll.ccClaimAllDone::after{display:none;}
#overQuest .resQuest.ccClaimAllDone{animation:ccStampIn 260ms cubic-bezier(.2,1.5,.4,1) both;}
@keyframes ccStampIn{0%{scale:1.12;}100%{scale:1;}}
@media (prefers-reduced-motion:reduce){#overQuest .resQuest.ccClaimAllDone{animation:none;}}
body.cc-rm #overQuest .resQuest.ccClaimAllDone{animation:none;}

/* ---------------------------------------------------------------- 31 HOLD TO PEEK: HOME TEAM + LINEUP (F16)
   The peek card can sit under its card when there is no room above it (HOME's team is near the top). */
.ccPeek.below{transform:translate(-50%,0);}
.ccPeek.below::after{bottom:auto;top:-8px;transform:rotate(225deg);}
#chTeamRow .ch-teamslot,#heroGrid .unitCard{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;}
#chTeamRow .ch-teamslot.ccPeeked .ch-teamfig,#heroGrid .unitCard.ccPeeked{filter:brightness(1.12);}

/* ---------------------------------------------------------------- 32 THE CODEX SHEET'S MORE (M8)
   Paint unchanged; the box a thumb lands in is ~44 px (the ::after hit-box pattern of section 10). */
#detailLoreMore{position:relative;}
#detailLoreMore::after{content:'';position:absolute;inset:-12px -10px;border-radius:999px;}
#detailLore.ccFold .detLoreHead{cursor:pointer;}

/* ---------------------------------------------------------------- 34 OPEN ANOTHER (F42)
   The second button on the chest show's summary: the same shape as TAP TO CLOSE, a quieter fill. */
.ccs .ccsSumGo.ccAnother{background:#7ee8fa;margin-top:10px;}
.ccs .ccsSumGo.ccAnother + .ccsSumGo{margin-top:8px;}

/* ---------------------------------------------------------------- 35 PREMIUM GLOW (other players) - W307 / OWNER DECISION D39
   The HEADQUARTERS member list: a restrained animated gold glow around the WHOLE row of a premium player, never the word
   PREMIUM (the LEADERBOARD paints its own, .lbPremium). The glow breathes three times while the row is on screen
   (.ccPremVisible, one IntersectionObserver in polish.js) and then stands still; REDUCED MOTION = a still gold edge. */
#hqBody .hqRow.ccPremGlow{position:relative;isolation:isolate;border-radius:10px;box-shadow:0 0 0 1px #c59b35,0 0 8px rgba(255,210,63,.28);}
#hqBody .hqRow.ccPremGlow::after{content:'';position:absolute;inset:-2px;border:2px solid #ffd978;border-radius:inherit;pointer-events:none;opacity:.35;
  box-shadow:0 0 6px rgba(255,210,63,.25);animation:ccPremGold 3.6s ease-in-out 3;animation-play-state:paused;}
#hqBody .hqRow.ccPremGlow.ccPremVisible::after{animation-play-state:running;}
#hqBody .hqRow.ccPremGlow.ccPremStill::after{animation:none;}
@keyframes ccPremGold{0%,100%{opacity:.3}50%{opacity:.85}}
@media (prefers-reduced-motion:reduce){#hqBody .hqRow.ccPremGlow::after{animation:none;}}
/* the member list never runs wider than the phone (a long name pushed it ~20-50 px off both edges): its rows share the
   screen's width and a long name shortens itself instead */
#hqBody{max-width:100%;min-width:0;box-sizing:border-box;}
#hqBody .hqList{width:100%;max-width:100%;box-sizing:border-box;}
#hqBody .hqRowMain{min-width:0;}

/* ---------------------------------------------------------------- 36 EMPTY STATES WITH A PICTURE (F32) */
.ccEmptyPic{display:block;width:min(210px,58vw);height:auto;margin:4px auto 2px;pointer-events:none;
  filter:drop-shadow(0 4px 0 rgba(0,0,0,.28));animation:ccFadeIn .25s ease-out both;}
@media (max-height:700px){.ccEmptyPic{width:min(160px,46vw);}}
@media (prefers-reduced-motion:reduce){.ccEmptyPic{animation:none;}}
body.cc-rm .ccEmptyPic{animation:none;}

/* ---------------------------------------------------------------- 37 HOME'S WELCOME-BACK BEAT (F24)
   A rail badge that is new since HOME was last seen pops once (home.js adds .ch-bump in the beat). */
#capeHome .ch-railBadge.ch-bump{animation:ccBump 400ms cubic-bezier(.2,1.6,.4,1);}
@media (prefers-reduced-motion:reduce){#capeHome .ch-railBadge.ch-bump,#chChestMark.ch-bump{animation:none;}}
body.cc-rm #capeHome .ch-railBadge.ch-bump,body.cc-rm #chChestMark.ch-bump{animation:none;}

/* ---------------------------------------------------------------- 38 THUMB-SIZED ODDS AND TROPHY DOORS (W69 QA L4)
   The ODDS pills (CHESTS, PRIZE WHEEL, PREMIUM: 36x20) and HOME's trophy chip that opens the LEADERBOARD
   (71x17) keep their paint; an invisible ::after makes the box a thumb lands in ~44 px tall. */
.muOddsDoor,#muOddsPrem{position:relative;}
.muOddsDoor::after,#muOddsPrem::after{content:'';position:absolute;inset:-12px -8px;border-radius:12px;}
#capeHome .ch-troph.ccLbDoor{position:relative;}
#capeHome .ch-troph.ccLbDoor::after{content:'';position:absolute;inset:-14px -3px;}
/* ---------------------------------------------------------------- FEEL-96 F9 (lane B): THE SUMMON BUTTON
   A press squashes it to 94% in 80 ms (the generic press rule above is 95.5%); the release overshoots to 104% and settles in 120 ms and a
   refused tap shakes it 240 ms - both by the Web Animations API in index.html (f96BtnFeel / f96SummonRefuse), so they never fight the
   keyframes hud.css already runs on this button. The price digits are their own span (.f96-px), flipped on a change. */
#summonBtn.f96-down{scale:.94;filter:brightness(.94);}
#summonBtn .f96-px{display:inline-block;}
@media (prefers-reduced-motion:reduce){#summonBtn.f96-down{scale:none;}}
body.cc-rm #summonBtn.f96-down{scale:none;}
