/*
 * peixin. Ice, deep water and a price-tag red. Large type and large targets:
 * the counter screen is read from a step away, and the list is written with
 * cold, wet hands.
 */
:root {
  color-scheme: light;
  --ink: #0f1d2a;
  --muted: #5a6b7b;
  --bg: #f4f8fb;
  --panel: #ffffff;
  --line: #d7e2ea;
  --sea: #0d2b45;
  --sea-2: #164a6e;
  --tag: #e8553d;
  --tag-ink: #ffffff;
  --good: #1f8a5b;
  --warn: #b7791f;
  --bad: #c0392b;
  --radius: 14px;
}

* { box-sizing: border-box; }
/* A class that sets display (.claim, .btn, .row…) would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--sea-2); }
img { max-width: 100%; display: block; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 10px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 28px 0 10px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 12px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--panel); padding: 8px 12px; }

/* ── Header and footer ─────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--sea); color: #fff;
}
.site-header a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.site-header nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.site-header nav a { opacity: .82; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { opacity: 1; border-bottom-color: var(--tag); }
.account { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.site-header .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.site-header .lang { font-size: 14px; font-weight: 700; letter-spacing: .04em; opacity: .82; }
.site-header .lang:hover { opacity: 1; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: #9fb3c4; }
.sync-dot[data-state="synced"] { background: #4ade80; }
.sync-dot[data-state="syncing"] { background: #facc15; }
.sync-dot[data-state="error"], .sync-dot[data-state="offline"] { background: var(--tag); }
.claim {
  display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 10px 20px; background: #fff4d6; border-bottom: 1px solid #f1d58a; font-size: 15px;
}

main { width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 20px 56px; flex: 1; }
main.wide { max-width: 1180px; }

.site-footer {
  display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap;
  padding: 22px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; background: var(--panel);
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Building blocks ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 2px solid var(--sea);
  background: var(--sea); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--sea-2); border-color: var(--sea-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.tag { background: var(--tag); border-color: var(--tag); }
.btn.tag:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; color: var(--sea); }
.btn.ghost:hover { background: rgba(13,43,69,.06); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 15px; border-width: 1.5px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.error { color: var(--bad); font-weight: 600; }
.error:empty { display: none; }
.ok { color: var(--good); font-weight: 600; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #e8eff4; color: var(--sea); }
.pill.good { background: #dcf3e8; color: var(--good); }
.pill.warn { background: #fdf0d5; color: var(--warn); }
.pill.bad { background: #fbe1dd; color: var(--bad); }
.notice { background: #e8f1f8; border: 1px solid #c4d9e8; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

label { display: block; font-weight: 650; margin: 14px 0 6px; font-size: 15px; }
label.inline { display: flex; gap: 10px; align-items: center; font-weight: 500; }
input, select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; min-height: 46px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(22,74,110,.25); border-color: var(--sea-2); }
textarea { min-height: 110px; resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
dialog { border: 0; border-radius: var(--radius); padding: 22px; width: min(520px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(13,43,69,.45); }

/* ── Price tags and the list ──────────────────────────────────── */
.price {
  display: inline-block; background: var(--tag); color: var(--tag-ink); font-weight: 800;
  padding: 3px 10px; border-radius: 6px; transform: rotate(-2deg); white-space: nowrap;
}
.items { display: grid; gap: 12px; }
.item {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
}
.item .thumb {
  width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: #e3ecf2;
  display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center;
}
.item h3 { margin: 0; font-size: 19px; }
.item .meta { color: var(--muted); font-size: 14px; }
.item.gone { opacity: .55; }
.item .actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 560px) {
  .item { grid-template-columns: 72px 1fr; }
  .item .thumb { width: 72px; height: 72px; }
  .item .actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; flex-wrap: wrap; }
}

/* ── The counter ──────────────────────────────────────────────── */
.orders { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.order { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea-2); border-radius: var(--radius); padding: 14px 16px; }
.order.prepared { border-left-color: var(--warn); }
.order.collected { border-left-color: var(--good); opacity: .7; }
.order.cancelled, .order.no_show { border-left-color: var(--bad); opacity: .55; }
.order .time { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.order ul { margin: 8px 0; padding-left: 18px; }
.order li { margin: 3px 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs button { font: inherit; border: 1.5px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--sea); color: #fff; border-color: var(--sea); }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

/* ── The front page ───────────────────────────────────────────── */
.hero { display: grid; gap: 28px; grid-template-columns: 1.1fr .9fr; align-items: center; margin: 8px 0 40px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); }
.hero .lede { font-size: 20px; color: var(--muted); }
.board { background: var(--sea); color: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 18px 40px rgba(13,43,69,.25); }
.board h3 { color: #fff; margin-bottom: 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.board ul { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.25); }
.board li:last-child { border-bottom: 0; }
.board .left { font-size: 14px; opacity: .75; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 12px 0 28px; }
.steps .card { margin: 0; }
.steps .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tag); color: #fff; font-weight: 800; margin-bottom: 8px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .claim, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
}
