/* ==========================================================================
   Cape Clash - W80 LAYOUT (docs/notes/W80-layout.md)
   J, 2026-09-29, playing a Clash on a tall phone: "make all that stuff a little smaller and move
   that whole top part up because it comes down on the main one that you play on."

   1. THE COMPACT MODE STRIP. The strip under the top bar (twist chip, clock, boss chip) was a 44 px
      row (40 / 36 on shorter phones) holding 20 px pills. In the stacked layouts (Clash, Co-op,
      4-Player) it is a 24 px row of 18 px pills now, and in the one-board modes a 32 px row (it
      still carries NEXT WAVE there). Every pixel it gives back goes to the canvas, i.e. to the
      boards. The chips that answer a tap (the twist chip, the boss chip) keep a 44 px hit box; the
      top bar's own buttons sit ABOVE that overflow, so they never lose a pixel of theirs.
   2. THE DIVIDER CHIPS. In Clash and Co-op the shared NEXT WAVE IN read-out and the rival's CARRYING
      chip used to hang off the top of the canvas, straight over the rival board's name and hearts.
      They now ride the divider between the two boards (board.js publishes its screen y as
      --w80-div-y on #gameWrap), where nothing else is drawn but the COMBO chip on the left.
   Scoped under body.cc-hud like every HUD rule: remove this <link> and the game is exactly 0.9.7.
   ========================================================================== */

/* ---------------------------------------------------------------- 1 THE COMPACT STRIP */
body.cc-hud[data-cc-mode]{--cc-strip-h:32px}
body.cc-hud[data-cc-mode="pvp"],
body.cc-hud[data-cc-mode="coop"],
body.cc-hud[data-cc-mode="ffa4"]{--cc-strip-h:24px}

body.cc-hud #ccStrip .cc-mut,
body.cc-hud #ccStrip .cc-clock,
body.cc-hud #ccStrip .cc-boss,
body.cc-hud #ccStrip .cc-daily{height:18px}
/* The twist chip is sized to its words now: grown flexibly it ran UNDER the centred clock, so the
   clock read as sitting inside the twist chip (J's screenshot). Capped short of the clock. */
body.cc-hud #ccStrip .cc-mut{flex:0 1 auto;max-width:calc(50% - 46px);padding:0 6px 0 4px;gap:3px}
body.cc-hud #ccStrip .cc-mut-ico{width:11px;height:11px;font-size:11px}
body.cc-hud #ccStrip .cc-mut-name{font-size:10px;letter-spacing:.3px}
body.cc-hud #ccStrip .cc-clock{padding:0 6px 0 4px;gap:3px}
body.cc-hud #ccStrip .cc-clock-ico{width:11px;height:11px;font-size:11px}
body.cc-hud #ccStrip .cc-clock-t{font-size:13px;min-width:32px}
body.cc-hud #ccStrip .cc-boss{padding:0 6px 0 2px;gap:3px;max-width:calc(50% - 46px)}
body.cc-hud #ccStrip .cc-boss-face{width:15px;height:15px}
body.cc-hud #ccStrip .cc-boss-glyph{font-size:12px}
body.cc-hud #ccStrip .cc-boss-t{font-size:10px;letter-spacing:.3px}
body.cc-hud #ccStrip .cc-threat{height:2px}
/* 44 px hit boxes on the two chips that answer a tap (polish.js chipCard): 18 px of pill + 13 px
   above and below. The top bar's buttons are lifted over that overflow (below), so a thumb on the
   X or the emote button always reaches the X or the emote button. */
body.cc-hud #ccStrip .cc-mut::before,
body.cc-hud #ccStrip .cc-boss::before{content:'';position:absolute;left:-3px;right:-3px;top:-13px;bottom:-13px}
body.cc-hud #quitBtn,body.cc-hud #pauseBtn,body.cc-hud #muteBtn2,body.cc-hud #emoteBtn{z-index:4}
/* NEXT WAVE (one-board modes) in the 32 px strip: a 26 px pill, its real 44 px hit span kept. */
body.cc-hud #ccStrip .cc-nw{height:26px;padding:0 9px}
body.cc-hud #ccStrip .cc-nw-hit{top:-9px;bottom:-9px}

/* ---------------------------------------------------------------- 2 THE DIVIDER CHIPS */
/* #ccRivals is the zero-height row that sits exactly on the canvas's top edge (hud.css 6.3), so a
   top of var(--w80-div-y) lands its chips on the divider between the two boards. Without the
   variable (board.js missing) they fall back to where they always were. */
body.cc-hud[data-cc-mode="pvp"] #ccRivals .cc-cd,
body.cc-hud[data-cc-mode="coop"] #ccRivals .cc-cd{
  top:calc(var(--w80-div-y,10px) - 9px);height:18px;
}
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])){
  top:calc(var(--w80-div-y,31px) - 9px);height:18px;left:auto;right:8px;transform:none;
}
