/* Shared look for every page: tokens, base, nav, footnote, home and about. The picker's step styles live in picker.html. */
:root {
  --ink: #111; --mid: #666; --faint: #C6C6C6; --rule: #E5E5E5; --quiet: #999; --mark: #FFE600;
  --pad: 48px; --prompt: 26px; --word: clamp(30px, 4.4vw, 46px); --join: clamp(20px, 3vw, 30px); --nav-h: 64px;
}
@media (max-width: 640px) { :root { --pad: 22px; --prompt: 18px; --nav-h: 56px; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); }
body { font-family: 'Instrument Sans', system-ui, sans-serif; line-height: 1.3; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

html[lang="zh-CN"] body { font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Instrument Sans', system-ui, sans-serif; }
html[lang="zh-CN"] .words, html[lang="zh-CN"] .hero, html[lang="zh-CN"] .row .dish, html[lang="zh-CN"] .row .n { letter-spacing: 0; }
html[lang="zh-CN"] .join, html[lang="zh-CN"] .derived, html[lang="zh-CN"] .sub { font-style: normal; }

/* Nav: wordmark, the picker as the thing to press, about, language. */
.nav { height: var(--nav-h); display: flex; align-items: center; gap: 22px; max-width: 1000px; margin: 0 auto; padding: 0 var(--pad); font-size: 15px; }
.nav .brand img { display: block; height: 24px; width: auto; }
.nav .brand { font-weight: 700; text-decoration: none; margin-right: auto; letter-spacing: -.01em; }
.nav a:not(.brand) { text-decoration: none; color: var(--mid); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a.go { color: var(--ink); font-weight: 700; background: var(--mark); padding: 4px 8px; }
.nav .lang { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--mark); padding: 2px 4px; }
.nav a.me { display: inline-block; max-width: 7em; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; } /* a 24-letter nickname is not a nav item */
.nav .menu, .nav .note { display: none; }
@media (max-width: 640px) {
  /* Phones: one row. The logo, the picker and Menu; the other pages, the language and the footnote wait behind Menu. */
  .nav { gap: 14px; font-size: 14px; white-space: nowrap; }
  .nav > :not(.brand, .go, .menu) { display: none; }
  .nav:not(.open) a.go[aria-current="page"] { display: none; }
  .nav a.go { position: relative; padding: 3px 6px; }
  .nav a.go::before { content: ''; position: absolute; inset: -11px -4px; } /* a thumb's worth to hit around the marker (::after is the short label) */
  .nav .menu { display: block; min-width: 44px; min-height: 44px; font-weight: 700; text-align: right; }
  .nav:not(.open) .sh { font-size: 0; } .nav:not(.open) .sh::after { content: attr(data-short); font-size: 14px; } /* short label in the row; the full one stays as the accessible name */
  /* Open: the whole screen, the pages as big words down the left. Current page in ink on the marker's underline; the picker on the marker. */
  .nav.open { position: fixed; inset: 0; z-index: 10; height: auto; flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 20px; background: #fff; overflow-y: auto; overscroll-behavior: contain; white-space: normal; }
  .nav.open + main { margin-top: var(--nav-h); } /* the sheet is out of the flow: the page under it stays where it was */
  .nav.open > * { display: block; flex: none; }
  .nav.open .brand { display: flex; align-items: center; height: var(--nav-h); margin: 0 0 12px; }
  .nav.open .menu { position: absolute; top: 6px; right: var(--pad); }
  .nav.open a:not(.brand) { color: var(--ink); font-weight: 700; font-size: 38px; line-height: 1.34; letter-spacing: -.03em; max-width: 100%; }
  .nav.open a.go { padding: 0 6px; margin-left: -6px; }
  .nav.open a.go::before { content: none; }
  .nav.open a[aria-current="page"]:not(.go) { border-bottom: 3px solid var(--mark); line-height: 1.15; }
  .nav.open .lang { position: relative; margin-top: 26px; font-size: 18px; }
  .nav.open .lang::before { content: ''; position: absolute; inset: -8px -6px; }
  .nav.open .note { margin: auto 0 0; padding-top: 30px; font-size: 11px; color: var(--quiet); }
}
/* The menu, moving: the sheet unrolls from under the header and its words rise in one after another, the way a step's do
   (the same rise the picker, the account and Rātaka define). Close rolls it back up; that half is in site.js. */
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  @keyframes unroll { from { clip-path: inset(0 0 calc(100% - var(--nav-h)) 0); } to { clip-path: inset(0); } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  .nav.open { animation: unroll 280ms cubic-bezier(.2, .7, .2, 1) backwards; }
  .nav.open > :not(.brand, .menu) { animation: rise 360ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(60ms + var(--i, 0) * 28ms); }
}

main { max-width: 1000px; margin: 0 auto; padding: 0 var(--pad); }

/* Footnote: one quiet line. */
.footnote { max-width: 1000px; margin: 0 auto; padding: 26px var(--pad) 30px; font-size: 11px; color: var(--quiet); }

/* Words: an answer you tap. Grey until picked, then ink on the marker. Shared by the picker, lists and contact. */
@media (hover: hover) { .word:not([aria-pressed="true"]):not([disabled]):hover { color: var(--quiet); } }
.words { margin-top: 16px; font-weight: 700; font-size: var(--word); line-height: 1.22; letter-spacing: -.025em; }
.word { display: inline-block; position: relative; z-index: 0; margin: 0 22px 0 0; padding: 0 4px; color: var(--faint); }
.word[aria-pressed="true"] { color: var(--ink); }
.word[aria-pressed="true"]::before { content: ''; position: absolute; inset: 0 -4px; z-index: -1; background: var(--mark); transform-origin: 0 50%; }
.word[disabled] { color: #E0E0E0; font-weight: 400; cursor: default; }
.join { display: inline-block; margin-right: 22px; font-weight: 400; font-style: italic; color: var(--quiet); font-size: var(--join); }
@media (max-width: 640px) { .word { margin-right: 14px; } .join { margin-right: 14px; } }

/* Social proof on an open row: the invitation when nobody has logged the place; the sample label in ?preview. */
.detail .first { font-weight: 700; }
.detail .first::after { content: ''; display: block; width: 28px; height: 3px; background: var(--mark); margin-top: 3px; }
.detail .sample { font-size: 11px; color: var(--quiet); margin-top: -4px; }

/* Home */
.home { min-height: calc(100vh - var(--nav-h)); min-height: calc(100dvh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; padding: 34px 0 60px; }
.hero { font-weight: 700; font-size: clamp(38px, 7vw, 84px); line-height: 1.02; letter-spacing: -.03em; margin: 0; max-width: 14ch; }
.hero mark { background: var(--mark); color: inherit; padding: 0 6px; box-shadow: 6px 0 0 var(--mark), -6px 0 0 var(--mark); white-space: nowrap; }
html[lang="zh-CN"] .hero { line-height: 1.2; }
html[lang="zh-CN"] .hero mark { padding: 2px 6px; }
.sub { font-size: clamp(18px, 2.2vw, 24px); color: var(--mid); font-style: italic; margin: 18px 0 0; max-width: 34ch; }
.cta { display: inline-block; margin-top: 34px; font-weight: 700; font-size: clamp(22px, 3vw, 32px); color: var(--ink); text-decoration: none; background: var(--mark); padding: 8px 14px; box-shadow: 6px 0 0 var(--mark), -6px 0 0 var(--mark); margin-left: 6px; align-self: flex-start; }
.live { margin-top: 40px; font-size: 14px; color: var(--mid); max-width: 52ch; line-height: 1.5; }
.live.join { margin-top: 8px; }
.live.join a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--mark); }
@media (max-width: 640px) {
  /* A phone: home is one screen, the footnote at its foot instead of under the fold. */
  body:has(.home) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
  body:has(.home) > * { width: 100%; } /* flex-column items with site.css's auto margins shrink to their content without a width */
  body:has(.home) > main { flex: 1; display: flex; flex-direction: column; }
  body:has(.home) .home { flex: 1; min-height: 0; }
}

/* About */
.about { padding: 34px 0 40px; }
.about h1 { font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.025em; margin: 0 0 18px; }
.about h2 { font-size: 17px; font-weight: 700; margin: 26px 0 4px; display: inline-block; border-bottom: 3px solid var(--mark); }
.about h2 + p { margin-top: 0; }
.about p { font-size: 17px; line-height: 1.55; max-width: 62ch; color: var(--ink); margin: 0 0 14px; }
