:root {
  --bg: #F4F2EE; --card: #fff; --ink: #1C1B19; --muted: #6E6A63; --line: #E2DED6;
  --accent: #1F7A4D; --accent-soft: #E3F1E9; --warn: #B4471B; --warn-soft: #FBEAE2;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { padding: 28px 32px 8px; }
h1 { margin: 0; font-size: 26px; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin: 22px 0 8px; }
.sub { margin: 6px 0 0; color: var(--muted); max-width: 680px; }
main { display: grid; grid-template-columns: 400px 1fr; gap: 28px; padding: 8px 32px 48px; align-items: start; }
@media (max-width: 1000px) { main { grid-template-columns: 1fr; } }
.left, .right { min-width: 0; }
.left { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px 20px; }
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0; }
.addr { margin: 10px 0 6px; }
.addr label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.addrrow { display: flex; gap: 6px; margin-bottom: 6px; }
.addrrow select { font: inherit; font-size: 14px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 6px; max-width: 150px; }
.addrrow input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.addrrow button { font-size: 13px; white-space: nowrap; }
#addrMsg { font-size: 13px; margin-top: 4px; }
#addrMsg div { padding: 1px 0; }
#addrMsg .bad { color: var(--warn); }
#addrMsg .good { color: var(--accent); }
.h2row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 18px 0 8px; }
.h2row h2 { margin: 0; }
.lists { display: flex; gap: 4px; }
.lists select { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; max-width: 160px; }
.lists button { font-size: 13px; padding: 4px 8px; }
.box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.box > summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.box .cnt { color: var(--muted); font-weight: 400; font-size: 13px; }
.box textarea { margin-top: 4px; }
.hist { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-top: 20px; }
.hist .row select { width: auto; }
.hrow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hrow:last-child { border-bottom: 0; }
.hrow .d { color: var(--muted); font-size: 12px; }
.hrow .s { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hrow button { border: 0; background: none; color: var(--muted); padding: 0 4px; }
.plan .topup { background: var(--accent-soft); border-radius: 6px; padding: 6px 8px; font-size: 13px; margin-top: 8px; }
.plan .topup button { font-size: 12px; padding: 2px 8px; margin-left: 6px; }
.plan .ordered { margin-top: 10px; font-size: 13px; }
.seg {display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 7px 14px; background: #fff; }
.seg button.on { background: var(--accent); color: #fff; }
.self .cfg-dim { opacity: .45; }
.recipe {background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 13px; }
.recipe button { font-size: 13px; padding: 4px 10px; margin: 2px 4px 2px 0; }
.recipe .chip { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }
.cfg { width: 100%; border-collapse: collapse; font-size: 13px; }
.cfg th { color: var(--muted); font-weight: 500; text-align: left; padding: 4px 4px; }
.cfg td { padding: 3px 4px; }
.cfg { table-layout: fixed; }
.cfg th:first-child { width: 96px; }
.cfg th { font-size: 12px; line-height: 1.2; }
.cfg td { overflow: hidden; }
.cfg label { white-space: normal; }
.cfg input[type=number] { width: 100%; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.cfg label { white-space: nowrap; }
.beta { color: var(--muted); font-size: 11px; }
.cfg tr.site td { color: var(--muted); font-size: 12px; padding-top: 0; }
.cfg input[type=text] { width: 100%; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.plan .cartbtn { margin-top: 6px; background: var(--accent); color: #fff; border: 0; font-size: 13px; }
.plan .cartbtn:disabled { opacity: .6; cursor: wait; }
.plan .cartmsg { font-size: 13px; color: var(--muted); margin-top: 4px; }
.row { display: block; margin: 10px 0 0; font-size: 14px; }
.row.check { font-size: 13px; color: var(--muted); }
.row.check input { width: auto; margin: 0 6px 0 0; vertical-align: -1px; }
.row select, .row input { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; width: 72px; }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 7px 12px; }
button.primary { margin-top: 18px; width: 100%; background: var(--accent); color: #fff; border: 0; padding: 12px; font-weight: 600; }
button.primary:disabled { opacity: .6; cursor: wait; }
#progress { margin-top: 12px; font-size: 13px; color: var(--muted); }
#progress div { display: flex; justify-content: space-between; padding: 2px 0; }
#progress .bad { color: var(--warn); }
.empty { color: var(--muted); padding: 40px 0; }

.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.plan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan .title { font-weight: 600; font-size: 17px; }
.plan .tag { display: inline-block; font-size: 12px; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 1px 9px; margin-left: 8px; font-weight: 600; vertical-align: 2px; }
.plan .total { font-size: 22px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.plan .warn { color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 4px 8px; font-size: 13px; margin-top: 8px; }
.plan details { margin-top: 10px; }
.plan summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.plan .store { margin-top: 10px; }
.plan .store b { display: block; margin-bottom: 2px; }
.plan ul { margin: 0; padding-left: 18px; font-size: 14px; }
.plan li { margin: 1px 0; }
.plan .copy { margin-top: 10px; font-size: 13px; }

.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
#grid { border-collapse: collapse; width: 100%; font-size: 13px; }
#grid th, #grid td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
#grid th { font-weight: 600; background: #FAF9F6; position: sticky; top: 0; }
#grid td.q { font-weight: 600; min-width: 140px; }
#grid select { width: 220px; font: inherit; font-size: 12px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
#grid .price { font-weight: 600; font-variant-numeric: tabular-nums; }
#grid .unit, #grid .none { color: var(--muted); }
#grid .cheapest .price { color: var(--accent); }
#grid a { color: var(--muted); text-decoration: none; margin-left: 4px; }
