:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-2: #f0ede7;
  --text: #1d1b19;
  --muted: #6d6862;
  --border: #e3dfd8;
  --accent: #e2231a;
  --accent-ink: #ffffff;
  --accent-soft: #fde9e7;
  --ok: #1f7a4d;
  --ok-soft: #e3f3ea;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514; --surface: #201f1d; --surface-2: #2a2826; --text: #f1eee9; --muted: #a39d95;
    --border: #3a3734; --accent: #ff4a3d; --accent-soft: #3a1d1a; --ok: #5fd39a; --ok-soft: #173326;
    --warn: #ffc65c; --warn-soft: #3a2e14; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 120px; }
header.top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
header.top h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; font-weight: 800; }
header.top h1 span { color: var(--accent); }
.sub { color: var(--muted); margin: 4px 0 0; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 220px; }
label.field { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=email], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 11px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 60px; }
button, .btn {
  font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
button:hover, .btn:hover { border-color: var(--muted); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.05); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 8px; }
button.ghost:hover { color: var(--text); }
button.danger { color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }

.tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: transparent; padding: 8px 16px; color: var(--muted); }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 8px 18px; }
.seg button[aria-pressed=true] { background: var(--text); color: var(--bg); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bowl { text-align: left; display: block; padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); width: 100%; font-weight: 400; }
.bowl:hover { border-color: var(--muted); }
.bowl[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bowl .name { font-weight: 800; font-size: 16px; letter-spacing: -.01em; display: block; }
.bowl .ing { color: var(--muted); font-size: 13px; display: block; margin: 6px 0 8px; }
.bowl .price { font-size: 13px; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 6px 14px; font-weight: 500; font-size: 14px; }
.chip small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed=true] small { color: inherit; opacity: .85; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 16px; z-index: 10; box-shadow: 0 -4px 16px rgba(0,0,0,.05);
}
.bar .inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar .what { flex: 1 1 200px; min-width: 0; }
.bar .what strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .what span { color: var(--muted); font-size: 13px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list .who { font-weight: 700; min-width: 120px; }
.list .desc { flex: 1; color: var(--muted); font-size: 14px; }
.list .mine { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.err { background: var(--accent-soft); color: var(--accent); }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.open { background: var(--ok-soft); color: var(--ok); }
.badge.final { background: var(--accent-soft); color: var(--accent); }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 50; font-weight: 600; font-size: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .admin-layout { grid-template-columns: 1fr; } }
.rounds a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.rounds a:hover { background: var(--surface-2); }
.rounds a.active { border-color: var(--accent); background: var(--accent-soft); }
.rounds a small { display: block; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.checks label { display: inline-flex; gap: 6px; align-items: center; }
.stat { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 8px; }
.stats div span { display: block; color: var(--muted); font-size: 13px; }
pre.email { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 8px; font-size: 13px; max-height: 260px; overflow: auto; }
[hidden] { display: none !important; }
