/* Grannmat prototype — iPhone 17 Pro (402×874) web app */
:root {
  --bg: #FBF6EC; --bg-el: #FFFFFF; --bg-grp: #F3ECDD;
  --ink: #1D1B16; --ink-2: #5A554A; --ink-3: #8C8576;
  --primary: #C2352F; --primary-pr: #A32A25; --on-primary: #FFFFFF;
  --skog: #1F5E46; --saffran: #F2A93B; --save-ink: #5A3A00;
  --warn: #B7791F; --danger: #B3261E; --swish: #14A898;
  --sep: rgba(29,27,22,.12);
  --glass: rgba(255,255,255,.62); --glass-stroke: rgba(255,255,255,.75);
  --shadow: 0 10px 30px -8px rgba(40,28,10,.28), 0 2px 6px rgba(40,28,10,.08);
  --map-land: #EFE6D2; --map-block: #E6DAC1; --map-park: #CFDDB8; --map-water: #B9D3CF; --map-road: #FFFDF7;
  --W: 402px; --H: 874px; --sat: 59px; --sab: 34px;
  --ease-ios: cubic-bezier(.32,.72,0,1);
  --font: -apple-system, "SF Pro Text", system-ui, "Inter", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg:#12100D; --bg-el:#1C1915; --bg-grp:#0B0A08; --ink:#F5EFE3; --ink-2:#B9B1A0; --ink-3:#807868; --primary:#E8574F; --primary-pr:#D2453E; --skog:#4FAE85; --saffran:#F7BC5E; --sep:rgba(245,239,227,.14); --glass:rgba(28,25,21,.62); --glass-stroke:rgba(255,255,255,.12); --map-land:#1E1B16; --map-block:#26221C; --map-park:#1F2A1C; --map-water:#16292A; --map-road:#2E2A23; --shadow:0 10px 30px -8px rgba(0,0,0,.7),0 2px 6px rgba(0,0,0,.4); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg:#12100D; --bg-el:#1C1915; --bg-grp:#0B0A08; --ink:#F5EFE3; --ink-2:#B9B1A0; --ink-3:#807868; --primary:#E8574F; --primary-pr:#D2453E; --skog:#4FAE85; --saffran:#F7BC5E; --sep:rgba(245,239,227,.14); --glass:rgba(28,25,21,.62); --glass-stroke:rgba(255,255,255,.12); --map-land:#1E1B16; --map-block:#26221C; --map-park:#1F2A1C; --map-water:#16292A; --map-road:#2E2A23; --shadow:0 10px 30px -8px rgba(0,0,0,.7),0 2px 6px rgba(0,0,0,.4); color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: #E9E2D3; font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; overflow: hidden; }
:root[data-theme="dark"] body { background: #070605; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: #070605; } }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 12px; }

/* ---------- Desktop stage ---------- */
.stage { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 48px; padding: 24px; }
.side { max-width: 300px; justify-self: end; color: #3d372c; }
.side.right { justify-self: start; }
:root[data-theme="dark"] .side { color: #c9c0ae; }
.side h1 { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.02em; margin: 14px 0 10px; font-weight: 650; }
.side p { font-size: 15px; line-height: 1.5; margin: 0 0 14px; opacity: .85; }
.side .kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 13px; align-items: center; }
kbd { font: 600 12px/1 var(--font); padding: 5px 7px; border-radius: 7px; background: rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.1); border-bottom-width: 2px; min-width: 24px; text-align: center; display: inline-block; }
.seg-out { display: inline-flex; background: rgba(0,0,0,.06); border-radius: 10px; padding: 3px; gap: 2px; margin-bottom: 14px; }
.seg-out button { font-size: 13px; padding: 6px 10px; border-radius: 8px; font-weight: 600; opacity: .7; }
.seg-out button[aria-pressed="true"] { background: #fff; opacity: 1; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: #1D1B16; }

.phone { position: relative; width: calc(var(--W) + 24px); height: calc(var(--H) + 24px); border-radius: 68px; background: #0d0c0b; padding: 12px; box-shadow: 0 0 0 2px #3a3631, 0 40px 80px -20px rgba(40,25,5,.45), inset 0 0 0 1px #5a544b; }
.phone.max { --W: 440px; --H: 956px; }
.screen { position: relative; width: var(--W); height: var(--H); border-radius: 56px; overflow: hidden; overflow: clip; background: var(--bg); isolation: isolate; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 126px; height: 37px; border-radius: 20px; background: #000; z-index: 100; pointer-events: none; }
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 50px; z-index: 99; font: 600 17px/1 var(--font); pointer-events: none; color: var(--ink); transition: color .3s; }
.statusbar.light { color: #fff; }
.statusbar .icons { display: flex; gap: 6px; align-items: center; }
.home-ind { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 139px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .85; z-index: 100; pointer-events: none; }

/* real phone: full bleed */
@media (max-width: 520px) {
  body { background: var(--bg); }
  .stage { display: block; padding: 0; height: 100dvh; }
  .side { display: none; }
  .phone { width: 100vw; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; --W: 100vw; --H: 100dvh; --sat: max(env(safe-area-inset-top), 20px); --sab: max(env(safe-area-inset-bottom), 12px); }
  .screen { border-radius: 0; }
  .island, .statusbar, .home-ind { display: none; }
}
@media (max-width: 1100px) and (min-width: 521px) { .side { display: none; } .stage { grid-template-columns: 1fr; justify-items: center; } }
@media (max-height: 940px) and (min-width: 521px) { .phone { transform: scale(calc((100vh - 40px) / 900)); } .phone.max { transform: scale(calc((100vh - 40px) / 982)); } }

/* ---------- Layers ---------- */
.layer { position: absolute; inset: 0; }
.tabview { position: absolute; inset: 0; background: var(--bg); overflow: hidden; }
.tabview[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
.scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: calc(var(--sat) + 8px) 16px calc(var(--sab) + 120px); }
.scroll::-webkit-scrollbar { display: none; }

/* ---------- Map ---------- */
.map { position: absolute; inset: 0; overflow: hidden; background: var(--map-land); touch-action: none; cursor: grab; }
.map:active { cursor: grabbing; }
.map-canvas { position: absolute; left: 0; top: 0; width: 1100px; height: 1300px; will-change: transform; }
.map-canvas svg { position: absolute; inset: 0; }
.pin { position: absolute; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; padding: 3px; background: var(--bg-el); box-shadow: 0 6px 16px -4px rgba(40,25,5,.45), 0 0 0 1.5px rgba(0,0,0,.05); transition: transform .25s var(--ease-ios); }
.pin img, .pin .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pin::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2.5px solid var(--primary); }
.pin.rada::after { border-color: var(--saffran); }
.pin .tag { z-index: 2; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font: 700 11px/1 var(--font); padding: 4px 6px; border-radius: 8px; white-space: nowrap; }
.pin.rada .tag { background: var(--saffran); color: var(--save-ink); }
.pin.sel { transform: scale(1.22); z-index: 3; }
.pin.dim { opacity: .35; }
.me { position: absolute; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: #2F7DE1; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.me-area { position: absolute; width: 240px; height: 240px; margin: -120px; border-radius: 50%; background: rgba(47,125,225,.08); border: 1.5px dashed rgba(47,125,225,.35); }
.me::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; background: rgba(47,125,225,.25); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

/* top bar over map */
.mapbar { position: absolute; top: calc(var(--sat) + 4px); left: 16px; right: 16px; display: flex; gap: 10px; z-index: 5; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-stroke), inset 0 0 0 .5px var(--glass-stroke); }
.searchpill { flex: 1; height: 48px; border-radius: 24px; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--ink-2); font-size: 16px; text-align: left; }
.areapill { height: 48px; border-radius: 24px; padding: 0 14px 0 6px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.areapill .logo-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; }

/* ---------- Sheet ---------- */
.sheet { position: absolute; left: 0; right: 0; top: 0; height: 100%; background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -8px 30px -10px rgba(40,25,5,.25); z-index: 10; will-change: transform; display: flex; flex-direction: column; }
.sheet-head { touch-action: none; padding: 8px 16px 10px; cursor: grab; flex: none; }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--ink-3); opacity: .45; margin: 0 auto 12px; }
.sheet-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.sheet-title h2 { font: 650 22px/28px var(--serif); margin: 0; letter-spacing: -.01em; }
.sheet-title .link { color: var(--primary); font-weight: 600; font-size: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; touch-action: pan-x; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, transform .12s; }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip.rada[aria-pressed="true"] { background: var(--saffran); color: var(--save-ink); }
.sheet-list { flex: 1; overflow-y: hidden; padding: 4px 16px calc(var(--sab) + 110px); scrollbar-width: none; overscroll-behavior: contain; touch-action: none; }
.sheet-list::-webkit-scrollbar { display: none; }
.sheet.full .sheet-list { overflow-y: auto; touch-action: pan-y; }

/* ---------- Cards ---------- */
.card { display: grid; grid-template-columns: 104px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--sep); position: relative; text-align: left; width: 100%; transition: transform .12s ease-out; }
.card:active { transform: scale(.98); }
.thumb { position: relative; width: 104px; height: 120px; border-radius: 18px; overflow: hidden; background: var(--bg-grp); }
.thumb img, .hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { background: linear-gradient(135deg, #e8b98d, #c2352f 60%, #7a2420); display: grid; place-items: center; color: #fff6; font: 700 34px var(--serif); width: 100%; height: 100%; }
.ph.g2 { background: linear-gradient(135deg, #d9c27a, #1f5e46); }
.ph.g3 { background: linear-gradient(135deg, #f7d38a, #f2a93b 55%, #b0670c); }
.card h3 { font: 600 17px/22px var(--font); margin: 2px 0 4px; letter-spacing: -.01em; }
.meta { font-size: 13px; line-height: 18px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.star { color: #E3A008; display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--ink); }
.price { font: 700 17px/1 var(--font); color: var(--primary); margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.price s { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.price .free { color: var(--skog); }
.badge { position: absolute; top: 8px; left: 8px; font: 700 11px/1 var(--font); padding: 5px 7px; border-radius: 8px; background: var(--saffran); color: var(--save-ink); letter-spacing: .02em; }
.badge.new { background: var(--skog); color: #fff; }
.tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag-s { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 7px; background: color-mix(in srgb, var(--skog) 12%, transparent); color: var(--skog); }
.countdown { font: 700 12px/1 var(--font); color: var(--save-ink); background: color-mix(in srgb, var(--saffran) 30%, transparent); padding: 4px 7px; border-radius: 7px; display: inline-flex; gap: 4px; align-items: center; }
:root[data-theme="dark"] .countdown { color: var(--saffran); }
.swipe-wrap { position: relative; overflow: hidden; }
.swipe-act { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-weight: 700; font-size: 14px; }
.swipe-act .l { color: var(--primary); display: flex; gap: 6px; align-items: center; }
.swipe-act .r { color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.swipe-wrap .card { background: var(--bg); touch-action: pan-y; }

/* ---------- Dock (Tallriksdocken) ---------- */
.dock { position: absolute; left: 50%; bottom: calc(var(--sab) + 8px); transform: translateX(-50%); width: 358px; height: 64px; border-radius: 32px; z-index: 40; touch-action: none; }
.ds { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; pointer-events: none; padding: 0 6px; }
.ds.on { opacity: 1; pointer-events: auto; }
.ds-tabs { justify-content: space-between; }
.tab { width: 64px; height: 52px; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--ink-2); border-radius: 26px; position: relative; z-index: 1; transition: color .2s; }
.tab[aria-current="page"] { color: var(--primary); }
.tab span { opacity: 1; }
.tab-ind { position: absolute; top: 6px; height: 52px; width: 64px; border-radius: 26px; background: color-mix(in srgb, var(--primary) 11%, transparent); z-index: 0; will-change: transform; }
.plate { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; color: #fff; position: relative; z-index: 2; box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--primary) 70%, transparent), inset 0 0 0 4px rgba(255,255,255,.12); transition: transform .12s ease-out, background .3s; touch-action: none; }
.plate::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); }
.plate:active { transform: scale(.94); }
.dock.rada .plate { background: var(--saffran); color: var(--save-ink); }
.dock.rada .tab[aria-current="page"] { color: #A86500; }
.dock.rada .tab-ind { background: color-mix(in srgb, var(--saffran) 25%, transparent); }
.dock.rada { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--saffran) 55%, transparent); }

.ds-buy, .ds-cart, .ds-pay, .ds-publish, .ds-search, .ds-seller { gap: 8px; padding: 0 8px; }
.dbtn { height: 48px; border-radius: 24px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; transition: transform .12s ease-out, opacity .2s; }
.dbtn:active { transform: scale(.96); }
.dbtn.primary { background: var(--primary); color: #fff; flex: 1; }
.dbtn.swish { background: var(--swish); color: #fff; flex: 1; }
.dbtn.swish[disabled], .dbtn.primary[disabled] { opacity: .4; pointer-events: none; }
.dbtn.round { width: 48px; padding: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.stepper { display: flex; align-items: center; height: 48px; border-radius: 24px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.stepper button { width: 40px; height: 48px; display: grid; place-items: center; }
.stepper b { min-width: 18px; text-align: center; }
.ds-search input { flex: 1; height: 48px; border: 0; background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 24px; padding: 0 16px 0 42px; font-size: 17px; outline: none; }
.ds-search .sicon { position: absolute; left: 22px; color: var(--ink-3); pointer-events: none; }
.ds-camera { justify-content: space-around; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.shutter i { width: 58px; height: 58px; border-radius: 50%; background: #fff; transition: transform .12s; }
.shutter:active i { transform: scale(.88); }
.dock.cam { background: rgba(20,18,15,.55); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 .5px rgba(255,255,255,.18); }
.dock.cam .dbtn.round { background: rgba(255,255,255,.14); }
.ds-collapsed { justify-content: center; gap: 10px; }
.ds-collapsed .plate { width: 40px; height: 40px; }
.ds-collapsed .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }

/* simple navigation fallback */
.simple .dock { left: 0; right: 0; bottom: 0; transform: none; width: auto !important; border-radius: 0 !important; padding-bottom: var(--sab); height: auto !important; min-height: 64px; }
.simple .dock .ds { position: relative; display: none; }
.simple .dock .ds.on { display: flex; height: 64px; }
.simple .tab-ind { display: none; }
.simple .tab span { font-size: 11px; }

/* live activity pill */
.live { position: absolute; left: 50%; bottom: calc(var(--sab) + 82px); transform: translateX(-50%); height: 40px; border-radius: 20px; padding: 0 14px 0 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; z-index: 39; white-space: nowrap; }
.live[hidden], .radial[hidden] { display: none; }
.live .pulse { width: 24px; height: 24px; border-radius: 50%; background: var(--skog); display: grid; place-items: center; color: #fff; }
.live .eta { color: var(--skog); }
.simple .live { bottom: calc(var(--sab) + 74px); }

/* ---------- Pages ---------- */
.page { position: absolute; inset: 0; background: var(--bg); z-index: 20; overflow: hidden; will-change: transform; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
.page .scroll { padding-top: 0; padding-left: 0; padding-right: 0; }
.backbtn { position: absolute; top: calc(var(--sat) + 4px); left: 16px; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; z-index: 6; }
.topright { position: absolute; top: calc(var(--sat) + 4px); right: 16px; display: flex; gap: 8px; z-index: 6; }
.topright button { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; }
.hero { position: relative; height: 380px; background: var(--bg-grp); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(to top, var(--bg), transparent); }
.pbody { padding: 0 20px; position: relative; margin-top: -26px; z-index: 2; }
.pbody h1 { font: 650 30px/34px var(--serif); letter-spacing: -.02em; margin: 0 0 10px; }
.sellerrow { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); width: 100%; text-align: left; margin: 14px 0; }
.av { width: 44px; height: 44px; border-radius: 50%; background: var(--skog); color: #fff; display: grid; place-items: center; font: 650 18px var(--serif); flex: none; }
.av.lg { width: 84px; height: 84px; font-size: 34px; }
.bankid { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--skog); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 18px; }
.info { padding: 12px 14px; border-radius: 16px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); }
.info small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.info b { font-size: 15px; }
.sec { font: 650 20px/26px var(--serif); margin: 22px 0 10px; letter-spacing: -.01em; }
.allergen { display: flex; gap: 8px; flex-wrap: wrap; }
.al { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--warn) 13%, transparent); color: var(--warn); }
.al.none { background: color-mix(in srgb, var(--skog) 12%, transparent); color: var(--skog); }
.desc { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.review { padding: 14px 0; border-bottom: 1px solid var(--sep); }
.review .top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.review p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.verified { font-size: 11px; color: var(--skog); font-weight: 700; display: inline-flex; gap: 3px; align-items: center; margin-top: 6px; }
.note { font-size: 12px; color: var(--ink-3); line-height: 1.45; margin: 10px 0 0; }

.seller-head { padding: calc(var(--sat) + 60px) 20px 10px; text-align: center; }
.seller-head h1 { font: 650 28px/32px var(--serif); margin: 12px 0 4px; }
.ratingbig { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: 20px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); margin: 16px 0; }
.ratingbig .n { font: 650 44px/1 var(--serif); }
.bars { display: grid; gap: 4px; }
.bar { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-3); font-weight: 700; }
.bar i { height: 6px; border-radius: 3px; background: var(--sep); position: relative; overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--ink); border-radius: 3px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats div { padding: 12px 6px; border-radius: 16px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); }
.stats b { display: block; font: 650 20px var(--serif); }
.stats small { font-size: 11px; color: var(--ink-3); font-weight: 600; }

/* Large title pages */
.ltitle { font: 650 34px/41px var(--serif); letter-spacing: -.02em; margin: 6px 0 4px; }
.lsub { color: var(--ink-2); margin: 0 0 18px; font-size: 15px; }
.impact { border-radius: 24px; padding: 18px; background: var(--saffran); color: var(--save-ink); position: relative; overflow: hidden; margin-bottom: 18px; }
.impact b { font: 650 44px/1 var(--serif); display: block; letter-spacing: -.02em; }
.impact span { font-size: 14px; font-weight: 600; }
.impact svg.ring { position: absolute; right: -20px; top: -20px; opacity: .25; }
.group { border-radius: 18px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); overflow: hidden; margin-bottom: 22px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; width: 100%; text-align: left; font-size: 16px; }
.row + .row { border-top: 1px solid var(--sep); }
.row .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.row .grow { flex: 1; }
.row .val { color: var(--ink-3); font-size: 15px; }
.gl { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px 16px; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 9px; padding: 2px; }
.seg button { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--bg-el); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.switch { width: 51px; height: 31px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 16%, transparent); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .3s var(--ease-ios); }
.switch[aria-checked="true"] { background: #34C759; }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* order */
.order { border-radius: 22px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); padding: 16px; margin-bottom: 14px; }
.order .hd { display: flex; gap: 12px; align-items: center; }
.order .hd img, .order .hd .ph { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 16px 0 8px; }
.steps i { height: 4px; border-radius: 2px; background: var(--sep); }
.steps i.on { background: var(--skog); }
.code { font: 700 28px/1 var(--font); letter-spacing: .2em; }
.empty { text-align: center; padding: 30px 20px; color: var(--ink-2); }
.empty img { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; margin: 0 auto 16px; display: block; }

/* sell */
.camera { position: absolute; inset: 0; background: #0b0a09; }
.camera img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.9); }
.camera .frame { position: absolute; inset: 22% 10% 30%; border-radius: 28px; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.camera .hint { position: absolute; top: calc(var(--sat) + 70px); left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 50; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px 4px; }
.field input, .field textarea { width: 100%; border: 0; border-radius: 14px; background: var(--bg-el); box-shadow: inset 0 0 0 1px var(--sep); padding: 14px; font-size: 17px; outline: none; resize: none; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.toggle-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--saffran) 18%, var(--bg-el)); margin-bottom: 14px; width: 100%; text-align: left; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 10%, var(--bg-el)); width: 100%; text-align: left; font-size: 14px; line-height: 1.4; }
.chk .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink-3); flex: none; display: grid; place-items: center; color: #fff; transition: background .2s, border-color .2s; }
.chk[aria-checked="true"] .box { background: var(--skog); border-color: var(--skog); }

/* overlays */
.scrim { position: absolute; inset: 0; background: rgba(15,12,8,.32); z-index: 45; opacity: 0; }
.radial { position: absolute; inset: 0; z-index: 46; pointer-events: none; }
.rbtn { position: absolute; width: 60px; display: grid; justify-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: auto; }
.rbtn i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-el); color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.rbtn.hot i { transform: scale(1.15); background: var(--primary); color: #fff; }
.toast { position: absolute; top: calc(var(--sat) + 6px); left: 0; right: 0; margin: 0 auto; width: max-content; transform: translateY(-140px); z-index: 90; padding: 12px 18px; border-radius: 22px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; max-width: 340px; }
.swishov { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); text-align: center; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--swish) 25%, transparent); border-top-color: var(--swish); animation: spin .9s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sig { position: absolute; inset: 0; z-index: 85; pointer-events: none; }
.sig .p { position: absolute; width: 76px; height: 76px; margin: -38px; border-radius: 50%; background: var(--bg-el); box-shadow: 0 12px 30px -6px rgba(40,25,5,.45), inset 0 0 0 6px var(--primary), inset 0 0 0 9px var(--bg-el), inset 0 0 0 10.5px color-mix(in srgb, var(--primary) 40%, transparent); display: grid; place-items: center; }
.sig .dot { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; }

/* onboarding */
.onb { position: absolute; inset: 0; z-index: 95; background: var(--bg); display: flex; flex-direction: column; }
.onb-art { position: relative; height: 58%; overflow: hidden; border-radius: 0 0 36px 36px; }
.onb-art img, .onb-art .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.onb-art::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,.25), transparent); }
.onb-lang { position: absolute; top: calc(var(--sat) + 4px); right: 16px; z-index: 3; }
.onb-logo { position: absolute; top: calc(var(--sat) + 4px); left: 16px; z-index: 3; height: 44px; padding: 0 14px 0 8px; border-radius: 22px; display: flex; align-items: center; gap: 8px; font: 650 18px var(--serif); }
.onb-text { padding: 26px 26px 0; flex: 1; }
.onb-text h1 { font: 650 34px/38px var(--serif); letter-spacing: -.02em; margin: 0 0 12px; }
.onb-text p { font-size: 17px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.onb-foot { padding: 0 20px calc(var(--sab) + 14px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--sep); transition: width .3s var(--ease-ios), background .3s; }
.dots i.on { width: 24px; background: var(--primary); }
.bigbtn { height: 56px; border-radius: 28px; padding: 0 28px; background: var(--primary); color: #fff; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s; }
.bigbtn:active { transform: scale(.96); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) { .me::before, .spinner { animation: none; } }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--bg-el); -webkit-backdrop-filter: none; backdrop-filter: none; } }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---------- Auth: Bullen ---------- */
.auth { position: absolute; inset: 0; z-index: 97; overflow: hidden; overflow: clip; display: flex; flex-direction: column; transition: background .5s var(--ease-ios); background: #F2A93B; }
.auth.signup { background: #C2352F; }
.auth::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.35), transparent 55%); pointer-events: none; }
.auth-marquee { contain: paint; position: absolute; top: 150px; left: 0; white-space: nowrap; font: 700 120px/1 var(--serif); letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 2px rgba(90,58,0,.22); pointer-events: none; animation: marq 26s linear infinite; }
.auth.signup .auth-marquee { -webkit-text-stroke-color: rgba(255,246,236,.25); }
@keyframes marq { to { transform: translateX(-50%); } }
.sticker { position: absolute; border-radius: 50%; overflow: hidden; border: 4px solid #FBF6EC; box-shadow: 0 10px 24px -8px rgba(40,20,0,.45); z-index: 1; }
.sticker img, .sticker .ph { width: 100%; height: 100%; object-fit: cover; }
.auth-guest { position: absolute; top: calc(var(--sat) + 4px); right: 16px; height: 40px; padding: 0 16px; border-radius: 20px; font-weight: 700; font-size: 14px; z-index: 5; color: #1D1B16; background: rgba(255,255,255,.55); }
.bullen-wrap { position: relative; z-index: 2; width: 220px; height: 220px; margin: calc(var(--sat) + 26px) auto 0; flex: none; will-change: transform; }
.bullen { width: 100%; height: 100%; overflow: visible; }
.bubble { position: absolute; z-index: 4; top: calc(var(--sat) + 70px); right: 14px; max-width: 150px; white-space: normal; text-align: left; background: #FBF6EC; color: #1D1B16; font: 700 15px var(--font); padding: 9px 14px; border-radius: 18px 18px 18px 4px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.3); opacity: 0; transform: scale(.6); transform-origin: 0 100%; }
.auth-card { position: relative; z-index: 3; margin-top: -18px; flex: 1; background: var(--bg); border-radius: 34px 34px 0 0; padding: 22px 20px calc(var(--sab) + 18px); overflow-y: auto; scrollbar-width: none; box-shadow: 0 -12px 40px -12px rgba(40,20,0,.35); }
.auth-card::-webkit-scrollbar { display: none; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.auth-top h1 { font: 700 32px/36px var(--serif); letter-spacing: -.02em; margin: 0; }
.auth-sub { color: var(--ink-2); margin: 6px 0 16px; font-size: 15px; line-height: 1.4; }
.af { display: block; margin-bottom: 12px; }
.af > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px 4px; }
.af-in { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 16px; border-radius: 18px; background: var(--bg-el); box-shadow: inset 0 0 0 1.5px var(--sep); color: var(--ink-3); transition: box-shadow .2s, transform .15s; }
.af-in:focus-within { box-shadow: inset 0 0 0 2.5px var(--ink); color: var(--ink); transform: translateY(-1px); }
.af-in input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; color: var(--ink); height: 100%; }
.af.err .af-in { box-shadow: inset 0 0 0 2.5px var(--danger); }
.af-err { display: block; color: var(--danger); font-size: 12px; font-weight: 600; min-height: 0; margin: 4px 0 0 6px; }
.eye-btn { height: 40px; padding: 0 12px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.eye-btn[aria-pressed="true"] { background: var(--primary); color: #fff; }
.meter { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; align-items: center; margin: 8px 4px 0; }
.meter i { height: 5px; border-radius: 3px; background: var(--sep); transition: background .3s; }
.meter b { font-size: 12px; min-width: 56px; text-align: right; }
.meter[data-s="1"] i:nth-child(1) { background: var(--danger); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-s="3"] i { background: var(--skog); }
.link-btn { color: var(--primary); font-weight: 700; font-size: 14px; margin: 0 0 14px 4px; }
.auth-go { width: 100%; justify-content: center; margin-top: 4px; }
.auth.signup .auth-go { background: var(--ink); color: var(--bg); }
.chk.terms { margin: 2px 0 4px; background: var(--bg-el); box-shadow: inset 0 0 0 1.5px var(--sep); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; font-weight: 600; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--sep); }
.alt { display: grid; gap: 10px; }
.alt-btn { height: 52px; border-radius: 26px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px; transition: transform .12s; }
.alt-btn:active, .auth-go:active { transform: scale(.97); }
.bankid-btn { background: #183E4F; color: #fff; }
.apple-btn { background: #000; color: #fff; }
:root[data-theme="dark"] .apple-btn { background: #fff; color: #000; }
.auth-switch { text-align: center; color: var(--ink-2); font-size: 15px; margin: 18px 0 0; }
.auth-switch button { color: var(--primary); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .auth-marquee { animation: none; } }
