:root {
  --ink: #f4f2e9;
  --ink-2: #deddd4;
  --paper: #0e100d;
  --paper-2: #1a1d17;
  --white: #151814;
  --lime: #d7ff3f;
  --lime-dark: #a8ce0d;
  --orange: #ff6339;
  --muted: #a4a89d;
  --line: #34382f;
  --label: #d8d9d1;
  --input-bg: #11140f;
  --panel-bg: rgba(22, 25, 20, .92);
  --panel-solid: #161914;
  --topbar-bg: rgba(14, 16, 13, .9);
  --inverse-bg: #080a07;
  --inverse-text: #f2f0e9;
  --on-accent: #11120f;
  --radius: 18px;
  --shadow: 0 28px 70px rgba(0, 0, 0, .42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: dark;
  font-synthesis: none;
}

:root[data-theme="light"] {
  --ink: #11120f;
  --ink-2: #1a1c18;
  --paper: #f2f0e9;
  --paper-2: #e8e5dc;
  --white: #fffef9;
  --muted: #73756f;
  --line: #d4d2c9;
  --label: #3e403a;
  --input-bg: rgba(255,255,255,.68);
  --panel-bg: rgba(255,255,255,.62);
  --panel-solid: #f8f7f2;
  --topbar-bg: rgba(242,240,233,.9);
  --shadow: 0 28px 70px rgba(13, 14, 11, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { color: var(--ink); background: var(--lime); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; font-size: 1.05rem; font-weight: 900; letter-spacing: -.04em; text-decoration: none; }
.brand-mark { position: relative; display: inline-block; width: 33px; height: 28px; transform: rotate(-4deg); }
.brand-mark i { position: absolute; left: 0; width: 31px; height: 7px; border: 2px solid currentColor; border-radius: 100% 20% 100% 30%; transform: skewX(-25deg); }
.brand-mark i:nth-child(1) { top: 1px; }
.brand-mark i:nth-child(2) { top: 9px; left: 2px; width: 27px; }
.brand-mark i:nth-child(3) { top: 17px; left: 5px; width: 22px; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; padding: 0 18px; font-weight: 800; text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .68; }
.button-primary { color: var(--on-accent); background: var(--lime); }
.button-primary:hover:not(:disabled) { background: #e2ff72; }
.button-secondary { color: var(--inverse-text); background: var(--inverse-bg); }
.button-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.button-ghost:hover { border-color: var(--ink); }
.button-wide { width: 100%; }
.button-small { min-height: 38px; padding: 0 13px; font-size: .8rem; border-radius: 8px; }
.icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 9px; color: inherit; background: transparent; }
.icon-button:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.icon-button.danger { color: #a23926; font-size: 1.5rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner-dark { border-color: rgba(0,0,0,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

label { display: grid; gap: 8px; color: var(--label); font-size: .78rem; font-weight: 800; }
input, select { width: 100%; min-height: 49px; border: 1px solid var(--line); border-radius: 9px; outline: none; padding: 0 14px; color: var(--ink); background: var(--input-bg); transition: border-color .2s, box-shadow .2s; }
input::placeholder { color: #a09f98; }
input:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(215, 255, 63, .45); }
code { padding: 2px 5px; border-radius: 4px; font-family: ui-monospace, monospace; background: var(--paper-2); }
.form-error { min-height: 20px; margin: 0; color: #b33924; font-size: .8rem; font-weight: 700; }

/* Authentication */
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(460px, .88fr) 1.12fr; background: var(--paper); }
.auth-main { display: flex; min-height: 100vh; flex-direction: column; padding: 34px clamp(28px, 5vw, 86px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.auth-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { border: 1px solid var(--line); background: var(--white); }
.private-pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-card { width: 100%; max-width: 470px; margin: auto; padding: 60px 0 35px; }
.eyebrow { display: block; margin-bottom: 17px; color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.auth-card h1 { margin: 0; font-size: clamp(2.7rem, 4.5vw, 4.75rem); font-weight: 900; letter-spacing: -.075em; line-height: .94; }
.auth-card h1 em, .search-hero h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1.4px var(--ink); }
.section-heading h2 em { color: transparent; font-style: normal; -webkit-text-stroke: 1.4px var(--inverse-text); }
.auth-card .lead { max-width: 430px; margin: 24px 0 31px; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.auth-card .lead strong { color: var(--ink); }
.stack-form { display: grid; gap: 18px; }
.stack-form .button { margin-top: 4px; }
.form-row { display: flex; justify-content: space-between; margin-top: -7px; font-size: .76rem; }
.form-row a, .back-link { color: var(--ink); font-weight: 800; }
.back-link { display: inline-block; margin-bottom: 45px; font-size: .8rem; text-decoration: none; }
.invite-note { display: flex; gap: 13px; margin-top: 27px; border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); }
.invite-note > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--ink); background: var(--white); }
.invite-note b { display: block; color: var(--ink); font-size: .78rem; }
.invite-note p { margin: 4px 0 0; font-size: .74rem; line-height: 1.45; }
.auth-foot { display: flex; justify-content: space-between; gap: 16px; margin: 0; color: #999991; font-size: .65rem; letter-spacing: .05em; }
.auth-art { position: relative; min-height: calc(100vh - 24px); overflow: hidden; margin: 12px; border-radius: 22px; color: var(--inverse-text); background: var(--inverse-bg); isolation: isolate; }
.auth-art::before { position: absolute; width: 60vw; height: 60vw; content: ""; top: -23vw; right: -17vw; border: 2px solid rgba(215,255,63,.15); border-radius: 50%; box-shadow: 0 0 0 60px rgba(215,255,63,.025), 0 0 0 130px rgba(215,255,63,.02); }
.auth-art::after { position: absolute; content: ""; inset: 0; z-index: -1; background: radial-gradient(circle at 65% 33%, rgba(215,255,63,.14), transparent 23%), linear-gradient(140deg, transparent 45%, rgba(255,255,255,.025)); }
.art-grid { position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.shoe-orbit { position: absolute; display: grid; border: 1px solid rgba(215,255,63,.6); border-radius: 50%; place-items: center; }
.shoe-orbit::before { width: 74%; height: 28%; content: ""; border: 4px solid var(--lime); border-radius: 75% 24% 65% 35%; transform: rotate(-20deg) skewX(-16deg); box-shadow: inset -23px -8px 0 rgba(215,255,63,.18), 0 18px 35px rgba(0,0,0,.4); }
.shoe-orbit span { position: absolute; top: 9%; right: 15%; color: var(--lime); font-size: .65rem; font-weight: 900; }
.orbit-one { width: min(33vw, 480px); height: min(33vw, 480px); top: 8%; right: 5%; transform: rotate(8deg); }
.orbit-two { width: min(23vw, 330px); height: min(23vw, 330px); right: 42%; bottom: 7%; transform: rotate(-11deg); }
.orbit-two::before { border-color: var(--orange); box-shadow: inset -23px -8px 0 rgba(255,99,57,.17), 0 18px 35px rgba(0,0,0,.4); }
.orbit-two span { color: var(--orange); }
.art-copy { position: absolute; bottom: 8%; left: 7%; z-index: 2; }
.art-copy span { display: block; margin-bottom: 18px; color: var(--lime); font-size: .65rem; font-weight: 900; letter-spacing: .18em; }
.art-copy strong { font-size: clamp(1.8rem, 3vw, 3.5rem); letter-spacing: -.055em; line-height: .96; }
.art-stats { position: absolute; display: flex; top: 5%; left: 6%; gap: 25px; }
.art-stats span { display: flex; align-items: baseline; gap: 6px; color: #9a9d93; font-size: .68rem; text-transform: uppercase; }
.art-stats b { color: var(--inverse-text); font-size: 1.25rem; }
.auth-loading, .success-state, .error-state { display: grid; min-height: 300px; align-content: center; justify-items: start; gap: 12px; }
.success-state > span, .error-state > span { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--lime); font-size: 1.4rem; font-weight: 900; }
.success-state h2, .error-state h2 { margin: 8px 0 0; font-size: 2rem; letter-spacing: -.05em; }
.success-state p, .error-state p { max-width: 400px; margin: 0 0 12px; color: var(--muted); line-height: 1.6; }

/* App shell */
.app-shell { min-height: 100vh; }
.topbar { position: sticky; display: grid; min-height: 76px; grid-template-columns: 1fr auto 1fr; align-items: center; top: 0; z-index: 20; border-bottom: 1px solid var(--line); padding: 0 clamp(20px, 4vw, 68px); background: var(--topbar-bg); backdrop-filter: blur(16px); }
.main-nav { display: flex; align-self: stretch; gap: 26px; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 800; text-decoration: none; }
.main-nav a svg { width: 17px; }
.main-nav a::after { position: absolute; height: 3px; content: ""; right: 50%; bottom: -1px; left: 50%; background: var(--ink); transition: left .2s, right .2s; }
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after { right: 0; left: 0; }
.profile-menu { display: flex; justify-self: end; align-items: center; gap: 10px; }
.profile-menu > div { display: grid; gap: 1px; }
.profile-menu b { font-size: .73rem; }
.profile-menu small { color: var(--muted); font-size: .62rem; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--inverse-text); background: var(--inverse-bg); font-size: .68rem; font-weight: 900; }
.avatar.small { width: 31px; height: 31px; font-size: .6rem; }
.page-content { min-height: calc(100vh - 126px); }
.site-footer { display: grid; max-width: 1400px; grid-template-columns: 1fr auto 1fr; gap: 24px; margin: 0 auto; border-top: 1px solid var(--line); padding: 22px clamp(20px, 4vw, 68px); color: #95968f; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.site-footer span:nth-child(2) { text-align: center; }
.site-footer span:last-child { text-align: right; }

/* Search */
.search-hero { position: relative; overflow: hidden; max-width: 1400px; margin: 0 auto; padding: clamp(70px, 9vw, 125px) clamp(20px, 6vw, 90px) 92px; }
.search-hero::before { position: absolute; width: 480px; height: 480px; content: ""; top: -270px; left: 45%; border: 1px solid rgba(17,18,15,.09); border-radius: 50%; box-shadow: 0 0 0 50px rgba(17,18,15,.018), 0 0 0 110px rgba(17,18,15,.014); }
.search-kicker { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.search-kicker span { width: 26px; height: 2px; background: var(--orange); }
.search-hero h1 { max-width: 800px; margin: 17px 0 20px; font-size: clamp(4rem, 9vw, 8.9rem); font-weight: 950; letter-spacing: -.085em; line-height: .79; }
.search-hero > p { margin: 0 0 33px; color: var(--muted); font-size: .98rem; }
.hero-search { position: relative; display: flex; width: min(830px, calc(100% - 120px)); min-height: 72px; align-items: center; border: 1px solid var(--ink); border-radius: 13px; padding: 7px; background: var(--white); box-shadow: 0 16px 40px rgba(20,20,16,.08); }
.hero-search .search-icon { display: grid; width: 55px; place-items: center; color: var(--muted); }
.hero-search input { min-width: 0; border: 0; padding: 0; font-size: 1.05rem; font-weight: 700; background: transparent; box-shadow: none; }
.hero-search button { display: flex; min-width: 160px; min-height: 56px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 9px; color: var(--on-accent); background: var(--lime); font-size: .78rem; font-weight: 900; }
.quick-searches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .66rem; }
.quick-searches button { border: 0; border-bottom: 1px solid var(--line); padding: 2px 0; color: var(--muted); background: transparent; font-size: .66rem; }
.hero-stamp { position: absolute; display: flex; width: 108px; height: 108px; align-items: center; justify-content: center; gap: 8px; right: 5%; bottom: 19%; border: 1px solid var(--line); border-radius: 50%; transform: rotate(7deg); }
.hero-stamp::after { position: absolute; content: ""; inset: 6px; border: 1px dashed var(--line); border-radius: 50%; }
.hero-stamp span { font-size: 2rem; font-weight: 950; letter-spacing: -.08em; }
.hero-stamp small { font-size: .55rem; font-weight: 800; line-height: 1.05; text-transform: uppercase; }
.empty-search { color: var(--inverse-text); background: var(--inverse-bg); }
.empty-search > * { max-width: 1280px; margin-right: auto; margin-left: auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; padding: 72px 30px 37px; }
.section-heading > span { color: var(--lime); font-size: .62rem; font-weight: 900; letter-spacing: .14em; }
.section-heading h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 5.2rem); letter-spacing: -.07em; line-height: .9; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 30px 80px; }
.steps-grid article { position: relative; min-height: 270px; border-top: 1px solid #44473f; border-right: 1px solid #44473f; padding: 24px 30px; }
.steps-grid article:last-child { border-right: 0; }
.steps-grid article > b { color: #777a70; font-size: .65rem; }
.step-icon { display: grid; width: 54px; height: 54px; margin: 38px 0 25px; place-items: center; border: 1px solid #4e5148; border-radius: 50%; color: var(--lime); }
.steps-grid h3 { margin: 0; font-size: 1.25rem; letter-spacing: -.03em; }
.steps-grid p { max-width: 260px; margin: 9px 0; color: #92958a; font-size: .78rem; line-height: 1.55; }
.searching-panel { display: flex; max-width: 1280px; min-height: 300px; align-items: center; gap: 50px; margin: 0 auto 70px; border-radius: var(--radius); padding: 40px clamp(25px, 7vw, 90px); color: var(--inverse-text); background: var(--inverse-bg); }
.radar { position: relative; display: grid; width: 165px; height: 165px; flex: 0 0 auto; place-items: center; border: 1px solid #44483f; border-radius: 50%; }
.radar::after { position: absolute; width: 50%; height: 50%; content: ""; top: 0; right: 0; border-left: 1px solid var(--lime); transform-origin: bottom left; animation: radar 1.6s linear infinite; background: linear-gradient(35deg, rgba(215,255,63,.18), transparent 60%); }
.radar i { position: absolute; border: 1px solid #34372f; border-radius: 50%; inset: 25px; }
.radar i:nth-child(2) { inset: 51px; }
.radar i:nth-child(3) { width: 6px; height: 6px; inset: auto; border: 0; background: var(--lime); box-shadow: 30px -38px 0 var(--orange), -47px 23px 0 var(--lime); }
.radar span { z-index: 2; color: var(--lime); }
@keyframes radar { to { transform: rotate(360deg); } }
.searching-panel h2 { margin: 0 0 8px; font-size: 2.2rem; letter-spacing: -.05em; }
.searching-panel p { margin: 0; color: #92958b; font-size: .85rem; }
.results-section { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 60px) 90px; }
.results-head { display: flex; align-items: end; justify-content: space-between; border-top: 1px solid var(--line); padding: 35px 0 28px; }
.results-head h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -.055em; }
.result-meta { display: flex; gap: 7px; }
.result-meta span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: .65rem; font-weight: 800; }
.warning-banner { margin-bottom: 24px; border-left: 4px solid var(--orange); padding: 14px 17px; color: #75412f; background: #ffe7dd; font-size: .75rem; line-height: 1.55; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: transform .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-media { position: relative; display: grid; height: 290px; overflow: hidden; place-items: center; background: #e8e7e0; }
.product-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .35s; }
.product-card:hover img { transform: scale(1.035); }
.shop-badge { position: absolute; top: 13px; left: 13px; border-radius: 999px; padding: 6px 9px; color: var(--inverse-text); background: rgba(8,10,7,.9); font-size: .6rem; font-weight: 900; }
.product-placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: space-between; padding: 30px; color: #9a9c94; background: repeating-linear-gradient(135deg, #ecebe5, #ecebe5 13px, #e7e6df 13px, #e7e6df 26px); }
.product-placeholder span { align-self: flex-start; font-size: .65rem; font-weight: 900; }
.product-placeholder b { color: #c5c5bd; font-size: 2rem; letter-spacing: -.08em; line-height: .8; text-align: right; }
.product-info { padding: 19px; }
.product-info h3 { min-height: 45px; margin: 0 0 18px; font-size: .98rem; letter-spacing: -.025em; line-height: 1.35; }
.sizes { min-height: 60px; border-top: 1px solid #e1dfd8; padding-top: 12px; }
.sizes small { display: block; margin-bottom: 7px; color: var(--muted); font-size: .6rem; font-weight: 800; text-transform: uppercase; }
.sizes > div { display: flex; flex-wrap: wrap; gap: 5px; }
.sizes span { border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; font-size: .62rem; font-weight: 700; }
.sizes-unknown { color: #9a9b94; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; border-top: 1px solid #e1dfd8; padding-top: 15px; }
.product-bottom strong { font-size: 1.13rem; letter-spacing: -.035em; }
.product-bottom a { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; color: var(--inverse-text); background: var(--inverse-bg); }
.product-bottom a svg { width: 16px; }
.no-results { display: grid; min-height: 320px; align-content: center; justify-items: center; border: 1px dashed #c1c0b8; border-radius: var(--radius); text-align: center; }
.no-results > span { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 50%; background: var(--paper-2); }
.no-results h3 { margin: 18px 0 4px; }
.no-results p { max-width: 460px; margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

/* Settings */
.admin-page { max-width: 1400px; margin: 0 auto; padding: 58px clamp(20px, 4vw, 60px) 90px; }
.admin-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; }
.admin-header h1 { margin: 0; font-size: clamp(3.1rem, 6vw, 6.4rem); letter-spacing: -.08em; line-height: .9; }
.admin-header p { margin: 18px 0 0; color: var(--muted); }
.admin-label { border: 1px solid var(--ink); border-radius: 999px; padding: 8px 12px; font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-grid article { display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--panel-bg); }
.stat-grid article > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: var(--white); }
.stat-grid div { display: grid; }
.stat-grid b { font-size: 1.35rem; line-height: 1; }
.stat-grid small { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr); gap: 18px; align-items: start; }
.settings-main, .settings-aside { display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-bg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 21px 23px; }
.panel-head > div { display: flex; align-items: center; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 1rem; letter-spacing: -.025em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .67rem; }
.panel-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: var(--inverse-text); background: var(--inverse-bg); }
.panel-icon.lime { color: var(--on-accent); background: var(--lime); }
.panel-icon svg { width: 17px; }
.status-dot { display: flex; align-items: center; gap: 6px; color: #9a5c46; font-size: .61rem; font-weight: 800; }
.status-dot::before { width: 7px; height: 7px; content: ""; border-radius: 50%; background: #c98067; }
.status-dot.online { color: #53701c; }
.status-dot.online::before { background: #80a72e; box-shadow: 0 0 0 3px rgba(128,167,46,.13); }
.settings-form, .shop-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; padding: 24px; }
.field-wide { grid-column: 1 / -1; }
.field-wide > p { margin: -2px 0 0; color: var(--muted); font-size: .66rem; font-weight: 400; }
.form-divider { position: relative; height: 24px; margin-top: 4px; border-bottom: 1px solid var(--line); }
.form-divider span { position: absolute; bottom: -6px; left: 0; padding-right: 10px; color: var(--muted); background: var(--panel-solid); font-size: .58rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.switch-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.switch-row span { display: grid; gap: 3px; }
.switch-row small { color: var(--muted); font-weight: 400; }
.switch-row input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 39px; height: 22px; border-radius: 999px; background: #c8c8c1; transition: background .2s; }
.switch-row i::after { position: absolute; width: 16px; height: 16px; content: ""; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-row input:checked + i { background: var(--lime); }
.switch-row input:checked + i::after { transform: translateX(17px); background: var(--on-accent); }
.form-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 18px; }
.shop-list { padding: 7px 20px 16px; }
.shop-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 14px 3px; }
.shop-row:last-child { border-bottom: 0; }
.shop-monogram { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 11px; color: var(--inverse-text); background: var(--inverse-bg); font-size: .72rem; font-weight: 950; letter-spacing: -.02em; }
.shop-details { min-width: 0; }
.shop-details > div { display: flex; align-items: center; gap: 10px; }
.shop-details h3 { margin: 0; font-size: .8rem; }
.shop-details a { display: block; width: max-content; margin: 3px 0; color: var(--muted); font-size: .66rem; }
.shop-details > small { display: block; overflow: hidden; color: #a0a199; font-family: ui-monospace, monospace; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 4px; }
.panel-empty { display: grid; min-height: 260px; align-content: center; justify-items: center; padding: 35px; text-align: center; }
.panel-empty > span { display: grid; width: 53px; height: 53px; place-items: center; border-radius: 50%; color: var(--ink); background: var(--paper-2); }
.panel-empty h3 { margin: 15px 0 5px; }
.panel-empty p { max-width: 340px; margin: 0 0 15px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.invite-form { display: grid; gap: 14px; padding: 20px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: .68rem; }
.check-row input { width: 17px; min-height: 17px; accent-color: var(--ink); }
.mini-list { border-top: 1px solid var(--line); padding: 16px 20px; }
.mini-list h3 { margin: 0 0 9px; color: var(--muted); font-size: .62rem; text-transform: uppercase; }
.mini-list > div { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; }
.mini-list span { display: grid; min-width: 0; }
.mini-list b { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.mini-list small { color: var(--muted); font-size: .58rem; }
.user-list { padding: 10px 19px 16px; }
.user-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.user-list > div:last-child { border-bottom: 0; }
.user-list span:nth-child(2) { display: grid; min-width: 0; }
.user-list b { font-size: .7rem; }
.user-list small { overflow: hidden; color: var(--muted); font-size: .59rem; text-overflow: ellipsis; }
.user-list em { border-radius: 999px; padding: 5px 7px; color: #71736c; background: var(--paper-2); font-size: .55rem; font-style: normal; font-weight: 800; }

/* Dialogs & feedback */
.dialog-backdrop { position: fixed; display: grid; overflow-y: auto; inset: 0; z-index: 100; place-items: center; padding: 24px; background: rgba(9,10,8,.72); backdrop-filter: blur(8px); }
.dialog { position: relative; width: min(760px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border-radius: 18px; background: var(--paper); box-shadow: 0 35px 100px rgba(0,0,0,.35); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 24px; }
.dialog-head .eyebrow { margin-bottom: 7px; }
.dialog-head h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.05em; }
.dialog-close { position: absolute; top: 18px; right: 18px; z-index: 2; font-size: 1.5rem; }
.shop-form label small { color: var(--muted); }
.selector-help { border-left: 3px solid var(--lime-dark); padding: 10px 13px; color: #66685f; background: #edf2d6; font-size: .7rem; }
.selector-help p { margin: 3px 0 0; line-height: 1.5; }
.invite-dialog { display: grid; width: min(560px, 100%); justify-items: center; padding: 48px 38px 40px; text-align: center; }
.dialog-success { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--lime); }
.invite-dialog h2 { margin: 18px 0 6px; font-size: 2rem; letter-spacing: -.05em; }
.invite-dialog > p { max-width: 430px; margin: 0 0 23px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.invite-dialog > label { width: 100%; text-align: left; }
.copy-field { display: flex; gap: 7px; }
.copy-field input { min-width: 0; font-size: .72rem; }
.invite-dialog > small { margin-top: 12px; color: var(--muted); font-size: .62rem; }
.toast-region { position: fixed; display: grid; right: 20px; bottom: 20px; z-index: 200; gap: 9px; }
.toast { display: flex; width: min(380px, calc(100vw - 40px)); align-items: center; gap: 11px; border-radius: 11px; padding: 13px 16px; color: var(--inverse-text); background: var(--inverse-bg); box-shadow: 0 15px 45px rgba(0,0,0,.25); animation: toast-in .3s ease-out; }
.toast > span { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--lime); font-weight: 900; }
.toast > span svg { width: 14px; }
.toast p { margin: 0; font-size: .75rem; font-weight: 700; line-height: 1.4; }
.toast-error > span { background: var(--orange); }
.toast-out { opacity: 0; transform: translateY(10px); transition: .4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
.page-loading { display: grid; min-height: 70vh; align-content: center; justify-items: center; gap: 12px; }
.page-loading .spinner { color: var(--ink); border-color: #ccc; border-top-color: var(--ink); }
.page-loading p { color: var(--muted); font-size: .75rem; }
.fatal-error { display: grid; min-height: 100vh; align-content: center; justify-items: center; padding: 30px; text-align: center; }
.fatal-error > span { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--orange); font-size: 1.5rem; font-weight: 900; }
.fatal-error h1 { margin-bottom: 5px; }
.fatal-error p { margin: 0 0 18px; color: var(--muted); }

@media (max-width: 1050px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-main { min-height: 100vh; }
  .hero-stamp { display: none; }
  .hero-search { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-aside { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 720px) {
  .topbar { min-height: 68px; grid-template-columns: auto 1fr auto; padding: 0 15px; }
  .topbar .brand > span:last-child { display: none; }
  .main-nav { justify-content: center; gap: 11px; }
  .main-nav a { padding: 0 6px; }
  .profile-menu > div { display: none; }
  .profile-menu { gap: 0; }
  .profile-menu .avatar { width: 31px; height: 31px; }
  .search-hero { padding-top: 60px; padding-bottom: 65px; }
  .search-hero h1 { font-size: clamp(3.7rem, 19vw, 6rem); }
  .hero-search { display: grid; grid-template-columns: 40px 1fr; padding: 7px; }
  .hero-search .search-icon { width: 40px; }
  .hero-search button { grid-column: 1 / -1; min-height: 50px; margin-top: 6px; }
  .quick-searches { display: none; }
  .section-heading { display: block; padding-top: 55px; }
  .section-heading > span { display: block; margin-bottom: 20px; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid article { min-height: 210px; border-right: 0; }
  .step-icon { margin: 28px 0 18px; }
  .searching-panel { display: grid; justify-items: center; margin-right: 15px; margin-left: 15px; text-align: center; }
  .results-head { display: block; }
  .result-meta { margin-top: 14px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-media { height: 320px; }
  .admin-header { display: block; }
  .admin-label { display: inline-block; margin-top: 22px; }
  .stat-grid { grid-template-columns: 1fr; }
  .settings-aside { grid-template-columns: 1fr; }
  .settings-form, .shop-form { grid-template-columns: 1fr; padding: 18px; }
  .settings-form > *, .shop-form > * { grid-column: 1; }
  .panel-head { align-items: flex-start; padding: 18px; }
  .shops-panel .panel-head { display: grid; gap: 14px; }
  .shop-row { grid-template-columns: auto 1fr; }
  .row-actions { grid-column: 2; }
  .site-footer { grid-template-columns: 1fr; gap: 7px; }
  .site-footer span:nth-child(2), .site-footer span:last-child { text-align: left; }
  .dialog-backdrop { padding: 10px; }
  .dialog { max-height: calc(100vh - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
