:root {
  --bg: #f6f1ea;
  --card: #fffdf9;
  --ink: #2b211b;
  --muted: #7a6a5e;
  --line: #e6dccf;
  --accent: #b5542b;
  --accent-ink: #fff;
  --soft: #f3e4d8;
  --ok: #3f7d58;
  --ok-soft: #e2f0e7;
  --warn: #a8690b;
  --warn-soft: #fbeed3;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1512;
    --card: #241d19;
    --ink: #f0e7dd;
    --muted: #a8998b;
    --line: #3a2f28;
    --accent: #e08a5b;
    --accent-ink: #1a1512;
    --soft: #33261f;
    --ok: #7fc79b;
    --ok-soft: #1f3327;
    --warn: #e6b45a;
    --warn-soft: #3a2d14;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 460px;
  padding: 16px 16px 48px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.hub { max-width: 920px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 4px 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
h3 { font-size: 0.95rem; margin: 0 0 6px; }
p { margin: 0 0 10px; }
a { color: var(--accent); }
small, .muted { color: var(--muted); }
small { font-size: 0.82rem; }

.top { margin-bottom: 16px; }
.back { display: inline-block; font-size: 0.9rem; text-decoration: none; padding: 6px 0; }
.eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.pitch { color: var(--muted); margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card > :last-child { margin-bottom: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row.left { justify-content: flex-start; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.big { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.mt { margin-top: 12px; }

.btn {
  font: inherit; font-weight: 600;
  min-height: 46px; padding: 10px 16px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
  cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.block { display: block; width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 0.88rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, .chip:focus-visible, .item:focus-visible, .bld:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  font: inherit; font-size: 0.9rem;
  padding: 8px 14px; min-height: 38px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.item {
  font: inherit; text-align: left; color: var(--ink);
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; min-height: 52px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
button.item { cursor: pointer; }
.item.on { border-color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent); }
.item .ic { font-size: 1.4rem; width: 30px; text-align: center; flex: none; }
.item small { display: block; }
.qty { display: flex; align-items: center; gap: 8px; flex: none; }
.qty button {
  font: inherit; font-size: 1.1rem; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.qty b { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--accent); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.banner { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--soft); }
.banner.ok { background: var(--ok-soft); }
.banner.warn { background: var(--warn-soft); }
.banner > :last-child { margin-bottom: 0; }

.bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 6px 0 10px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
.bar.ok i { background: var(--ok); }

.steps { list-style: none; margin: 14px 0; padding: 0; display: flex; gap: 6px; }
.steps li { flex: 1; font-size: 0.75rem; color: var(--muted); padding-top: 10px; border-top: 4px solid var(--line); }
.steps li.done { border-color: var(--ok); color: var(--ink); }
.steps li.now { border-color: var(--accent); color: var(--ink); font-weight: 700; }

.demo { border: 2px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0 12px; }
.demo-h { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.demo > :last-child { margin-bottom: 0; }

input[type="text"], select, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  width: 100%; padding: 11px 12px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 12px;
}
textarea { min-height: 76px; resize: vertical; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 0.95rem; margin-bottom: 10px; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

.tabs { display: flex; gap: 6px; background: var(--soft); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.tabs button { flex: 1; font: inherit; font-weight: 600; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 0.9rem;
  max-width: calc(100vw - 32px); z-index: 30; text-align: center;
}
.push {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(430px, calc(100vw - 24px)); z-index: 40;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: drop 0.3s ease-out;
}
.push p { margin: 2px 0 8px; }
@keyframes drop { from { transform: translate(-50%, -120%); } to { transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .push { animation: none; } .bar i { transition: none; } }

.lock { border-radius: 28px; padding: 28px 14px 16px; margin-bottom: 12px; color: #fff; background: linear-gradient(160deg, #4a2c1d, #1d1512); text-align: center; }
.lock-time { font-size: 3.4rem; font-weight: 300; line-height: 1; }
.lock-date { opacity: 0.75; margin-bottom: 20px; }
.notif { text-align: left; background: rgba(255, 255, 255, 0.16); border-radius: 16px; padding: 12px 14px; }
.notif p { margin: 2px 0 10px; }
.notif .btn { border-color: transparent; background: rgba(255, 255, 255, 0.2); color: #fff; }
.notif .btn.primary { background: #fff; color: #2b211b; }

.qr { border-radius: 10px; display: block; margin: 8px auto; }
.code { font: 700 1.2rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; }

.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 12px 0; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 1.3rem; }
.stamp.on { border: 2px solid var(--accent); background: var(--soft); }

.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; text-align: center; }
.day { border-radius: 14px; border: 1px solid var(--line); padding: 10px 0; font-size: 0.8rem; color: var(--muted); }
.day b { display: block; font-size: 1.4rem; height: 32px; }
.day.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ink); }
.day.today { box-shadow: 0 0 0 2px var(--accent); color: var(--ink); }

.map { width: 100%; height: auto; display: block; margin-bottom: 10px; }
.map .track { stroke: var(--muted); stroke-width: 3; }
.map .sleepers { stroke: var(--muted); stroke-width: 9; stroke-dasharray: 2 8; opacity: 0.45; }
.map .cafe { fill: var(--accent); }
.map .cafe-t { fill: var(--accent-ink); font-size: 11px; font-weight: 700; }
.map .side { fill: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; }
.map .bld { cursor: pointer; }
.map .bld rect { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.map .bld text { fill: var(--ink); font-size: 10px; pointer-events: none; }
.map .bld.on rect { fill: var(--soft); stroke: var(--accent); stroke-width: 2.5; }
.map .route { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 4; fill: none; }

.ring { display: block; margin: 0 auto; }
.ring .bg { stroke: var(--soft); }
.ring .fg { stroke: var(--accent); transition: stroke-dashoffset 0.4s; }
.ring text { fill: var(--ink); font-weight: 700; }

.foot { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-size: 0.88rem; }
.foot a { text-decoration: none; }

/* hub */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 24px; }
.hub-card { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.hub-card:hover { border-color: var(--accent); }
.hub-card .ic { font-size: 1.6rem; }
.hub-card h3 { margin: 4px 0; }
.hub-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }
