/* 牛タン平司 / Gyutan Heiji - Taishido, Setagaya.
   The only stylesheet written for this site. ds.css, booking.css and
   media.css load after it and are shared; nothing here forks them.

   THE READ. A one-dish house in a Setagaya side street. The shop's own
   handwriting is the design system: a live-edge cedar fascia, two spot lamps
   on it, paper lanterns, and a column of handwritten paper strips down the
   shopfront. So the page is built out of paper slips - narrow vertical
   headings pinned down the left edge of a narrow measure - lit warm from
   above. Nothing here imitates the shop's hand in a typeface.

   GROUND. Lantern dark, warm, never black. Nothing is #000000 and nothing is
   #FFFFFF. Measured against --bg #17120E: --text 15.23:1, --muted 7.71:1,
   --accent 8.39:1 (so the amber is safe for text as well as fills),
   --err 7.63:1, --ok 9.25:1. --line is a 1.41:1 hairline BY DESIGN: it is a
   rule, never information, and nothing depends on seeing it.
   --edge is derived from the same timber for control borders, because a
   hairline that a form control depends on has to clear 3:1: it measures
   4.13:1 on --bg, 3.89:1 on --bg-2 and 3.54:1 on --bg-3. */

:root {
  --bg:        #17120E;   /* timber in shadow */
  --bg-2:      #201913;   /* surface / card / slip */
  --bg-3:      #2A2119;   /* input wells */
  --text:      #F2E7D8;   /* warm paper */
  --muted:     #B7A48D;
  --line:      #3A2E23;   /* hairline. decoration, never information */
  --edge:      #8A7360;   /* control borders, >= 3:1 everywhere it is used */
  --accent:    #E0A33A;   /* the lantern amber */
  --accent-ink:#17120E;   /* dark text on the amber chip */
  --err:       #F08A7A;
  --ok:        #8FC39A;

  --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  --font-body:    "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --font-latin:   Spectral, "Zen Old Mincho", Georgia, serif;

  --measure: 34rem;       /* about 66 latin characters, about 34 japanese */
  --nav-h: 64px;
  --radius: 3px;          /* one radius system. paper has corners, not pills */
  --shadow: 0 16px 38px -26px rgba(9, 6, 3, 0.95);
  --ease: cubic-bezier(0.22, 0.75, 0.3, 1);

  --ds-lift: 2px;         /* quiet register: the smallest lift in the set */
  --ds-dur: 0.34s;

  color-scheme: dark;
}

/* Traditional Chinese and Korean override the display and body stacks
   WHOLESALE. Leaving the Japanese mincho at the head of either stack renders
   Chinese in Japanese glyph forms, which a native reader sees immediately. */
/* English leads with Spectral and keeps Zen Old Mincho behind it for the kanji
   in the shop's name. Zen Old Mincho's own Latin is a secondary design in a
   Japanese face, and an English headline set in it reads as an accident. */
html[lang="en"] {
  --font-display: Spectral, "Zen Old Mincho", "Hiragino Mincho ProN", Georgia, serif;
}
html[lang="zh-Hant"] {
  --font-display: "Noto Serif TC", "Songti TC", PMingLiU, serif;
  --font-body:    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
html[lang="ko"] {
  --font-display: "Noto Serif KR", "Nanum Myeongjo", Batang, serif;
  --font-body:    "Noto Sans KR", "Apple SD Gothic Neo", Pretendard, "Malgun Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 400;
  overflow-x: hidden;           /* the full bleed band must not scroll the page */
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent); }
a:hover { color: var(--text); }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.measure { max-width: var(--measure); }

.lat { font-family: var(--font-latin); font-weight: 600; letter-spacing: 0.01em; }

/* ---------- reveal ----------
   motion.js takes ownership when it runs (ds.css switches this transition
   off). If it never runs, media.js still adds .in, and if nothing runs at
   all the <noscript> block in the page shows everything. */
.rv {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}

/* ---------- header ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(23, 18, 14, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(8px);
}
.nav .wrap {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.4rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
  margin-inline-end: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand:hover { color: var(--accent); }

.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.55rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-links a:hover { color: var(--text); }

.lang { display: flex; gap: 0.2rem; }
.lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: #EEB456; border-color: #EEB456; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--edge);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.nav .btn { min-height: 44px; padding: 0.45rem 0.95rem; font-size: 0.9rem; }

.si { flex: none; }

/* ---------- the paper slip ----------
   The signature family. A section heading is a narrow slip pinned down the
   left edge of the measure, set in vertical Japanese, with the amber as the
   pin along its top edge. */
.slip-sec { padding-block: clamp(3rem, 8vw, 5.5rem); }
.slip-sec > .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.1rem, 3.5vw, 2.75rem);
  align-items: start;
}
.slip h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.02rem, 0.94rem + 0.35vw, 1.24rem);
  line-height: 1.85;
  letter-spacing: 0.2em;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 0.55rem 1rem 0.7rem;
}
/* Vertical setting only where the script reads well vertically. Latin and
   Hangul keep the same slip, set horizontally: rotating them would be a
   graphic effect pretending to be typography. */
@media (min-width: 821px) {
  html[lang="ja"] .slip h2,
  html[lang="zh-Hant"] .slip h2 {
    writing-mode: vertical-rl;
    padding: 1.25rem 0.6rem 1.5rem;
  }
}
@media (max-width: 820px) {
  .slip-sec > .wrap { grid-template-columns: minmax(0, 1fr); }
  .slip h2 { display: inline-block; }
}

/* ---------- opening: the shopfront ----------
   Deliberately NOT called .hero: motion.js and media.css both attach a drift
   to `.hero img`, and the brief for this shop says no parallax on the
   lantern light. */
.opening {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding-block: clamp(2rem, 6vw, 4rem) clamp(2.5rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.opening > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.opening-text {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

/* The one vertical setting of the shop name on the whole site, echoing the
   column of paper strips down the shopfront. It is never used again, and
   never for anything a guest has to scan in a hurry. */
.namecol {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: 0.1em;
  color: var(--text);
  text-shadow: 0 0 34px rgba(224, 163, 58, 0.16);
}
html[lang="en"] .namecol,
html[lang="ko"] .namecol { writing-mode: horizontal-tb; letter-spacing: 0.04em; }
/* With the name set horizontally there is no column to hang the text beside,
   so it stacks above it instead of being squeezed into a narrow track. */
html[lang="en"] .opening-text,
html[lang="ko"] .opening-text { grid-template-columns: minmax(0, 1fr); }
.namecol .rom {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 0.34em;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: var(--muted);
}

.opening-say { display: grid; gap: 1rem; align-content: start; }
.lede {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.5rem);
  line-height: 1.8;
  color: var(--text);
  max-width: 22ch;
}
html[lang="en"] .lede { max-width: 26ch; }
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
}
.acts { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.35rem; }
.acts .btn { flex: 0 1 auto; }

.opening-shot { margin: 0; position: relative; }
.opening-shot .m-figure {
  aspect-ratio: 676 / 1200;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.shot-cap {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 900px) {
  .opening > .wrap { grid-template-columns: minmax(0, 1fr); }
  .opening-shot { order: 2; justify-self: start; width: min(100%, 22rem); }
  .opening-shot .m-figure { max-height: 52dvh; }
}

/* ---------- narrow measure ---------- */
.say p { margin: 0 0 1.1rem; }
.say p:last-child { margin-bottom: 0; }
.say .quiet { color: var(--muted); font-size: 0.94rem; }
.rating {
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- the food band ----------
   Full bleed at the frame's native 1600x739. It cross fades as it decodes
   (media.css .m-fade) rather than rising: a plate that slides up the screen
   reads as an advertisement, and this shop is not shouting. */
.band { border-block: 1px solid var(--line); }
.band .m-figure { aspect-ratio: 1600 / 739; }
.band-cap {
  margin: 0;
  padding-block: 0.9rem 0;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- info list ----------
   In motion.js GROUPS, so the rows arrive one after another: a list being
   pinned up is hierarchy, not decoration. */
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.info-list > li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.35rem 1rem;
  align-items: baseline;
  padding: 0.7rem 0.95rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.info-list .label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.info-list .val {
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
}
.info-list .val .cross { color: var(--accent); font-weight: 700; }
@media (max-width: 520px) {
  .info-list > li { grid-template-columns: minmax(0, 1fr); }
}

.note {
  margin: 1.25rem 0 0;
  padding: 0.95rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.9;
}
.note strong { color: var(--accent); font-weight: 700; }

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-variant-numeric: tabular-nums;
}
.link:hover { color: var(--text); }

/* ---------- the two plate pair ----------
   Unequal on purpose: a tall slip of the signage beside a wide plate, bottoms
   aligned, the way two photographs get pinned to a wall rather than laid out
   in a grid. */
.plates {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: clamp(0.9rem, 2.5vw, 1.5rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}
.plates figure { margin: 0; }
.plates .m-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.plate-tall .m-figure { aspect-ratio: 675 / 1200; }
.plate-wide .m-figure { aspect-ratio: 1600 / 900; }
.plates figcaption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
}
@media (max-width: 760px) {
  .plates { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .plate-tall { max-width: 15rem; }
}

.addr { font-style: normal; }

.info-actions { margin-top: 1.1rem; }

/* ---------- booking ---------- */
.book-intro { margin: 0 0 1.1rem; }
.book-intro p { margin: 0 0 0.75rem; }
.book-intro p:last-child { margin-bottom: 0; }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  margin-top: 1.5rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.field input,
.field select {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
.field select {
  appearance: none;
  padding-inline-end: 2.2rem;
  /* A chevron drawn in CSS borders, so no hand rolled decorative SVG. */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 1.15rem center, right 0.75rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field optgroup {
  font-family: inherit;
  font-style: normal;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
}
.field option { color: var(--text); background: var(--bg-3); font-weight: 400; }
.field .hint {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
}

/* booking.css hardcodes #f0a08c, which does pass here at 8.95:1. Restated so
   the error colour is one value across the whole page. */
.form .field.bad input,
.form .field.bad select,
.form .field.bad textarea { border-color: var(--err); }
.form .field .field-msg { color: var(--err); }

/* Status is never colour alone: each carries a glyph. */
.form-error, .form-ok {
  grid-column: 1 / -1;
  display: none;
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.8;
}
.form-error.show, .form-ok.show { display: block; }
.form-error { color: var(--err); border: 1px solid var(--err); background: rgba(240, 138, 122, 0.08); }
.form-ok    { color: var(--ok);  border: 1px solid var(--ok);  background: rgba(143, 195, 154, 0.08); }
.form-error a { color: var(--err); font-weight: 700; }
.form-error::before,
.form-ok::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  margin-inline-end: 0.5em;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
  vertical-align: -0.25em;
}
.form-error::before { content: "!"; }
.form-ok::before { content: "\2713"; }

.after-form {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
}
.after-form strong { color: var(--text); font-weight: 700; }

.book-result { border-radius: var(--radius); margin-top: 1.5rem; }
.book-result:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* zh and ko only: site.js STR has no entry for either, so the confirmation
   panel renders in Japanese. This says, in the reader's own language, what
   the big number on it is. */
.ref-note {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.9;
}

@media (max-width: 640px) {
  .form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 6vw, 3rem);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.9;
}
.foot .foot-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.foot p { margin: 0 0 0.5rem; max-width: var(--measure); }
.foot p:last-child { margin-bottom: 0; }
.foot .demo { color: var(--muted); }

/* ---------- narrow header ----------
   Brand and the booking button on the first row, the four languages on the
   second, so nothing is squeezed below a 44px target at 390px. */
@media (max-width: 720px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  :root { --nav-h: 104px; }
  .nav .wrap { flex-wrap: wrap; row-gap: 0; }
  .lang { order: 3; width: 100%; border-top: 1px solid var(--line); }
  .lang a { flex: 1 1 auto; justify-content: center; }
}
