@font-face { font-family: 'Oswald'; font-weight: 500; font-display: swap; src: url('/fonts/oswald-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-weight: 600; font-display: swap; src: url('/fonts/oswald-latin-600-normal.woff2') format('woff2'); }

/* Simple retro-American: cream paper, navy ink, red + mustard accents, thin outlines. */
:root {
  --bg: #f2e8d5;
  --card: #fbf6ec;
  --card-2: #f6eedd;
  --ink: #1e2a44;
  --navy: #1e2a44;
  --red: #c8372d;
  --red-l: #f6dcd6;
  --mustard: #e3b04b;
  --mustard-l: #f7e6bb;
  --muted: #6e6658;
  --line: #d9ccb2;
  --good: #2e7d5b;
  --good-l: #dcefe4;
  --mid: #b7791f;
  --bad: #c8372d;
  --r: 10px;
  --bw: 1.5px;
  --shadow: 2px 2px 0 var(--navy);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --num: 'Oswald', 'Hiragino Sans', system-ui, sans-serif;
  --jp: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Yu Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg); font-family: var(--jp);
  font-size: 15px; line-height: 1.55; font-weight: 500;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  line-break: strict; word-break: keep-all; overflow-wrap: anywhere;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--red); }
[hidden] { display: none !important; }
b, strong { font-weight: 700; }
h1, h2, h3 { text-wrap: balance; }
.ico { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.num { font-family: var(--num); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--muted); }

/* ---------- top bar (one slim row) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  height: calc(44px + var(--safe-t)); padding: var(--safe-t) 12px 0;
  background: var(--bg); border-bottom: var(--bw) solid var(--navy);
}
.topbar__clock { font-family: var(--num); font-weight: 600; font-size: 22px; line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; }
.topbar__date { font-family: var(--num); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.topbar__sp { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: var(--bw) solid var(--navy); border-radius: 999px; background: var(--card); font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.is-live .pill__dot { background: var(--good); }
.pill.is-stale .pill__dot { background: var(--mustard); }
.pill.is-error .pill__dot { background: var(--red); }
.pill.is-loading .pill__dot { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; color: var(--navy); }

.banner { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; background: var(--mustard-l); border-bottom: 1px solid var(--line); }
.banner.is-error { background: var(--red-l); }
.banner .btn { margin-left: auto; }

/* ---------- layout ---------- */
main { padding: 12px 12px calc(var(--tabh, 60px) + 24px); max-width: 560px; margin: 0 auto; }
body.has-actionbar main { padding-bottom: calc(var(--tabh, 60px) + 90px); }
.view { display: flex; flex-direction: column; gap: 12px; }
.view--map { margin: -12px -12px 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border: var(--bw) solid var(--navy); border-radius: var(--r); }
.card--pad { padding: 14px; }
.card--shadow { box-shadow: var(--shadow); }
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px -4px; }
.sec h2 { margin: 0; font-size: 16px; font-weight: 800; }
.sec__en { font-family: var(--num); font-size: 12px; letter-spacing: .12em; color: var(--red); margin-right: 6px; }
.sec__sub { font-size: 12.5px; color: var(--muted); }
.kicker { font-family: var(--num); font-size: 12px; letter-spacing: .1em; color: var(--red); text-transform: uppercase; }
.empty { padding: 18px; text-align: center; color: var(--muted); }
.footer { text-align: center; font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: var(--bw) solid var(--navy); border-radius: 8px; background: var(--card); font-weight: 700; font-size: 15px;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn--primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
.btn--block { width: 100%; }
.btn.is-busy { opacity: .6; }
.btnrow { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.linkbtn { color: var(--red); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- tags / chips ---------- */
.tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 700; background: var(--card-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--line); }
.tag--live { background: var(--good-l); color: var(--good); border-color: transparent; }
.tag--manual { background: var(--mustard-l); color: var(--mid); border-color: transparent; }
.tag--est { background: transparent; color: var(--muted); border-style: dashed; }
.tag--must { background: var(--red); color: #fff; border-color: transparent; }
.tag--bad { background: var(--red-l); color: var(--red); border-color: transparent; }
.tag--warn { background: var(--mustard-l); color: var(--mid); border-color: transparent; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 12px; border-radius: 999px; border: var(--bw) solid var(--navy); background: var(--card);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.chip.is-active { background: var(--navy); color: #fff; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: var(--bw) solid var(--navy); border-radius: 8px; overflow: hidden; background: var(--card); }
.seg button { min-height: 38px; font-size: 14px; font-weight: 700; padding: 0 4px; }
.seg button + button { border-left: 1px solid var(--navy); }
.seg button.is-active { background: var(--navy); color: #fff; }

/* wait colors */
.is-good { color: var(--good); }
.is-mid { color: var(--mid); }
.is-bad { color: var(--red); }

/* ---------- home: progress strip ---------- */
.prog { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.prog__n { font-family: var(--num); font-size: 26px; font-weight: 600; line-height: 1; }
.prog__n small { font-size: 14px; color: var(--muted); }
.prog__k { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.prog__bar { flex: 1; height: 6px; border-radius: 3px; background: var(--card-2); border: 1px solid var(--line); overflow: hidden; }
.prog__bar i { display: block; height: 100%; background: var(--red); }
.musts { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 10px; }
.must { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--navy); }
.must.is-done { background: var(--navy); color: #fff; }
.must.is-down { border-style: dashed; color: var(--muted); }

/* notes & alerts */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--mustard-l); border: 1px dashed var(--mid); font-size: 13.5px; }
.note--bad { background: var(--red-l); border-color: var(--red); }
.note .ico { font-size: 18px; margin-top: 1px; color: var(--mid); }
.note--bad .ico { color: var(--red); }
.note__t { font-weight: 800; }
.note__s { font-size: 12.5px; color: var(--muted); }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--navy); color: #fff; }
.alert__body { flex: 1; min-width: 0; }
.alert__t { font-weight: 800; }
.alert__s { font-size: 13px; opacity: .85; }
.alert__x { color: #fff; opacity: .7; width: 28px; height: 28px; }

/* ---------- home: next card ---------- */
.next { padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.next__head { display: flex; gap: 12px; align-items: flex-start; }
.next__thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex: none; border: 1px solid var(--navy); }
.next__title { margin: 2px 0 0; font-size: 20px; line-height: 1.3; font-weight: 800; }
.next__en { font-size: 12px; color: var(--muted); line-height: 1.3; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 8px 4px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__k { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.stat__v { font-family: var(--num); font-size: 28px; font-weight: 600; line-height: 1.15; }
.stat__v small { font-family: var(--jp); font-size: 12px; font-weight: 700; margin-left: 1px; }
.stat__src { margin-top: 2px; }

/* time bar: visual "how the next hour goes" */
.tbar__row { display: flex; height: 22px; border-radius: 4px; overflow: hidden; border: 1px solid var(--navy); }
.tbar__seg { display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; min-width: 0; }
.tbar__seg + .tbar__seg { border-left: 1px solid var(--navy); }
.tbar__seg--walk { background: var(--card-2); }
.tbar__seg--wait { background: var(--mustard-l); }
.tbar__seg--ride { background: var(--red); color: #fff; }
.tbar__seg--slack { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px); color: var(--muted); }
.tbar__lbl { display: flex; justify-content: space-between; margin-top: 3px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.tbar__lbl .num { font-size: 13px; color: var(--ink); }

/* list rows (alts, upcoming, explore) */
.rows { overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; min-height: 56px; }
.row + .row { border-top: 1px solid var(--line); }
.row__thumb { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.row__body { flex: 1; min-width: 0; }
.row__k, .row__name { display: block; }
.row__k { font-size: 11.5px; color: var(--red); font-weight: 700; line-height: 1.3; }
.row__name { font-weight: 800; font-size: 15px; line-height: 1.35; }
.row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row__meta .ico { margin-right: 1px; }
.row__time { font-family: var(--num); font-size: 18px; font-weight: 600; color: var(--red); width: 48px; flex: none; }
.row__wait { text-align: right; flex: none; }
.row__wait b { font-family: var(--num); font-size: 24px; font-weight: 600; line-height: 1; }
.row__wait small { font-size: 11px; font-weight: 700; }
.row__chev { color: var(--muted); font-size: 16px; }
.row.is-done { opacity: .55; }

.locrow { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; }
.locrow .ico { font-size: 16px; color: var(--red); }
.locrow__t { flex: 1; min-width: 0; color: var(--muted); }
.locrow__t b { color: var(--ink); }

/* pre-open */
.countdown { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; background: var(--navy); color: #fff; border-radius: var(--r); }
.countdown__k { font-family: var(--num); letter-spacing: .12em; font-size: 12px; color: var(--mustard); }
.countdown__n { font-weight: 800; font-size: 16px; line-height: 1.35; }
.countdown__v { font-family: var(--num); font-size: 22px; white-space: nowrap; flex: none; font-weight: 600; text-align: right; line-height: 1.1; }
.countdown__v small { display: block; font-family: var(--jp); font-size: 11px; opacity: .8; }

/* image placeholder */
.img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster { width: 100%; height: 100%; display: grid; place-items: center; background: var(--c, var(--navy)); color: #fff; font-family: var(--num); font-size: 18px; letter-spacing: .04em; }
.poster--lg { font-size: 34px; }

/* ---------- plan ---------- */
.condsum { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.condsum__kv { font-size: 13px; gap: 4px 10px; }
.condsum__kv dd { font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { padding: 8px 4px; text-align: center; }
.kpi b { display: block; font-family: var(--num); font-size: 22px; font-weight: 600; line-height: 1.1; }
.kpi span { font-size: 11.5px; color: var(--muted); font-weight: 700; }

.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ''; position: absolute; left: 55px; top: 8px; bottom: 8px; border-left: 2px dotted var(--muted); }
.tl__item { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; margin-bottom: 8px; position: relative; }
.tl__time { font-family: var(--num); font-size: 17px; font-weight: 600; color: var(--red); text-align: right; padding-top: 10px; line-height: 1.2; }
.tl__card { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; background: var(--card); border: var(--bw) solid var(--navy); border-radius: 8px; min-height: 52px; }
.tl__main { flex: 1; min-width: 0; text-align: left; }
.tl__name { font-weight: 800; font-size: 15px; line-height: 1.35; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl__item--must .tl__card { border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.tl__item--meal .tl__card, .tl__item--show .tl__card { background: var(--mustard-l); }
.tl__item--free .tl__card { background: transparent; border-style: dashed; border-color: var(--muted); min-height: 36px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.tl__item--free .tl__time { padding-top: 6px; font-size: 14px; color: var(--muted); }
.tl__item--dropped .tl__card { background: transparent; border-style: dashed; color: var(--muted); }
.tl__item--done .tl__card { background: transparent; border-color: var(--line); }
.tl__item--done .tl__time { color: var(--muted); }
.check { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: var(--bw) solid var(--navy); background: var(--card); color: transparent; font-size: 20px; }
.check:active { background: var(--card-2); }
.check.is-done { background: var(--navy); color: #fff; }
.check:not(.is-done) .ico { color: var(--line); }

/* plan builder (sheet) */
.form { display: flex; flex-direction: column; gap: 18px; }
.field__h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.field__h b { font-size: 15px; }
.field__h span { font-size: 12px; color: var(--muted); }
.opts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.opt {
  min-height: 52px; padding: 6px 4px; border-radius: 8px; border: var(--bw) solid var(--navy); background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.25;
}
.opt b { font-size: 14px; }
.opt small { font-size: 11px; color: var(--muted); font-weight: 700; }
.opt.is-active { background: var(--navy); color: #fff; }
.opt.is-active small { color: #cfd5e3; }
.ridepick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rp {
  display: flex; word-break: keep-all; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px; border-radius: 8px; text-align: left;
  border: var(--bw) solid var(--line); background: var(--card); font-size: 13px; font-weight: 700; line-height: 1.3;
}
.rp__st { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; }
.rp.is-must { border-color: var(--red); background: var(--red-l); }
.rp.is-must .rp__st { background: var(--red); border-color: var(--red); color: #fff; }
.rp.is-skip { color: var(--muted); text-decoration: line-through; border-style: dashed; }
.rp.is-skip .rp__st { border-style: dashed; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-block; }
.legend i.m { background: var(--red); border-color: var(--red); }
.legend i.s { border-style: dashed; }
.mealrow { padding: 10px 0; }
.mealrow + .mealrow { border-top: 1px solid var(--line); }
.mealrow__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mealrow__h b { font-size: 14px; }
.mealrow__ctl { display: grid; grid-template-columns: 1fr 84px; gap: 6px; margin-top: 8px; }
.mealrow__ctl select { width: 100%; min-width: 0; }
select, input[type=time], input[type=number], input[type=text] {
  min-height: 40px; border: var(--bw) solid var(--navy); border-radius: 8px; background: var(--card); padding: 0 8px; font-size: 15px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 24px; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(-45deg, transparent 50%, var(--navy) 50%); background-position: right 12px center, right 7px center; background-size: 5px 5px; background-repeat: no-repeat; }
.toggle { position: relative; width: 48px; height: 28px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.toggle input:checked + i { background: var(--navy); }
.toggle input:checked + i::after { transform: translateX(20px); }
.showrow { padding: 10px 0; }
.showrow + .showrow { border-top: 1px solid var(--line); }
.showrow__h { display: flex; align-items: center; gap: 8px; }
.showrow__h b { flex: 1; font-size: 14px; }
.times { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.time { height: 34px; min-width: 64px; padding: 0 10px; border-radius: 8px; border: var(--bw) solid var(--navy); background: var(--card); font-family: var(--num); font-size: 16px; font-weight: 600; }
.time.is-active { background: var(--red); border-color: var(--red); color: #fff; }
.time.is-past { opacity: .4; }
.sheet__foot { position: sticky; bottom: 0; padding: 10px 16px calc(10px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); }

/* ---------- explore ---------- */
.sortrow { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.sortrow select { min-height: 34px; font-size: 13px; }
.spark { display: inline-flex; align-items: center; gap: 2px; }
.flow { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; text-align: center; }
.flow__t { font-family: var(--num); font-size: 17px; font-weight: 600; color: var(--red); }
.flow__s { font-size: 12px; font-weight: 700; }
.flow__step { position: relative; padding: 6px 2px; border-top: 2px solid var(--navy); }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(30, 42, 68, .45); }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 14px 14px 0 0; border-top: var(--bw) solid var(--navy); max-width: 560px; margin: 0 auto;
}
.sheet__grip { position: sticky; top: 0; z-index: 2; height: 22px; display: grid; place-items: center; background: var(--card); }
.sheet__grip::before { content: ''; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
.sheet__body { padding: 0; }
.sheet__content { padding: 4px 16px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.sheet__title { margin: 0; font-size: 19px; line-height: 1.35; font-weight: 800; }
.sheet__hero { height: 180px; overflow: hidden; position: relative; margin-top: -22px; }
.sheet__close { position: absolute; top: 6px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: 18px; }
.credit { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #fff; text-shadow: 0 0 3px #000; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.para { margin: 0; font-size: 14.5px; }
.box { padding: 10px 12px; border-radius: 8px; background: var(--card-2); font-size: 13.5px; }
.box b { display: block; margin-bottom: 2px; font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.menu li span:last-child { font-family: var(--num); white-space: nowrap; }
.formrow { display: flex; gap: 6px; align-items: center; }
details.more summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--red); list-style: none; padding: 6px 0; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: ' +'; }
details.more[open] summary::after { content: ' −'; }
details.more p { margin: 4px 0 0; font-size: 13.5px; }

/* settings rows */
.setrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 56px; }
.setrow + .setrow { border-top: 1px solid var(--line); }
.setrow__ico { font-size: 20px; color: var(--navy); }
.setrow__b { flex: 1; min-width: 0; }
.setrow__t { font-weight: 800; }
.setrow__s { font-size: 12.5px; color: var(--muted); }
.landgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.landgrid button { min-height: 48px; padding: 6px 10px; border-radius: 8px; border: var(--bw) solid var(--navy); background: var(--card); font-weight: 700; font-size: 13.5px; text-align: left; border-left: 6px solid var(--c); }
.landgrid button.is-active { background: var(--navy); color: #fff; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; }
.stepper button { min-height: 44px; border-radius: 8px; border: var(--bw) solid var(--navy); background: var(--card); font-weight: 700; }
.stepper__v { text-align: center; font-family: var(--num); font-size: 28px; font-weight: 600; }
.restgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rest { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 8px; border: var(--bw) solid var(--line); background: var(--card); text-align: left; min-height: 56px; }
.rest.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.rest__n { font-weight: 800; font-size: 13px; line-height: 1.3; }
.rest__s { font-size: 11.5px; color: var(--muted); }
.rest.is-active .rest__s { color: #cfd5e3; }

/* trend chart */
.bigspark { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.bigspark__head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 4px; }
.bigspark__legend { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.lg { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--navy); }
.lg--est { border-top: 2px dashed var(--muted); }
.ax { font-size: 10px; fill: var(--muted); font-family: var(--num); }
.bigspark__tip { font-size: 12px; color: var(--muted); min-height: 18px; }
.bigspark svg { touch-action: none; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0 0 var(--safe-b); background: var(--card); border-top: var(--bw) solid var(--navy);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 54px; color: var(--muted); font-size: 11.5px; font-weight: 700; position: relative; }
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--red); }
.tab.is-active::before { content: ''; position: absolute; top: -1.5px; left: 25%; right: 25%; height: 3px; background: var(--red); }

/* bottom action bar (thumb reach) */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabh, 60px)); z-index: 35; display: flex; gap: 8px; padding: 8px 12px;
  background: linear-gradient(to top, var(--bg) 70%, rgba(242, 232, 213, 0)); max-width: 560px; margin: 0 auto;
}
.actionbar__side { width: 64px; min-height: 52px; border-radius: 10px; border: var(--bw) solid var(--navy); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; gap: 1px; }
.actionbar__side .ico { font-size: 18px; }
.actionbar__main { flex: 1; min-width: 0; min-height: 52px; border-radius: 10px; background: var(--red); color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; box-shadow: var(--shadow); }
.actionbar__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* toast */
.toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabh, 60px) + 76px); z-index: 70; max-width: 520px; margin: 0 auto;
  padding: 10px 14px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 700;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; display: flex; align-items: center; gap: 8px;
}
.toast.is-on { opacity: 1; transform: none; }
.toast.is-error { background: var(--red); }
.toast .linkbtn { color: var(--mustard); margin-left: auto; flex: none; }

/* ---------- map ---------- */
.mapwrap { position: fixed; left: 0; right: 0; top: calc(var(--hdr, 45px) + var(--bnr, 0px)); bottom: var(--tabh, 60px); isolation: isolate; z-index: 1; }
#map { position: absolute; inset: 0; background: #ece3cf; }
.mapbar { position: absolute; top: 8px; left: 0; right: 0; z-index: 500; display: flex; gap: 6px; overflow-x: auto; padding: 0 10px; scrollbar-width: none; }
.mapbar .chip { height: 30px; font-size: 12.5px; padding: 0 10px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.mapfab { position: absolute; right: 10px; bottom: 76px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.mapfab button { width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: var(--bw) solid var(--navy); display: grid; place-items: center; font-size: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.mapdest {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 500; display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 6px 0 12px; background: var(--card); border: var(--bw) solid var(--navy); border-radius: 10px; box-shadow: var(--shadow);
}
.mapdest__b { flex: 1; min-width: 0; line-height: 1.25; }
.mapdest__k { font-size: 11px; color: var(--red); font-weight: 800; }
.mapdest__n { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapdest__m { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapdest .btn { min-height: 42px; }
.mapnote { position: absolute; left: 10px; top: 44px; z-index: 500; }
.mk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 2px solid var(--navy); font-family: var(--num); font-weight: 600; font-size: 13px; color: var(--navy); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.mk.is-good { background: var(--good); color: #fff; border-color: #fff; }
.mk.is-mid { background: var(--mustard); color: var(--navy); border-color: #fff; }
.mk.is-bad { background: var(--red); color: #fff; border-color: #fff; }
.mk.is-off { background: #aaa; color: #fff; border-color: #fff; font-size: 11px; }
.mk.is-done { background: var(--card); color: var(--muted); border-color: var(--muted); }
.mk.is-next { width: 38px; height: 38px; font-size: 16px; outline: 3px solid var(--navy); outline-offset: 1px; }
.mk--food, .mk--show { width: 24px; height: 24px; font-size: 13px; background: var(--navy); color: #fff; border-color: #fff; }
.mk--show { background: #5b3f78; }
.mk--food .ico, .mk--show .ico { font-size: 13px; }
.mk--me { width: 18px; height: 18px; border-radius: 50%; background: #2b7bf3; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(43,123,243,.35); }
.leaflet-popup-content { font-family: var(--jp); font-size: 13.5px; margin: 10px 12px; }
.leaflet-container { font-family: var(--jp); }

/* small screens (iPhone SE: 375×667) */
@media (max-width: 380px) {
  body { font-size: 14.5px; }
  .next__title { font-size: 18px; }
  .stat__v { font-size: 24px; }
  .actionbar__main { font-size: 15px; }
}
