/* =====================================================================
   ETUYA option C, Try it / Coba sendiri pages (hub + five games).
   The games are shared with option B (/etuya-web/option-b/play/*.js and *.css). This file
   loads after c.css and the B game styles, and does two things:
   1. Bridge: defines the B tokens and the few B utilities the games use
      (buttons, links, stamps, the cobalt field) in option C terms:
      Plus Jakarta Sans, the one accent #1577BD, cards 22px, nested 14px, pills.
   2. The option C page chrome around the games: hero, game cards, more games.
   Generated pages: tools/gen-play-pages-c.py.
   ===================================================================== */
:root {
  --paper: var(--surface);
  --paper-2: #EDF1F5;
  --rule: var(--line);
  --rule-strong: var(--line-strong);
  --cobalt: var(--accent);
  --cobalt-deep: var(--accent-strong);
  --on-cobalt: #FFFFFF;
  --serif: var(--font);
  --sans: var(--font);
  --margin: var(--pad);
  --gutter: clamp(16px, 2vw, 28px);
  --nav-h: 88px;
}

/* ---------- B base rules the games expect ---------- */
.game svg, .game canvas, .game video { display: block; max-width: 100%; }
:where(.game) a { color: inherit; }
:where(.game) ol { list-style: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[id] { scroll-margin-top: 96px; }

/* ---------- Buttons: B modifiers on the C pill ---------- */
.btn { min-height: var(--h); }
.btn--solid { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(11,21,32,.08), 0 10px 24px -12px rgba(21,119,189,.6); }
.btn--solid:hover { background: var(--accent-strong); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-chip); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-strong); }
.btn--on-cobalt { background: #fff; color: var(--b-navy); }
.btn--on-cobalt:hover { background: #EAF4FC; }
.btn--ghost-on-cobalt { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.6); box-shadow: none; }
.btn--ghost-on-cobalt:hover { background: rgba(255,255,255,.16); border-color: #fff; color: #fff; }
.btn--lg { --h: 56px; padding: 0 26px; font-size: 17px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn i { transition: transform .35s var(--ease-out); }
@media (hover: hover) {
  .btn:hover i.ph-arrow-right { transform: translateX(3px); }
  .btn:hover i.ph-arrow-up-right { transform: translate(2px, -2px); }
}

/* ---------- Links ---------- */
.link-u {
  position: relative; display: inline-block; padding-block: .5em;
  font: 650 15.5px/1.2 var(--font); color: var(--accent-strong);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px; white-space: nowrap;
  transition: color .2s, text-decoration-color .2s;
}
.link-u::after { content: none; }
.link-u:hover { text-decoration-color: currentColor; }
.link-u--on-cobalt, .link-u.link-u--on-cobalt:hover { color: #fff; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; padding-block: 6px;
  font: 650 15px/1.3 var(--font); color: var(--accent-strong);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.link-arrow:hover { text-decoration-color: currentColor; }
.link-arrow i { transition: transform .3s var(--ease-out); }
.link-arrow:hover i.ph-arrow-right { transform: translateX(3px); }
.src-link { font-family: var(--font); }

/* ---------- Tag stamps (mitigation solid, adaptation outline, co-benefit half) ---------- */
.stamp {
  display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1.5px solid var(--accent); border-radius: var(--r-pill);
  background: var(--surface); color: var(--accent-strong);
  font: 700 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  transform: rotate(-3deg);
}
.stamp__icon { display: grid; place-items: center; padding: 5px 6px 5px 9px; font-size: 15px; }
.stamp__label { display: flex; align-items: center; padding: 6px 11px 5px 7px; }
.stamp--m .stamp__icon, .stamp--m .stamp__label, .stamp--c .stamp__icon { background: var(--accent); color: #fff; }
.stamp--c .stamp__icon { padding-right: 8px; }
.stamp--c .stamp__label { padding-left: 9px; }
.stamp--flat { transform: none; }
.stamp--sm { font-size: 10.5px; }
.stamp--sm .stamp__icon { padding: 4px 4px 4px 7px; font-size: 13px; }
.stamp--sm .stamp__label { padding: 5px 9px 4px 5px; }
.stamp--sm.stamp--c .stamp__label { padding-left: 7px; }

/* ---------- The cobalt field (clean sea): a rounded accent panel ---------- */
.cobalt { position: relative; background: var(--accent); color: #fff; }
.cobalt :focus-visible { outline-color: #fff; }
.cp-panel {
  border-radius: var(--r-card);
  padding: clamp(20px, 3.4vw, 48px);
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(88,250,195,.16), transparent 60%),
    linear-gradient(160deg, #1A82CC 0%, var(--accent) 45%, #11609B 100%);
  box-shadow: var(--shadow-lg);
}

/* ---------- Game surfaces: the C card language ---------- */
.game .play-note, .cp-hero .play-note { color: var(--ink-2); }
.game__noscript { border-radius: var(--r-media); background: var(--surface); border: 1px solid var(--line); }

/* ---------- Game type: B's serif display lines become C's heavy sans ---------- */
.planner__q, .region__name, .tagv__title, .trk__title, .report__title, .plan__title,
.zone__name, .fcard__text, .fcard__verdict, .own__title, .send__rank strong,
.sea__intro-title, .sea__paused p, .wend__title,
.qz__q, .qz__verdict, .qz__rank, .qz__rq, .cert__title, .mx__msg {
  font-weight: 800;
  letter-spacing: -.03em;
}
.qz__rq { font-weight: 700; letter-spacing: -.015em; }
/* Big figures: heavy, tight, tabular */
.psum__left, .zone__count, .srt__score, .send__score, .qz__big, .mx__total-n, .mx__score-big,
.scene__year, .act__cost, .ledger__cost, .report__val, .sea__stats b, .wbin__count, .meter__val b {
  font-weight: 800;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums lining-nums;
}
/* B's italic serif labels: upright in C */
.mix__title, .real__title, .send__title, .qz__title, .mx__total-sub, .mx__tie-title {
  font-style: normal;
  font-weight: 650;
  letter-spacing: -.01em;
}

/* ---------- Game shapes: cards 22px, nested 14px, keys and chips small radius ---------- */
.region, .zone, .fcard__face, .fcard__back, .srt__deck::before, .srt__deck::after,
.mx__board, .scene, .report, .own, .tagv__stage, .trk__scene {
  border-radius: var(--r-card);
}
.region, .scene, .tagv__stage, .trk__scene, .zone, .mx__board { overflow: hidden; }
.region, .zone, .fcard__face, .mx__board { box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.qopt, .wbin, .mini__card, .act, .ledger, .own__input, .cert__input, .sea__frame, .plan__stage { border-radius: var(--r-media); }
.sea__frame { overflow: hidden; }
.qopt__key, .zone__key, .wbin__key, .act__icon { border-radius: 8px; }
.act__btn, .mx__toggle { border-radius: var(--r-pill); }
.srt__cell, .qz__dots li, .qz__rmark { border-radius: 6px; }
.planner__steps li::before, .scene__dots span, .fx__dots span { border-radius: 50%; }
.real, .own, .cert__frame { border-radius: var(--r-card); }
.psum, .qz__fb, .cert__img { border-radius: var(--r-media); }
.cert__img { overflow: hidden; }
.qz__fb { overflow: hidden; }
.scene__year { border-radius: 10px; font-weight: 800; letter-spacing: -.03em; }
.mx__icon, .wend__icon { border-radius: 10px; }
.mx__range::-webkit-slider-thumb { border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent), 0 2px 8px -2px rgba(21,119,189,.45); }
.mx__range::-moz-range-thumb { border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent), 0 2px 8px -2px rgba(21,119,189,.45); }

/* =====================================================================
   PAGE CHROME
   ===================================================================== */
.cplay main { padding-top: 104px; }
.cp-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); }
.cp-hero .wrap { display: grid; gap: 18px; justify-items: start; }
.cp-hero .eyebrow { margin-bottom: 0; }
.cp-hero h1 { max-width: 16ch; }
.cp-hero .lede { max-width: 58ch; }
.cp-hero .play-note { margin-top: 2px; }
.cp-hero--game { padding: clamp(20px, 3vw, 36px) 0 clamp(20px, 3vw, 32px); }
.cp-hero--game .wrap { gap: 14px; }
.cp-hero--game h1 { max-width: 20ch; font-size: clamp(1.9rem, 3.4vw, 3rem); }
.game-back {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 4px;
  height: 36px; padding: 0 14px 0 10px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-chip);
  font: 600 14px/1 var(--font); color: var(--ink-2); text-decoration: none;
  transition: color .2s, border-color .2s;
}
.game-back:hover { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.game-back i { transition: transform .3s var(--ease-out); }
.game-back:hover i { transform: translateX(-3px); }
.game { padding-bottom: clamp(48px, 7vw, 96px); }
.game--sea .game__pad { padding-block: 0; }

/* ---------- Hub: five game cards ---------- */
.cp-games { padding-bottom: clamp(56px, 7vw, 104px); }
.cg-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(14px, 1.6vw, 22px);
}
.cg {
  position: relative; display: flex; flex-direction: column;
  padding: 10px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: box-shadow .3s, transform .25s var(--ease-out), border-color .3s;
}
.cg__media { position: relative; overflow: hidden; border-radius: var(--r-media); background: var(--canvas); aspect-ratio: 16 / 10; }
.cg__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.cg__body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: clamp(14px, 1.6vw, 22px) clamp(10px, 1.2vw, 16px) clamp(8px, 1vw, 12px); }
.cg__n { font: 500 12px/1 var(--mono); letter-spacing: .12em; color: var(--accent-strong); }
.cg__title { font-weight: 800; font-size: clamp(1.3rem, 1.9vw, 1.75rem); line-height: 1.12; letter-spacing: -.03em; }
.cg__link { color: var(--ink); text-decoration: none; }
.cg__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cg__link:focus-visible { outline: none; }
.cg:has(.cg__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.cg__blurb { color: var(--ink-2); font-size: 16px; line-height: 1.5; max-width: 46ch; }
.cg__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; font: 500 13px/1.2 var(--mono); color: var(--ink-2); }
.cg__meta > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.cg__meta .ph-timer { font-size: 15px; }
.cg__go {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-strong);
  font: 700 14.5px/1 var(--font); transition: background-color .25s, color .25s;
}
.cg__go i { transition: transform .35s var(--ease-out); }
.cg:active { transform: scale(.992); }
@media (hover: hover) and (pointer: fine) {
  .cg:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
  .cg:hover .cg__media img { transform: scale(1.04); }
  .cg:hover .cg__go { background: var(--accent); color: #fff; }
  .cg:hover .cg__go i { transform: translateX(3px); }
}
/* Plan tall on the left, sort and sea stacked on the right, quiz and mix below. */
.cg--plan { grid-column: 1 / span 7; grid-row: span 2; }
.cg--plan .cg__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
.cg--plan .cg__body { flex: 0 0 auto; }
.cg--plan .cg__title { font-size: clamp(1.8rem, 2.9vw, 2.7rem); }
.cg--sort, .cg--sea { grid-column: 8 / span 5; flex-direction: row; }
.cg--sort .cg__media, .cg--sea .cg__media { flex: 0 0 42%; aspect-ratio: auto; }
.cg--quiz { grid-column: 1 / span 5; }
.cg--mix { grid-column: 6 / span 7; }
.cg--quiz .cg__media, .cg--mix .cg__media { aspect-ratio: 16 / 7; }

/* ---------- More games ---------- */
.cp-more { padding: clamp(8px, 2vw, 24px) 0 clamp(56px, 7vw, 96px); }
.cp-more .eyebrow { margin-bottom: 16px; }
.cm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cm__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name icon" "blurb icon";
  align-items: center; column-gap: 16px; height: 100%;
  padding: 18px 20px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-chip);
  color: var(--ink); text-decoration: none;
  transition: border-color .25s, box-shadow .25s, transform .2s var(--ease-out);
}
.cm__name { grid-area: name; font-weight: 750; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }
.cm__blurb { grid-area: blurb; margin-top: 4px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.cm__link i {
  grid-area: icon; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 18px;
  transition: background-color .25s, color .25s, transform .3s var(--ease-out);
}
.cm__link:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) {
  .cm__link:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow); }
  .cm__link:hover i { background: var(--accent); color: #fff; transform: translateX(2px); }
}

/* ---------- Closing panel: the C CTA panel, shorter ---------- */
.cp-close h2 { max-width: 18ch; }
.cp-close .cta-sub { max-width: 52ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .cg--plan { grid-column: 1 / -1; grid-row: auto; }
  .cg--plan .cg__media { min-height: 0; aspect-ratio: 16 / 8; }
  .cg--sort, .cg--sea, .cg--quiz, .cg--mix { grid-column: span 6; flex-direction: column; }
  .cg--sort .cg__media, .cg--sea .cg__media, .cg--quiz .cg__media, .cg--mix .cg__media { flex: none; aspect-ratio: 16 / 9; }
}
@media (max-width: 900px) {
  /* The C nav never hides, so the sticky plan stage parks just below it. */
  .cplay .plan__stage { top: 84px; border-radius: 0 0 var(--r-card) var(--r-card); background: var(--canvas); box-shadow: 0 12px 24px -18px rgba(11,21,32,.35); }
}
@media (max-width: 767px) {
  .cplay main { padding-top: 88px; }
  .cg--sort, .cg--sea, .cg--quiz, .cg--mix { grid-column: 1 / -1; }
  .cg--plan .cg__media { aspect-ratio: 16 / 10; }
  .cm-list { grid-template-columns: minmax(0, 1fr); }
}
