/* The site around the game (/, /how, the room, /readme/, /making-of): the
   site plan v8 mock's layout, one reading column under a sticky top bar, in
   /play's colours and fonts (ink, paper, lacquer, gold, jade). */
:root {
  --ink: #120e18;
  --ink-2: #1d1726;
  --surface: #1b1622;
  --paper: #f5ead6;
  --mist: #b9b0c6;
  --lacquer: #cf3b2e;
  --gold: #e8b84d;
  --jade: #45a48c;
  --line: rgba(245, 234, 214, .16);
  --chip: rgba(245, 234, 214, .08);
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --brush: "Ma Shan Zheng", "KaiTi", "STKaiti", serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--body); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
html[lang="zh"] body.site { font-family: var(--zh); }
:where(.site) button { font: inherit; color: inherit; cursor: pointer; }
:where(.site) a { color: inherit; }
.site :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.min0 { min-width: 0; }
.m0 { margin: 0; }
.mt { margin-top: 18px; }
.muted { color: var(--mist); }
.small { font-size: 14px; }

/* the top bar */
.top { position: sticky; top: 0; z-index: 30; background: rgba(18, 14, 24, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand b { font-family: var(--display); font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="zh"] .brand b { font-family: var(--zh); font-weight: 700; }
.top .seal { flex: none; width: 34px; height: 34px; border-radius: 5px; background: var(--lacquer); color: var(--paper); display: grid; grid-template-columns: 1fr 1fr; place-items: center; font-family: var(--brush); font-size: 13px; line-height: 1; padding: 3px; box-shadow: inset 0 0 0 2px rgba(245,234,214,.3); }
.links { display: flex; gap: 2px; margin-left: auto; }
.links a { text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--mist); white-space: nowrap; }
.links a[aria-current="page"] { color: var(--paper); background: var(--chip); }
.links a:hover { color: var(--paper); }
.lang { display: flex; flex: none; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 0; }
.lang button { border: 0; background: none; padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--mist); }
.lang button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.menu { display: none; }
.menu summary { list-style: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-weight: 700; cursor: pointer; font-size: 14px; }
.menu summary::-webkit-details-marker { display: none; }

main.wrap { padding-block: 28px 64px; }
main.wrap :is(h1, h2, h3), .site .h3 { font-family: var(--display); line-height: 1.08; margin: 0; text-wrap: balance; }
html[lang="zh"] main.wrap :is(h1, h2, h3, .h3) { font-family: var(--zh); font-weight: 700; letter-spacing: .5px; }
main.wrap h1 { font-size: clamp(32px, 5vw, 46px); }
.site .h3 { font-size: 18px; margin-bottom: 8px; }
.eyebrow { font-family: var(--body) !important; font-size: 12px !important; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--mist); margin: 0 0 8px !important; }
html[lang="zh"] .eyebrow { letter-spacing: 2px; }
.lede { font-size: 19px; color: var(--mist); max-width: 40ch; margin: 12px 0 0; }

.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; font-family: var(--display); font-size: 17px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; color: var(--paper); }
html[lang="zh"] .btn { font-family: var(--zh); font-weight: 700; }
.btn.primary { background: var(--lacquer); color: var(--paper); box-shadow: 0 3px 0 #7d1f17; }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.spread { justify-content: space-between; }
form.inline { display: inline; margin: 0; }
.toast { color: var(--gold); margin: 10px 0 0; }
.field-err { width: 100%; margin: 4px 0 0; color: #ffb4a8; font-size: 14px; }

/* home */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); }
.hero .zhtitle { font-family: var(--brush); color: var(--gold); font-size: 26px; margin-top: 6px; display: block; }
.hero .zhtitle[lang="en"] { font-family: var(--display); font-weight: 700; font-size: 20px; }
.hero .cta { margin-top: 22px; align-items: flex-start; }
.hero .proof { margin-top: 14px; font-size: 14px; color: var(--mist); }
.join { position: relative; }
.join summary { list-style: none; }
.join summary::-webkit-details-marker { display: none; }
.joincode { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.joincode label { width: 100%; font-size: 13px; color: var(--mist); }
.joincode input { font: inherit; font-family: var(--display); letter-spacing: 4px; text-transform: uppercase; width: 8ch; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink-2); color: var(--paper); }
.scene { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 5 / 4; max-width: 100%; border: 1px solid var(--line); }
.scene svg { display: block; width: 100%; height: 100%; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; counter-reset: s; }
.step3 { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; counter-increment: s; min-width: 0; }
.step3::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 800; margin-bottom: 8px; }
.step3 b { display: block; font-size: 17px; margin-bottom: 2px; }
.step3 p { margin: 0; color: var(--mist); font-size: 15px; }
.section-h { margin: 52px 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-h h2 { font-size: 30px; }
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; grid-template-columns: 64px 1fr; gap: 14px; min-width: 0; }
.game .ico { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; }
.game .ico svg { width: 40px; height: 40px; }
.game h3 { font-size: 22px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.game h3 span { font-family: var(--brush); font-weight: 400; font-size: 17px; color: var(--gold); }
.game h3 span[lang="en"] { font-family: var(--body); font-size: 14px; color: var(--mist); }
.game p { margin: 4px 0 8px; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tagc { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--mist); font-variant-numeric: tabular-nums; }
.choice { font-size: 14px; border-left: 3px solid var(--gold); padding-left: 10px; margin: 0 0 12px; }
.choice b { color: var(--gold); }
.memory { margin-top: 52px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.memory h2 { font-size: 28px; }
.memory p { color: var(--mist); }
.fishn { font-family: var(--display); font-size: 30px; line-height: 1; }
.fishn small { font-size: 15px; color: var(--mist); font-family: var(--body); }

/* how to play */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 22px; }
.tab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 700; text-decoration: none; }
.tab[aria-current="page"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.howhead { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.goalgrid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.goalbox { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.goalbox.key { border-color: var(--gold); }
.goalbox p { margin: 0; font-size: 17px; }
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; align-items: center; min-width: 0; }
.steps .pic { width: 96px; height: 72px; border-radius: 10px; background: #e8efe6; display: grid; place-items: center; }
.steps .pic svg { width: 84px; height: 62px; }
.steps b { display: block; font-size: 17px; }
.steps p { margin: 2px 0 0; color: var(--mist); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }
.panel h3 { font-size: 18px; margin-bottom: 8px; }
.panel ul { margin: 0; padding-left: 18px; }
.panel li { margin: 3px 0; }

/* the room */
.roomhead { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.code { font-family: var(--display); font-size: 44px; letter-spacing: 6px; line-height: 1; }
.share { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; max-width: 100%; min-width: 0; }
.share .btn { white-space: nowrap; flex: none; }
.share code { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.roomgrid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; margin-top: 20px; }
.people { display: flex; gap: 12px; flex-wrap: wrap; }
.person { text-align: center; width: 76px; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.person .f { width: 64px; height: 76px; border-radius: 12px; overflow: hidden; margin: 0 auto 4px; position: relative; border: 2px solid var(--line); }
.person .f svg { width: 100%; height: 100%; display: block; }
.person.on .f { border-color: var(--jade); }
.person .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--jade); margin-right: 4px; }
.person.empty .f { border-style: dashed; display: grid; place-items: center; color: var(--mist); font-size: 22px; }
.pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.pickb { text-align: left; border: 1px solid var(--line); background: var(--ink-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.pickb b { display: block; }
.pickb span { font-size: 13px; color: var(--mist); }
.pickb[aria-pressed="true"] { border-color: var(--lacquer); box-shadow: inset 0 0 0 1px var(--lacquer); }
.lakebar { height: 14px; border-radius: 999px; background: var(--chip); overflow: hidden; margin: 6px 0 4px; }
.lakebar i { display: block; height: 100%; background: var(--jade); border-radius: inherit; transition: width .4s; }
.small-h { font-size: 16px !important; }
.log { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: 14px; }
.log li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.log li.none { display: block; color: var(--mist); }
.log time { color: var(--mist); font-variant-numeric: tabular-nums; font-size: 13px; }
.log .fish { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.roster { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.face-btn { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.face-btn:has(input:checked) { border-color: var(--gold); }
.face-btn input { position: absolute; opacity: 0; pointer-events: none; }
.face-btn svg { display: block; width: 100%; height: 100%; }
.page-room .joinform { position: static; transform: none; width: auto; max-width: 520px; margin-top: 18px; display: grid; gap: 8px; }
.page-room .joinform h3 { margin: 0; font-family: var(--display); font-size: 22px; }
.page-room .joinform #name { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-2); color: var(--paper); }


/* making of */
.timeline { list-style: none; padding: 0; margin: 24px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 40px; margin-bottom: 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid var(--mist); }
.timeline li.now::before { border-color: var(--lacquer); background: var(--lacquer); }
.timeline .when { font-size: 13px; color: var(--mist); font-weight: 700; }
.timeline .h3 { font-size: 21px; margin: 2px 0 4px; }
.timeline p { margin: 0 0 6px; max-width: 62ch; }
.timeline .why { color: var(--mist); font-size: 15px; }

/* /readme/ */
.note-en { background: var(--chip); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--gold); margin: 0 0 18px; }
.readme { max-width: 72ch; }
.about-zh { max-width: 60ch; } .about-zh p { font-size: 17px; line-height: 1.75; }
.readme-en { margin-top: 8px; } .readme-en > summary { list-style: none; cursor: pointer; margin-bottom: 14px; } .readme-en > summary::-webkit-details-marker { display: none; }
.readme h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 12px; }
.readme h2 { font-size: 24px; margin: 28px 0 8px; }
.readme a { color: var(--gold); }
.readme code { background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: .9em; overflow-wrap: anywhere; }
.readme img { max-width: 100%; height: auto; }
.readme table { display: block; overflow-x: auto; max-width: 100%; }

footer { border-top: 1px solid var(--line); padding-block: 22px; color: var(--mist); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .hero, .memory, .roomgrid { grid-template-columns: 1fr; }
  .games, .goalgrid, .two { grid-template-columns: 1fr; }
  .steps3 { grid-template-columns: 1fr; }
  .top .wrap { flex-wrap: wrap; }
  .menu { display: block; margin-left: auto; }
  .links { display: none; order: 9; width: 100%; flex-direction: column; margin: 0; padding: 4px 0; }
  .top:has(.menu[open]) .links, .top.open .links { display: flex; }
  .brand b { font-size: 16px; }
  .steps li { grid-template-columns: 72px 1fr; }
  .steps .pic { width: 72px; height: 56px; }
  .steps .pic svg { width: 62px; height: 46px; }
  .howhead { grid-template-columns: 1fr; }
  .code { font-size: 36px; letter-spacing: 4px; }
}
@media (max-width: 420px) { .pick { grid-template-columns: 1fr; } .game { grid-template-columns: 1fr; } .game .ico { width: 52px; height: 52px; } .roster { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* the 3D tag on your own boat, in the page's language */

/* C1: the card before the start, on the room page */
.c1 { margin-top: 14px; display: grid; gap: 10px; }
.c1 .goalline { margin: 0; border-left: 3px solid var(--gold); padding-left: 10px; }
.c1 .goalline b { color: var(--gold); }
.icons3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.icons3 > div { background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 2px; justify-items: center; text-align: center; min-width: 0; }
.icons3 > div > span { font-size: 22px; }
.icons3 b { font-size: 14px; }
.icons3 small { color: var(--mist); font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--mist); }
@media (max-width: 420px) { .icons3 { grid-template-columns: 1fr; } }
