:root {
  --bg: #06090f;
  --bg-soft: #0a101a;
  --panel: rgba(14, 22, 35, 0.82);
  --panel-solid: #0e1623;
  --panel-border: rgba(148, 163, 184, 0.13);
  --panel-border-strong: rgba(148, 163, 184, 0.22);
  --text: #e9eef8;
  --text-soft: #c3cede;
  --muted: #8b9bb4;
  --dim: #5c6c85;
  --red: #ff4d4f;
  --red-soft: #ff7a7c;
  --green: #16c784;
  --green-soft: #4ade80;
  --gold: #f0c36d;
  --gold-soft: #f7d99b;
  --blue: #5aa7ff;
  --grid: rgba(148, 163, 184, 0.075);
  --zero: rgba(226, 232, 240, 0.34);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --radius: 18px;
  --row-h: 31px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(1100px 620px at 8% -10%, rgba(255, 77, 79, 0.1), transparent 62%),
    radial-gradient(900px 560px at 100% 8%, rgba(22, 199, 132, 0.08), transparent 58%),
    radial-gradient(700px 500px at 52% 110%, rgba(90, 167, 255, 0.06), transparent 62%),
    linear-gradient(180deg, #05080d 0%, #070c14 48%, #05080d 100%);
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 77, 79, 0.28);
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  width: 100%;
  max-width: 1920px;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: clamp(12px, 1.6vw, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.1vw, 16px);
  overflow: hidden;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
  padding: 2px 2px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 77, 79, 0.14), rgba(22, 199, 132, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(17px, 1.75vw, 24px);
  font-weight: 650;
  letter-spacing: 0.2px;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-text .sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.topbar-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  min-width: 0;
}

.date-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.view-date {
  font-weight: 650;
  letter-spacing: 0.4px;
}

.view-weekday {
  color: var(--muted);
  font-size: 12px;
}

.asof-line {
  color: var(--muted);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.asof-line strong {
  color: var(--text-soft);
  font-weight: 600;
}

.dot-sep {
  color: var(--dim);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.4;
  border: 1px solid var(--panel-border);
  background: rgba(148, 163, 184, 0.06);
  color: var(--muted);
  white-space: nowrap;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}

.status-pill.is-live {
  color: #ffb4b4;
  border-color: rgba(255, 77, 79, 0.3);
  background: rgba(255, 77, 79, 0.08);
}

.status-pill.is-live .pill-dot {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.55);
  animation: pulse 1.8s infinite;
}

.status-pill.is-lunch {
  color: var(--gold-soft);
  border-color: rgba(240, 195, 109, 0.28);
  background: rgba(240, 195, 109, 0.07);
}

.status-pill.is-lunch .pill-dot {
  background: var(--gold);
}

.status-pill.is-closed .pill-dot,
.status-pill.is-holiday .pill-dot {
  background: var(--dim);
}

.status-pill.is-stale {
  color: #ffb4b4;
  border-color: rgba(255, 77, 79, 0.38);
  background: rgba(255, 77, 79, 0.12);
}

.status-pill.is-stale .pill-dot {
  background: var(--red);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.select-wrap {
  position: relative;
  display: inline-flex;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select-wrap select,
.speed-wrap select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--panel-border);
  background: rgba(14, 22, 35, 0.9);
  color: var(--text-soft);
  border-radius: 10px;
  padding: 8px 30px 8px 12px;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.16s, background 0.16s;
}

.select-wrap select:hover,
.speed-wrap select:hover {
  border-color: var(--panel-border-strong);
  background: rgba(20, 30, 47, 0.95);
}

.btn {
  border: 1px solid var(--panel-border);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-soft);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  line-height: 1.2;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.1s;
}

.btn:hover {
  background: rgba(148, 163, 184, 0.11);
  border-color: var(--panel-border-strong);
}

.btn:active {
  transform: translateY(1px);
}

.btn-accent {
  border-color: rgba(240, 195, 109, 0.4);
  background: linear-gradient(135deg, rgba(240, 195, 109, 0.2), rgba(232, 137, 74, 0.14));
  color: #ffe3b0;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-accent:hover {
  background: linear-gradient(135deg, rgba(240, 195, 109, 0.3), rgba(232, 137, 74, 0.2));
  border-color: rgba(240, 195, 109, 0.6);
}

.btn-ghost {
  background: transparent;
}

.btn-small {
  padding: 6px 10px;
  font-size: 11.5px;
}

.btn[aria-pressed="true"] {
  border-color: rgba(240, 195, 109, 0.45);
  background: rgba(240, 195, 109, 0.12);
  color: var(--gold-soft);
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(240, 195, 109, 0.55);
  outline-offset: 2px;
}

/* ---------- Banners ---------- */

.banner,
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid rgba(255, 77, 79, 0.32);
  background: linear-gradient(90deg, rgba(255, 77, 79, 0.15), rgba(255, 77, 79, 0.04));
  color: #ffc0c1;
}

.banner::before {
  content: "!";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 77, 79, 0.2);
  border: 1px solid rgba(255, 77, 79, 0.5);
  color: #ffd4d5;
  font-size: 12px;
  font-weight: 700;
}

.banner[hidden],
.notice[hidden] {
  display: none;
}

.notice {
  border-color: rgba(240, 195, 109, 0.24);
  background: linear-gradient(90deg, rgba(240, 195, 109, 0.1), rgba(240, 195, 109, 0.02));
  color: #ecd39f;
}

.notice::before {
  content: "i";
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(240, 195, 109, 0.45);
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 700;
}

