/* ============================================================
   Simply Peju Sauces — admin app (mobile-first, installable)
   Phone layout: top bar + bottom tab bar, 48px touch targets, safe-area aware.
   ≥ 900px: sidebar layout.
   ============================================================ */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --green-950: #0b2415; --green-900: #0f301c; --green-800: #17492a; --green-700: #1f6138; --green-500: #3f9a4f;
  --lime: #a8cf3a; --lime-soft: #eef5cf; --red: #cf2a2a; --red-dark: #a31d1d; --red-soft: #fde8e6; --ink: #1d1f18;
  --bg: #f6f0e0; --card: #fffdf6; --muted: #5f6455; --line: #e6dcc0; --amber: #b7791f; --amber-soft: #fff1cf;
  --font-display: "Fraunces", Georgia, serif; --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 80px; --top-h: 56px; --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 48, 28, .06), 0 8px 22px -12px rgba(15, 48, 28, .25);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5em; color: var(--green-900); }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.icon { flex: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--green-800); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: 8px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.stack { display: grid; gap: 14px; } .stack-lg { display: grid; gap: 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; } .mt-0 { margin-top: 0; }

/* ── Shell ─────────────────────────────────────────────────── */
.app__shell { min-height: 100dvh; display: flex; flex-direction: column; }
.sidebar { display: none; }
.app__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; min-height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 14px 0; background: rgba(243, 239, 226, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar__title { font-size: 1.2rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1; }
.topbar__back { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 50%; color: var(--green-900); }
.net-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: .8rem; }
.content { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 16px 14px calc(var(--tab-h) + var(--safe-b) + 28px); }


@media (min-width: 900px) {
  .app__shell { flex-direction: row; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; width: 250px; flex: none; padding: 20px 14px; background: var(--green-900); color: #dfe9d0; }
  .sidebar__brand { display: block; margin: 0 auto 22px; }
  .sidebar__brand img { width: 96px; height: 96px; margin: 0 auto; }
  .sidebar__nav { display: grid; gap: 4px; align-content: start; flex: 1; }
  .sidebar__nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: #dfe9d0; text-decoration: none; font-weight: 600; }
  .sidebar__nav a:hover { background: rgba(255, 255, 255, .08); }
  .sidebar__nav a.is-active { background: var(--lime); color: var(--green-950); }
  .sidebar__nav .nav-badge { margin-left: auto; border-color: var(--green-900); }
  .sidebar__out button { width: 100%; display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .08); color: #fff; border: 0; border-radius: 12px; padding: 12px 14px; font: 600 1rem var(--font-body); cursor: pointer; }
  .tabbar { display: none; }
  .menu-sheet { display: none !important; }
  .content { padding: 28px 32px 60px; }
  .topbar { padding-inline: 32px; }
  .install-bar { left: 282px !important; }
}

/* ── Floating phone bar (carbon copy of melr-admin's) ───────── */
.tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); z-index: 40; display: flex; gap: 2px; height: 66px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 246, .94); box-shadow: 0 8px 28px rgba(15, 48, 28, .2), 0 1px 3px rgba(15, 48, 28, .1); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.tabbar__link { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1 1 0; gap: .2rem; min-width: 0; padding: 0 .3rem; border: 0; border-radius: 999px; background: none; color: var(--ink); font: 700 .6875rem/1 var(--font-body); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background-color .15s, transform .15s; }
.tabbar__link:active { transform: scale(.94); }
.tabbar__link[aria-current="page"] { background: rgba(23, 73, 42, .12); color: var(--green-800); }
.tabbar__icon { position: relative; display: grid; place-items: center; line-height: 1; }
.tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border: 2px solid var(--card); border-radius: 999px; background: var(--red); color: #fff; font: 800 .625rem/1 var(--font-body); }
.nav-badge[hidden] { display: none; }
.tabbar__icon .nav-badge { position: absolute; top: -.55rem; left: calc(100% - .45rem); }

@media (max-width: 380px) { .tabbar { left: 8px; right: 8px; } .tabbar__link { padding: 0 .1rem; } .tabbar__label { font-size: .625rem; letter-spacing: -.01em; } }
.kv a, .list__sub a { display: inline-block; min-height: 24px; line-height: 24px; }

/* "More" sheet */
.menu-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.menu-sheet[hidden] { display: none; }
.menu-sheet__backdrop { position: absolute; inset: 0; background: rgba(11, 36, 21, .5); animation: fadein .2s; }
.menu-sheet__panel { position: relative; width: 100%; max-width: 520px; max-height: 88vh; padding: .75rem 16px calc(1.5rem + var(--safe-b)); overflow-y: auto; border-radius: 20px 20px 0 0; background: var(--card); animation: rise .25s cubic-bezier(.22, .61, .36, 1); }
.menu-sheet__handle { width: 40px; height: 4px; margin: 0 auto 1rem; border-radius: 2px; background: var(--line); }
.menu-sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.menu-sheet__form { display: contents; }
.menu-sheet__item { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 100%; padding: 1rem .25rem; border: 0; border-radius: 14px; background: var(--bg); color: var(--ink); font: 700 .75rem/1.2 var(--font-body); text-align: center; text-decoration: none; cursor: pointer; }
.menu-sheet__item .icon { color: var(--green-700); }
.menu-sheet__item[aria-current="page"] { background: var(--lime-soft); }
@media (min-width: 600px) { .menu-sheet { align-items: center; padding: 1rem; } .menu-sheet__panel { border-radius: 20px; } }
@media (min-width: 900px) { .tabbar, .menu-sheet { display: none !important; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* ── New order form ─────────────────────────────────────────── */
.order-row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.order-row .field { margin: 0; }
.order-row [data-remove-row] { justify-self: end; }
@media (min-width: 600px) { .order-row { grid-template-columns: 1.6fr 1fr 90px auto; align-items: center; } .order-row [data-remove-row] { justify-self: auto; } }
.pay-modes { display: flex; gap: 10px; flex-wrap: wrap; } .pay-modes--col { flex-direction: column; }
.pay-mode { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 220px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.pay-mode:has(input:checked) { border-color: var(--green-700); background: var(--lime-soft); }
.pay-mode input { margin-top: 4px; accent-color: var(--green-700); width: 18px; height: 18px; flex: none; }
.pay-mode small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pay-link { display: flex; gap: 8px; align-items: center; }
.pay-link input { flex: 1; min-width: 0; }

/* ── Notifications page ─────────────────────────────────────── */
.filters--inline { padding: 2px 0; margin: 0; overflow: visible; flex-wrap: wrap; }
.alert-card { position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; text-decoration: none; }
.alert-card[data-read="false"] { background: #fff; border-color: #cfe3b5; box-shadow: var(--shadow); }
.alert-card:active { background: var(--lime-soft); }
.alert-card__icon, .push-status__icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--bg); color: var(--muted); }
.alert-card__icon[data-tone="success"] { background: var(--lime-soft); color: var(--green-800); }
.alert-card__icon[data-tone="info"] { background: #e3ecf8; color: #214e8f; }
.alert-card__icon[data-tone="danger"] { background: var(--red-soft); color: var(--red-dark); }
.alert-card__icon[data-tone="warning"] { background: var(--amber-soft); color: var(--amber); }
.alert-card__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.alert-card__title { font-weight: 800; }
.alert-card[data-read="true"] .alert-card__title { font-weight: 600; color: var(--muted); }
.alert-card__text { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.alert-card__meta { color: var(--muted); font-size: .78rem; }
.alert-card__dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--red); }
.push-status { display: flex; gap: 14px; align-items: flex-start; }
.push-status__icon { width: 48px; height: 48px; }
[data-push-panel][data-state="on"] .push-status__icon { background: var(--lime-soft); color: var(--green-800); }
[data-push-panel][data-state="blocked"] .push-status__icon, [data-push-panel][data-state="install"] .push-status__icon { background: var(--amber-soft); color: var(--amber); }
.push-status__title { margin: 0; font-weight: 800; }
.push-status__text { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.switch__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.switch .hint { font-weight: 400; }

/* ── Cards, lists ──────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.card--flush { padding: 0; overflow: hidden; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card + .card { margin-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: block; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.stat__n { display: block; font: 800 1.9rem/1 var(--font-display); color: var(--green-900); }
.stat__l { display: block; margin-top: 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat--alert { background: var(--red-soft); border-color: #f3b4ae; } .stat--alert .stat__n { color: var(--red-dark); }
.stat--accent { background: var(--green-800); border-color: var(--green-800); } .stat--accent .stat__n, .stat--accent .stat__l { color: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 64px; }
.list__item:last-child { border-bottom: 0; }
a.list__item:active { background: var(--lime-soft); }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.list__sub { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__end { text-align: right; flex: none; }
.list__thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--bg); object-fit: cover; flex: none; }
.list__thumb--logo { object-fit: contain; padding: 4px; }
.chev { color: var(--muted); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg); color: var(--muted); white-space: nowrap; }
.chip--new { background: var(--red); color: #fff; }
.chip--ok { background: var(--lime-soft); color: var(--green-900); }
.chip--warn { background: var(--amber-soft); color: var(--amber); }
.chip--bad { background: var(--red-soft); color: var(--red-dark); }
.chip--info { background: #e3ecf8; color: #214e8f; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 10px; margin: 0 -14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; min-height: 40px; display: inline-flex; align-items: center; }
.filters a.is-active { background: var(--green-800); border-color: var(--green-800); color: #fff; }

/* ── Buttons & forms ───────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 2px solid var(--green-800); background: var(--green-800); color: #fff; font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s, background .2s; }
.btn:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: var(--green-900); }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--danger { background: transparent; color: var(--red-dark); border-color: var(--red); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .92rem; border-radius: 12px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 35; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 10px 24px -8px rgba(163, 29, 29, .6); text-decoration: none; }
@media (min-width: 900px) { .fab { bottom: 28px; right: 28px; } }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 700; font-size: .92rem; }
.hint { font-size: .84rem; color: var(--muted); font-weight: 400; }
.error { font-size: .88rem; color: var(--red-dark); font-weight: 600; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=url], .field input[type=password], .field input[type=number], .field input[type=time], .field input[type=search], .field select, .field textarea, .input { width: 100%; min-height: 50px; padding: 12px 14px; font: 400 1rem var(--font-body); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 14px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(63, 154, 79, .18); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--red); }
.field--inline { grid-template-columns: 1fr auto; align-items: center; }
.cols-2 { display: grid; gap: 14px; } @media (min-width: 600px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; min-height: 52px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 15px; background: #cfc8b0; position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--green-500); }
.switch input:checked::after { transform: translateX(22px); }
.search { position: relative; } .search input { padding-left: 44px !important; } .search .icon { position: absolute; left: 14px; top: 15px; color: var(--muted); }

.flash { padding: 12px 14px; border-radius: 14px; font-weight: 600; margin-bottom: 14px; background: var(--lime-soft); color: var(--green-900); }
.flash--error { background: var(--red-soft); color: var(--red-dark); } .flash--warning { background: var(--amber-soft); color: var(--amber); }
.notice { padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); color: #6b4a00; font-weight: 600; }
.notice--bad { background: var(--red-soft); color: var(--red-dark); }

/* ── Order / detail pieces ─────────────────────────────────── */
.kv { display: grid; gap: 2px; } .kv dt { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; } .kv dd { margin: 0; }
.lines { width: 100%; border-collapse: collapse; } .lines td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; } .lines td:last-child { text-align: right; white-space: nowrap; }
.lines tr.total td { font-weight: 800; border-bottom: 0; font-size: 1.05rem; }
.actions { display: grid; gap: 10px; } @media (min-width: 560px) { .actions { grid-template-columns: repeat(2, 1fr); } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; } .timeline li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); } .timeline li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--line); } .timeline li:last-child::after { display: none; }
.timeline time { display: block; font-size: .8rem; color: var(--muted); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .done { color: var(--green-500); } .check-list .todo { color: var(--amber); }
.hours-edit { display: grid; gap: 8px; } .hours-edit .day { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; background: #fff; border: 2px solid var(--line); border-radius: 14px; }
.hours-edit .day__times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
details.accordion { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
details.accordion + details.accordion { margin-top: 12px; }
details.accordion > summary { list-style: none; cursor: pointer; padding: 16px; display: flex; align-items: center; gap: 12px; font: 700 1.05rem var(--font-display); min-height: 56px; }
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion > summary .icon:last-child { margin-left: auto; transition: transform .2s; }
details.accordion[open] > summary .icon:last-child { transform: rotate(180deg); }
details.accordion > .accordion__body { padding: 0 16px 18px; }
.preview { max-width: 220px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.code { font: 600 1.05rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font: 600 .95rem ui-monospace, Menlo, monospace; }

/* Native fieldsets keep a default box: reset it so grouped controls sit flush with other fields. */
.fieldset-reset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset-reset legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: .92rem; }

/* "{{" suggestion menu in the page editor */
.token-menu { position: absolute; z-index: 60; max-height: 260px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(15, 48, 28, .45); padding: 6px; }
.token-menu__item { display: grid; width: 100%; gap: 2px; text-align: left; padding: 10px 12px; min-height: 48px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font: inherit; color: var(--ink); }
.token-menu__item:hover, .token-menu__item.is-active { background: var(--lime-soft); }
.token-menu__name { font: 700 .95rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--green-800); }
.token-menu__value { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Customer ranking */
.rank { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); color: var(--muted); font: 700 .95rem var(--font-body); }
.rank--top { background: var(--lime); color: var(--green-950); }

/* ── Selectable chips (multi-select) ───────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-pick { cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-pick span { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); font-weight: 800; transition: background .15s, border-color .15s, color .15s; }
.chip-pick span .icon { display: none; }
.chip-pick:hover span { border-color: var(--green-700); }
.chip-pick input:checked + span { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.chip-pick input:checked + span .icon { display: inline-block; }
.chip-pick input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 3px; }

/* ── Sheet / toast / bars ──────────────────────────────────── */
.sheet { border: 0; border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + var(--safe-b)); width: min(100%, 480px); margin: auto auto 0; background: var(--card); box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); }
.sheet::backdrop { background: rgba(11, 36, 21, .55); }
@media (min-width: 600px) { .sheet { margin: auto; border-radius: 22px; } }
.sheet h2 { margin-bottom: .3em; } .sheet__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; } .sheet__actions .btn { flex: 1; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 90; max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 14px; background: var(--green-950); color: #fff; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); }
.toast--error { background: var(--red-dark); }
.session-bar { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 8px); z-index: 120; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); color: #6b4a00; font-weight: 600; box-shadow: var(--shadow); }
.session-bar button, .install-bar button { font: 700 .95rem var(--font-body); border: 0; border-radius: 10px; padding: 8px 12px; background: var(--green-800); color: #fff; cursor: pointer; min-height: 40px; }
.install-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 45; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--green-900); color: #fff; font-size: .92rem; box-shadow: var(--shadow); }
.install-bar span { flex: 1; display: flex; gap: 8px; align-items: center; }
.install-bar [data-install-dismiss] { background: transparent; padding: 8px; }
@media (min-width: 900px) { .install-bar { bottom: 20px; right: 20px; left: auto; max-width: 420px; } .toast { bottom: 24px; } }

/* ── Login ─────────────────────────────────────────────────── */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(70% 50% at 80% 0%, rgba(168, 207, 58, .3), transparent 70%), var(--green-900); }
.auth__card { width: min(100%, 420px); background: var(--bg); border-radius: 22px; padding: 28px 22px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6); }
.auth__card img { width: 130px; height: 130px; margin: 0 auto 14px; }
.auth__card h1 { text-align: center; font-size: 1.35rem; }
.auth__card .lede { text-align: center; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (display-mode: standalone) { .skip-link { display: none; } }
