:root {
  --bg: #FBF6EE; --card: #fff; --ink: #1E2433; --muted: #6A7180; --line: #ECE3D5;
  --brand: #E2552B; --brand-dark: #B93F1B; --brand-soft: #FDE9E1;
  --leaf: #1F8A5B; --leaf-soft: #E2F4EB; --sun: #F6B73C;
  --radius: 16px; --shadow: 0 1px 2px rgba(30,36,51,.06), 0 6px 18px rgba(30,36,51,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.45rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: .4rem 0 .8rem; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button, input, select, textarea { font: inherit; color: inherit; }

/* header + navigation */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--brand-dark); margin-right: auto; }
.langs { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.langs button { border: 0; background: none; padding: 5px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.langs button.on { background: var(--ink); color: #fff; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: .68rem; font-weight: 600; color: var(--muted); min-width: 0; }
.nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav a.on { color: var(--brand); }
.main { max-width: 1120px; margin: 0 auto; padding: 16px; }

/* generic */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.pad { padding: 16px; }
.stack { display: grid; gap: 12px; max-width: 560px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.list { display: grid; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; margin: 12px 0; }
.grow { flex: 1; min-width: 0; }
.meta { color: var(--muted); font-size: .88rem; }
.meta.good, .good { color: var(--leaf); font-weight: 600; }
.small { font-size: .8rem; margin-top: 6px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.link { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.title { font-weight: 700; font-size: 1.02rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; min-height: 46px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.sm { white-space: nowrap; padding: 7px 12px; min-height: 36px; font-size: .88rem; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .big { font-size: 2.6rem; }
.loading { height: 120px; background: radial-gradient(circle, var(--brand) 0 5px, transparent 6px) center/22px 22px no-repeat; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #B3261E; } .toast.good { background: var(--leaf); }
.banner { background: #FFF3D6; border: 1px solid #F3DDA0; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: .92rem; }
.banner.bad { background: #FDE7E5; border-color: #F3B7B2; } .banner.good { background: var(--leaf-soft); border-color: #B5E0CB; font-weight: 600; }

/* browse */
.hero { background: linear-gradient(135deg, #E2552B, #F08A3C); color: #fff; border-radius: 20px; padding: 20px 18px; margin-bottom: 14px; }
.hero h1 { font-size: 1.35rem; } .hero p { margin: 0; opacity: .95; font-size: .93rem; }
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.search input, select, .form input, .form textarea, .auth input, .pickup input {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 13px; min-height: 46px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
.filters select { width: auto; flex: 1; min-width: 150px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .9rem; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand-soft); color: var(--brand-dark); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }

.offer { overflow: hidden; transition: transform .15s; }
.offer:hover { transform: translateY(-2px); }
.offer.soldout .cover, .offer.soldout .prices { filter: grayscale(.8); opacity: .75; }
.cover { position: relative; height: 128px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius) var(--radius) 0 0; }
.cover .emoji { font-size: 3.6rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.cover.big { height: 200px; border-radius: 20px; } .cover.big .emoji { font-size: 5.5rem; }
.c-bakery { background: linear-gradient(135deg, #FCE3B0, #F6B96A); }
.c-restaurant { background: linear-gradient(135deg, #FFD0BE, #F28C6B); }
.c-cafe { background: linear-gradient(135deg, #E9D8C6, #C49A73); }
.c-shop { background: linear-gradient(135deg, #D3EFC7, #8CCB8A); }
.c-sweets { background: linear-gradient(135deg, #FBD3E3, #EE94B8); }
.badge { position: absolute; left: 10px; top: 10px; background: #fff; color: var(--ink); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.badge.out { background: var(--ink); color: #fff; }
.pct { position: absolute; left: 10px; bottom: 10px; background: var(--leaf); color: #fff; font-weight: 800; font-size: .8rem; padding: 3px 9px; border-radius: 8px; }
.heart { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.heart svg { width: 20px; height: 20px; }
.heart.on { color: var(--brand); } .heart.on svg { fill: var(--brand); }
.store-head .heart, .rowcard .heart { position: static; border: 1.5px solid var(--line); }
.offer .body { padding: 12px 14px 14px; }
.store-name { color: var(--muted); font-size: .85rem; font-weight: 600; }
.prices { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.prices s { color: var(--muted); font-size: .88rem; }
.prices b { color: var(--brand-dark); font-size: 1.12rem; }
.prices.lg b { font-size: 1.6rem; }
.map { height: min(62vh, 560px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e8e4dc; z-index: 1; }
.pin { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2.5px solid var(--brand); display: grid; place-items: center; font-size: 19px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pin.out { border-color: #999; filter: grayscale(1); }

/* offer detail */
.detail-body { padding-top: 14px; }
.save-note { color: var(--leaf); font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr; gap: 2px; background: #fff; border-radius: var(--radius); padding: 14px; margin: 14px 0; box-shadow: var(--shadow); }
.facts dt { font-size: .82rem; color: var(--muted); font-weight: 600; margin-top: 8px; } .facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; font-weight: 600; }
.note { background: var(--leaf-soft); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.buy { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); display: flex; gap: 10px; background: var(--bg); padding: 10px 0; margin-top: 8px; }
.stepper { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; }
.stepper button { border: 0; background: none; width: 42px; height: 46px; font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.stepper b { min-width: 22px; text-align: center; }

/* store / orders */
.store-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.store-head h1 { margin: 0; }
.logo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; flex: none; }
.logo.sm { width: 42px; height: 42px; font-size: 1.3rem; border-radius: 12px; }
.rowcard { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.rowcard .time { font-weight: 700; font-size: .85rem; color: var(--brand-dark); text-align: center; line-height: 1.25; }
.order { padding: 14px; display: grid; gap: 8px; }
.order.live { border: 1.5px solid var(--brand); }
.order-top { display: flex; gap: 10px; align-items: center; }
.order-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.code { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.code span { font-size: .85rem; font-weight: 600; color: var(--brand-dark); }
.code b { font: 800 1.7rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; }
.st { font-size: .74rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: #EEE; color: #555; }
.st-reserved, .ss-pending { background: #FFF0CC; color: #8A5A00; }
.st-picked, .ss-approved { background: var(--leaf-soft); color: var(--leaf); }
.st-cancelled, .st-expired, .ss-blocked { background: #F1ECE6; color: #7A7268; }

/* forms */
.auth { max-width: 420px; margin: 20px auto; padding: 22px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
label small { font-weight: 400; color: var(--muted); }
.lbl { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form { max-width: 620px; }
form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.main > .btn { margin-bottom: 14px; }
.phone { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.phone:focus-within { border-color: var(--brand); }
.phone span { padding: 0 4px 0 13px; font-weight: 700; color: var(--muted); }
.phone input { border: 0 !important; padding-left: 4px !important; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: block; }
.days input { position: absolute; opacity: 0; width: 0; min-height: 0; }
.days span { display: grid; place-items: center; min-width: 42px; height: 40px; padding: 0 6px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: .85rem; }
.days input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.inline { display: flex; gap: 8px; }
.pickup input { text-transform: uppercase; font: 700 1.1rem ui-monospace, Menlo, monospace; letter-spacing: .12em; }
.pickup input::placeholder { font: 400 .95rem -apple-system, sans-serif; letter-spacing: 0; text-transform: none; }

/* dashboards */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin: 12px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 12px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; font-size: .93rem; }
.tabs a.on { color: var(--brand-dark); border-color: var(--brand); }
.dot { background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 14px; }
.tile { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.card .tile { background: var(--bg); box-shadow: none; }
.tile b { display: block; font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { color: var(--muted); font-size: .8rem; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 8px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar .track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.bar i { width: 100%; max-width: 44px; min-height: 3px; background: var(--brand); border-radius: 6px 6px 2px 2px; }
.bar span { font-size: .8rem; font-weight: 700; } .bar em { font-style: normal; font-size: .75rem; color: var(--muted); }
.dim { opacity: .62; }
.who { display: flex; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.linkcard { font-size: 1rem; }
.biz-cta { background: linear-gradient(135deg, #fff, var(--leaf-soft)); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 640px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }

@media (min-width: 620px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  body { padding-bottom: 32px; }
  .nav { position: static; border: 0; background: none; gap: 4px; padding: 0; margin-right: 8px; }
  .nav a { flex: none; flex-direction: row; gap: 6px; font-size: .9rem; padding: 8px 12px; border-radius: 10px; }
  .nav a svg { width: 18px; height: 18px; }
  .nav a.on { background: var(--brand-soft); color: var(--brand-dark); }
  .main { padding: 24px 16px; }
  .hero { padding: 30px 32px; } .hero h1 { font-size: 1.9rem; } .hero p { font-size: 1.02rem; max-width: 640px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .filters { grid-template-columns: 320px 1fr; align-items: center; }
  .filters .chips { grid-column: 1 / -1; }
  .filters select { flex: none; }
  .detail { display: grid; grid-template-columns: 5fr 6fr; gap: 28px; align-items: start; }
  .cover.big { height: 380px; position: sticky; top: 80px; } .cover.big .emoji { font-size: 8rem; }
  .detail-body { padding-top: 0; }
  .buy { position: static; }
  .toast { bottom: 28px; }
}

/* first-visit language choice */
.langpick { position: fixed; inset: 0; z-index: 100; background: rgba(30,36,51,.55); display: grid; place-items: center; padding: 20px; }
.langpick .card { width: 100%; max-width: 340px; display: grid; gap: 12px; text-align: center; justify-items: center; padding: 26px 22px; }
.langpick h1 { margin: 4px 0 6px; } .langpick h1 span { color: var(--muted); font-weight: 600; font-size: 1.1rem; }
.langpick .btn { width: 100%; font-size: 1.05rem; }

/* photos */
.has-photo { background-size: cover; background-position: center; }
.thumb { width: 120px; height: 80px; border-radius: 10px; background-size: cover; background-position: center; }
input[type=file] { padding: 9px !important; font-size: .88rem; }
.tg { margin-top: 14px; display: grid; gap: 8px; justify-items: start; }
.auth .inline input, .form .inline input { flex: 1; min-width: 0; }
