/* Shopo Assistant — iOS-style design system. Tokens first, then components. */
/* Colours use light-dark(): they follow the device unless the Appearance setting forces light or dark. */
:root {
  color-scheme: light dark;
  --tint: light-dark(#1b4dff, #5b82ff); --tint-press: light-dark(#1339c4, #7f9dff); --tint-wash: light-dark(#e8edff, #152046); --on-tint: #fff;
  --bg: light-dark(#f2f2f7, #000000); --card: light-dark(#ffffff, #1c1c1e);
  --fill: light-dark(rgb(118 118 128 / .12), rgb(118 118 128 / .24)); --fill-strong: light-dark(rgb(118 118 128 / .2), rgb(118 118 128 / .36));
  --label: light-dark(#000000, #ffffff); --label2: light-dark(rgb(60 60 67 / .64), rgb(235 235 245 / .64)); --label3: light-dark(rgb(60 60 67 / .36), rgb(235 235 245 / .34)); --sep: light-dark(rgb(60 60 67 / .16), rgb(84 84 88 / .6));
  --green: light-dark(#1f9d55, #32d074); --green-wash: light-dark(#e3f6ea, #0f2e1c); --orange: light-dark(#b25e00, #ffb340); --orange-wash: light-dark(#fff1dc, #33240a); --red: light-dark(#d92d20, #ff6961); --red-wash: light-dark(#fdeceb, #3a1513);
  --bar: light-dark(rgb(249 249 249 / .82), rgb(22 22 24 / .8)); --sheet: light-dark(#f2f2f7, #1c1c1e); --scrim: light-dark(rgb(0 0 0 / .32), rgb(0 0 0 / .56));
  --img-outline: light-dark(oklch(0 0 0 / .08), oklch(1 0 0 / .1));
  --r-card: 14px; --r-ctl: 12px; --r-img: 10px;
  --spring: cubic-bezier(.32, .72, 0, 1); --ease: cubic-bezier(.2, 0, 0, 1);
  --tabbar: 54px; --navbar: 44px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.sheet .group, .sheet .input { --card: light-dark(#ffffff, #2c2c2e); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--label); font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
#app { max-width: 640px; margin-inline: auto; min-height: 100dvh; display: flex; flex-direction: column; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--tint); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sub { color: var(--label2); font-size: 15px; }
.foot { color: var(--label2); font-size: 13px; line-height: 1.35; padding: 8px 16px 0; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 60%, transparent); outline-offset: 2px; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }

/* ---- Navigation bar with large title ---- */
.nav { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); background: transparent; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.nav.scrolled { background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 .5px 0 var(--sep); }
.nav .row { height: var(--navbar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 8px; }
.nav .mid { font-weight: 600; font-size: 17px; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity .18s var(--ease); }
.nav.scrolled .mid, .nav.inline .mid { opacity: 1; }
.nav .lead { justify-self: start; } .nav .trail { justify-self: end; display: flex; }
.navbtn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; gap: 2px; padding-inline: 8px; color: var(--tint); font-size: 17px; border-radius: 10px; transition: opacity .12s var(--ease); }
.navbtn:active { opacity: .4; }
.navbtn.strong { font-weight: 600; }
.navbtn svg.i { stroke-width: 2.4; }
.navbtn.back svg.i { margin-inline-start: -6px; width: 26px; height: 26px; }
.large { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.022em; margin: 2px 0 10px; padding-inline: 16px; text-wrap: balance; }
main { flex: 1; padding: 0 0 calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); }
main.has-cta { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.pad { padding-inline: 16px; }

/* ---- Tab bar ---- */
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 12; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -.5px 0 var(--sep); padding-bottom: env(safe-area-inset-bottom); }
.tabbar > div { max-width: 640px; margin-inline: auto; display: flex; height: var(--tabbar); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--label3); font-size: 10px; font-weight: 500; letter-spacing: 0; transition: color .15s var(--ease); }
.tabbar a svg.i { width: 26px; height: 26px; }
.tabbar a[aria-current="page"] { color: var(--tint); }
.tabbar a[aria-current="page"] svg.i { fill: color-mix(in srgb, var(--tint) 18%, transparent); }
.tabbar a:active { opacity: .5; }

/* ---- Search + segmented control ---- */
.search { position: relative; margin: 0 16px 12px; }
.search svg.i { position: absolute; inset-inline-start: 8px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--label2); stroke-width: 2.2; }
.search input { width: 100%; height: 36px; border: 0; border-radius: 10px; background: var(--fill); color: var(--label); font: inherit; padding: 0 12px 0 32px; }
.search input::placeholder { color: var(--label2); }
.seg { display: flex; margin: 0 16px 16px; padding: 2px; background: var(--fill); border-radius: 9px; }
.seg button { flex: 1; min-height: 32px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--label); transition: background-color .2s var(--ease), box-shadow .2s var(--ease); white-space: nowrap; padding-inline: 4px; }
.seg button[aria-pressed="true"] { background: var(--card); font-weight: 600; box-shadow: 0 3px 8px rgb(0 0 0 / .12), 0 0 0 .5px rgb(0 0 0 / .04); }
.seg button[aria-pressed="true"] { background: light-dark(var(--card), #636366); }
.seg small { color: var(--label2); font-size: 12px; font-weight: 400; margin-inline-start: 3px; }

/* ---- Grouped inset lists ---- */
.title { font-size: 13px; color: var(--label2); text-transform: uppercase; letter-spacing: .02em; margin: 24px 32px 7px; font-weight: 400; }
.group { background: var(--card); border-radius: var(--r-card); margin-inline: 16px; overflow: hidden; }
.group + .foot { padding-inline: 32px; }
.cell { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 11px 16px; text-align: start; transition: background-color .1s linear; }
button.cell:active, a.cell:active { background: var(--fill); }
.cell + .cell::before { content: ""; position: absolute; top: 0; inset-inline: 16px 0; height: .5px; background: var(--sep); }
.cell.media + .cell.media::before { inset-inline-start: 88px; }
.cell .main { flex: 1; min-width: 0; }
.cell .k { color: var(--label); }
.cell .v { color: var(--label2); text-align: end; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.cell.stack { display: block; }
.cell.stack .k { font-size: 13px; color: var(--label2); margin-bottom: 3px; }
.cell.stack .v2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-inline-end: 24px; }
.cell.stack .chev { position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%; }
.chev { color: var(--label3); width: 14px !important; height: 14px !important; stroke-width: 2.6 !important; flex: none; }
.cell.tint .k { color: var(--tint); } .cell.red .k { color: var(--red); }
.cell .lead-icon { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--tint); flex: none; }
.cell .lead-icon svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
.thumb { width: 60px; height: 60px; border-radius: var(--r-img); object-fit: cover; background: var(--fill); flex: none; outline: 1px solid var(--img-outline); outline-offset: -1px; display: grid; place-items: center; color: var(--label3); }
.cell.media { padding-block: 10px; }
.cell.media .name { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.cell.media .line { color: var(--label2); font-size: 15px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; }
.badge { display: inline-flex; align-items: center; height: 20px; padding-inline: 8px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; background: var(--tint-wash); color: var(--tint); white-space: nowrap; }
.badge.wait { background: var(--orange-wash); color: var(--orange); }
.badge.live { background: var(--green-wash); color: var(--green); }

/* ---- Buttons ---- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 20px; border-radius: 14px; background: var(--tint); color: var(--on-tint); font-size: 17px; font-weight: 600; transition: scale .2s var(--spring), background-color .15s var(--ease), opacity .15s var(--ease); }
.btn:active:not(:disabled) { scale: .97; background: var(--tint-press); }
.btn.gray { background: var(--fill); color: var(--tint); } .btn.gray:active:not(:disabled) { background: var(--fill-strong); }
.btn.plain { background: none; color: var(--tint); font-weight: 400; }
.btn[aria-busy="true"] { opacity: .6; }
.btn[aria-busy="true"]::before, .navbtn[aria-busy="true"]::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.cta { position: fixed; inset-inline: 0; bottom: 0; z-index: 12; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -.5px 0 var(--sep); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.cta > div { max-width: 608px; margin-inline: auto; }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--fill); color: var(--label); font-size: 15px; transition: scale .2s var(--spring), background-color .15s; }
.pill:active { scale: .96; background: var(--fill-strong); }

/* ---- Inputs ---- */
.input { width: 100%; min-height: 50px; padding: 13px 16px; border: 0; border-radius: var(--r-ctl); background: var(--card); color: var(--label); font: inherit; letter-spacing: inherit; }
textarea.input { resize: none; line-height: 1.35; min-height: 110px; display: block; }
.input::placeholder { color: var(--label3); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--label3) 50%), linear-gradient(135deg, var(--label3) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-inline-end: 40px; }
.form { padding: 0 16px; }
.form label, .lbl { display: block; font-size: 13px; color: var(--label2); text-transform: uppercase; letter-spacing: .02em; margin: 20px 16px 7px; }
.form .help { font-size: 13px; color: var(--label2); margin: 7px 16px 0; display: flex; justify-content: space-between; gap: 12px; }
.help .over { color: var(--red); font-weight: 600; }
.money { position: relative; }
.money span { position: absolute; inset-inline-start: 16px; top: 50%; translate: 0 -50%; color: var(--label2); pointer-events: none; }
.money .input { padding-inline-start: 52px; font-variant-numeric: tabular-nums; }
.status-line { min-height: 20px; margin: 12px 16px 0; font-size: 15px; color: var(--label2); text-align: center; }

/* ---- Product detail ---- */
.carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 16px 0; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: none; width: min(78vw, 420px); aspect-ratio: 1; object-fit: cover; border-radius: 20px; scroll-snap-align: center; background: var(--fill); outline: 1px solid var(--img-outline); outline-offset: -1px; }
.carousel img:only-child { width: 100%; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--label3); transition: background-color .2s, scale .2s var(--spring); }
.dots i.on { background: var(--label); scale: 1.15; }
.hero { padding: 16px 16px 0; }
.hero h1 { font-size: 24px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 0; text-wrap: balance; }
.hero .tags { display: flex; gap: 8px; align-items: center; color: var(--label2); font-size: 13px; }
.price-card { margin: 16px 16px 0; background: var(--card); border-radius: 20px; padding: 18px 16px 6px; }
.price-card .big { font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.price-card .cap { color: var(--label2); font-size: 13px; margin-bottom: 6px; }
.price-card .top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.profit { display: inline-flex; flex-direction: column; align-items: flex-end; padding: 8px 12px; border-radius: 12px; background: var(--green-wash); color: var(--green); font-weight: 700; font-size: 17px; }
.profit small { font-size: 11px; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.profit.loss { background: var(--red-wash); color: var(--red); }
.price-card .cell { padding-inline: 0; }
.price-card .cell::before { inset-inline-start: 0 !important; }
.price-card .cell:first-of-type::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: .5px; background: var(--sep); }
.note { display: flex; gap: 10px; margin: 16px 16px 0; padding: 12px 14px; border-radius: var(--r-card); background: var(--orange-wash); color: var(--orange); font-size: 15px; }
.note svg.i { width: 20px; height: 20px; margin-top: 1px; }
.note b { display: block; }
.note ul { margin: 2px 0 0; padding-inline-start: 18px; }
.note.ok { background: var(--green-wash); color: var(--green); }
.ai-card { margin: 16px 16px 0; border-radius: 20px; padding: 16px; color: #fff; background: linear-gradient(135deg, #1b4dff 0%, #6a3dff 60%, #a23dff 100%); display: flex; align-items: center; gap: 14px; width: calc(100% - 32px); text-align: start; transition: scale .25s var(--spring); }
.ai-card:active { scale: .98; }
.ai-card .orb { width: 44px; height: 44px; border-radius: 14px; background: rgb(255 255 255 / .2); display: grid; place-items: center; flex: none; }
.ai-card b { display: block; font-size: 17px; } .ai-card span { font-size: 14px; opacity: .9; }
.ai-card .chev { color: rgb(255 255 255 / .7); margin-inline-start: auto; }
.serp { padding: 14px 16px; overflow-wrap: anywhere; }
.serp .u { font-size: 12px; color: var(--label2); }
.serp .t { color: #1a0dab; font-size: 18px; line-height: 1.25; margin: 3px 0; letter-spacing: 0; }
.serp .d { font-size: 14px; color: var(--label2); line-height: 1.4; letter-spacing: 0; }
.serp .t { color: light-dark(#1a0dab, #8ab4f8); }

/* ---- Add ---- */
.options { display: grid; gap: 12px; padding: 4px 16px 0; }
.option { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--card); text-align: start; transition: scale .25s var(--spring); }
.option:active { scale: .98; }
.option .orb { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--tint); flex: none; }
.option .orb.alt { background: #ff8a00; }
.option b { display: block; } .option span span { color: var(--label2); font-size: 15px; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px; }
.photos figure { margin: 0; position: relative; aspect-ratio: 1; }
.photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; outline: 1px solid var(--img-outline); outline-offset: -1px; }
.photos .rm { position: absolute; top: -6px; inset-inline-end: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--label); color: var(--bg); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.photos .rm svg.i { width: 12px; height: 12px; stroke-width: 3.2; }
.photos .rm::after { content: ""; position: absolute; inset: -10px; }
.photos .add { aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; background: var(--fill); color: var(--tint); cursor: pointer; font-size: 12px; font-weight: 500; }

/* ---- Chat ---- */
.chat { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px 0; }
.msg { max-width: 78%; padding: 8px 14px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.3; margin-top: 6px; }
.msg.me { align-self: flex-end; background: var(--tint); color: var(--on-tint); border-end-end-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--card); border-end-start-radius: 6px; }
.msg.ai { background: light-dark(#e9e9eb, var(--card)); }
.msg.same { margin-top: 0; }
.msg.in { animation: pop .32s var(--spring); }
@keyframes pop { from { opacity: 0; translate: 0 8px; scale: .96; } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--label3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
.composer { position: fixed; inset-inline: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 11; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); padding: 8px 12px; box-shadow: 0 -.5px 0 var(--sep); }
.composer > div { max-width: 616px; margin-inline: auto; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 36px; height: 36px; max-height: 120px; border: .5px solid var(--sep); border-radius: 18px; background: var(--card); color: var(--label); font: inherit; padding: 7px 14px; resize: none; line-height: 1.3; }
.composer button { width: 34px; height: 34px; margin-bottom: 1px; border-radius: 50%; background: var(--tint); color: #fff; display: grid; place-items: center; flex: none; transition: scale .2s var(--spring), opacity .15s; }
.composer button svg.i { width: 18px; height: 18px; stroke-width: 2.8; }
.composer button:active { scale: .9; }
main.has-composer { padding-bottom: calc(var(--tabbar) + 76px + env(safe-area-inset-bottom)); }

/* ---- Empty + loading ---- */
.empty { text-align: center; padding: 56px 32px; color: var(--label2); font-size: 15px; }
.empty .orb { width: 72px; height: 72px; border-radius: 22px; background: var(--fill); display: grid; place-items: center; margin: 0 auto 16px; color: var(--label2); }
.empty .orb svg.i { width: 34px; height: 34px; stroke-width: 1.6; }
.empty b { display: block; color: var(--label); font-size: 20px; letter-spacing: -.015em; margin-bottom: 6px; }
.empty .btn { width: auto; display: inline-flex; margin-top: 20px; }
.skel { height: 80px; margin: 0 16px 1px; background: var(--card); position: relative; overflow: hidden; }
.skel:first-child { border-radius: var(--r-card) var(--r-card) 0 0; } .skel:last-child { border-radius: 0 0 var(--r-card) var(--r-card); }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--fill), transparent); translate: -100% 0; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { translate: 100% 0; } }

/* ---- Login ---- */
.login { margin: auto; width: 100%; max-width: 400px; padding: 32px 24px; text-align: center; }
.login img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 10px 30px rgb(0 0 0 / .12), 0 0 0 .5px var(--sep); margin-bottom: 20px; }
.login h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.login .input { margin: 28px 0 12px; text-align: center; }
.login .err { color: var(--red); font-size: 15px; min-height: 22px; margin-bottom: 8px; }

/* ---- Sheets, alerts, toast ---- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity .3s var(--ease); }
.scrim.on { opacity: 1; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 41; max-width: 640px; margin-inline: auto; max-height: calc(100dvh - 24px - env(safe-area-inset-top)); display: flex; flex-direction: column; background: var(--sheet); border-radius: 14px 14px 0 0; translate: 0 100%; transition: translate .5s var(--spring); box-shadow: 0 -10px 40px rgb(0 0 0 / .18); }
.sheet.on { translate: 0 0; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--label3); margin: 6px auto 0; flex: none; }
.sheet .head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 48px; padding-inline: 8px; flex: none; }
.sheet .head b { font-size: 17px; }
.sheet .head .navbtn:last-child { justify-self: end; }
.sheet .body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 calc(24px + env(safe-area-inset-bottom)); }
.sheet .body > .input, .sheet .body > .money { margin-inline: 16px; width: calc(100% - 32px); }
.sheet .body > .btn { margin: 20px 16px 0; width: calc(100% - 32px); }
.alert { position: fixed; z-index: 51; top: 50%; left: 50%; translate: -50% -50%; width: min(300px, 86vw); background: color-mix(in srgb, var(--sheet) 94%, transparent); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-radius: 14px; text-align: center; overflow: hidden; scale: 1.12; opacity: 0; transition: scale .28s var(--spring), opacity .2s var(--ease); }
.alert.on { scale: 1; opacity: 1; }
.alert .txt { padding: 20px 16px 16px; }
.alert .txt b { display: block; font-size: 17px; margin-bottom: 4px; }
.alert .txt p, .alert .txt li { font-size: 13px; line-height: 1.35; }
.alert .acts { display: flex; box-shadow: 0 -.5px 0 var(--sep); }
.alert .acts button { flex: 1; min-height: 44px; color: var(--tint); font-size: 17px; }
.alert .acts button + button { box-shadow: -.5px 0 0 var(--sep); font-weight: 600; }
.alert .acts button.red { color: var(--red); }
.alert .acts button:active { background: var(--fill); }
.scrim.top { z-index: 50; }
.checks { list-style: none; margin: 10px 0 0; padding: 0; text-align: start; }
.checks li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.checks svg.i { width: 16px; height: 16px; stroke-width: 3; margin-top: 1px; }
.checks .ok { color: var(--green); } .checks .no { color: var(--red); }
.checks small { display: block; color: var(--label2); }
#toast { position: fixed; inset-inline: 16px; top: calc(10px + env(safe-area-inset-top)); z-index: 60; margin-inline: auto; width: fit-content; max-width: min(92vw, 480px); display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; border-radius: 999px; background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 8px 30px rgb(0 0 0 / .16), 0 0 0 .5px var(--sep); font-size: 15px; font-weight: 500; opacity: 0; translate: 0 -24px; scale: .94; pointer-events: none; transition: opacity .25s var(--ease), translate .45s var(--spring), scale .45s var(--spring); }
#toast.show { opacity: 1; translate: 0 0; scale: 1; pointer-events: auto; }
#toast:not(:has(button)) { padding-inline-end: 16px; }
#toast button { min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--tint-wash); color: var(--tint); font-weight: 600; font-size: 15px; }
.offline { background: var(--orange-wash); color: var(--orange); text-align: center; padding: calc(6px + env(safe-area-inset-top)) 16px 6px; font-size: 13px; font-weight: 600; }
.log { list-style: none; margin: 0; padding: 0; }

/* ---- Page transitions (push / pop), where supported ---- */
@supports (view-transition-name: none) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .42s; animation-timing-function: var(--spring); }
  html[data-nav="push"]::view-transition-old(root) { animation-name: out-left; } html[data-nav="push"]::view-transition-new(root) { animation-name: in-right; }
  html[data-nav="pop"]::view-transition-old(root) { animation-name: out-right; z-index: 2; } html[data-nav="pop"]::view-transition-new(root) { animation-name: in-left; }
  html[data-nav="tab"]::view-transition-old(root), html[data-nav="tab"]::view-transition-new(root) { animation-duration: .16s; animation-timing-function: linear; }
}
@keyframes in-right { from { translate: 100% 0; } } @keyframes out-left { to { translate: -30% 0; opacity: .6; } }
@keyframes in-left { from { translate: -30% 0; opacity: .6; } } @keyframes out-right { to { translate: 100% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ---- Phone-only bits of the shared nav ---- */
.tabbar .brand { display: none; }
.tabbar.deep { display: none; }
.navbtn.add span { display: none; }
.chev.tinted { color: var(--tint); }

/* ---- Desktop / wide website: sidebar, two-column product page, centered dialogs ---- */
@media (min-width: 900px) {
  :root { --side: 248px; }
  body { font-size: 15px; }
  #app { max-width: none; margin: 0; padding-inline-start: var(--side); }
  #app > .nav, #app > main { width: 100%; max-width: 760px; margin-inline: auto; }
  #app > main:has(.detail) , #app > .nav.inline { max-width: 1080px; }
  .nav { padding-top: 12px; }
  .large { font-size: 30px; margin-top: 8px; }
  main, main.has-cta { padding-bottom: 96px; }
  .tabbar, .tabbar.deep { display: block; inset: 0 auto 0 0; width: var(--side); background: var(--card); backdrop-filter: none; box-shadow: .5px 0 0 var(--sep); padding: 20px 12px; }
  .tabbar > div { flex-direction: column; height: auto; gap: 2px; max-width: none; }
  .tabbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; padding: 0 8px 20px; }
  .tabbar .brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 .5px var(--sep); }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; height: 38px; padding-inline: 10px; border-radius: 9px; font-size: 15px; color: var(--label); }
  .tabbar a svg.i { width: 20px; height: 20px; color: var(--label2); }
  .tabbar a:hover { background: var(--fill); }
  .tabbar a[aria-current="page"] { background: var(--tint-wash); color: var(--tint); font-weight: 600; }
  .tabbar a[aria-current="page"] svg.i { color: var(--tint); }
  .navbtn.add { background: var(--tint); color: var(--on-tint); border-radius: 10px; padding-inline: 14px; min-height: 36px; font-weight: 600; font-size: 15px; gap: 6px; }
  .navbtn.add span { display: inline; } .navbtn.add svg.i { width: 18px; height: 18px; }
  .navbtn:hover { opacity: .75; }
  .cell { min-height: 46px; } button.cell:hover, a.cell:hover { background: color-mix(in srgb, var(--fill) 55%, transparent); }
  .btn:hover:not(:disabled) { background: var(--tint-press); } .btn.gray:hover:not(:disabled) { background: var(--fill-strong); }
  .pill:hover, .option:hover { background: var(--fill-strong); } .option:hover { background: color-mix(in srgb, var(--card) 92%, var(--label)); }
  .seg { max-width: 460px; } .search { max-width: 460px; margin-inline: 16px auto; }
  .options { grid-template-columns: 1fr 1fr; }
  .photos { grid-template-columns: repeat(6, 1fr); }
  .form .btn, .cta .btn, .login .btn { max-width: 320px; }
  .cta { inset-inline-start: var(--side); } .cta > div { max-width: 1048px; display: flex; justify-content: flex-end; }
  .composer { inset-inline-start: var(--side); bottom: 0; } .composer > div { max-width: 728px; }
  main.has-composer { padding-bottom: 96px; } .msg { max-width: 62%; }
  .detail { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 8px; align-items: start; }
  .detail .col-a { position: sticky; top: 64px; }
  .detail .carousel img { width: 100%; }
  .detail .col-b .v { max-width: 62%; }
  .detail .col-b > :first-child { margin-top: 4px; }
  .scrim { backdrop-filter: blur(2px); }
  .sheet { inset: 50% auto auto 50%; width: min(540px, 92vw); max-height: 84vh; border-radius: 16px; translate: -50% -46%; scale: .96; opacity: 0; transition: translate .35s var(--spring), scale .35s var(--spring), opacity .2s var(--ease); }
  .sheet.on { translate: -50% -50%; scale: 1; opacity: 1; }
  .sheet .grab { display: none; } .sheet .head { padding-top: 6px; }
  .alert { width: 340px; } .alert .txt p, .alert .txt li { font-size: 14px; }
  #toast { inset-inline-start: calc(var(--side) + 16px); }
  .offline { margin-inline-start: 0; }
  .empty { padding-block: 96px; }
}

/* ---- Photo manager ---- */
.gallery-edit { display: flex; justify-content: center; margin-top: 10px; }
.gallery-edit .pill { display: inline-flex; align-items: center; gap: 6px; color: var(--tint); font-weight: 500; }
.gallery-edit .pill svg.i { width: 18px; height: 18px; }
.pm { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 10px 16px 0; }
.pm-item { background: var(--card); border-radius: 16px; padding: 8px; }
.pm-item figure { margin: 0; position: relative; aspect-ratio: 1; }
.pm-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; outline: 1px solid var(--img-outline); outline-offset: -1px; }
.pm-item .badge { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--tint); color: #fff; }
.pm-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.pm-acts button { height: 40px; border-radius: 10px; background: var(--fill); color: var(--tint); display: grid; place-items: center; transition: scale .2s var(--spring), background-color .15s; }
.pm-acts button:active:not(:disabled) { scale: .92; background: var(--fill-strong); }
.pm-acts button.red { color: var(--red); }
.pm-acts svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
.pm-add { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 180px; border-radius: 16px; border: 1.5px dashed var(--label3); color: var(--tint); font-size: 15px; font-weight: 500; cursor: pointer; }

/* ---- Site preview: mirrors the shopo.lk product page ---- */
.sp { margin: 6px 16px 0; padding: 16px; border-radius: 16px; background: #fff; color: #10131a; font-size: 15px; line-height: 1.5; letter-spacing: 0; }
.sp-main { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: #f6f7f9; }
.sp-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.sp-thumbs button { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid #e3e6ec; }
.sp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sp-id { display: flex; gap: 12px; margin-top: 14px; font-size: 12px; color: #5c6473; }
.sp-id b { color: #1b4dff; }
.sp-title { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin: 6px 0 8px; }
.sp-lede { color: #454c5a; margin-bottom: 8px; }
.sp-stock { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #12805c; margin-bottom: 12px; }
.sp-stock i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sp-stock.out { color: #b3261e; }
.sp-price { border: 1px solid #e3e6ec; border-radius: 14px; padding: 14px; }
.sp-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.sp-row strong { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.sp-row del { color: #7a8292; }
.sp-save { background: #e8f6ef; color: #12805c; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.sp-price p { font-size: 12px; color: #5c6473; margin-top: 6px; }
.sp-price .sp-pay { font-size: 13px; color: #10131a; font-weight: 600; border-top: 1px solid #e3e6ec; padding-top: 10px; margin-top: 10px; }
.sp-war { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #12805c; font-weight: 600; margin-top: 12px; }
.sp-war svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.sp-btn { margin-top: 14px; height: 50px; border-radius: 12px; background: #1b4dff; color: #fff; font-weight: 700; display: grid; place-items: center; }
.sp h3 { font-size: 16px; margin: 22px 0 8px; }
.sp table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sp th, .sp td { text-align: start; padding: 8px 0; border-top: 1px solid #eceef2; vertical-align: top; }
.sp th { color: #5c6473; font-weight: 500; width: 38%; }
.sp-desc p { margin: 0 0 10px; } .sp-desc ul { margin: 0 0 10px; padding-inline-start: 20px; } .sp-desc h3 { margin-top: 16px; }
@media (min-width: 900px) { .pm { grid-template-columns: repeat(3, 1fr); } .sheet:has(.pm) { width: min(620px, 92vw); } .sheet:has(.sp) { width: min(920px, 94vw); max-height: 90vh; } .sp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 28px; padding: 24px; } .sp-id { margin-top: 0; } .sp-more { grid-column: 1 / -1; } .pm-acts button:hover:not(:disabled) { background: var(--fill-strong); } }

/* ---- Similar products ---- */
.badge.dup { background: var(--red-wash); color: var(--red); }
.cell .lead-icon.ok { background: var(--green); border-radius: 50%; }
.help.ok-text { color: var(--green); font-weight: 500; }
.cell.media .line + .line { font-size: 13px; }

/* ---- iOS switch ---- */
.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; background: var(--fill-strong); flex: none; transition: background-color .25s var(--ease); padding: 0; }
.switch i { position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgb(0 0 0 / .15), 0 1px 1px rgb(0 0 0 / .16); transition: translate .3s var(--spring); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"] i { translate: 20px 0; }
[dir="rtl"] .switch[aria-checked="true"] i { translate: -20px 0; }
.switch::after { content: ""; position: absolute; inset: -7px -4px; }
.sp-desc img { display: block; width: 100%; height: auto; border-radius: 10px; margin: 12px 0; background: #f6f7f9; }

/* ---- Clickable similar rows ---- */
.cell.media .line.open { color: var(--tint); font-weight: 500; font-size: 14px; }

/* ---- "What happens next" (needs-cost page) ---- */
.next { margin: 6px 16px 0; padding: 16px; background: var(--card); border-radius: 20px; }
.next > b { display: block; font-size: 17px; margin-bottom: 12px; }
.next ol { list-style: none; margin: 0; padding: 0; position: relative; }
.next li { display: flex; gap: 12px; padding: 7px 0; position: relative; }
.next li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 11px; top: 32px; bottom: -7px; width: 2px; background: var(--fill-strong); }
.next li.done:not(:last-child)::before { background: var(--green); }
.next .pc-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--label3); display: block; }
.next li.now .pc-dot { box-shadow: 0 0 0 3px var(--tint-wash); background: var(--tint); }
.next li.now .pc-dot i { background: #fff; }
.next li small, .pc-step small { display: block; color: var(--label2); font-size: 13px; line-height: 1.3; }
.next li b, .pc-step b { font-weight: 600; display: block; }
.next li:not(.done):not(.now) b { color: var(--label2); font-weight: 500; }
.pc-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--fill-strong); color: transparent; transition: background-color .3s var(--ease), color .3s var(--ease), scale .45s var(--spring); }
.pc-dot svg.i { width: 14px; height: 14px; stroke-width: 3.4; }
.next li.done .pc-dot { background: var(--green); color: #fff; }

/* ---- Draft creation progress ---- */
.pc { margin: 6px 16px 0; padding: 18px 16px 14px; background: var(--card); border-radius: 20px; overflow: hidden; }
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pc-head b { flex: 1; font-size: 17px; }
.pc-orb { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1b4dff, #8a3dff); animation: orb 2.4s ease-in-out infinite; }
.pc.complete .pc-orb { animation: none; background: var(--green); }
@keyframes orb { 50% { scale: 1.08; box-shadow: 0 0 0 7px rgb(27 77 255 / .12); } }
.pc-clock { color: var(--label2); font-size: 15px; }
.pc-bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-bottom: 14px; }
.pc-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--tint), #8a3dff); transition: width .8s var(--spring); position: relative; overflow: hidden; }
.pc-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .55), transparent); translate: -100% 0; animation: shimmer 1.4s infinite; }
.pc.complete .pc-bar i { background: var(--green); } .pc.complete .pc-bar i::after { animation: none; display: none; }
.pc-steps { list-style: none; margin: 0; padding: 0; }
.pc-step { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; opacity: .45; transition: opacity .4s var(--ease); }
.pc-step.active, .pc-step.done { opacity: 1; }
.pc-step.active .pc-dot { background: transparent; box-shadow: inset 0 0 0 2.5px var(--fill-strong); position: relative; }
.pc-step.active .pc-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid var(--tint); border-inline-end-color: transparent; animation: spin .8s linear infinite; }
.pc-step.done .pc-dot { background: var(--green); color: #fff; animation: pop-dot .5s var(--spring); }
@keyframes pop-dot { from { scale: .5; } 60% { scale: 1.18; } }
.pc-foot { color: var(--label2); font-size: 13px; margin: 10px 0 0; padding-top: 12px; box-shadow: 0 -.5px 0 var(--sep); }
.pc.complete .pc-foot { color: var(--green); font-weight: 600; }
@media (min-width: 900px) { .next, .pc { margin-inline: 0; } .detail .col-b .pc { margin-top: 4px; } }

a.cell.media { color: inherit; }
.next[hidden] { display: none; }

/* ---- Live-product notice inside edit sheets, store list ---- */
.live-note { display: flex; gap: 8px; align-items: center; margin: 4px 16px 12px; padding: 10px 12px; border-radius: 12px; background: var(--orange-wash); color: var(--orange); font-size: 14px; }
.live-note svg.i { width: 18px; height: 18px; }
.badge.live-badge { background: var(--green-wash); color: var(--green); }
.seg.five button { font-size: 12.5px; padding-inline: 2px; }
.seg.five small { display: none; }
@media (min-width: 420px) { .seg.five small { display: inline; } }
