:root {
  --ink: #0A1A3D;
  --ground: #F4F7F1;
  --card: #FFFFFF;
  --accent: #9BD31F;
  --accent-soft: #E9F5C9;
  --accent-ink: #4A6B06;
  --ok: #1B8A5A;
  --ok-soft: #DDF3E8;
  --ok-ink: #11603E;
  --muted: #4A5A70;
  --line: #D3DCCB;
  --line-soft: #E6ECDF;
  --bar: #1B3566;
  --danger: #A3341F;
  --display: 'Bricolage Grotesque', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--ground); color: var(--ink); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-wrap: balance; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.shell.wide { max-width: 1000px; }
.pad { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pad.grow { flex: 1; padding-bottom: 96px; }

.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(20px + env(safe-area-inset-top)) 20px 8px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--muted); letter-spacing: 0.02em; }
.hello { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.dashed { border-style: dashed; border-color: #B9C6AE; }
.card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card h2 { font-size: 18px; }
.card.dark h2 { font-size: 20px; line-height: 1.2; }
.small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 4px; }

.btn { min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; font-weight: 700; font-size: 15px; background: var(--ink); color: #fff; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--ink); font-weight: 600; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); font-weight: 600; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.link { background: none; border: 0; padding: 0 8px; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: underline; font-size: 14px; }

label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 6px; }
input, select { min-height: 48px; padding: 0 12px; border: 1px solid #B9C6AE; border-radius: 12px; background: #fff; width: 100%; }
form { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 10px; background: var(--line-soft); color: #3A4A62; }
.pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill.now { background: var(--accent-soft); color: var(--accent-ink); }

.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-family: var(--display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

.progress { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.progress > div { height: 8px; border-radius: 4px; background: var(--accent); }

.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; width: 28px; }
.dot { width: 28px; height: 28px; border-radius: 14px; border: 2px solid #B9C6AE; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.dot.ok { background: var(--ok); border-color: var(--ok); }
.dot.now { background: var(--accent); border-color: var(--accent); }
.dot svg { width: 14px; height: 14px; }
.line { width: 2px; flex: 1; min-height: 20px; background: var(--line); }
.line.ok { background: var(--ok); }
.tl-body { flex: 1; min-width: 0; min-height: 44px; text-align: left; background: transparent; border: 0; padding: 0 0 16px; display: flex; flex-direction: column; gap: 4px; }
.tl-body strong { font-size: 15px; line-height: 1.3; }
.tl-body p { font-size: 14px; line-height: 1.45; padding-top: 4px; }

.bars { display: flex; align-items: flex-end; gap: 12px; height: 160px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.bar-col span { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { width: 100%; border-radius: 6px 6px 0 0; background: var(--bar); min-height: 2px; }
.bar.now { background: var(--accent); }
.bar-labels { display: flex; gap: 12px; }
.bar-labels span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
.tabbar-in { max-width: 480px; margin: 0 auto; display: flex; }
.tab { flex: 1; min-height: 56px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tab[aria-current="page"] { color: var(--ink); }
.tab svg { width: 24px; height: 24px; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.list-btn { text-align: left; min-height: 64px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 2px solid var(--line); color: var(--ink); display: flex; flex-direction: column; gap: 4px; width: 100%; }
.list-btn[aria-pressed="true"] { border-color: var(--ink); background: #F1F8DD; }

.item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 48px; border-top: 1px solid var(--line-soft); padding: 8px 0; }
.code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #11264F; border-radius: 12px; padding: 6px 6px 6px 14px; }
.code b { font-family: var(--display); font-size: 18px; letter-spacing: 0.06em; }

.notice { position: fixed; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); max-width: 448px; margin: 0 auto; z-index: 10; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(14, 42, 59, 0.25); }
.notice.err { background: var(--danger); }
.err-text { color: var(--danger); font-size: 14px; font-weight: 600; }

.split { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.split > .col-a { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.split > .col-b { flex: 2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.center { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .progress > div { transition: width 0.3s ease; }
}

.logo { display: block; height: 34px; width: auto; max-width: 100%; align-self: flex-start; flex: none; margin-bottom: 6px; }
