/* Layout: one phone-width column, sticky search on top, three tabs fixed at the bottom, a 12-month strip on every row. */
:root {
  --bg: #f1f5ee; --surface: #ffffff; --ink: #15231a; --muted: #5a6a5f; --line: #d9e2d6;
  --leaf: #1c7742; --leaf-soft: #dbeee1; --peak: #c9431c; --peak-soft: #fbe2d7; --off: #c9d3c8; --tile: #e6efe3;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1511; --surface: #17211b; --ink: #e7efe8; --muted: #98a99e; --line: #29362e;
  --leaf: #62cf8d; --leaf-soft: #1c3929; --peak: #ff8d61; --peak-soft: #45251b; --off: #34423a; --tile: #223028; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0e1511; --surface: #17211b; --ink: #e7efe8; --muted: #98a99e; --line: #29362e;
  --leaf: #62cf8d; --leaf-soft: #1c3929; --peak: #ff8d61; --peak-soft: #45251b; --off: #34423a; --tile: #223028; color-scheme: dark }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 6px; }
h1, h2, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.app { max-width: 560px; margin: 0 auto; padding-inline: 16px; padding-block: 0 104px; }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 12px 10px; display: flex; flex-direction: column; gap: 10px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand svg { color: var(--leaf); }
.brand small { margin-left: auto; font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 46px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); padding: 0 16px 0 42px; font-size: 16px; }
.search input::placeholder { color: var(--muted); }

/* month picker */
.months { display: flex; gap: 6px; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 10px; scrollbar-width: none; }
.months::-webkit-scrollbar { display: none; }
.month { flex: none; min-width: 52px; height: 38px; line-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); text-align: center; font-weight: 600; font-size: 14px; color: var(--muted); position: relative; }
.month.today::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--leaf); }
.month.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.month.on.today::after { background: var(--bg); }

.hero { display: flex; flex-direction: column; gap: 8px; padding-block: 8px 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--leaf); }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 8vw, 36px); line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }
.hero-sum { color: var(--muted); }
.hero-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.region { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.region select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 8px; font-weight: 600; font-size: 14px; max-width: 100%; }
.estimate { font-size: 13px; color: var(--muted); border-left: 2px solid var(--peak); padding-left: 10px; }

/* groups and rows */
.view { display: flex; flex-direction: column; }
.group { display: flex; flex-direction: column; gap: 8px; padding-bottom: 22px; }
.group-head { display: flex; align-items: baseline; gap: 8px; }
h2 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.count { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-note { font-size: 14px; color: var(--muted); margin-top: -4px; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 4px 8px 10px; min-height: 62px; }
.thumb { flex: none; position: relative; width: 44px; height: 44px; border-radius: 12px; background: var(--tile); display: grid; place-items: center; }
.thumb img, .thumb svg { width: 36px; height: 36px; display: block; }
.thumb .dot { position: absolute; right: -3px; bottom: -3px; box-shadow: 0 0 0 2px var(--surface); background: var(--surface); }
.thumb .dot.best { background: var(--peak); }
.monthlist .row-main { padding-left: 14px; }
.monthlist .row-sub { white-space: normal; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-name { font-weight: 600; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { flex: none; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--off); display: inline-block; }
.dot.in { border-color: var(--leaf); }
.dot.best { border-color: var(--peak); background: var(--peak); }
.strip { flex: none; display: grid; grid-template-columns: repeat(12, 5px); gap: 2px; align-items: end; height: 18px; }
.strip i { height: 6px; border-radius: 2px; background: var(--off); }
.strip i.in { height: 11px; background: var(--leaf); }
.strip i.best { height: 16px; background: var(--peak); }
.strip i.none { height: 6px; }
.strip i.now { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.star { flex: none; width: 48px; display: grid; place-items: center; color: var(--muted); }
.star svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.star.on { color: var(--peak); }
.star.on svg { fill: currentColor; }

.notice { background: var(--leaf-soft); border-radius: var(--r); padding: 14px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 8px; }
.notice li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.link { color: var(--leaf); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mini { flex: none; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; }
.foot, .legend { font-size: 13px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-bottom: 8px; }
.legend .dot { margin-left: 8px; } .legend .dot:first-child { margin-left: 0; }
.empty { color: var(--muted); font-size: 15px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 14px; }

/* browse */
.chips, .pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.answer { text-align: left; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--r); margin-bottom: 14px; background: var(--leaf-soft); }
.answer.best { background: var(--peak-soft); }
.answer.out { background: var(--surface); border: 1px solid var(--line); }
.answer-yn { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -0.03em; color: var(--leaf); }
.answer.best .answer-yn { color: var(--peak); } .answer.out .answer-yn { color: var(--muted); }
.answer-text { display: flex; flex-direction: column; min-width: 0; font-size: 15px; }
.answer-text span { color: var(--muted); font-size: 14px; }

/* detail */
.detail { gap: 14px; padding-top: 8px; }
.detail-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); display: flex; justify-content: space-between; align-items: center; padding-block: 8px; margin-bottom: -6px; }
.detail-head { display: flex; align-items: center; gap: 14px; }
.detail-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.art { flex: none; width: 104px; height: 104px; border-radius: 24px; background: var(--tile); display: grid; place-items: center; }
.art img, .art svg { width: 86px; height: 86px; display: block; }
@media (max-width: 380px) { .art { width: 84px; height: 84px; border-radius: 20px; } .art img, .art svg { width: 68px; height: 68px; } }
.back { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding-right: 12px; font-weight: 600; margin-left: -6px; }
.back svg { stroke: currentColor; }
.star.big { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.verdict { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 18px; border-radius: var(--r); background: var(--leaf-soft); }
.verdict.best { background: var(--peak-soft); }
.verdict.out { background: var(--surface); border: 1px solid var(--line); }
.verdict-yn { font-family: var(--display); font-weight: 700; font-size: 60px; line-height: .9; letter-spacing: -0.04em; color: var(--leaf); }
.verdict.best .verdict-yn { color: var(--peak); } .verdict.out .verdict-yn { color: var(--muted); }
.verdict-line { font-weight: 600; font-size: 17px; }
.lead { font-size: 16px; max-width: 60ch; }
.cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cal li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 54px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.cal-m { font-weight: 600; font-size: 14px; }
.cal-s { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; min-height: 14px; }
.cal li.in { background: var(--leaf-soft); border-color: transparent; color: var(--ink); } .cal li.in .cal-s { color: var(--leaf); }
.cal li.best { background: var(--peak); border-color: transparent; color: var(--surface); }
.cal li.now { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.actions { display: flex; flex-direction: column; gap: 8px; }
.act { display: block; width: 100%; line-height: 48px; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: center; font-weight: 600; }
.act.primary { background: var(--leaf); border-color: var(--leaf); color: var(--bg); }
.act:disabled { background: var(--leaf-soft); border-color: transparent; color: var(--leaf); cursor: default; }
.tips { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tips div { padding: 14px; border-top: 1px solid var(--line); } .tips div:first-child { border-top: 0; }
.tips dt { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.pair { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.pair.plain { border-style: dashed; color: var(--muted); font-weight: 500; background: none; }
.detail .group { padding-bottom: 4px; }
.detail .foot { padding-top: 6px; }
.prose { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; padding-bottom: 20px; }
.prose h2 { margin-top: 10px; }
.foot { padding-bottom: 8px; }

/* my list */
.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; }
.add button { height: 46px; padding: 0 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; }
.shop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.shop li { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-left: 14px; min-height: 52px; }
.shop li:first-child { border-top: 0; }
.shop label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding-block: 10px; cursor: pointer; font-weight: 500; }
.shop input { width: 20px; height: 20px; accent-color: var(--leaf); flex: none; }
.shop li.done label span { text-decoration: line-through; color: var(--muted); }
.tag { flex: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.tag.in { background: var(--leaf-soft); color: var(--leaf); } .tag.best { background: var(--peak-soft); color: var(--peak); }
.x { flex: none; width: 44px; height: 44px; text-align: center; font-size: 22px; color: var(--muted); }
.shop-actions { display: flex; gap: 8px; }
#copybox { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 10px; }

/* tab bar and toast */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); }
.tab { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); position: relative; }
.tab svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--leaf); }
.tab.on::before { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--leaf); }
.badge { position: absolute; top: 5px; left: 50%; margin-left: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--peak); color: var(--surface); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; text-align: center; }
@media (max-width: 359px) { .strip { display: none; } }
/* Only for the real site (the preview page gets these from its host). */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.app { padding-top: env(safe-area-inset-top, 0px); }

/* extras: wrapped notes, need filters, guides */
.rows.wrap .row-sub { white-space: normal; }
.rows.wrap .row-main { align-items: flex-start; padding-block: 10px; }
.rows.wrap .strip { margin-top: 4px; }
.chips-label { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.after { margin-top: -12px; padding-bottom: 22px; }
.notice .link { min-width: 0; }
.hero .lead { color: var(--ink); }
.prose .link { overflow-wrap: anywhere; }
.nutri dt .tag { margin-left: 6px; text-transform: none; letter-spacing: 0; vertical-align: 1px; }
.nutri dd b { font-variant-numeric: tabular-nums; }
.detail .group .foot { padding-top: 2px; }
