/* 周游食界 · 群接龙  —— 暖色杂志方向：米底 + logo 绿主色 + 一个柿橙强调（只给价格/数字） */
:root {
  --bg: #F6F2EA;
  --surface: #FFFDF8;
  --sunk: #EFE9DD;
  --ink: #1C2119;
  --ink-2: #474E44;
  --ink-3: #676D62;
  --line: #E4DDCE;
  --brand: #009240;
  --brand-ink: #0A7537;
  --brand-soft: #E2F0E4;
  --accent: #B8501B;
  --accent-soft: #F8E7DA;
  --r1: 8px;
  --r2: 16px;
  --sh1: 0 1px 2px rgba(40, 34, 20, .06);
  --sh2: 0 8px 24px rgba(40, 34, 20, .12);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.ic { display: inline-flex; width: 1em; height: 1em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }
.price { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.price small { font-size: 13px; font-weight: 500; }
.muted { color: var(--ink-3); }
.t13 { font-size: 13px; line-height: 1.5; }
.serif { font-family: var(--serif); }

/* 顶栏 */
.top { padding: 16px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top img { height: 44px; width: auto; display: block; }
.top .grp { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* 分段切换（吸顶） */
.seg-bar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 8px 0 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunk); border-radius: var(--r1); padding: 4px; }
.seg button { height: 40px; border-radius: 6px; font-size: 16px; color: var(--ink-2); transition: background .15s ease-out, color .15s ease-out; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh1); }
.seg button .badge { font-size: 13px; color: var(--accent); margin-left: 4px; font-weight: 600; }

/* 期次头 */
.round { padding: 8px 0 24px; }
.round .kicker { font-size: 13px; color: var(--brand-ink); font-weight: 600; letter-spacing: .04em; }
.round h1 { font: 600 31px/1.2 var(--serif); margin: 4px 0 16px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fact { background: var(--surface); border-radius: var(--r1); padding: 12px; box-shadow: var(--sh1); min-width: 0; }
.fact .k { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.fact .v { font-size: 16px; font-weight: 600; line-height: 1.35; margin-top: 4px; }
.fact .v.cd { color: var(--accent); }
.live { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); min-height: 20px; }
.live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.live span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 我的接龙条 */
.mine { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border-radius: var(--r1); padding: 12px 16px; margin-bottom: 24px; }
.mine .no { font: 600 25px/1 var(--serif); color: var(--brand-ink); }
.mine .txt { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.mine .txt b { display: block; font-size: 16px; color: var(--ink); font-weight: 600; }
.mine button { color: var(--brand-ink); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 2px; white-space: nowrap; }

/* 商品 */
.list-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; }
.list-h h2 { font-size: 20px; margin: 0; }
.goods { list-style: none; margin: 0; padding: 0; }
.good { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.good:first-child { border-top: 0; }
.tile { width: 72px; height: 72px; border-radius: var(--r1); display: grid; place-items: center; color: rgba(255, 255, 255, .95); font: 600 31px/1 var(--serif); position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .28), transparent 60%); }
.good h3 { font-size: 16px; margin: 0; line-height: 1.4; }
.good .spec { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.good .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.good .price { font-size: 20px; }
.bar { height: 4px; border-radius: 2px; background: var(--sunk); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.good .stock { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.good.full .tile { filter: grayscale(.6); opacity: .7; }
.full-tag { font-size: 13px; color: var(--ink-3); background: var(--sunk); border-radius: 6px; padding: 4px 8px; }

.step { display: flex; align-items: center; gap: 4px; }
.step button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; }
.step .minus { border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.step .plus { background: var(--brand-ink); color: #fff; }
.step .plus:disabled { background: var(--sunk); color: var(--ink-3); cursor: not-allowed; }
.step .q { min-width: 24px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 底栏 */
.foot-pad { height: calc(96px + var(--safe-b)); }
.cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(40, 34, 20, .06); padding: 12px 0 calc(12px + var(--safe-b)); transform: translateY(0); transition: transform .2s ease-out; }
.cart.hide { transform: translateY(110%); visibility: hidden; transition: transform .2s ease-in, visibility 0s .2s; }
.cart .wrap { display: flex; align-items: center; gap: 12px; }
.cart .sum { flex: 1; min-width: 0; }
.cart .sum .price { font-size: 25px; line-height: 1.2; }
.cart .sum .t13 { color: var(--ink-3); }
.btn { height: 48px; border-radius: var(--r1); padding: 0 24px; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: filter .15s ease-out; }
.btn.pri { background: var(--brand-ink); color: #fff; }
.btn.pri:hover { filter: brightness(1.06); }
.btn.pri:disabled { background: var(--sunk); color: var(--ink-3); cursor: not-allowed; filter: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.link { color: var(--brand-ink); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }

/* 弹层 */
.mask { position: fixed; inset: 0; z-index: 50; background: rgba(28, 33, 25, .45); opacity: 0; pointer-events: none; transition: opacity .2s ease-out; }
.mask.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--surface); border-radius: var(--r2) var(--r2) 0 0; max-height: 92vh; overflow-y: auto; transform: translateY(105%); visibility: hidden; transition: transform .22s ease-in, visibility 0s .22s; padding-bottom: var(--safe-b); }
.sheet.on { transform: none; visibility: visible; transition: transform .22s ease-out, visibility 0s; }
.sheet .wrap { padding-top: 16px; padding-bottom: 24px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sheet-h h2 { font-size: 20px; margin: 0; }
.x { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; color: var(--ink-3); margin-right: -8px; }
.recap { background: var(--bg); border-radius: var(--r1); padding: 12px 16px; margin-bottom: 24px; font-size: 13px; }
.recap div { display: flex; justify-content: space-between; gap: 8px; line-height: 1.8; }
.recap .tot { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; font-size: 16px; }

.field { margin-bottom: 16px; }
.field > label, .field > .lb { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.inp { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--surface); padding: 0 12px; font-size: 16px; }
textarea.inp { height: auto; min-height: 72px; padding: 12px; resize: vertical; line-height: 1.5; }
.inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.bad .inp { border-color: var(--accent); }
.field .err { display: none; font-size: 13px; color: var(--accent); margin-top: 4px; }
.field.bad .err { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--surface); font-size: 16px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* 接龙成功 */
.done { text-align: center; padding: 8px 0 16px; }
.done .ok { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: inline-grid; place-items: center; font-size: 25px; }
.done .big { font: 600 39px/1.2 var(--serif); margin: 12px 0 4px; }
.done .big em { font-style: normal; color: var(--brand-ink); }
.jl { background: var(--bg); border-radius: var(--r1); padding: 12px 16px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; max-height: 196px; overflow-y: auto; text-align: left; margin: 16px 0 8px; color: var(--ink-2); }
.jl .me { color: var(--brand-ink); font-weight: 600; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0; font-size: 13px; color: var(--ink-2); text-align: left; }
.steps3 div { background: var(--bg); border-radius: var(--r1); padding: 8px 12px; }
.steps3 b { display: block; color: var(--brand-ink); font: 600 16px/1.4 var(--serif); }

/* 自提点 */
.pickbox { display: flex; gap: 8px; background: var(--bg); border-radius: var(--r1); padding: 12px 16px; margin: -8px 0 16px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.pickbox:empty { display: none; }
.pickbox > .ic { font-size: 16px; color: var(--brand-ink); margin-top: 2px; }
.pickbox b { display: block; font-size: 16px; color: var(--ink); }
.pickbox a { color: var(--brand-ink); font-weight: 600; }
.field .hint + .err { margin-top: 0; }
.done-addr { color: var(--ink-2); margin-top: 4px; }
.done-addr:empty { display: none; }

/* 付款 */
.paysum { text-align: center; padding: 8px 0 24px; }
.payamt { font: 600 49px/1.2 var(--sans); margin: 4px 0; letter-spacing: -.01em; }
.payamt small { font-size: 25px; margin-right: 2px; }
.method { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border: 1px solid var(--brand); background: var(--brand-soft); border-radius: var(--r1); margin-bottom: 24px; font-weight: 600; }
.method .ic { font-size: 20px; color: var(--brand-ink); }
.method .ok { margin-left: auto; }
.later { display: block; margin: 12px auto 0; height: 40px; padding: 0 16px; color: var(--ink-3); font-size: 16px; }
.ps { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: var(--r1); padding: 8px 8px 8px 16px; margin-top: 16px; font-size: 16px; font-weight: 600; text-align: left; }
.ps:empty { display: none; }
.ps.due { background: var(--accent-soft); color: var(--accent); }
.ps.ok { background: var(--brand-soft); color: var(--brand-ink); padding: 12px 16px; justify-content: center; gap: 6px; }
.ps .btn { height: 40px; padding: 0 16px; }

/* 我想要 */
.wish-h { padding: 8px 0 24px; }
.wish-h h1 { font: 600 31px/1.2 var(--serif); margin: 0 0 8px; }
.wish-h p { margin: 0; color: var(--ink-2); max-width: 32em; }
.card { background: var(--surface); border-radius: var(--r2); padding: 16px; box-shadow: var(--sh1); }
.sec { margin-top: 48px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.sec-h h2 { font-size: 20px; margin: 0; }
.wishes { list-style: none; margin: 0; padding: 0; }
.wish { padding: 16px 0; border-top: 1px solid var(--line); }
.wish:first-child { border-top: 0; }
.wish .l1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wish h3 { font-size: 16px; margin: 0; line-height: 1.4; }
.wish q { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; quotes: "“" "”"; }
.st { font-size: 13px; border-radius: 6px; padding: 2px 8px; white-space: nowrap; font-weight: 600; }
.st.collecting { background: var(--sunk); color: var(--ink-2); }
.st.sourcing { background: var(--accent-soft); color: var(--accent); }
.st.open { background: var(--brand-soft); color: var(--brand-ink); }
.wish .l2 { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.wish .l2 .bar { flex: 1; margin: 0; }
.wish .cnt { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.wish .cnt b { color: var(--ink); font-variant-numeric: tabular-nums; }
.plus1 { height: 32px; padding: 0 12px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.plus1[aria-pressed="true"] { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }

.note { margin: 48px 0 0; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); text-align: center; }
.note a { color: var(--brand-ink); font-weight: 600; }

.toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.96); background: rgba(28, 33, 25, .92); color: #fff; font-size: 16px; padding: 12px 20px; border-radius: var(--r1); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .15s ease-out, transform .15s ease-out; max-width: calc(100% - 64px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
