/* Royal china: tokens, base, components and the shell. Spec: docs/design-system.md.
   Loaded last on every public and account page. */

@font-face { font-family: "Besley"; src: url("/assets/fonts/besley-var.woff2") format("woff2"); font-weight: 500 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/assets/fonts/commissioner-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("/assets/fonts/commissioner-gc-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+0370-03FF, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+1F00-1FFF; }

:root {
  --glaze: #FBFCFF; --white: #FFFFFF;
  --cobalt-950: #071640; --cobalt-900: #0B2161; --cobalt-700: #1238A6; --cobalt-500: #2F5BD0;
  --cobalt-200: #C4D2F4; --cobalt-100: #E3EAFB; --cobalt-50: #F1F5FD; --ink-muted: #4B5A86;
  --turq-700: #0F766E; --turq-500: #17A398; --turq-100: #D3F1EC; --teal-900: #0A3F3C;
  --saffron-500: #F5B50E; --saffron-300: #FAD25E; --saffron-100: #FFF0C0; --saffron-50: #FFF8E1; --saffron-800: #6E4A00;
  --chili-500: #EE6A12; --chili-100: #FFE7D3; --chili-800: #8A3904;
  --bole-600: #C8381F; --bole-700: #A52B15; --bole-100: #FCE3DC;
  --emerald-600: #1B7A4B; --emerald-100: #DBF1E3;
  --gilt-500: #C8962A; --gilt-700: #7A5A0E; --gilt-100: #F8ECC9;

  --font-display: "Besley", "Commissioner", "Noto Serif", serif;
  --font-body: "Commissioner", "Noto Sans", "Segoe UI", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-tile: 4px; --r-sheet: 16px; --r-round: 999px;
  --grad-bar: linear-gradient(100deg, #071640 0%, #0B2161 45%, #1238A6 100%);
  --grad-cobalt: linear-gradient(135deg, #2F5BD0 0%, #1238A6 45%, #0B2161 100%);
  --grad-saffron: radial-gradient(120% 90% at 78% 38%, #FFDB6B 0%, #F9C22E 38%, #F5B50E 70%, #F0A00C 100%);
  --grad-bole: linear-gradient(135deg, #DE4F2C 0%, #C8381F 60%, #B02E17 100%);
  --grad-emerald: linear-gradient(135deg, #2A9A60 0%, #1B7A4B 60%, #14633C 100%);
  --grad-turq: linear-gradient(135deg, #17A398 0%, #0F766E 70%);
  --grad-band: linear-gradient(90deg, #071640 0%, #0B2161 38%, #1740B8 100%);
  --grad-rule: linear-gradient(90deg, #0B2161 0%, #2F5BD0 55%, #F5B50E 100%);
  --grad-gilt: linear-gradient(90deg, #F5B50E, #EE6A12);
  --grad-warm: linear-gradient(180deg, #FFF4D2 0%, #FFFBEF 100%);
  --shadow-sheet: 0 -2px 16px rgba(11, 33, 97, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar-h: 60px; --tab-h: 64px;
  --room: var(--cobalt-700); --room-tint: var(--cobalt-100);
  --tile-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none' stroke='%23fff' stroke-opacity='.13' stroke-width='1.2'%3E%3Cpath d='M28 5c7 9 7 14 0 23c-7-9-7-14 0-23zM28 28c7 9 7 14 0 23c-7-9-7-14 0-23zM5 28c9-7 14-7 23 0c-9 7-14 7-23 0zM28 28c9-7 14-7 23 0c-9 7-14 7-23 0z'/%3E%3Ccircle cx='0' cy='0' r='6'/%3E%3Ccircle cx='56' cy='0' r='6'/%3E%3Ccircle cx='0' cy='56' r='6'/%3E%3Ccircle cx='56' cy='56' r='6'/%3E%3C/svg%3E");

  /* Names the older sheets still read, mapped onto the china. */
  --bg-primary: var(--glaze); --bg-secondary: var(--cobalt-50); --bg-tertiary: var(--cobalt-100);
  --bg-elevated: var(--white); --bg-hover: var(--cobalt-50); --bg-input: var(--white); --bg-surface-glow: transparent;
  --text-primary: var(--cobalt-900); --text-secondary: var(--ink-muted); --text-muted: var(--ink-muted);
  --ink: var(--cobalt-900); --ink-deep: var(--cobalt-950);
  --accent: var(--cobalt-700); --accent-hover: var(--cobalt-500); --accent-strong: var(--cobalt-900);
  --accent-dim: var(--cobalt-100); --accent-border: var(--cobalt-200); --accent-contrast: var(--white); --accent-text: var(--cobalt-700);
  --border: var(--cobalt-200); --border-strong: var(--cobalt-700);
  --tomato: var(--bole-600); --tomato-soft: var(--bole-100); --tomato-deep: var(--bole-700);
  --chili: var(--chili-500); --chili-soft: var(--chili-100); --chili-deep: var(--chili-800);
  --saffron: var(--saffron-500); --saffron-soft: var(--saffron-100); --saffron-deep: var(--saffron-800);
  --leaf: var(--emerald-600); --leaf-soft: var(--emerald-100); --leaf-deep: #125C37;
  --rose: var(--bole-600); --rose-soft: var(--bole-100); --rose-deep: var(--bole-700);
  --blueberry: var(--cobalt-700); --blueberry-soft: var(--cobalt-100); --blueberry-deep: var(--cobalt-900);
  --aubergine: var(--cobalt-900); --aubergine-soft: var(--cobalt-100); --aubergine-deep: var(--cobalt-950);
  --teal: var(--turq-700); --teal-soft: var(--turq-100); --teal-deep: #0A554F;
  --success: var(--emerald-600); --success-dim: var(--emerald-100); --error: var(--bole-600); --error-dim: var(--bole-100);
  --warning: var(--gilt-700); --warning-dim: var(--gilt-100); --info: var(--turq-700);
  --radius-sm: 4px; --radius-md: 4px; --radius-lg: 4px; --radius-xl: 4px; --radius-2xl: 4px; --radius-full: 999px;
  --shadow-sm: none; --shadow-md: none; --shadow-accent: none;
  --nav-height: var(--bar-h); --container-width: 1180px;
}
/* Scripts the display face does not draw take the text face for headings. */
:lang(vi), :lang(el), :lang(ru), :lang(uk), :lang(ar), :lang(hi), :lang(th), :lang(zh), :lang(ja), :lang(ko) { --font-display: var(--font-body); }

[data-room="cook"] { --room: var(--bole-600); --room-tint: var(--bole-100); }
[data-room="eat-out"] { --room: var(--cobalt-700); --room-tint: var(--cobalt-100); }
[data-room="shop"] { --room: var(--emerald-600); --room-tint: var(--emerald-100); }
[data-room="gear"] { --room: var(--saffron-800); --room-tint: var(--saffron-100); }

/* Base */
html { background: var(--glaze); scroll-padding-top: calc(var(--bar-h) + 8px); }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--cobalt-900); background: var(--glaze); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .h-display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; color: inherit; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--cobalt-500); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--cobalt-500); outline-offset: 2px; }
::selection { background: var(--cobalt-700); color: var(--white); }
main *, body > header *, body > footer * { box-shadow: none !important; }

.h-display { font-weight: 900; font-size: clamp(2.25rem, 1.4rem + 4.4vw, 3.5rem); line-height: 1.04; letter-spacing: -.02em; }
.h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.5rem); }
.h2 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2rem); }
.h3 { font-size: 1.25rem; line-height: 1.2; }
.lead { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.45; }
.meta { font-size: .8125rem; color: var(--ink-muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon .tint { fill: currentColor; fill-opacity: .16; stroke: none; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 32px; height: 32px; }
.icon--xl { width: 48px; height: 48px; stroke-width: 1.5; }

/* Layout */
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; box-sizing: border-box; }
.floor { padding-block: var(--s6); background: var(--glaze); }
.floor--tint { background: var(--grad-warm); }
.floor--cobalt, .floor--bole, .floor--emerald, .floor--turq, .floor--ink { color: var(--white); }
.floor--cobalt { background-color: var(--cobalt-700); }
.floor--ink { background-color: var(--cobalt-950); }
.floor--bole { background-color: var(--bole-600); }
.floor--emerald { background-color: var(--emerald-600); }
.floor--turq { background-color: var(--turq-700); }
.floor--tiled { background-image: var(--tile-motif); background-size: 56px 56px; }
.floor--cobalt a:not(.btn), .floor--ink a:not(.btn) { color: var(--white); }
.floor--cobalt .meta, .floor--ink .meta, .floor--bole .meta, .floor--emerald .meta, .floor--turq .meta { color: rgba(255, 255, 255, .82); }
.floor--cobalt :focus-visible, .floor--ink :focus-visible, .floor--bole :focus-visible, .topbar :focus-visible, .foot :focus-visible { outline-color: var(--white); }
.stack { display: grid; gap: var(--s4); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.row--between { justify-content: space-between; }

.tiles { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--cobalt-200); border-radius: var(--r-tile); overflow: hidden; color: var(--cobalt-900); }
.tile--link { text-decoration: none; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.tile--link:hover { border-color: var(--cobalt-700); }
.tile--link:active { background: var(--cobalt-50); }
.tile__media { position: relative; aspect-ratio: 4 / 3; background: var(--cobalt-50); display: grid; place-items: center; overflow: hidden; }
.tile__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__body { padding: var(--s4); display: grid; gap: var(--s2); align-content: start; }
.tile__title { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.2; letter-spacing: -.01em; }
.tile--room { background: var(--room); border-color: var(--room); color: var(--white); min-height: 132px; padding: var(--s4); justify-content: space-between; gap: var(--s4); }
.tile--room:hover { border-color: var(--cobalt-950); }
.tile--room .tile__title { font-size: 1.375rem; }
.tile--room .meta { color: rgba(255, 255, 255, .86); }

/* Controls */
.btn, .btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; box-sizing: border-box; border: 1px solid transparent; border-radius: var(--r-tile); font: 600 1rem/1.2 var(--font-body); letter-spacing: 0; text-transform: none; text-decoration: none; cursor: pointer; transform: none; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); background: var(--cobalt-700); color: var(--white); }
.btn:hover, .btn-primary:hover, .btn-secondary:hover { transform: none; background: var(--cobalt-900); color: var(--white); }
.btn--primary, .btn.btn-primary { background: var(--bole-600); border-color: var(--bole-600); color: var(--white); }
.btn--primary:hover, .btn.btn-primary:hover { background: var(--bole-700); border-color: var(--bole-700); }
.btn--cobalt { background: var(--cobalt-700); border-color: var(--cobalt-700); }
.btn--ghost, .btn.btn-secondary, .btn.btn-outline { background: transparent; border-color: var(--cobalt-700); color: var(--cobalt-700); }
.btn--ghost:hover, .btn.btn-secondary:hover, .btn.btn-outline:hover { background: var(--cobalt-50); color: var(--cobalt-900); border-color: var(--cobalt-900); }
.btn--quiet { background: transparent; color: var(--cobalt-700); padding-inline: 12px; }
.btn--quiet:hover { background: var(--cobalt-100); color: var(--cobalt-900); }
.btn--white { background: var(--white); border-color: var(--white); color: var(--cobalt-900); }
.btn--white:hover { background: var(--cobalt-100); border-color: var(--cobalt-100); color: var(--cobalt-900); }
.floor--cobalt .btn--ghost, .floor--ink .btn--ghost, .floor--bole .btn--ghost, .floor--emerald .btn--ghost, .floor--turq .btn--ghost { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.floor--cobalt .btn--ghost:hover, .floor--ink .btn--ghost:hover, .floor--bole .btn--ghost:hover, .floor--emerald .btn--ghost:hover, .floor--turq .btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); color: var(--white); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: .9375rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--cobalt-200); background: var(--white); color: var(--cobalt-900); cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.iconbtn:hover { background: var(--cobalt-50); border-color: var(--cobalt-700); }
.topbar .iconbtn, .floor--cobalt .iconbtn { background: transparent; border-color: rgba(255, 255, 255, .45); color: var(--white); }
.topbar .iconbtn:hover, .floor--cobalt .iconbtn:hover { background: rgba(255, 255, 255, .14); border-color: var(--white); }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; box-sizing: border-box; border: 1px solid transparent; border-radius: var(--r-tile); background: var(--cobalt-100); color: var(--cobalt-900); font: 500 .9375rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.chip:hover { border-color: var(--cobalt-700); }
.chip[aria-pressed="true"], .chip[aria-current="true"], .chip.is-on { background: var(--cobalt-700); color: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--scroll > * { flex: none; }

.field { display: grid; gap: 4px; }
.field__label { font-size: .875rem; font-weight: 600; }
.input, .select { width: 100%; min-height: 48px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--cobalt-200); border-radius: var(--r-tile); background: var(--cobalt-50); color: var(--cobalt-900); font: 400 1rem/1.3 var(--font-body); }
textarea.input { padding-block: 12px; min-height: 96px; }
.input::placeholder { color: var(--ink-muted); opacity: 1; }
.input:hover, .select:hover { border-color: var(--cobalt-700); }
.input:focus, .select:focus { background: var(--white); border-color: var(--cobalt-500); }
.ask { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 4px 4px 4px 16px; background: var(--white); border: 1px solid var(--cobalt-200); border-radius: var(--r-tile); color: var(--cobalt-900); }
.ask input { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 6px; border: 0; background: transparent; color: inherit; font: 400 1rem/1.3 var(--font-body); outline: 0; }
.ask:focus-within { outline: 2px solid var(--cobalt-500); outline-offset: 2px; }
.floor--cobalt .ask:focus-within { outline-color: var(--white); }

/* Plates, rings, stamps */
.plate { display: block; box-sizing: border-box; aspect-ratio: 1; width: 96px; padding: 4px; border: 2px solid var(--cobalt-700); border-radius: 50%; background: var(--white); overflow: hidden; flex: none; }
.plate > img, .plate > svg, .plate > span { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; outline: 1px solid var(--cobalt-200); outline-offset: -1px; }
.plate--sm { width: 48px; padding: 2px; border-width: 1.5px; }
.plate--lg { width: clamp(160px, 44vw, 260px); padding: 7px; border-width: 3px; }
.plate--icon { display: grid; place-items: center; width: 48px; padding: 0; border: 0; background: var(--room-tint); color: var(--room); }
.floor--cobalt .plate, .floor--ink .plate { border-color: var(--white); }
.ring { width: 56px; height: 56px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 4; stroke: var(--cobalt-100); }
.ring circle + circle { stroke: var(--room); stroke-linecap: round; transition: stroke-dashoffset .24s var(--ease); }
.stamp { display: block; width: 112px; aspect-ratio: 1; color: inherit; flex: none; }
.stamp text { font: 700 9.5px/1 var(--font-body); letter-spacing: .14em; fill: currentColor; }

/* Rows, notes, empty states */
.list { margin: 0; padding: 0; list-style: none; background: var(--white); border: 1px solid var(--cobalt-200); border-radius: var(--r-tile); }
.list__row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; box-sizing: border-box; border-top: 1px solid var(--cobalt-200); color: var(--cobalt-900); text-decoration: none; }
.list__row:first-child { border-top: 0; }
a.list__row:hover, button.list__row:hover { background: var(--cobalt-50); }
.list__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list__title { font-weight: 600; overflow-wrap: anywhere; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--cobalt-200); border-radius: var(--r-tile); background: var(--cobalt-50); color: var(--cobalt-900); font-size: .9375rem; }
.note--info { background: var(--turq-100); border-color: var(--turq-100); }
.note--ok { background: var(--emerald-100); border-color: var(--emerald-100); }
.note--warn { background: var(--bole-100); border-color: var(--bole-100); }
.note--premium { background: var(--gilt-100); border-color: var(--gilt-100); color: var(--gilt-700); }
.empty { display: grid; justify-items: center; gap: var(--s4); padding: var(--s7) var(--s4); text-align: center; }
.empty > .plate--icon { width: 88px; }
.skeleton { background: var(--cobalt-100); border-radius: var(--r-tile); min-height: 16px; }

.room-head { background-color: var(--room); color: var(--white); padding-block: var(--s5); }
.room-head__in { display: flex; align-items: center; gap: var(--s4); }
.room-head .plate--icon { background: var(--white); width: 56px; }
.room-head .meta { color: rgba(255, 255, 255, .86); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.section-head a { font-weight: 600; font-size: .9375rem; white-space: nowrap; }

/* Shell: top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--grad-bar); color: var(--white); border-bottom: 2px solid var(--saffron-500); }
.topbar__in { display: flex; align-items: center; gap: var(--s4); min-height: var(--bar-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; min-height: 44px; }
.brand__plate { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad-cobalt); color: var(--white); flex: none; }
.brand__plate::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1px solid var(--saffron-500); }
.brand__plate .icon { width: 30px; height: 30px; }
.brand:hover .brand__plate .icon { animation: brand-nod .5s var(--ease); }
@keyframes brand-nod { 40% { transform: translateY(-2px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
.brand__plate img { width: 28px; height: 28px; display: block; }
.brand__name { font: 900 1.125rem/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.topbar__nav { margin-inline-start: auto; }
.topbar__nav ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.topbar__nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r-tile); color: var(--white); font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.topbar__nav a:hover { background: rgba(255, 255, 255, .14); }
.topbar__nav a[aria-current="page"], .topbar__nav a.active { background: var(--saffron-500); color: var(--cobalt-950); }
.topbar__nav .nav-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .3); margin-inline: 8px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
@media (max-width: 899px) {
  .topbar__nav { margin: 0; }
  .topbar__actions { margin-inline-start: auto; }
  .menu-toggle { display: inline-grid; }
  .topbar__nav ul { display: none; position: absolute; inset: var(--bar-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--cobalt-900); border-top: 1px solid rgba(255, 255, 255, .2); max-height: calc(100dvh - var(--bar-h)); overflow: auto; }
  .topbar__nav ul.active, .topbar__nav ul.open, .topbar__nav ul.is-open { display: flex; }
  .topbar__nav a { min-height: 48px; }
  .topbar__nav .nav-room, .topbar__nav .nav-sep { display: none; }
  .topbar .btn--chef { display: none; }
}

/* Shell: tab bar (phones and small tablets) */
.tabbar { display: none; }
@media (max-width: 899px) {
  .tabbar { position: fixed; inset: auto 0 0 0; z-index: 55; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; min-height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom); background: var(--white); border-top: 1px solid var(--cobalt-200); box-shadow: var(--shadow-sheet) !important; }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: var(--tab-h); padding: 6px 2px; box-sizing: border-box; color: var(--ink-muted); font: 600 .75rem/1.1 var(--font-body); text-align: center; text-decoration: none; overflow-wrap: anywhere; hyphens: auto; }
  .tabbar .tab__ico { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 15px; transition: background-color .15s var(--ease); }
  .tabbar a[aria-current="page"] { color: var(--room); }
  .tabbar a[aria-current="page"] .tab__ico { background: var(--room-tint); }
  .tabbar .tab--chef { color: var(--bole-600); }
  .tabbar .tab--chef .tab__ico { width: 56px; height: 56px; margin-top: -22px; border-radius: 50%; background: var(--bole-600); color: var(--white); border: 3px solid var(--white); outline: 1px solid var(--cobalt-200); }
  .tabbar .tab--chef .icon { width: 30px; height: 30px; }
  body.has-tabbar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
}

/* Shell: the pass (what chat and the tools hand each other) */
.pass { position: fixed; inset: auto 0 0 0; z-index: 54; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--white); border-top: 1px solid var(--cobalt-200); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow-sheet) !important; transition: transform .24s var(--ease); }
.pass[hidden] { display: none; }
.pass__main { flex: 1; min-width: 0; display: grid; }
.pass__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass__actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 899px) { body.has-tabbar .pass { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); border-radius: 0; } body.has-pass { padding-bottom: calc(var(--tab-h) + 68px + env(safe-area-inset-bottom)); } }
@media (min-width: 900px) { .pass { inset: auto 24px 24px auto; width: 420px; border: 1px solid var(--cobalt-200); border-radius: var(--r-tile); } }

/* Sheets and dialogs */
.sheet { position: fixed; inset: auto 0 0 0; z-index: 60; box-sizing: border-box; width: 100%; max-width: none; max-height: 86dvh; margin: 0; padding: var(--s5) var(--s4); overflow: auto; border: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--white); color: var(--cobalt-900); box-shadow: var(--shadow-sheet) !important; }
.sheet::backdrop { background: rgba(7, 22, 64, .5); }
@media (min-width: 720px) { .sheet { inset: 0; margin: auto; width: min(520px, 92vw); height: fit-content; border-radius: var(--r-sheet); } }

/* Shell: footer */
.foot { background-color: var(--cobalt-950); background-image: var(--tile-motif); background-size: 56px 56px; color: var(--white); padding-block: var(--s7) var(--s5); }
.foot a { color: var(--white); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__top { display: grid; gap: var(--s6); }
.foot__mark { display: grid; justify-items: start; gap: var(--s3); }
.foot__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
.foot__col { display: grid; gap: 2px; align-content: start; }
.foot__col h2 { font: 700 .9375rem/1.3 var(--font-body); letter-spacing: 0; margin-bottom: 4px; color: var(--cobalt-200); }
.foot__col a { display: inline-flex; align-items: center; min-height: 36px; font-size: .9375rem; }
.foot__cuisines { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s6) 0 0; padding: var(--s5) 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .18); }
.foot__cuisines a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--r-tile); font-size: .875rem; font-weight: 500; }
.foot__cuisines a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: var(--s5); font-size: .8125rem; color: var(--cobalt-200); }

@media (min-width: 640px) {
  .wrap { padding-inline: 24px; }
  .tiles--2, .tiles--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .wrap { padding-inline: 32px; }
  .floor { padding-block: var(--s7); }
  .tiles { gap: 12px; }
  .tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot__top { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Shell details */
.topbar .menu-toggle { display: none; }
.topbar .menu-toggle > span { display: none; }
@media (max-width: 899px) { .topbar .menu-toggle { display: inline-grid; } }
@media (min-width: 900px) { .topbar__nav .nav-more { display: none; } }
.icon .fill { fill: currentColor; stroke: none; }
.btn .icon { width: 20px; height: 20px; }

/* Two columns from tablet up */
.cols-2 { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7); } }

/* Painted detail: gradients on the grounds that carry colour, a gilt line under section titles */
.foot { background-image: var(--tile-motif), linear-gradient(170deg, #0B2161 0%, #071640 60%, #050F2E 100%); background-size: 56px 56px, auto; border-top: 3px solid var(--saffron-500); }
.btn--primary, .ask__go, .tabbar .tab--chef .tab__ico { background-image: var(--grad-bole); }
.btn--cobalt { background-image: var(--grad-cobalt); }
.tile--room[data-room="cook"] { background-image: var(--grad-bole); }
.tile--room[data-room="eat-out"] { background-image: var(--grad-cobalt); }
.tile--room[data-room="shop"] { background-image: var(--grad-emerald); }
.tile--room[data-room="gear"] { background-image: linear-gradient(135deg, #F9C22E 0%, #F5B50E 55%, #EE9A12 100%); color: var(--cobalt-950); }
.tile--room[data-room="gear"] .meta { color: var(--cobalt-950); }
.room-head[data-room="cook"], [data-room="cook"] > .room-head { background-image: var(--grad-bole); }
[data-room="eat-out"] .room-head { background-image: var(--grad-cobalt); }
[data-room="shop"] .room-head { background-image: var(--grad-emerald); }
[data-room="cook"] .room-head { background-image: var(--grad-bole); }
[data-room="gear"] .room-head { background-image: linear-gradient(135deg, #F9C22E 0%, #F5B50E 55%, #EE9A12 100%); color: var(--cobalt-950); }
[data-room="gear"] .room-head :is(.h1, h1, .meta, p) { color: var(--cobalt-950); }
.section-head .h2, .section-head h2 { position: relative; padding-bottom: 10px; }
.section-head .h2::after, .section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 2px; background: var(--grad-gilt); }
.tile--link { transition: border-color .15s var(--ease), translate .24s var(--ease), background-color .2s var(--ease); }
.tile--link:not(.tile--room):hover { translate: 0 -3px; background-image: linear-gradient(180deg, #fff 60%, var(--saffron-50)); }
.plate { background-image: radial-gradient(circle at 30% 25%, #fff 0, #fff 55%, var(--cobalt-50) 100%); }
::selection { background: var(--saffron-500); color: var(--cobalt-950); }
.btn--primary, .ask__go { background-size: 180% 100%; background-position: 0 0; transition: background-position .4s var(--ease), translate .15s var(--ease); }
.btn--primary:hover, .ask__go:hover { background-position: 100% 0; }
.chip:hover { background: var(--saffron-100); border-color: var(--saffron-500); }
