/* Layout: a responsive marketplace website. Desktop: top nav, sidebar filters, two-column item and form pages. Mobile: compact header, stacked pages, bottom tab bar. */
:root{
  --bg:#f5f6f8; --surface:#ffffff; --ink:#18202b; --muted:#5d6573; --line:#e1e4e9;
  --navy:#1f2a3a; --navy-ink:#ffffff; --accent:#d9730d; --accent-ink:#ffffff; --soft:#eef0f3; --tint:#fdf1e4;
  --good:#1f7a3a; --good-soft:#e5f3ea; --bad:#b3261e;
  --display:"Bricolage Grotesque","Arial Black",Arial,sans-serif;
  --body:"Figtree",Arial,Helvetica,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --max:1180px;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#101419; --surface:#1a2029; --ink:#eef0f3; --muted:#a6adb9; --line:#2c3440;
  --navy:#d3deef; --navy-ink:#101419; --accent:#f08a2b; --accent-ink:#1a1208; --soft:#232a35; --tint:#33261a;
  --good:#5cc27c; --good-soft:#18301f; --bad:#f08178; color-scheme:dark }}
:root[data-theme="dark"]{
  --bg:#101419; --surface:#1a2029; --ink:#eef0f3; --muted:#a6adb9; --line:#2c3440;
  --navy:#d3deef; --navy-ink:#101419; --accent:#f08a2b; --accent-ink:#1a1208; --soft:#232a35; --tint:#33261a;
  --good:#5cc27c; --good-soft:#18301f; --bad:#f08178; color-scheme:dark }
*{box-sizing:border-box}
[hidden]{display:none!important}
body{background:var(--bg);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.5;margin:0}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:30;background:var(--surface)}
.wrap{max-width:var(--max);margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1,h2,h3{font-family:var(--display);color:var(--navy);margin:0;line-height:1.08;text-wrap:balance}
h1{font-size:clamp(32px,5vw,56px);font-weight:800;letter-spacing:-.01em}
h2{font-size:clamp(24px,3vw,32px);font-weight:800}
h3{font-size:18px;font-weight:600}
p{margin:0}
.muted{color:var(--muted)} .tiny{color:var(--muted);font-size:13px}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
/* header */
.hdr{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:var(--surface);border-bottom:1px solid var(--line)}
.hdr .wrap{display:flex;align-items:center;gap:24px;height:64px}
.logo{font-family:var(--display);font-weight:800;font-size:24px;color:var(--navy);text-decoration:none;flex:none}
.logo span{color:var(--accent)}
.topnav{display:flex;gap:4px;flex:1}
.topnav a{color:var(--ink);text-decoration:none;font-weight:600;padding:8px 12px;border-radius:10px}
.topnav a:hover{background:var(--soft)}
.topnav a[aria-current="page"]{color:var(--accent)}
.hright{display:flex;align-items:center;gap:8px}
.pill{font-size:12px;font-weight:700;padding:5px 10px;border-radius:999px;background:var(--soft);color:var(--navy);white-space:nowrap;border:0;font-family:var(--body)}
.pill.accent{background:var(--tint);color:var(--accent)}
.pill.good{background:var(--good-soft);color:var(--good)}
button.pill{cursor:pointer}
.tabbar{display:none}
@media (max-width:820px){
  .topnav{display:none}
  .hdr .wrap{height:56px;gap:12px;justify-content:space-between}
  .tabbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--surface);border-top:1px solid var(--line);
    padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
  .tabbar a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px 10px;color:var(--muted);text-decoration:none;font-size:11px;font-weight:700}
  .tabbar a svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .tabbar a[aria-current="page"]{color:var(--accent)}
  main{padding-bottom:84px}
}
main{display:block}
.page{padding-block:32px 56px;display:flex;flex-direction:column;gap:28px}
@media (max-width:820px){.page{padding-block:20px 32px;gap:20px}}
/* buttons + inputs */
.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:13px 20px;border-radius:12px;font:700 16px var(--body);cursor:pointer;border:2px solid transparent;text-decoration:none;white-space:nowrap}
.btn.block{width:100%}
.btn.primary{background:var(--accent);color:var(--accent-ink)}
.btn.dark{background:var(--navy);color:var(--navy-ink)}
.btn.outline{background:transparent;color:var(--navy);border-color:var(--navy)}
.btn.soft{background:var(--soft);color:var(--navy)}
:is(.btn,.chip,.card,input,select,textarea,.logo,.topnav a,.tabbar a,.opt,.pill,.link,summary):focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.link{background:none;border:0;padding:0;color:var(--accent);font:700 15px var(--body);cursor:pointer;text-decoration:underline}
input,select,textarea{font:16px var(--body);padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);width:100%}
textarea{min-height:96px;resize:vertical}
label.f{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:14px;color:var(--navy)}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{border:1px solid var(--line);background:var(--surface);color:var(--navy);border-radius:999px;padding:7px 12px;font:14px var(--body);cursor:pointer;white-space:nowrap}
.chip[aria-pressed="true"]{background:var(--navy);color:var(--navy-ink);border-color:var(--navy)}
/* hero */
.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:40px;align-items:center}
.hero-copy{display:flex;flex-direction:column;gap:18px}
.hero-copy .lead{font-size:19px;color:var(--muted);max-width:34em}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap}
.trust{display:flex;gap:8px;flex-wrap:wrap}
.collage{display:grid;grid-template-columns:1.3fr 1fr;grid-template-rows:1fr 1fr;gap:12px;height:420px}
.collage img{width:100%;height:100%;object-fit:cover;border-radius:18px;max-width:100%}
.collage img:first-child{grid-row:span 2}
@media (max-width:820px){.hero{grid-template-columns:1fr;gap:20px}.collage{height:240px}.hero-copy .lead{font-size:17px}}
/* sections */
.section{display:flex;flex-direction:column;gap:18px}
.sec-head{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap}
.cols3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.cols2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
@media (max-width:820px){.cols3,.cols2{grid-template-columns:1fr}}
.box{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:10px;min-width:0}
.box.tint{background:var(--tint);border-color:transparent}
.box.good{background:var(--good-soft);border-color:transparent}
.box.dark{background:var(--navy);border-color:transparent;color:var(--navy-ink)}
.box.dark h2,.box.dark h3{color:var(--navy-ink)}
.box.dark .muted{color:var(--navy-ink);opacity:.8}
.step{display:flex;gap:12px;align-items:flex-start}
.num{flex:none;width:30px;height:30px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-weight:800;display:flex;align-items:center;justify-content:center}
/* listings */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
@media (max-width:520px){.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:0;display:flex;flex-direction:column;cursor:pointer;text-align:left;font:inherit;color:inherit;position:relative;overflow:hidden}
.card:hover{border-color:var(--muted)}
.card .meta{padding:10px 12px 12px;display:flex;flex-direction:column;gap:2px}
.thumb{aspect-ratio:4/3;max-width:100%;width:100%;background:var(--soft);display:flex;align-items:center;justify-content:center;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb svg{width:40%;height:auto;stroke:var(--muted);fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.price{font-weight:800;font-variant-numeric:tabular-nums;font-size:17px}
.badge{position:absolute;top:10px;left:10px;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px;background:var(--surface);color:var(--navy);border:1px solid var(--line)}
.badge.sold{background:var(--navy);color:var(--navy-ink);border-color:var(--navy)}
/* shop layout */
.shop{display:grid;grid-template-columns:240px minmax(0,1fr);gap:28px;align-items:start}
.filters{display:flex;flex-direction:column;gap:18px;position:sticky;top:88px}
.filters h3{font-size:15px}
.fgroup{display:flex;flex-direction:column;gap:8px}
.check{display:flex;gap:8px;align-items:center;font-size:15px;cursor:pointer}
.check input{width:auto}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.toolbar input{flex:1;min-width:200px}
.toolbar select{width:auto}
.ftoggle{display:none}
@media (max-width:820px){.shop{grid-template-columns:1fr}.filters{position:static;display:none;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px}.filters.open{display:flex}.ftoggle{display:inline-flex}}
/* item / two-column pages */
.two{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:32px;align-items:start}
.two.even{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.sticky{position:sticky;top:88px}
.itemgrid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);grid-template-areas:"photo buy" "about buy";gap:16px 32px;align-items:start}
.g-photo{grid-area:photo;display:flex;flex-direction:column;gap:8px;min-width:0}.g-about{grid-area:about}.g-buy{grid-area:buy}
@media (max-width:820px){.itemgrid{grid-template-columns:1fr;grid-template-areas:"photo" "buy" "about";gap:16px}}
@media (max-width:820px){.two,.two.even{grid-template-columns:1fr;gap:20px}.sticky{position:static}}
.gallery{border-radius:20px;overflow:hidden;background:var(--soft);aspect-ratio:4/3;max-width:100%;display:flex;align-items:center;justify-content:center}
.gallery img{width:100%;height:100%;object-fit:cover}
.gallery svg{width:30%;stroke:var(--muted);fill:none;stroke-width:2.2}
.crumbs{font-size:14px;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap}
.crumbs a{color:var(--muted)}
.row{display:flex;justify-content:space-between;gap:12px;font-variant-numeric:tabular-nums;padding:9px 0;border-bottom:1px solid var(--line)}
.row.total{border-bottom:0;font-weight:800;font-size:19px}
.row .k{color:var(--muted)}
.seller{display:flex;gap:12px;align-items:center}
.av{width:42px;height:42px;border-radius:50%;background:var(--soft);display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--navy);flex:none}
.ok{color:var(--good);font-weight:700;font-size:14px}
.opts{display:flex;flex-direction:column;gap:8px}
.opt{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:14px;cursor:pointer;background:var(--surface);text-align:left;font:inherit;color:inherit;width:100%}
.opt[aria-checked="true"]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.radio{width:18px;height:18px;border-radius:50%;border:2px solid var(--muted);flex:none;margin-top:3px}
.opt[aria-checked="true"] .radio{border:5px solid var(--accent)}
.opt .grow{flex:1;min-width:0}
.sizes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.sizes .opt{flex-direction:column;gap:2px}
@media (max-width:820px){.sizes{grid-template-columns:repeat(2,minmax(0,1fr))}}
.specs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.specs div{background:var(--soft);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column}
.specs b{color:var(--navy)}
@media (max-width:520px){.specs{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* misc */
.steps{display:flex;flex-direction:column}
.st{display:flex;gap:12px;align-items:flex-start;padding:9px 0}
.st .d{width:26px;height:26px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;background:var(--soft);color:var(--muted)}
.st.done .d{background:var(--good);color:var(--surface)}
.st.now .d{background:var(--accent);color:var(--accent-ink)}
canvas.qr{width:132px;height:132px;border-radius:8px;background:#ffffff;flex:none}
.qrbox{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.code{font-family:var(--mono);font-size:24px;letter-spacing:.08em;color:var(--navy)}
input[type=range]{padding:0;accent-color:var(--accent)}
.bars{display:flex;flex-direction:column;gap:8px}
.bar{display:grid;grid-template-columns:130px 1fr 64px;gap:10px;align-items:center;font-size:14px}
.bar .track{height:12px;border-radius:999px;background:var(--soft);overflow:hidden}
.bar .fill{height:100%;border-radius:999px;background:var(--accent)}
.bar .fill.alt{background:var(--muted)}
.bar b{text-align:right;font-variant-numeric:tabular-nums}
.tablewrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:13px;color:var(--muted);font-weight:700}
.list{display:flex;flex-direction:column;gap:10px}
.li{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;cursor:pointer;background:var(--surface);text-align:left;font:inherit;color:inherit;width:100%}
.li .thumb{width:72px;flex:none;border-radius:10px}
.li .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.empty{color:var(--muted);font-size:15px;padding:14px;border:1px dashed var(--line);border-radius:12px}
.photo{border:2px dashed var(--line);border-radius:16px;min-height:160px;display:flex;align-items:center;justify-content:center;color:var(--muted);cursor:pointer;overflow:hidden;position:relative;background:var(--surface)}
.photo img{width:100%;height:220px;object-fit:cover}
.photo input{position:absolute;inset:0;opacity:0;cursor:pointer}
.err{color:var(--bad);font-size:14px}
.inbox{background:var(--soft);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:4px}
.narrow{max-width:460px;margin:0 auto;width:100%}
details.box summary{cursor:pointer;font-weight:700;color:var(--navy)}
footer{border-top:1px solid var(--line);background:var(--surface)}
footer .wrap{padding-block:28px;display:flex;flex-direction:column;gap:8px}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--navy);color:var(--navy-ink);padding:11px 18px;border-radius:12px;font-weight:700;font-size:15px;z-index:40;max-width:calc(100% - 32px)}
@media (max-width:820px){.toast{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
.guide-btn{position:fixed;right:max(20px,env(safe-area-inset-right,0px));bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:25}
.guide{position:fixed;right:max(20px,env(safe-area-inset-right,0px));bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:25;width:min(340px,calc(100% - 32px));box-shadow:0 12px 40px rgba(0,0,0,.18)}
.guide ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:15px}
.guide a{color:var(--accent);font-weight:700}
@media (max-width:820px){.guide-btn{display:none}.guide{top:calc(64px + env(safe-area-inset-top,0px));bottom:auto;right:max(16px,env(safe-area-inset-right,0px))}}
@media (prefers-reduced-motion:no-preference){.page{animation:in .2s ease-out}@keyframes in{from{transform:translateY(6px)}to{transform:none}}}
