/*
 * FESTIVUS COLOR CLASH (Phase 9J): the landing (PLAY THE COMPUTER, FAMILY
 * TABLE, your turn, invites, waiting to start, active, completed, how to
 * play) and one table: a card-table felt in the Texas Hold'em style with the
 * other players round its edges (2 / 3 / 4 seats), the draw pile, the
 * direction, the discard with the ACTIVE COLOUR ring and the status line on
 * it; docked under it, the CLASH! / CAUGHT YOU! button, the drawn card's PLAY
 * IT / KEEP IT and my hand; the colour / how-to-play sheets; the result.
 *
 * LINKED BY index.html, before phase8k.css (which stays LAST). Every rule is
 * scoped to a .cc-* class, so nothing here touches another screen. It reads
 * ONLY tokens app.css defines (--bg*, --line*, --text*, --accent*, --warn,
 * --danger, --metal*, --radius*, --tap, --gutter, --safe-bottom,
 * --shell-nav-space) -- nothing invented. The four card hues, the felt and
 * its rail are literal colours, because no app token is a cranberry, a frost
 * or a felt.
 *
 * NEVER COLOUR ALONE. Each colour has a glyph as well (evergreen ▲ a tree,
 * gold ★ a star, cranberry ● a berry, frost ❄ a snowflake), drawn by the
 * script on every card face, colour button and the ACTIVE COLOUR label, and
 * each active-colour ring has its own border STYLE too (solid, double,
 * dashed, dotted). A playable card is RAISED as well as bright; a dimmed card
 * sits low. The current player says "▶ PLAYING" in words, CLASH! is a word.
 *
 * PHONE FIRST, 320-1280 px; 390 x 844 and 375 x 667 portrait are one screen.
 * At 320 px the page gutter leaves 288 px: the seats share three equal
 * columns on the felt, the draw pile and the discard share one row (two
 * equal columns) with the direction under the pile, and my hand is ONE row
 * that scrolls sideways inside itself (cards 3.25rem = 52 px wide, at least
 * the 44 px touch minimum, overlapping by 0.5rem only when long) -- the page
 * itself never scrolls sideways. From 768 px the table and the cards grow.
 * Nothing has a fixed pixel width.
 *
 * NO INLINE STYLES: every state is a class. Animations are short (a card
 * flying to the discard and a banner popping in, 0.25 s, once each; the turn
 * glow breathing six times; the CLASH! countdown's 0.3 s pulse once a second
 * in its last three seconds) and none loops forever; under
 * prefers-reduced-motion the script adds none and every animation and
 * transition below is off.
 */

.cc {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-inline-size: 60rem;
  margin-inline: auto;
  padding: 0.5rem 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 40% at 50% 0%, rgb(31 110 74 / 0.35), transparent 70%),
    radial-gradient(110% 50% at 50% 100%, rgb(160 28 58 / 0.18), transparent 75%),
    var(--bg-elev);
  color: var(--text);
}

@media (max-width: 400px) {
  .cc {
    padding: 0.5rem 0.25rem 1rem;
    border: 0;
    border-radius: var(--radius-sm);
  }
}

.cc-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--warn);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.cc-section { gap: 0.6rem; }

.cc-meta,
.cc-label {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.4;
}

.cc-label {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cc-warning {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 0.9rem;
}

/* The ONE free-play line (landing and table). */
.cc-free {
  justify-self: center;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: 1px dashed var(--accent-dim);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.cc-bigbtn {
  inline-size: 100%;
  min-height: 3.25rem;
}

/* ========================================================================== *
 * Choices, the fill switch, rows
 * ========================================================================== */

.cc-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cc-choice {
  display: inline-flex;
  flex: 1 1 5.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  min-height: var(--tap);
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.cc-choice.is-selected {
  border-color: var(--warn);
  background: var(--bg-elev-2);
  box-shadow: inset 0 0 0 2px var(--warn);
}

.cc-choice:disabled { opacity: 0.45; cursor: default; }
.cc-choice__sub { color: var(--text-dim); font-size: 0.75rem; font-weight: 600; }
.cc-choice__picked { color: var(--warn); font-size: 0.7rem; letter-spacing: 0.08em; }

.cc-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  inline-size: 100%;
  min-height: var(--tap);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.cc-toggle__switch {
  position: relative;
  flex: 0 0 auto;
  inline-size: 2.75rem;
  block-size: 1.5rem;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s ease;
}

.cc-toggle__switch::after {
  content: "";
  position: absolute;
  inset-block-start: 0.2rem;
  inset-inline-start: 0.2rem;
  inline-size: 1.1rem;
  block-size: 1.1rem;
  border-radius: 50%;
  background: var(--metal);
  transition: transform 0.2s ease;
}

.cc-toggle.is-on .cc-toggle__switch { background: var(--accent-dim); }
.cc-toggle.is-on .cc-toggle__switch::after { transform: translateX(1.25rem); }
.cc-toggle__label { flex: 1 1 auto; min-width: 0; }
.cc-toggle__state { font-weight: 900; letter-spacing: 0.08em; }

.cc-row,
.cc-invite {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.cc-row--yourTurn { border-color: var(--warn); }
.cc-invite { border-color: var(--accent-dim); }
.cc-row__text { min-width: 0; }
.cc-row__what { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.cc-row__when { margin: 0.2rem 0 0; color: var(--text-dim); font-size: 0.85rem; }
.cc-invite__title { margin: 0; font-weight: 900; letter-spacing: 0.06em; color: var(--warn); }
.cc-invite__players { margin: 0; overflow-wrap: anywhere; }

.cc-row__actions,
.cc-invite__actions,
.cc-lobby__actions,
.cc-drawn__actions,
.cc-result__actions,
.cc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cc-row__btn { flex: 1 1 7rem; }

.cc-completed__summary,
.cc-howto__summary,
.cc-log__summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  cursor: pointer;
}

.cc-rules {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-inline-start: 1.25rem;
  line-height: 1.45;
}

.cc-rules__key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin-inline-start: -1.25rem;
}

.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

/* ========================================================================== *
 * The four colours (and the wild). Literal hues: no app token is one of them.
 * p9k Package 2: key "gold" is bright YELLOW (#FFD600, dark text 13:1) and key
 * "frost" is solid BLUE (#1C62D6, white text 5.6:1); the keys never change.
 * ========================================================================== */

.cc-card--evergreen,
.cc-chip--evergreen,
.cc-color--evergreen { background: rgb(31 110 74); color: rgb(240 250 244); }

.cc-card--gold,
.cc-chip--gold,
.cc-color--gold { background: rgb(255 214 0); color: rgb(30 20 2); }

.cc-card--cranberry,
.cc-chip--cranberry,
.cc-color--cranberry { background: rgb(160 28 58); color: rgb(255 240 244); }

.cc-card--frost,
.cc-chip--frost,
.cc-color--frost { background: rgb(28 98 214); color: rgb(255 255 255); }

.cc-card--wild {
  background: conic-gradient(rgb(31 110 74) 0 25%, rgb(255 214 0) 0 50%, rgb(160 28 58) 0 75%, rgb(28 98 214) 0);
  color: var(--text);
}

.cc-card--none { background: var(--bg-elev-2); color: var(--text-dim); }

/* ========================================================================== *
 * A card face: number or symbol in the middle, small in the corner, the glyph
 * ========================================================================== */

.cc-card {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 3.25rem;
  block-size: 4.75rem;
  padding: 0;
  border: 2px solid rgb(255 255 255 / 0.85);
  border-radius: 0.6rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.45);
  font: inherit;
  line-height: 1;
  overflow: hidden;
}

.cc-card__symbol {
  font-size: 1.6rem;
  font-weight: 900;
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.25);
}

.cc-card--wild .cc-card__symbol {
  display: grid;
  place-items: center;
  inline-size: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg);
  font-size: 1.2rem;
}

.cc-card__corner {
  position: absolute;
  inset-block-start: 0.2rem;
  inset-inline-start: 0.25rem;
  font-size: 0.7rem;
  font-weight: 900;
}

.cc-card__glyph {
  position: absolute;
  inset-block-end: 0.15rem;
  inset-inline-end: 0.25rem;
  font-size: 0.85rem;
}

/* A wild carries all four glyphs, in a row along its foot. */
.cc-card__wheel {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0.15rem;
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  pointer-events: none;
}

.cc-card__wheel-glyph {
  font-size: 0.55rem;
  text-shadow: 0 0 2px rgb(0 0 0 / 0.8);
}

.cc-card--large { inline-size: 5rem; block-size: 7.25rem; border-width: 3px; border-radius: 0.8rem; }
.cc-card--large .cc-card__symbol { font-size: 2.5rem; }
.cc-card--large .cc-card__corner { font-size: 0.9rem; }
.cc-card--large .cc-card__glyph { font-size: 1.2rem; }
.cc-card--small { inline-size: 2rem; block-size: 2.9rem; border-width: 1px; border-radius: 0.35rem; }
.cc-card--small .cc-card__symbol { font-size: 0.95rem; }
.cc-card--small .cc-card__corner,
.cc-card--small .cc-card__wheel { display: none; }
.cc-card--small .cc-card__glyph { font-size: 0.55rem; }

.cc-glyph { line-height: 1; }

/* ========================================================================== *
 * The table's edge: back, the mode, HOW TO PLAY (?) and LEAVE, the free line
 * ========================================================================== */

/* Arriving at a game, the script scrolls the table to the top of the screen -- just under the sticky app bar. */
.cc-table { gap: 0.45rem; padding-block: 0.35rem 0.5rem; scroll-margin-top: calc(var(--safe-top) + 4.25rem); }

.cc-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.15rem 0.4rem;
  min-width: 0;
}

.cc-bar .cc-back { justify-content: center; min-inline-size: var(--tap); font-size: 1.15rem; }
.cc-bar__title { min-width: 0; text-align: center; }
.cc-bar__mode { margin: 0; font-size: 0.9rem; font-weight: 900; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cc-controls { flex-wrap: nowrap; gap: 0.3rem; }

/* Two small buttons on the table's edge -- still a full tap target. */
.cc-iconbtn {
  display: inline-grid;
  place-items: center;
  min-inline-size: var(--tap);
  min-height: var(--tap);
  padding: 0 0.6rem;
  border: 1px solid rgb(214 162 38 / 0.6);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.cc-iconbtn--danger { border-color: var(--danger); color: var(--danger); font-size: 0.72rem; }
.cc-iconbtn:disabled { opacity: 0.5; cursor: default; }
.cc-iconbtn:focus-visible { outline: 3px solid var(--metal); outline-offset: 2px; }

/* ========================================================================== *
 * The status line (the near rail of the felt; above the lobby and the result)
 * ========================================================================== */

.cc-status {
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  text-align: center;
}

.cc-status--mine { border: 2px solid var(--warn); }
.cc-status__title { margin: 0; font-size: 1.1rem; font-weight: 900; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.cc-status__detail { margin: 0; color: var(--text-dim); font-size: 0.85rem; }
.cc-status__clock { margin: 0; font-family: var(--mono); font-weight: 700; }
.cc-status__clock.is-urgent { color: var(--danger); font-weight: 900; }

/* The move being shown: a banner (laid over the felt's middle on the table). */
.cc-banner {
  justify-self: center;
  margin: 0;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--warn);
  border-radius: 999px;
  background: var(--bg-elev-2);
  color: var(--warn);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  animation: cc-pop 0.25s ease-out both;
}

.cc-banner--clash { border-color: var(--accent); color: var(--accent); }
.cc-banner--penalty { border-color: var(--danger); color: var(--danger); }
.cc-banner--clash_call { border-color: rgb(214 162 38); color: rgb(249 229 166); }
.cc-banner--clash_catch { border-color: var(--danger); color: var(--danger); }
.cc-banner--clash_escape { border-color: var(--accent); color: var(--accent); }
.cc-banner__main,
.cc-banner__sub { display: block; }
.cc-banner__sub { margin-block-start: 0.1rem; color: var(--text); font-size: 0.72rem; letter-spacing: 0.08em; }

/* ========================================================================== *
 * THE FELT -- the Texas Hold'em table's look (a green felt, a gold-lined
 * rail), in this file's own literal hues: app.css has no felt token.
 *
 * PHONE PORTRAIT (390 x 844, 375 x 667) is the design point: one screen with
 * no vertical scroll for the essentials. The felt is a grid of three rows --
 * the seats round its upper and side edges, the centre, the status line on
 * the near rail -- so nothing can overlap whatever the phone; its height
 * follows the viewport (svh, with a vh fallback) between two bounds, and it
 * gives up 4.5rem when the CLASH! / CAUGHT YOU! button joins the dock. Seats
 * sit in three equal columns (left / top / right), so at 320 px each pod is
 * about 90 px and the names shorten with an ellipsis: the page never scrolls
 * sideways.
 * ========================================================================== */

.cc-felt {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.35rem;
  min-width: 0;
  max-inline-size: 100%;
  min-block-size: clamp(15rem, calc(100vh - 24rem), 30rem);
  min-block-size: clamp(15rem, calc(100svh - 24rem), 30rem);
  padding: 0.55rem 0.45rem 0.5rem;
  isolation: isolate;
}

.cc-table.has-clash-button .cc-felt {
  min-block-size: clamp(13.5rem, calc(100vh - 28.5rem), 30rem);
  min-block-size: clamp(13.5rem, calc(100svh - 28.5rem), 30rem);
}

.cc-felt__rail {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: clamp(5px, 1.8vw, 12px) solid rgb(78 44 20);
  border-radius: 44% / 26%;
  background: radial-gradient(ellipse at 50% 42%, rgb(30 122 82), rgb(18 88 57) 46%, rgb(6 46 29) 100%);
  box-shadow:
    0 0 0 2px rgb(214 162 38) inset,
    0 0 0 1px rgb(150 110 20),
    0 12px 30px rgb(0 0 0 / 0.6),
    inset 0 0 40px rgb(0 0 0 / 0.5);
}

/* The faint printed line on a real felt. */
.cc-felt__rail::after {
  content: "";
  position: absolute;
  inset: 16% 12%;
  border: 1px solid rgb(249 229 166 / 0.16);
  border-radius: 50%;
}

/* Placed explicitly (column AND row), so the wide 4-seat layout may lay the seats layer over the centre's row. */
.cc-felt > .cc-seats,
.cc-felt > .cc-centre,
.cc-felt > .cc-status { grid-column: 1; }
.cc-felt > .cc-seats { grid-row: 1; }
.cc-felt > .cc-centre { grid-row: 2; }
.cc-felt > .cc-status { grid-row: 3; }

/* The status line on the near rail: one compact pill. */
.cc-felt .cc-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  justify-self: center;
  gap: 0 0.5rem;
  inline-size: min(100%, 24rem);
  padding: 0.25rem 0.85rem;
  border: 1px solid rgb(214 162 38 / 0.55);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
}

.cc-felt .cc-status__title { font-size: 0.85rem; }
.cc-felt .cc-status__detail { font-size: 0.7rem; }
.cc-felt .cc-status--mine { border: 2px solid var(--warn); box-shadow: 0 0 12px rgb(240 180 41 / 0.4); }
.cc-status--clash { border-color: rgb(249 229 166); }
.cc-status--clash-catch,
.cc-status--clash-forgot { border-color: var(--danger); }
.cc-status__clock--clash { font-size: 1.05rem; font-weight: 900; color: rgb(249 229 166); }
.cc-status.is-final .cc-status__clock--clash { color: var(--danger); }

/* A banner over the felt's middle: it never moves anything else. */
.cc-felt .cc-banner {
  position: absolute;
  inset-inline: 8%;
  top: 40%;
  z-index: 3;
  pointer-events: none;
  background: rgb(8 20 17 / 0.92);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.6);
}

/* ========================================================================== *
 * The seats -- round the felt; one plain row under a finished game's result
 * ========================================================================== */

.cc-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* On the felt: three columns, the Hold'em places mapped onto them. */
.cc-felt .cc-seats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "left top right";
  align-items: start;
  gap: 0.3rem;
}

.cc-seat--top { grid-area: top; }
.cc-seat--left,
.cc-seat--upper-left { grid-area: left; }
.cc-seat--right,
.cc-seat--upper-right { grid-area: right; }

/* 4 seats: left and right sit lower, down the side edges, round the top seat. */
.cc-felt--4 .cc-seat--left,
.cc-felt--4 .cc-seat--right { margin-block-start: 1.75rem; }
/* 3 seats: two upper corners, a little apart. */
.cc-felt--3 .cc-seats { grid-template-columns: minmax(0, 1fr) minmax(0, 0.35fr) minmax(0, 1fr); }
.cc-felt--3 .cc-seat--upper-left,
.cc-felt--3 .cc-seat--upper-right { margin-block-start: 0.6rem; }
/* 2 seats: across the table. */
.cc-felt--2 .cc-seats { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.2fr) minmax(0, 0.6fr); }
/*
 * 095 -- 5 and 6 seats: TWO rows round the felt. The upper places (and the top seat at six) first, then the lower
 * places down the side edges -- clockwise from my left, as play goes. Every pod keeps its four-seat width (three
 * columns), so names, card counts, FP and AWAY / COMPUTER marks read exactly as before; only a row is added.
 */
.cc-felt--5 .cc-seats,
.cc-felt--6 .cc-seats {
  grid-template-areas: "ul top ur" "ll . lr";
  row-gap: 0.3rem;
}
.cc-felt--5 .cc-seats { grid-template-areas: "ul . ur" "ll . lr"; grid-template-columns: minmax(0, 1fr) minmax(0, 0.35fr) minmax(0, 1fr); }
.cc-felt--5 .cc-seat--upper-left,
.cc-felt--6 .cc-seat--upper-left { grid-area: ul; }
.cc-felt--5 .cc-seat--upper-right,
.cc-felt--6 .cc-seat--upper-right { grid-area: ur; }
.cc-felt--5 .cc-seat--lower-left,
.cc-felt--6 .cc-seat--lower-left { grid-area: ll; }
.cc-felt--5 .cc-seat--lower-right,
.cc-felt--6 .cc-seat--lower-right { grid-area: lr; }
.cc-felt--6 .cc-seat--top { grid-area: top; }

/* A pod: the disc beside the name and the fan; the marks and badges under them. */
.cc-seat {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  flex: 1 1 7rem;
  align-content: start;
  align-items: center;
  justify-items: center;
  gap: 0.1rem 0.3rem;
  min-width: 0;
  padding: 0.3rem 0.25rem 0.35rem;
  border: 1px solid rgb(214 162 38 / 0.55);
  border-radius: var(--radius-sm);
  background: rgb(8 20 17 / 0.85);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.5);
  text-align: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* The turn: a gold border and glow -- it breathes six times as the turn arrives (finite; none under reduced motion). */
.cc-seat.is-current {
  border-color: var(--warn);
  box-shadow: 0 0 0 2px var(--warn), 0 0 16px rgb(240 180 41 / 0.55);
  animation: cc-glow 0.3s ease-in-out 6 alternate;
}

.cc-seat.is-acting { outline: 3px dashed var(--accent); outline-offset: 2px; }
.cc-seat.is-left,
.cc-seat.is-away { border-style: dashed; }
.cc-seat.is-left .cc-seat__avatar,
.cc-seat.is-away .cc-seat__avatar { opacity: 0.6; }

/* THE CLASH! SPOTLIGHT: gold while they may still call it, cranberry once they forgot. */
.cc-seat.is-spotlight,
.cc-me.is-spotlight {
  border-color: rgb(249 229 166);
  box-shadow: 0 0 0 3px rgb(214 162 38), 0 0 24px rgb(249 229 166 / 0.7);
}

.cc-seat.is-spotlight--challenge,
.cc-me.is-spotlight--challenge {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgb(160 28 58), 0 0 24px rgb(242 112 107 / 0.7);
}

.cc-seat > :not(.cc-seat__avatar, .cc-seat__name, .cc-fan) { grid-column: 1 / -1; }
.cc-seat > .cc-seat__avatar { grid-row: span 2; }
.cc-seat > .cc-seat__name { justify-self: start; }
.cc-seat > .cc-fan { justify-self: start; }

.cc-seat__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  inline-size: 1.9rem;
  aspect-ratio: 1;
  border: 2px solid rgb(214 162 38);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(160 28 58), rgb(92 12 32));
  color: rgb(249 229 166);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.cc-seat__avatar.is-computer {
  border-color: var(--metal-dim);
  background: radial-gradient(circle at 35% 30%, var(--bg-elev-2), var(--bg));
  color: var(--metal);
  font-size: 1rem;
}

.cc-seat__name {
  margin: 0;
  max-inline-size: 100%;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-seat__mark { margin: 0; max-inline-size: 100%; color: var(--text-dim); font-size: 0.58rem; font-weight: 700; line-height: 1.15; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.cc-seat__mark--status { color: var(--warn); }
.cc-seat__turn { margin: 0; color: var(--warn); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.08em; }

.cc-seat__clash {
  justify-self: center;
  margin: 0;
  padding: 0.05rem 0.5rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.cc-seat__spot {
  margin: 0;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgb(214 162 38);
  color: rgb(30 20 2);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.cc-seat.is-spotlight--challenge .cc-seat__spot { background: rgb(160 28 58); color: rgb(255 240 244); }

/* An opponent's hand: card backs, overlapped, and the COUNT in numerals. Never a face. */
.cc-fan {
  display: inline-flex;
  align-items: center;
  padding-inline-start: 0.5rem;
}

.cc-fan__back {
  inline-size: 0.9rem;
  block-size: 1.3rem;
  margin-inline-start: -0.5rem;
  border: 1px solid var(--metal-dim);
  border-radius: 0.2rem;
  background: repeating-linear-gradient(45deg, rgb(160 28 58) 0 3px, rgb(92 12 32) 3px 6px);
}

.cc-fan__back:nth-child(1) { transform: rotate(-10deg); }
.cc-fan__back:nth-child(3) { transform: rotate(10deg); }
.cc-fan__count { margin-inline-start: 0.4rem; font-size: 1.05rem; font-weight: 900; }

/* ========================================================================== *
 * The centre: draw pile | discard (the top card LARGE in the active ring),
 * the direction under the pile
 * ========================================================================== */

.cc-centre {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "pile discard" "dir discard";
  align-self: center;
  justify-self: center;
  align-items: center;
  justify-items: center;
  gap: 0.25rem 0.6rem;
  inline-size: min(100%, 16rem);
  min-width: 0;
}

.cc-pile { grid-area: pile; }
.cc-discard { grid-area: discard; }
.cc-direction { grid-area: dir; }

.cc-pile {
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  min-height: var(--tap);
  padding: 0.2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.cc-pile.is-playable .cc-pile__back { box-shadow: 0 0 0 2px var(--warn), 0 0 16px rgb(240 180 41 / 0.6); }
.cc-pile:disabled { cursor: default; }
.cc-pile:disabled .cc-pile__back { opacity: 0.75; }
.cc-pile:focus-visible { outline: 3px solid var(--metal); outline-offset: 2px; }

/* The draw pile: a stack of backs (two shadows), with the CC mark. */
.cc-pile__back {
  display: grid;
  place-items: center;
  inline-size: 3.25rem;
  block-size: 4.6rem;
  border: 2px solid rgb(249 229 166);
  border-radius: 0.55rem;
  background: repeating-linear-gradient(45deg, rgb(160 28 58) 0 5px, rgb(92 12 32) 5px 10px);
  box-shadow: 2px 2px 0 rgb(92 12 32), 4px 4px 0 rgb(0 0 0 / 0.45);
}

.cc-pile__mark {
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
  background: var(--bg);
  color: var(--warn);
  font-size: 0.7rem;
  font-weight: 900;
}

.cc-pile__label { font-weight: 900; letter-spacing: 0.08em; font-size: 0.72rem; }
.cc-pile__count { color: rgb(249 229 166 / 0.85); font-size: 0.65rem; }

.cc-direction {
  margin: 0;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.35);
  color: rgb(249 229 166);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* The discard: the top card large, in a ring of the ACTIVE colour -- a ring with its own border style per colour. */
.cc-discard {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  padding: 0.35rem;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: rgb(0 0 0 / 0.22);
}

.cc-ring--evergreen { border: 4px solid rgb(31 110 74); }
.cc-ring--gold { border: 6px double rgb(255 214 0); }
.cc-ring--cranberry { border: 4px dashed rgb(160 28 58); }
.cc-ring--frost { border: 4px dotted rgb(28 98 214); }

.cc-active {
  margin: 0;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.45);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: nowrap;
}

.cc-discard__count { margin: 0; color: rgb(249 229 166 / 0.7); font-size: 0.6rem; }

.cc-felt .cc-card--large { inline-size: 4.5rem; block-size: 6.5rem; }
.cc-felt .cc-card--large .cc-card__symbol { font-size: 2.25rem; }

.cc-fly { animation: cc-fly-in 0.25s ease-out both; }
.cc-fly--mine { animation-name: cc-fly-up; }

/* ========================================================================== *
 * THE DOCK -- mine, at the bottom of the screen: the CLASH! / CAUGHT YOU!
 * button, the drawn card, my seat and my hand. It sticks just above the
 * app's bottom nav (--shell-nav-space already holds the iPhone safe area,
 * env(safe-area-inset-bottom)), so my hand and the button are on screen even
 * on the smallest phone.
 * ========================================================================== */

.cc-dock {
  position: sticky;
  bottom: var(--shell-nav-space);
  z-index: 5;
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.35rem 0.2rem 0.3rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(to top, var(--bg-elev) 88%, rgb(17 34 32 / 0));
}

/*
 * THE CLASH! BUTTON (gold) and THE CAUGHT YOU! BUTTON (cranberry): one tap,
 * 4rem = 64 px tall, the full width of a phone, the seconds in a disc on the
 * left. In the last three seconds the disc turns white-on-dark and -- with
 * motion allowed -- each second the button gives one short 0.3 s pulse (the
 * script alternates data-cc-beat a / b so the animation restarts; nothing
 * loops).
 */
.cc-clashbtn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  inline-size: 100%;
  min-block-size: 4rem;
  padding: 0.4rem 1rem;
  border: 3px solid rgb(249 229 166);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.55);
  font: inherit;
  text-align: start;
  cursor: pointer;
  animation: cc-pop 0.25s ease-out both;
}

.cc-clashbtn--call {
  background: linear-gradient(180deg, rgb(240 196 72), rgb(214 162 38) 55%, rgb(168 120 18));
  color: rgb(30 20 2);
}

.cc-clashbtn--catch {
  border-color: rgb(255 200 210);
  background: linear-gradient(180deg, rgb(200 48 84), rgb(160 28 58) 55%, rgb(110 14 36));
  color: rgb(255 240 244);
}

.cc-clashbtn:disabled { opacity: 0.75; filter: saturate(0.6); cursor: default; }
.cc-clashbtn:focus-visible { outline: 3px solid var(--metal); outline-offset: 3px; }

.cc-clashbtn__clock {
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.28);
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 900;
}

.cc-clashbtn__text { display: grid; min-width: 0; }
.cc-clashbtn__label { font-size: 1.65rem; font-weight: 900; letter-spacing: 0.1em; line-height: 1.05; }
.cc-clashbtn__sub { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; overflow-wrap: anywhere; }

.cc-clashbtn.is-final .cc-clashbtn__clock { background: rgb(0 0 0 / 0.6); color: rgb(255 255 255); box-shadow: 0 0 0 2px rgb(255 255 255); }
.cc-clashbtn.is-final[data-cc-beat="a"] { animation: cc-beat-a 0.3s ease-out; }
.cc-clashbtn.is-final[data-cc-beat="b"] { animation: cc-beat-b 0.3s ease-out; }

/* The drawn card: one compact row -- the words, the card, PLAY IT / KEEP IT. */
.cc-drawn {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-areas: "title card actions";
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.cc-drawn__title { grid-area: title; max-inline-size: 3.5rem; margin: 0; font-size: 0.72rem; font-weight: 900; line-height: 1.15; letter-spacing: 0.08em; color: var(--accent); }
.cc-drawn > .cc-card { grid-area: card; inline-size: 2.5rem; block-size: 3.6rem; }
.cc-drawn > .cc-card .cc-card__symbol { font-size: 1.2rem; }
.cc-drawn__actions { grid-area: actions; min-width: 0; }
.cc-drawn__actions .cc-bigbtn { flex: 1 1 5.5rem; inline-size: auto; min-height: var(--tap); }

.cc-handbox {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

/* MY seat: the near edge of the table. */
.cc-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.2rem 0.6rem 0.2rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.cc-me.is-current {
  border-color: var(--warn);
  box-shadow: 0 0 0 1px var(--warn), 0 0 12px rgb(240 180 41 / 0.4);
  animation: cc-glow 0.3s ease-in-out 6 alternate;
}

.cc-me__avatar { inline-size: 1.7rem; }
.cc-handbox__title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-me .cc-seat__clash { white-space: nowrap; }

/* ONE row that scrolls sideways inside itself when the hand is long; the page never does. */
.cc-hand {
  display: flex;
  gap: 0.3rem;
  min-width: 0;
  max-inline-size: 100%;
  padding: 0.75rem 0.25rem 0.35rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 0.25rem;
}

/* A long hand overlaps gently: 0.5rem under the next card, so 44 px of every card stays its own tap target. */
.cc-hand.is-long { gap: 0; }
.cc-hand.is-long .cc-hand__card + .cc-hand__card { margin-inline-start: -0.5rem; }

.cc-hand__card {
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.15s ease;
}

/* Playable: RAISED and bright (position as well as light). Not playable: low and muted, still readable. */
.cc-hand__card.is-playable {
  transform: translateY(-0.6rem);
  box-shadow: 0 0 0 2px var(--warn), 0 4px 10px rgb(0 0 0 / 0.5);
}

.cc-hand__card.is-dim { opacity: 0.55; filter: saturate(0.45); cursor: default; }
.cc-hand__card:disabled.is-playable { cursor: default; }
.cc-hand__card.is-drawn { outline: 3px solid var(--accent); outline-offset: 2px; }
/* The tapped card: lifted further, ringed, while its play is in flight. */
.cc-hand__card.is-pending { z-index: 1; transform: translateY(-1rem); box-shadow: 0 0 0 3px var(--metal), 0 6px 14px rgb(0 0 0 / 0.6); }

.cc-hand__card:focus-visible {
  z-index: 1;
  outline: 3px solid var(--metal);
  outline-offset: 3px;
}

.cc-recap {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  overflow-wrap: anywhere;
}

/* ========================================================================== *
 * The lobby, the result, the log
 * ========================================================================== */

.cc-lobby,
.cc-result {
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.cc-invites { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }

.cc-invites__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.cc-invites__name { font-weight: 800; overflow-wrap: anywhere; }
.cc-invites__state { color: var(--text-dim); font-size: 0.85rem; font-weight: 700; }
.cc-invites__item--joined .cc-invites__state,
.cc-invites__item--present .cc-invites__state,
.cc-invites__item.is-host .cc-invites__state { color: var(--accent); }
.cc-invites__item--declined .cc-invites__state { color: var(--danger); }

.cc-result--won { border: 2px solid var(--warn); }
.cc-result__headline { display: flex; justify-content: center; gap: 0.5rem; margin: 0; font-size: 1.35rem; font-weight: 900; letter-spacing: 0.06em; text-align: center; overflow-wrap: anywhere; }
.cc-result__symbol { color: var(--warn); }
.cc-result__line { margin: 0; text-align: center; color: var(--text-dim); }

.cc-final { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.cc-final__name { margin: 0 0 0.25rem; font-weight: 800; overflow-wrap: anywhere; }
.cc-final__cards { display: flex; flex-wrap: wrap; gap: 0.25rem; }

.cc-verified { margin: 0; font-weight: 900; text-align: center; }
.cc-verified--ok { color: var(--accent); }
.cc-verified--bad { color: var(--danger); }

.cc-log__list { display: grid; gap: 0.2rem; margin: 0; padding-inline-start: 1.25rem; color: var(--text-dim); font-size: 0.85rem; }
.cc-log__item.is-mine { color: var(--text); }

/* ========================================================================== *
 * The sheets (in the page, never a browser dialog)
 * ========================================================================== */

.cc-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  padding: var(--gutter);
  padding-block-end: calc(var(--gutter) + var(--safe-bottom));
  background: rgb(0 0 0 / 0.6);
}

.cc-sheet__panel {
  display: grid;
  gap: 0.75rem;
  inline-size: 100%;
  max-inline-size: 32rem;
  max-block-size: 85vh;
  margin-inline: auto;
  padding: 1rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  animation: cc-pop 0.25s ease-out both;
}

.cc-sheet__title { margin: 0; font-size: 1.1rem; font-weight: 900; letter-spacing: 0.08em; text-align: center; }
.cc-sheet__text { margin: 0; color: var(--text-dim); text-align: center; }
.cc-sheet__actions { display: grid; gap: 0.5rem; }

.cc-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.cc-color {
  display: grid;
  gap: 0.2rem;
  place-items: center;
  min-height: 5rem;
  border: 2px solid rgb(255 255 255 / 0.8);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.cc-color__glyph { font-size: 1.75rem; }

/* ========================================================================== *
 * Wider screens: the table scales up -- larger seats and cards, and with four
 * players the side seats move down beside the centre, on the oval's edges.
 * ========================================================================== */

@media (min-width: 768px) {
  .cc { padding: 0.75rem 1.25rem 1.25rem; }
  .cc-card { inline-size: 4rem; block-size: 5.75rem; }
  .cc-card__symbol { font-size: 2rem; }
  .cc-card--large { inline-size: 6.5rem; block-size: 9.25rem; }
  .cc-card--large .cc-card__symbol { font-size: 3.25rem; }
  .cc-felt .cc-card--large { inline-size: 6rem; block-size: 8.5rem; }
  .cc-felt .cc-card--large .cc-card__symbol { font-size: 3rem; }
  .cc-card--small { inline-size: 2.4rem; block-size: 3.4rem; }
  .cc-felt {
    min-block-size: clamp(20rem, calc(100vh - 27rem), 34rem);
    min-block-size: clamp(20rem, calc(100svh - 27rem), 34rem);
    padding: 1rem 1.25rem 0.85rem;
  }
  .cc-table.has-clash-button .cc-felt {
    min-block-size: clamp(18rem, calc(100vh - 31.5rem), 34rem);
    min-block-size: clamp(18rem, calc(100svh - 31.5rem), 34rem);
  }
  /* The tab bar is a floating pill 18 px off the bottom here (as Hold'em's action bar): clear it and its shadow. */
  .cc-dock { bottom: calc(var(--shell-nav-space) + 30px); }
  .cc-felt .cc-seats { gap: 0.75rem; }
  .cc-centre { inline-size: min(100%, 22rem); gap: 0.4rem 1rem; }
  .cc-pile__back { inline-size: 4.25rem; block-size: 6rem; }
  .cc-seat { padding: 0.45rem 0.4rem 0.5rem; }
  .cc-seat__avatar { inline-size: 2.5rem; font-size: 0.9rem; }
  .cc-seat__name { font-size: 0.9rem; }
  .cc-seat__mark { font-size: 0.68rem; }
  .cc-felt .cc-status__title { font-size: 1rem; }
  .cc-hand { flex-wrap: wrap; overflow-x: visible; }
  .cc-hand.is-long { row-gap: 0.75rem; }
  .cc-sheet { align-items: center; }

  /*
   * Four players: left and right come down beside the centre, on the oval's
   * side edges. They keep their grid cells (so nothing reflows) and are only
   * drawn lower; the centre stays inside the middle column, clear of them.
   */
  .cc-felt--4 .cc-seats { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); }
  .cc-felt--4 .cc-seat--left,
  .cc-felt--4 .cc-seat--right { position: relative; inset-block-start: 6.5rem; margin-block-start: 0; }
  .cc-felt--4 > .cc-centre { inline-size: min(40%, 20rem); }
}

/*
 * A SHORT PHONE (375 x 667 and the like): the table gives up its extras so
 * the seats, the piles, the status line, the CLASH! / CAUGHT YOU! button and
 * my hand still share one screen -- a smaller top card and draw pile, the
 * pile counts and the status hint left to the screen-reader words (each pile
 * still says them), and while a CLASH! button or the drawn card's PLAY IT /
 * KEEP IT is showing, my seat strip makes way for it (both are mine).
 */
@media (max-height: 760px) {
  .cc-felt .cc-card--large { inline-size: 3.75rem; block-size: 5.4rem; }
  .cc-felt .cc-card--large .cc-card__symbol { font-size: 1.9rem; }
  .cc-pile__back { inline-size: 2.75rem; block-size: 3.9rem; }
  .cc-pile__count,
  .cc-discard__count,
  .cc-felt .cc-status__detail { display: none; }
  .cc-felt .cc-seats { row-gap: 0.2rem; }
  .cc-felt--4 .cc-seat--left,
  .cc-felt--4 .cc-seat--right { margin-block-start: 1.1rem; }
  .cc-table.has-clash-button .cc-me,
  .cc-table.has-drawn .cc-me { display: none; }
  .cc-clashbtn { padding-block: 0.3rem; }
}

/*
 * p9k Package 1: NO CLASH! now shows from a contest's first instant, so on a wide screen with a hand long enough to
 * wrap, a sticky dock (button + two rows of cards) would cover the felt's status line. While a CLASH! button is on
 * screen the dock simply flows under the felt (the hand is frozen during the contest anyway). Phones keep the docked hand.
 */
@media (min-width: 768px) {
  .cc-table.has-clash-button .cc-dock { position: static; }
}

/* A phone on its side: too short for a docked hand -- everything simply flows. */
@media (orientation: landscape) and (max-height: 540px) {
  .cc-felt { min-block-size: 14rem; }
  .cc-dock { position: static; }
}
/* 095: on its side a phone is wide but short -- five and six seats go back to ONE row, in play order, so the piles stay in view. */
@media (orientation: landscape) and (max-height: 540px) {
  .cc-felt--6 .cc-seats { grid-template-areas: "ll ul top ur lr"; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cc-felt--5 .cc-seats { grid-template-areas: "ll ul ur lr"; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ========================================================================== *
 * Motion (short, finite) -- and none at all when asked
 * ========================================================================== */

@keyframes cc-fly-in {
  from { transform: translateY(-2.5rem) scale(0.7); opacity: 0.2; }
  to { transform: none; opacity: 1; }
}

@keyframes cc-fly-up {
  from { transform: translateY(3rem) scale(0.7); opacity: 0.2; }
  to { transform: none; opacity: 1; }
}

@keyframes cc-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* The turn's glow, breathing in (run six times, alternate: 1.8 s in all, then it rests). */
@keyframes cc-glow {
  from { box-shadow: 0 0 0 2px var(--warn), 0 0 6px rgb(240 180 41 / 0.3); }
  to { box-shadow: 0 0 0 3px var(--warn), 0 0 22px rgb(240 180 41 / 0.75); }
}

/* The CLASH! window's last seconds: two identical pulses, alternated by the script so each second restarts one. */
@keyframes cc-beat-a {
  from { transform: scale(1.04); }
  to { transform: none; }
}

@keyframes cc-beat-b {
  from { transform: scale(1.04); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cc *,
  .cc *::before,
  .cc *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ========================================================================== *
 * p9k Package 7 -- SPECIAL-CARD EFFECTS (brief, transform / opacity only;
 * NONE under reduced motion, where the words still say every move)
 * ========================================================================== */

.cc-iconbtn--sound { min-inline-size: 3.6rem; font-size: 0.78rem; }
.cc-iconbtn--sound.is-on { border-color: rgb(255 214 0); color: rgb(255 214 0); }

.cc-fx { animation: cc-fx-pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.cc-fx--draw2, .cc-fx--wild4 { font-size: 1.35em; border-color: rgb(255 214 0); box-shadow: 0 0 22px rgb(255 214 0 / 0.55); }
.cc-fx--wild4 { animation: cc-fx-pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both, cc-fx-shake 0.1s ease-in-out 0.3s 4 alternate; }
.cc-fx--skip { animation: cc-fx-pop 0.3s ease-out both, cc-fx-tilt 0.2s ease-in-out 0.3s 2 alternate; }
.cc-fx--reverse { animation: cc-fx-pop 0.3s ease-out both, cc-fx-spin 0.3s ease-in-out 0.3s 1; }
.cc-fx--wild[data-cc-fx-color="evergreen"], .cc-fx--wild4[data-cc-fx-color="evergreen"] { box-shadow: 0 0 0 4px rgb(31 110 74), 0 0 26px rgb(31 110 74); }
.cc-fx--wild[data-cc-fx-color="gold"], .cc-fx--wild4[data-cc-fx-color="gold"] { box-shadow: 0 0 0 4px rgb(255 214 0), 0 0 26px rgb(255 214 0); }
.cc-fx--wild[data-cc-fx-color="cranberry"], .cc-fx--wild4[data-cc-fx-color="cranberry"] { box-shadow: 0 0 0 4px rgb(160 28 58), 0 0 26px rgb(160 28 58); }
.cc-fx--wild[data-cc-fx-color="frost"], .cc-fx--wild4[data-cc-fx-color="frost"] { box-shadow: 0 0 0 4px rgb(28 98 214), 0 0 26px rgb(28 98 214); }
.cc-fx--clash { border-color: rgb(255 214 0); color: rgb(255 214 0); animation: cc-fx-pop 0.3s ease-out both, cc-fx-flash 0.15s ease-in-out 0.3s 4 alternate; }
.cc-fx--catch { border-color: var(--danger); color: var(--danger); animation: cc-fx-pop 0.3s ease-out both, cc-fx-shake 0.1s ease-in-out 0.3s 4 alternate; }
.cc-fx--win { position: relative; font-size: 1.5em; border-color: rgb(255 214 0); color: rgb(255 214 0); box-shadow: 0 0 30px rgb(255 214 0 / 0.6); }
.cc-fx__burst { position: absolute; inset: 50% auto auto 50%; pointer-events: none; }
.cc-fx__bit { position: absolute; inline-size: 0.5rem; block-size: 0.8rem; border-radius: 2px; opacity: 0; }
.cc-fx__bit--0 { background: rgb(31 110 74); }
.cc-fx__bit--1 { background: rgb(255 214 0); }
.cc-fx__bit--2 { background: rgb(160 28 58); }
.cc-fx__bit--3 { background: rgb(28 98 214); }
/* The victory burst is the one longer effect (0.9 s, once, decorative, aria-hidden). */
.cc-fx__bit:nth-child(1) { animation: cc-fx-bit-1 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(2) { animation: cc-fx-bit-2 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(3) { animation: cc-fx-bit-3 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(4) { animation: cc-fx-bit-4 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(5) { animation: cc-fx-bit-5 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(6) { animation: cc-fx-bit-6 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(7) { animation: cc-fx-bit-7 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(8) { animation: cc-fx-bit-8 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(9) { animation: cc-fx-bit-9 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(10) { animation: cc-fx-bit-10 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(11) { animation: cc-fx-bit-11 0.9s ease-out forwards; }
.cc-fx__bit:nth-child(12) { animation: cc-fx-bit-12 0.9s ease-out forwards; }

@keyframes cc-fx-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cc-fx-shake { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@keyframes cc-fx-tilt { from { transform: none; } to { transform: rotate(-8deg) scale(1.05); } }
@keyframes cc-fx-spin { from { transform: none; } to { transform: rotate(360deg); } }
@keyframes cc-fx-flash { from { filter: none; } to { filter: brightness(1.6); } }
@keyframes cc-fx-bit-1 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(-7rem, -4rem) rotate(220deg); } }
@keyframes cc-fx-bit-2 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(7rem, -4rem) rotate(220deg); } }
@keyframes cc-fx-bit-3 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(-5rem, 3rem) rotate(220deg); } }
@keyframes cc-fx-bit-4 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(5rem, 3rem) rotate(220deg); } }
@keyframes cc-fx-bit-5 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(0rem, -5rem) rotate(220deg); } }
@keyframes cc-fx-bit-6 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(-8rem, 0rem) rotate(220deg); } }
@keyframes cc-fx-bit-7 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(8rem, 0rem) rotate(220deg); } }
@keyframes cc-fx-bit-8 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(2rem, 5rem) rotate(220deg); } }
@keyframes cc-fx-bit-9 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(-2rem, -6rem) rotate(220deg); } }
@keyframes cc-fx-bit-10 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(6rem, 5rem) rotate(220deg); } }
@keyframes cc-fx-bit-11 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(-6rem, 5rem) rotate(220deg); } }
@keyframes cc-fx-bit-12 { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(3rem, -6rem) rotate(220deg); } }

@media (prefers-reduced-motion: reduce) {
  .cc-fx, .cc-fx--wild4, .cc-fx--skip, .cc-fx--reverse, .cc-fx--clash, .cc-fx--catch { animation: none; }
  .cc-fx__burst { display: none; }
}

/* ---- 085: the 25 FP wager (labels from the server's game.wager) ---------------- */
.cc-tag {
  justify-self: start;
  margin: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.cc-tag--wager { border-color: var(--warn); color: var(--warn); }
.cc-free--wager { border-style: solid; border-color: var(--warn); color: var(--warn); }
.cc-bar__pot { margin: 0; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.06em; color: var(--warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-result__wager { margin: 0; text-align: center; font-weight: 900; letter-spacing: 0.04em; color: var(--text); overflow-wrap: anywhere; }
.cc-result__wager.is-won { color: var(--warn); }

/* ---- 087: SHARKS VS ORCAS -- the mode choice, the reaction panel, practice FP, custom cards, final scores ---- */
.cc-mode { display: grid; gap: 0.5rem; }
.cc-react {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
  padding: 0.75rem;
  border: 2px solid var(--warn);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  color: var(--text);
}
.cc-react__title { margin: 0; font-weight: 900; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.cc-react__line { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.cc-react__secs { margin: 0; font-family: var(--mono); font-size: 1.6rem; font-weight: 900; color: var(--warn); }
.cc-react__answers { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cc-react__btn { display: grid; min-height: var(--tap); min-width: var(--tap); padding: 0.4rem 0.8rem; text-align: center; }
.cc-react__btn--all_might { border-color: var(--warn); }
.cc-react__label { font-weight: 900; }
.cc-react__sub { color: var(--text-dim); font-size: 0.72rem; font-weight: 600; }
.cc-fp { justify-self: center; padding: 0 0.4rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text-dim); font-size: 0.72rem; font-weight: 800; }
.cc-card--custom { background: var(--bg-elev-2); color: var(--text); border-color: var(--warn); }
.cc-card--custom .cc-card__symbol { font-size: 0.85rem; font-weight: 900; letter-spacing: 0.02em; }
.cc-scores { display: grid; gap: 0.25rem; margin: 0.5rem 0 0; padding: 0; list-style: none; color: var(--text-dim); }

/* ---- Spectacle 1: SHARKS VS ORCAS power cards -- bundled art, a family frame, a name, and (enlarged) the ability ---- */
.cc-card--so {
  display: block;
  background: #070a1c;
  color: #ffffff;
  border-color: #ff5a3c;
  text-align: center;
}
.cc-card--so-defense { border-color: #3ff0ff; }
.cc-card--so-ultimate { border-color: #ffcf3a; border-width: 3px; }
/* the frame's inner ring: inside the card, so the hand's own raised/selected shadows stay as they are */
.cc-card__ring {
  position: absolute;
  inset: 2px;
  border: 1px solid rgb(255 200 120 / 0.55);
  border-radius: 0.4rem;
  pointer-events: none;
}
.cc-card--so-defense .cc-card__ring { border-color: rgb(190 252 255 / 0.55); }
.cc-card--so-ultimate .cc-card__ring { inset: 1px; border-width: 2px; border-color: rgb(255 246 200 / 0.85); box-shadow: inset 0 0 10px rgb(255 207 58 / 0.7); }
.cc-card__art {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.cc-card__family,
.cc-card__short,
.cc-card__plate {
  position: absolute;
  inset-inline: 0;
  margin: 0;
  padding: 0.1rem 0.15rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  pointer-events: none;
}
/* in the hand: the art and a short name, nothing else */
.cc-card__short { inset-block-end: 0; font-size: 0.5rem; background: rgb(20 4 10 / 0.86); text-shadow: 0 1px 0 #000; }
.cc-card__family { inset-block-start: 0; display: none; font-size: 0.4rem; letter-spacing: 0.14em; color: #ff5a3c; background: rgb(20 4 10 / 0.86); }
.cc-card__plate { inset-block-end: 0; display: none; padding-block-start: 0.6rem; background: linear-gradient(to bottom, transparent, rgb(20 4 10 / 0.86) 0.55rem); }
.cc-card--so-defense .cc-card__short,
.cc-card--so-defense .cc-card__family { background: rgb(2 18 28 / 0.86); }
.cc-card--so-defense .cc-card__plate { background: linear-gradient(to bottom, transparent, rgb(2 18 28 / 0.86) 0.55rem); }
.cc-card--so-ultimate .cc-card__short,
.cc-card--so-ultimate .cc-card__family { background: rgb(40 18 0 / 0.86); }
.cc-card--so-ultimate .cc-card__plate { background: linear-gradient(to bottom, transparent, rgb(40 18 0 / 0.86) 0.55rem); }
.cc-card__title,
.cc-card__power { display: block; }
.cc-card__title { font-size: 0.62rem; text-shadow: 0 1px 0 #000, 0 0 4px #000; }
.cc-card__power { margin-block-start: 0.1rem; font-size: 0.46rem; color: #ff5a3c; }
.cc-card--so-defense .cc-card__family,
.cc-card--so-defense .cc-card__power { color: #3ff0ff; }
.cc-card--so-ultimate .cc-card__family,
.cc-card--so-ultimate .cc-card__power { color: #ffcf3a; }
.cc-card--so-ultimate .cc-card__short,
.cc-card--so-ultimate .cc-card__title { color: #ffe066; }
/* enlarged (the top of the pile, a played card): family, full name and the one-line ability */
.cc-card--so.cc-card--large .cc-card__family,
.cc-card--so.cc-card--large .cc-card__plate { display: block; }
.cc-card--so.cc-card--large .cc-card__short { display: none; }
.cc-card--so-ultimate.cc-card--large .cc-card__title { font-size: 0.68rem; }
/* small (a final hand): the art alone */
.cc-card--so.cc-card--small .cc-card__short { display: none; }
.cc-card--so.cc-card--small .cc-card__ring { inset: 1px; border-radius: 0.25rem; }
/* chosen while its sheet asks WHO / which colour: the card steps up and grows so its art can be seen */
.cc-hand__card.cc-card--so.is-pending { transform: translateY(-1rem) scale(1.3); transform-origin: 50% 100%; z-index: 2; }
@media (min-width: 768px) {
  .cc-card__short { font-size: 0.6rem; }
  .cc-card--so.cc-card--large .cc-card__title { font-size: 0.85rem; }
  .cc-card--so.cc-card--large .cc-card__power { font-size: 0.6rem; }
  .cc-card--so-ultimate.cc-card--large .cc-card__title { font-size: 0.92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-hand__card.cc-card--so.is-pending { transform: translateY(-1rem); }
}
