/*
  The Tapdaro website (tapdaro.com, or /tapdaro on the platform host). Its own
  small design system on the apps' tokens (design/ordering/tokens.json):
  chestnut for the one action, warm cream ground, white cards, sand panels,
  espresso text; honey takes the action in the dark theme. Every rule is keyed
  .td so nothing reaches another area. Sent on /tapdaro/** alone (App.razor).
*/

@font-face {
  font-family: "Inter";
  src: url("/fonts/themes/inter-normal-100-900.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --td-ground: #FFF8F0;
  --td-surface: #FFFFFF;
  --td-sunken: #F4E8DC;
  --td-border: #E9D9CB;
  --td-text: #2D140C;
  --td-muted: #766255;
  --td-accent: #74300E;
  --td-accent-ink: #74300E;
  --td-on-accent: #FFFFFF;
  --td-accent-soft: #F9E6CF;
  --td-caramel: #B65C19;
  --td-honey: #F2B765;
  --td-success: #1F6E46;
  --td-success-soft: #E3F1E8;
  --td-warning: #9A5A09;
  --td-danger: #B42318;
  --td-danger-soft: #FCE8E6;
  --td-band: #4B1E0C;
  --td-band-text: #FFF8F0;
  --td-shadow: 0 1px 2px rgba(45, 20, 12, .06), 0 8px 24px rgba(45, 20, 12, .08);
  --td-shadow-lg: 0 20px 50px rgba(45, 20, 12, .18);
  --td-radius: 16px;
  --td-radius-sm: 10px;
  --td-wrap: 1180px;
  --td-ease: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --td-ground: #1C110D; --td-surface: #2D1B15; --td-sunken: #24160F; --td-border: #51372B;
    --td-text: #FFF8F0; --td-muted: #CDB8A8; --td-accent: #F2B765; --td-accent-ink: #F2B765;
    --td-on-accent: #2D140C; --td-accent-soft: #4A2C1A; --td-success: #6CCB98; --td-success-soft: #173326;
    --td-warning: #F2B765; --td-danger: #F59287; --td-danger-soft: #3D1A16; --td-band: #2D1B15;
    --td-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --td-ground: #1C110D; --td-surface: #2D1B15; --td-sunken: #24160F; --td-border: #51372B;
  --td-text: #FFF8F0; --td-muted: #CDB8A8; --td-accent: #F2B765; --td-accent-ink: #F2B765;
  --td-on-accent: #2D140C; --td-accent-soft: #4A2C1A; --td-success: #6CCB98; --td-success-soft: #173326;
  --td-warning: #F2B765; --td-danger: #F59287; --td-danger-soft: #3D1A16; --td-band: #2D1B15;
  --td-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}

html { background: var(--td-ground); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--td-ground);
  color: var(--td-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.td *, .td *::before, .td *::after { box-sizing: border-box; }
.td img { max-width: 100%; }
.td a { color: var(--td-accent-ink); }
.td a:focus-visible, .td button:focus-visible, .td input:focus-visible, .td select:focus-visible {
  outline: 3px solid var(--td-honey); outline-offset: 2px;
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logos: a light-ground and a dark-ground version, one shown per theme. */
.td-on-dark { display: none; }
:root[data-theme="dark"] .td-on-light { display: none; }
:root[data-theme="dark"] .td-on-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .td-on-light { display: none; }
  :root:not([data-theme="light"]) .td-on-dark { display: inline-block; }
}

.td-wrap { width: min(var(--td-wrap), 100% - 32px); margin-inline: auto; }
.td-muted { color: var(--td-muted); }
.td-small { font-size: .875rem; }
.td-center { text-align: center; }
.td-accent { color: var(--td-caramel); }
:root[data-theme="dark"] .td-accent { color: var(--td-honey); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-accent { color: var(--td-honey); } }

.td-skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--td-surface); padding: 8px 14px; border-radius: 8px; }
.td-skip:focus { left: 12px; }

/* Type */
.td-display { font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: .2em 0 .35em; }
.td-h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -.025em; font-weight: 800; margin: 0 0 .2em; }
.td-h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 750; margin: 0 0 .35em; }
.td-h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 700; margin: 0 0 .4em; }
.td-kicker { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 700; color: var(--td-text); margin: -.2em 0 .7em; }
.td-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--td-muted); max-width: 36em; margin: 0 0 1.4em; }
.td-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--td-caramel); margin: 0; }

/* Buttons and controls */
.td-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.25em; border-radius: 999px; border: 0;
  background: var(--td-accent); color: var(--td-on-accent) !important;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .18s var(--td-ease), box-shadow .18s var(--td-ease), opacity .18s;
}
.td-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(116, 48, 14, .25); }
.td-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.td-btn-lg { min-height: 56px; padding: 0 1.75em; font-size: 1.05rem; }
.td-btn-block { width: 100%; margin-top: 12px; }
.td-btn-grow { flex: 1; }
.td-btn-ghost { background: transparent; color: var(--td-accent-ink) !important; box-shadow: inset 0 0 0 1.5px var(--td-border); }
.td-btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--td-accent); }
.td-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--td-sunken); color: var(--td-text); font-size: 1rem; cursor: pointer; }
.td-input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--td-radius-sm); border: 1.5px solid var(--td-border); background: var(--td-surface); color: var(--td-text); font: inherit; }
.td-input:focus { border-color: var(--td-accent); outline: none; }
.td-field { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; margin-top: 14px; }
.td-field .td-muted { font-weight: 400; }

.td-chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--td-surface); border: 1.5px solid var(--td-border); color: var(--td-text) !important;
  font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s;
}
.td-chip:hover { border-color: var(--td-accent); }
.td-chip.is-on { background: var(--td-accent); border-color: var(--td-accent); color: var(--td-on-accent) !important; }

.td-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.td-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.td-pill.is-open { background: var(--td-success-soft); color: var(--td-success); }
.td-pill.is-closed { background: var(--td-sunken); color: var(--td-muted); }

.td-notice { background: var(--td-accent-soft); color: var(--td-text); border-radius: var(--td-radius-sm); padding: 12px 16px; margin: 14px 0 0; }
.td-error { background: var(--td-danger-soft); color: var(--td-danger); border-radius: var(--td-radius-sm); padding: 10px 14px; margin: 14px 0 0; font-weight: 600; }

/* Header */
.td-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--td-ground) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--td-border); }
.td-header-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.td-brand { display: inline-flex; align-items: center; }
.td-brand img { height: 32px; width: auto; }
.td-nav { display: flex; gap: 22px; margin-left: auto; }
.td-nav a { color: var(--td-text); text-decoration: none; font-weight: 600; }
.td-nav a:hover { color: var(--td-caramel); }
.td-theme { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--td-border); background: var(--td-surface); color: var(--td-text); cursor: pointer; display: grid; place-items: center; }
.td-theme svg { width: 18px; height: 18px; }
.td-theme-moon { display: none; }
:root[data-theme="dark"] .td-theme-sun { display: none; }
:root[data-theme="dark"] .td-theme-moon { display: block; }
@media (max-width: 720px) { .td-nav { display: none; } .td-theme { margin-left: auto; } }

/* Hero */
.td-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(36px, 6vw, 80px); }
.td-hero::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; background: radial-gradient(closest-side, color-mix(in srgb, var(--td-honey) 30%, transparent), transparent); pointer-events: none; }
.td-hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.td-hero-slim { padding-bottom: clamp(24px, 4vw, 56px); }
.td-hero-art { position: relative; display: grid; place-items: center; }
.td-hero-disc { position: absolute; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%; background: var(--td-accent-soft); }
.td-hero-art img { position: relative; width: min(340px, 80%); height: auto; animation: td-float 6s ease-in-out infinite; }
@keyframes td-float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .td-hero-art img { animation: none; } }
.td-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.td-hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--td-muted); font-weight: 600; font-size: .95rem; }
.td-hero-points span { color: var(--td-success); font-weight: 800; margin-right: 4px; }
@media (max-width: 860px) {
  .td-hero-in { grid-template-columns: 1fr; }
  .td-hero-art { order: -1; max-height: 220px; }
  .td-hero-art img { width: 200px; }
  .td-hero-disc { width: 240px; }
}

.td-search {
  display: flex; align-items: center; gap: 8px; max-width: 560px; padding: 6px 6px 6px 18px;
  background: var(--td-surface); border: 1.5px solid var(--td-border); border-radius: 999px; box-shadow: var(--td-shadow);
}
.td-search:focus-within { border-color: var(--td-accent); }
.td-search svg { width: 20px; height: 20px; color: var(--td-muted); flex: none; }
.td-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--td-text); font: inherit; font-size: 1.05rem; min-height: 46px; outline: none; }
.td-search .td-btn { min-height: 46px; }
.td-search input.td-search-place { flex: 0 1 170px; padding-left: 12px; border-left: 1px solid var(--td-border); }
@media (max-width: 560px) {
  /* Two rows on a phone: what, then where and the button. */
  .td-search { flex-wrap: wrap; border-radius: 22px; padding: 6px 6px 6px 14px; }
  .td-search #td-q { flex: 1 1 calc(100% - 40px); }
  .td-search input.td-search-place { flex: 1 1 0; padding-left: 0; border-left: 0; border-top: 1px solid var(--td-border); }
}
.td-locate {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--td-accent-ink); font: inherit; font-weight: 600; cursor: pointer;
}
.td-locate[hidden] { display: none; }
.td-locate svg { width: 18px; height: 18px; }

/* Sections */
.td-section { padding: clamp(40px, 6vw, 80px) 0; }
.td-section-sand { background: var(--td-sunken); }
.td-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.td-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px; margin-bottom: 8px; scrollbar-width: none; }
.td-chips::-webkit-scrollbar { display: none; }
.td-empty { text-align: center; padding: 56px 16px; background: var(--td-surface); border: 1.5px dashed var(--td-border); border-radius: var(--td-radius); }
.td-loading { padding: 80px 0; color: var(--td-muted); text-align: center; }

/* Restaurant tiles */
.td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.td-tile {
  display: flex; gap: 16px; padding: 18px; border-radius: var(--td-radius); background: var(--td-surface);
  border: 1px solid var(--td-border); color: var(--td-text) !important; text-decoration: none;
  transition: transform .18s var(--td-ease), box-shadow .18s var(--td-ease), border-color .18s;
}
.td-tile:hover { transform: translateY(-3px); box-shadow: var(--td-shadow); border-color: transparent; }
.td-tile-logo, .td-place-logo {
  flex: none; width: 64px; height: 64px; border-radius: 14px; background: var(--td-sunken);
  display: grid; place-items: center; overflow: hidden; font-weight: 800; color: var(--td-caramel); font-size: 1.2rem;
}
.td-tile-logo img, .td-place-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.td-tile-body { display: grid; gap: 4px; min-width: 0; }
.td-tile-name { font-weight: 750; font-size: 1.1rem; line-height: 1.25; }
.td-tile-meta { color: var(--td-muted); font-size: .9rem; }
.td-tile-tag { font-size: .95rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.td-tile-dishes { font-size: .85rem; color: var(--td-caramel); font-weight: 600; }
.td-tile-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.td-tile-time { font-size: .85rem; color: var(--td-muted); font-weight: 600; }

/* How it works */
.td-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.td-steps li { background: var(--td-surface); border-radius: var(--td-radius); padding: 28px 24px; border: 1px solid var(--td-border); }
.td-step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--td-accent); color: var(--td-on-accent); font-weight: 800; margin-bottom: 14px; }
@media (max-width: 760px) { .td-steps { grid-template-columns: 1fr; } }

/* The no-fees band */
.td-band { background: var(--td-band); color: var(--td-band-text); padding: clamp(40px, 6vw, 72px) 0; }
.td-band a { color: var(--td-honey); }
.td-band-in { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.td-band p { opacity: .9; font-size: 1.08rem; max-width: 34em; }
.td-band-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.td-band-figures div { background: rgba(255, 248, 240, .08); border: 1px solid rgba(255, 248, 240, .16); border-radius: var(--td-radius); padding: 18px; text-align: center; }
.td-band-figures dt { font-size: .85rem; opacity: .8; }
.td-band-figures dd { margin: 4px 0 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--td-honey); }
@media (max-width: 760px) { .td-band-in { grid-template-columns: 1fr; } }

.td-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; border-radius: 24px; background: var(--td-surface); border: 1px solid var(--td-border); box-shadow: var(--td-shadow); }
.td-cta p { margin: 0; max-width: 40em; }
@media (max-width: 760px) { .td-cta { flex-direction: column; align-items: flex-start; } }
.td-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.td-features article { background: var(--td-surface); border: 1px solid var(--td-border); border-radius: var(--td-radius); padding: 24px; }
@media (max-width: 860px) { .td-features { grid-template-columns: 1fr; } }

/* A restaurant's page */
.td-place { padding: 24px 0 8px; }
.td-back { display: inline-block; margin-bottom: 18px; font-weight: 600; text-decoration: none; }
.td-place-head { display: flex; gap: 20px; align-items: flex-start; }
.td-place-logo { width: 96px; height: 96px; border-radius: 20px; font-size: 1.6rem; }
.td-place-tag { margin: .2em 0 .5em; font-size: 1.05rem; }
.td-place-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-weight: 600; font-size: .95rem; }
.td-hours { margin-top: 16px; background: var(--td-surface); border: 1px solid var(--td-border); border-radius: var(--td-radius-sm); padding: 10px 16px; max-width: 420px; }
.td-hours summary { cursor: pointer; font-weight: 700; }
.td-hours dl { margin: 10px 0 4px; display: grid; gap: 4px; }
.td-hours dl div { display: flex; justify-content: space-between; gap: 16px; }
.td-hours dd { margin: 0; color: var(--td-muted); }

.td-order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-bottom: 96px; }
.td-menu { min-width: 0; }
.td-menu-nav { position: sticky; top: 68px; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; margin-bottom: 8px; background: var(--td-ground); scrollbar-width: none; }
.td-menu-nav::-webkit-scrollbar { display: none; }
.td-menu-nav a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--td-surface); border: 1px solid var(--td-border); color: var(--td-text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.td-menu-nav a:hover { border-color: var(--td-accent); }
.td-menu-section { padding-top: 18px; scroll-margin-top: 130px; }
.td-dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.td-dish {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 112px; padding: 16px;
  text-align: left; background: var(--td-surface); border: 1px solid var(--td-border); border-radius: var(--td-radius);
  color: var(--td-text); font: inherit; cursor: pointer; transition: transform .18s var(--td-ease), box-shadow .18s var(--td-ease), border-color .18s;
}
.td-dish:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--td-shadow); border-color: transparent; }
.td-dish:disabled { cursor: default; opacity: .7; }
.td-dish-text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.td-dish-name { font-weight: 700; }
.td-dish-desc { color: var(--td-muted); font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.td-dish-price { font-weight: 700; font-size: .95rem; }
.td-dish-img { flex: none; width: 92px; height: 92px; border-radius: 12px; object-fit: cover; background: var(--td-sunken); }
.td-dish-add { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--td-accent); color: var(--td-on-accent); font-weight: 800; font-size: 1.2rem; box-shadow: var(--td-shadow); }
.td-dish-img + .td-dish-add { right: 10px; bottom: 10px; }

/* The order beside the menu */
.td-cart { position: sticky; top: 88px; }
.td-cart-in { background: var(--td-surface); border: 1px solid var(--td-border); border-radius: 20px; padding: 20px; box-shadow: var(--td-shadow); max-height: calc(100vh - 110px); overflow-y: auto; }
.td-cart-head { display: flex; align-items: center; justify-content: space-between; }
.td-cart-close { display: none; }
.td-lines { list-style: none; padding: 0; margin: 8px 0 0; }
.td-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--td-border); }
.td-lines li > div { display: grid; gap: 2px; min-width: 0; }
.td-line-name { font-weight: 700; }
.td-line-price { font-weight: 600; font-size: .95rem; }
.td-stepper { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; border: 1.5px solid var(--td-border); height: fit-content; }
.td-stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--td-text); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.td-stepper button:hover:not(:disabled) { background: var(--td-sunken); }
.td-stepper button:disabled { opacity: .35; }
.td-stepper span { min-width: 22px; text-align: center; font-weight: 700; }
.td-totals { margin: 14px 0 6px; display: grid; gap: 6px; }
.td-totals div { display: flex; justify-content: space-between; }
.td-totals dd { margin: 0; font-weight: 600; }
.td-totals .is-total { padding-top: 8px; border-top: 1px solid var(--td-border); font-size: 1.1rem; font-weight: 800; }
.td-checkout fieldset { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.td-checkout legend { font-weight: 700; margin-bottom: 6px; }
.td-radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--td-radius-sm); border: 1.5px solid var(--td-border); cursor: pointer; }
.td-radio:has(input:checked) { border-color: var(--td-accent); background: var(--td-accent-soft); }
.td-radio input { accent-color: var(--td-accent); width: 18px; height: 18px; }
.td-radio.is-off { opacity: .5; cursor: not-allowed; }
.td-radio .td-muted { margin-left: auto; }
.td-cart-bar { display: none; }

@media (max-width: 960px) {
  .td-order-layout { grid-template-columns: minmax(0, 1fr); }
  .td-cart { position: fixed; inset: auto 0 0 0; top: auto; z-index: 40; transform: translateY(105%); transition: transform .25s var(--td-ease); }
  .td-cart.is-open { transform: none; }
  .td-cart-in { border-radius: 24px 24px 0 0; max-height: 86vh; box-shadow: var(--td-shadow-lg); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .td-cart-close { display: block; }
  .td-cart-bar {
    position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35;
    display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 22px; border: 0; border-radius: 999px;
    background: var(--td-accent); color: var(--td-on-accent); font: inherit; font-weight: 750; font-size: 1.05rem; box-shadow: var(--td-shadow-lg); cursor: pointer;
  }
}

/* A dish's choices: a bottom sheet on a phone, a dialog above it */
.td-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(28, 17, 13, .55); backdrop-filter: blur(3px); animation: td-fade .18s var(--td-ease); }
.td-sheet {
  position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, 100% - 32px); max-height: 88vh; overflow-y: auto; background: var(--td-surface); border-radius: 24px;
  box-shadow: var(--td-shadow-lg); animation: td-pop .22s var(--td-ease);
}
.td-sheet-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.td-sheet-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.td-sheet-body { padding: 24px; }
.td-group { border: 0; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.td-group legend { font-weight: 700; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; width: 100%; }
.td-req { font-size: .75rem; font-weight: 700; color: var(--td-muted); background: var(--td-sunken); padding: 2px 8px; border-radius: 999px; }
.td-sheet-foot { position: sticky; bottom: -24px; display: flex; gap: 12px; align-items: center; margin: 20px -24px -24px; padding: 16px 24px; background: var(--td-surface); border-top: 1px solid var(--td-border); }
@keyframes td-fade { from { opacity: 0; } }
@keyframes td-pop { from { opacity: 0; transform: translate(-50%, -46%); } }
@media (max-width: 640px) {
  .td-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 90vh; border-radius: 24px 24px 0 0; animation: td-rise .25s var(--td-ease); }
  .td-sheet-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@keyframes td-rise { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .td-sheet, .td-scrim, .td-cart { animation: none; transition: none; } }

/* Tracking an order */
.td-track { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.td-track-card { background: var(--td-surface); border: 1px solid var(--td-border); border-radius: 20px; padding: 28px; box-shadow: var(--td-shadow); }
.td-track-stage { font-size: 1.5rem; font-weight: 800; margin: .2em 0; }
.td-track-stage.stage-preparing { color: var(--td-warning); }
.td-track-stage.stage-ready, .td-track-stage.stage-collected { color: var(--td-success); }
.td-track-stage.stage-cancelled { color: var(--td-danger); }
.td-track-steps { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.td-track-steps li { padding-top: 12px; border-top: 5px solid var(--td-border); font-weight: 600; font-size: .9rem; color: var(--td-muted); }
.td-track-steps li.is-done { border-color: var(--td-accent); color: var(--td-text); }
.td-track-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.td-receipt { list-style: none; padding: 0; margin: 0; }
.td-receipt li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--td-border); }
@media (max-width: 860px) { .td-track { grid-template-columns: 1fr; } }

/* Footer */
.td-footer { border-top: 1px solid var(--td-border); padding: 48px 0 28px; background: var(--td-surface); }
.td-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.td-footer-grid img { height: 30px; width: auto; }
.td-footer-tag { font-weight: 800; font-size: 1.1rem; margin: 12px 0 4px; }
.td-footer-h { font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--td-muted); margin: 0 0 12px; }
.td-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.td-footer ul a { color: var(--td-text); text-decoration: none; }
.td-footer ul a:hover { color: var(--td-caramel); }
.td-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--td-border); font-size: .9rem; }
.td-by { display: inline-flex; align-items: center; gap: 8px; color: var(--td-muted) !important; text-decoration: none; }
.td-by img { height: 22px; width: auto; }
:root[data-theme="dark"] .td-by img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-by img { filter: brightness(0) invert(1); } }
@media (max-width: 760px) { .td-footer-grid { grid-template-columns: 1fr 1fr; } .td-footer-grid > :first-child { grid-column: 1 / -1; } }

/* On a phone: the headline is the first thing read, the menu bar runs edge to edge */
@media (max-width: 860px) {
  .td-hero-art { display: none; }
  .td-hero { padding-top: 28px; }
}
@media (max-width: 960px) {
  .td-menu-nav { top: 69px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; box-shadow: 0 1px 0 var(--td-border); }
}
@media (max-width: 640px) {
  .td-place-head { flex-direction: column; gap: 14px; }
  .td-place-logo { width: 72px; height: 72px; border-radius: 16px; }
  .td-hours { max-width: none; }
  .td-steps li { padding: 22px 20px; }
  .td-band-figures { gap: 8px; }
  .td-band-figures div { padding: 14px 8px; }
  .td-band-figures dt { font-size: .78rem; }
  .td-section-head .td-h2 { font-size: 1.5rem; }
}

/* The router moves focus to the page heading after a navigation; it is not a control, so no ring */
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }

/* Accounts: sign in with a code, your orders */
.td-account-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--td-text); text-decoration: none; font-weight: 650; font-size: .95rem; }
.td-account-link:hover { background: var(--td-accent-soft); }
.td-account-link svg { width: 20px; height: 20px; }
@media (max-width: 720px) { .td-account-link { margin-left: auto; padding: 8px; } .td-account-link span { display: none; } .td-theme { margin-left: 0; } }
.td-auth { max-width: 460px; }
.td-auth-form { display: grid; gap: 14px; margin: 18px 0 14px; }
.td-code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.td-account { max-width: 760px; }
.td-history { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 10px; }
.td-history li { background: var(--td-surface); border: 1px solid var(--td-border); border-radius: var(--td-radius); overflow: hidden; }
.td-history-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; color: var(--td-text); text-decoration: none; }
.td-history-row:hover { background: var(--td-accent-soft); }
.td-history-main { display: grid; gap: 2px; min-width: 0; }
.td-history-main strong { font-size: 1.05rem; }
.td-history-side { display: grid; justify-items: end; gap: 6px; font-weight: 700; flex: none; }
.td-history-invoice { display: block; padding: 10px 18px; border-top: 1px solid var(--td-border); font-weight: 650; font-size: .9rem; }
.td-card { background: var(--td-surface); border: 1px solid var(--td-border); border-radius: var(--td-radius); padding: 18px 20px; }
.td-total { font-size: 1.1rem; padding-top: 6px; border-top: 1px solid var(--td-border); }
.td-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.td-danger { margin-top: 12px; color: var(--td-muted); }
.td-danger summary { cursor: pointer; font-weight: 650; }
.td-signin-box { display: grid; gap: 12px; padding: 16px; margin: 4px 0 14px; border-radius: var(--td-radius-sm); background: var(--td-accent-soft); }
.td-signin-box p { margin: 0; }
.td-signed-as { font-size: .9rem; color: var(--td-muted); margin: 0 0 10px; }
.td-link { background: none; border: 0; padding: 0; color: var(--td-accent-ink); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
.td-pilot { display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 40px; align-items: start; }
@media (max-width: 860px) { .td-pilot { grid-template-columns: 1fr; } }
.td-faq { max-width: 760px; }
.td-faq details { background: var(--td-surface); border: 1px solid var(--td-border); border-radius: var(--td-radius-sm); padding: 14px 18px; margin-top: 10px; }
.td-faq summary { cursor: pointer; font-weight: 700; }
.td-faq p { margin: 10px 0 0; }

/* Ordering at the table (TableOrderView) in Tapdaro's colours: its own sheet reads the
   platform's token names, so they are given Tapdaro's values here. */
.td-table { padding: 16px 0 0; }
.td-table .to {
  --bg: var(--td-ground); --bg-raised: var(--td-surface); --text: var(--td-text); --text-muted: var(--td-muted);
  --accent: var(--td-accent); --border: var(--td-border);
}
.td-table .to-table, .td-table .to-btn-primary { color: var(--td-on-accent); }
.td-table .to-head { position: static; }
.td-table .to-cats { top: 69px; }
.td-account-back { padding-bottom: 0; }

/* Blazor's reconnect element, in Tapdaro's words: hidden until Blazor shows
   it, then a small bar at the foot after a moment's grace. */
.td-reconnect { display: none; }
.td-reconnect.components-reconnect-show,
.td-reconnect.components-reconnect-retrying {
  display: flex; align-items: center; gap: 10px;
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000;
  padding: 10px 18px; border-radius: 999px;
  background: var(--td-band); color: var(--td-band-text);
  font-size: 0.95rem; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0; animation: td-reconnect-in 200ms ease-out 1.2s forwards;
}
.td-reconnect-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
@keyframes td-reconnect-in { to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .td-reconnect-dot { animation: td-pulse 1s ease-in-out infinite alternate; }
  @keyframes td-pulse { from { opacity: .35; } to { opacity: 1; } }
}

/* Where the restaurant is: Google Maps' embed and a Navigate button. */
.td-map { margin-top: 16px; border: 1px solid var(--td-border); border-radius: var(--td-radius); overflow: hidden; background: var(--td-surface); }
.td-map iframe { display: block; width: 100%; height: 220px; border: 0; }
.td-map-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; }
