:root {
  --green: #2f5d3a; --green-2: #3f7a4c; --green-soft: #e6efe3; --sand: #faf7f0; --card: #fff;
  --ink: #1f2a22; --muted: #66706a; --line: #e4e0d6; --amber: #b7791f; --amber-soft: #fdf3e1;
  --red: #b23b2e; --red-soft: #fbe9e6; --blue: #2c5d87; --blue-soft: #e7f0f8; --radius: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--sand); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
a { color: var(--green); }
h1 { font-size: 1.35rem; margin: .2rem 0 .8rem; }
h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
.page { max-width: 600px; margin: 0 auto; padding: 14px 14px 90px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; } .right { text-align: right; } .mt { margin-top: 12px; } .mb0 { margin-bottom: 0; }
.stack > * + * { margin-top: 10px; }

.topbar { position: sticky; top: 0; z-index: 10; background: var(--green); color: #fff; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
.topbar .inner { max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 800; letter-spacing: .02em; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span { font-weight: 500; opacity: .85; }
.who { margin-left: auto; text-align: right; font-size: .78rem; line-height: 1.2; }
.who button { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: .75rem; margin-top: 3px; cursor: pointer; }

.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav:empty { display: none; }
.bottomnav a { flex: 1; max-width: 120px; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; position: relative; }
.bottomnav a.on { color: var(--green); font-weight: 700; }
.bottomnav svg { width: 23px; height: 23px; }
.badge { position: absolute; top: 7px; left: calc(50% + 6px); background: var(--red); color: #fff; border-radius: 999px; font-size: .65rem; min-width: 17px; height: 17px; padding: 0 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card.link { display: block; color: inherit; text-decoration: none; }
.card.hl { border-color: var(--amber); background: var(--amber-soft); }
.card.ok { border-color: #b9d4b3; background: var(--green-soft); }
.card.bad { border-color: #e7b9b2; background: var(--red-soft); }
.card.info { border-color: #bdd3e6; background: var(--blue-soft); }
.card h3 a { color: inherit; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .74rem; font-weight: 700; background: #eee; color: #444; white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); } .pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); } .pill.blue { background: var(--blue-soft); color: var(--blue); } .pill.dark { background: var(--green); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; background: var(--green); color: #fff; text-decoration: none; min-height: 44px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; } .btn.sm { padding: 6px 12px; min-height: 34px; font-size: .88rem; border-radius: 10px; }
.btn.ghost { background: #fff; color: var(--green); border: 1.5px solid var(--green); }
.btn.light { background: var(--green-soft); color: var(--green); } .btn.danger { background: var(--red); } .btn.warn { background: var(--amber); }

label { display: block; font-size: .85rem; font-weight: 600; margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfcabd; border-radius: 10px; background: #fff; min-height: 44px; }
textarea { min-height: 70px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--green); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .92rem; }
.check input { margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin: 10px 0; }
legend { font-size: .85rem; font-weight: 700; padding: 0 4px; }
details > summary { cursor: pointer; font-weight: 700; color: var(--green); padding: 6px 0; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.tabs a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; }
.tabs a.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.slot { border: 1.5px solid var(--green); border-radius: 12px; padding: 8px 12px; text-decoration: none; color: var(--green); background: #fff; font-size: .9rem; }
.slot b { display: block; } .slot small { color: var(--muted); }

.product { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.product:first-of-type { border-top: 0; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button { width: 38px; height: 38px; border: 0; background: var(--green-soft); color: var(--green); font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.stepper button:disabled { opacity: .35; }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; }
.add { min-height: 38px; padding: 6px 14px; }

.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 9; padding: 8px 14px; }
.cartbar a { max-width: 572px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; text-decoration: none; border-radius: 14px; padding: 13px 16px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

table.lines { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.lines td, table.lines th { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.lines th { font-size: .78rem; color: var(--muted); font-weight: 600; }
table.lines td.num, table.lines th.num { text-align: right; white-space: nowrap; }
table.lines tr.total td { font-weight: 800; border-bottom: 0; }
.strike { text-decoration: line-through; color: var(--muted); }

.timeline { display: flex; margin: 8px 0 4px; }
.timeline div { flex: 1; text-align: center; font-size: .72rem; color: var(--muted); position: relative; padding-top: 22px; }
.timeline div::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: #d8d3c6; z-index: 1; }
.timeline div::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: #d8d3c6; }
.timeline div:first-child::after { display: none; }
.timeline div.done { color: var(--green); font-weight: 700; } .timeline div.done::before, .timeline div.done::after { background: var(--green); }
.timeline div.warn::before { background: var(--amber); } .timeline div.warn { color: var(--amber); }

.code { font-size: 2rem; font-weight: 800; letter-spacing: .3em; text-align: center; color: var(--green); font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; color: inherit; }
.tile b { display: block; font-size: 1.4rem; } .tile span { font-size: .8rem; color: var(--muted); }
.tile.hl { border-color: var(--amber); background: var(--amber-soft); }

.hero { text-align: center; padding: 18px 0 6px; }
.hero img { width: 64px; height: 64px; border-radius: 16px; }
.hero h1 { margin: 8px 0 2px; font-size: 1.5rem; }
.demo { display: grid; gap: 8px; }
.demo button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.demo button:hover { border-color: var(--green); }
.demo .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.demo .ic svg { width: 22px; height: 22px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 80px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: 90vw; font-size: .92rem; }
.toast.show { opacity: 1; transform: translateX(-50%); } .toast.err { background: var(--red); }
.notif { padding: 10px 0; border-top: 1px solid var(--line); } .notif.unread b::before { content: "● "; color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; }
@media (min-width: 700px) { .page { padding-top: 22px; } }
.bell { margin-left: auto; color: #fff; position: relative; display: flex; padding: 6px; }
.bell svg { width: 24px; height: 24px; }
.bell .badge { top: 0; left: 18px; }
.who { margin-left: 4px; }
.map { width: 100%; height: 200px; border: 0; border-radius: 12px; margin: 8px 0 4px; background: #e8e4d8; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice a, .choice button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: var(--radius); border: 1.5px solid var(--green); background: #fff; color: var(--green); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.choice svg { width: 30px; height: 30px; }
.choice small { font-weight: 400; color: var(--muted); }
.net { background: var(--green-soft); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-top: 10px; }
.member-banner { background: linear-gradient(135deg, #fdf3e1, #f6e2b8); border: 1px solid #e8c77d; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.opt { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.who a { color: #fff; text-decoration: none; font-weight: 600; }
.cred { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; background: #fff; border: 1px dashed var(--green); border-radius: 8px; padding: 6px 10px; word-break: break-all; user-select: all; }
/* Photos */
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
.card-img { display: block; width: calc(100% + 28px); max-width: none; margin: -14px -14px 12px; height: 160px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.banner { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: 14px; margin-bottom: 10px; }
.photo-block { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.photo-block .photo { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; flex: none; }
.photo-block .photo.empty { display: grid; place-items: center; background: var(--line); color: var(--muted, #888); }
.photo-block label.btn { cursor: pointer; }
