/* Wada Wardrobe — "atelier ink".
   Layout: sticky ink-on-paper top bar with logo and tabs; hero with the model in an arch (the logo's shape);
   planner = numbered control rail + results; arch-topped lookbook photos; ink footer.
   Colors come from the logo (Wada No. 249) — aubergine ink, Hay's Russet accent, Ecru paper. */
:root {
  --bg: #F6F3EF; --surface: #FFFFFF; --surface-2: #EFEAE4; --ink: #2A1F2D; --muted: #6F6470;
  --line: #E2DBD3; --line-strong: #CFC5BB;
  --accent: #793327; --accent-ink: #FFFFFF; --accent-soft: #F3E4DE;
  --blue: #547076; --gold: #D6B43E; --ecru: #C2AE93;
  --ok: #2F6B4F; --ok-soft: #DCEBE2; --fig-line: rgba(42,31,45,.18);
  --stage: #CCBCAD; --topbar: rgba(246,243,239,.86); --panel: #2A1F2D; --panel-ink: #F2EADF; --panel-accent: #E39A85;
  --shadow: 0 1px 2px rgba(42,31,45,.05), 0 8px 24px -12px rgba(42,31,45,.18);
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px; --r-sm: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #17121A; --surface: #211A24; --surface-2: #2B2330; --ink: #F2EADF; --muted: #AFA3AE;
  --line: #3A3040; --line-strong: #4C4053;
  --accent: #E39A85; --accent-ink: #2A1F2D; --accent-soft: #3D2A2A;
  --ok: #8FCFAE; --ok-soft: #1F3329; --fig-line: rgba(255,255,255,.16);
  --topbar: rgba(23,18,26,.86); --panel: #2B2330; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -14px rgba(0,0,0,.6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #17121A; --surface: #211A24; --surface-2: #2B2330; --ink: #F2EADF; --muted: #AFA3AE;
  --line: #3A3040; --line-strong: #4C4053;
  --accent: #E39A85; --accent-ink: #2A1F2D; --accent-soft: #3D2A2A;
  --ok: #8FCFAE; --ok-soft: #1F3329; --fig-line: rgba(255,255,255,.16);
  --topbar: rgba(23,18,26,.86); --panel: #2B2330; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -14px rgba(0,0,0,.6); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--topbar); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo .mark { width: 28px; height: 36px; display: block; }
.logo-text { display: grid; line-height: 1.05; }
.logo-text b { font: italic 500 23px/1 var(--f-display); letter-spacing: -.01em; }
.logo-text small { font: 500 9.5px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.tabs [role="tablist"] { display: flex; gap: 2px; padding: 4px; background: var(--surface-2); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Hero ---------- */
section.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-block: 56px 40px; }
body:not([data-tab="planner"]) section.hero { display: none; }
.hero h1 { font: 500 clamp(40px, 6vw, 76px)/1.02 var(--f-display); letter-spacing: -.02em; margin: 14px 0 0; text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { margin: 18px 0 0; color: var(--muted); font-size: 17px; max-width: 54ch; text-wrap: pretty; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 36px 0 0; border-top: 1px solid var(--line); }
.hero-stats > div { padding: 16px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border-right: 0; margin-right: 0; }
.hero-stats dt { font: 500 10.5px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 4px 0 0; font: 500 34px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.hero-fig { margin: 0; display: grid; justify-items: center; gap: 14px; }
.arch { position: relative; width: min(320px, 100%); padding: 10px; border-radius: 999px 999px 22px 22px; background: linear-gradient(90deg, #793327 0 25%, #D6B43E 25% 50%, #C2AE93 50% 75%, #547076 75%); box-shadow: var(--shadow); }
.hero-stage { position: relative; width: 100%; border-radius: 999px 999px 14px 14px; overflow: hidden; background: var(--stage); }
.hero-stage canvas { display: block; width: 100%; height: auto; }
.hero-stage canvas + canvas { position: absolute; inset: 0; }
.hero-fig figcaption { display: flex; align-items: center; gap: 10px; font: 500 11px var(--f-mono); color: var(--muted); letter-spacing: .04em; text-align: left; max-width: 340px; }
.hero-sw { display: inline-flex; flex: none; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--fig-line); }
.hero-sw i { width: 16px; height: 22px; display: block; }

/* ---------- Type & shared ---------- */
main { padding-block: 32px 80px; }
.eyebrow { font: 500 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
h2 { font: 500 30px/1.12 var(--f-display); margin: 6px 0 0; letter-spacing: -.01em; text-wrap: balance; }
h3 { font: 600 15px var(--f-body); margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 13px 22px; font-weight: 700; font-size: 14px; text-decoration: none; transition: transform .15s, background .2s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: var(--surface); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 13px; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .muted { color: inherit; opacity: .7; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px var(--fig-line); }
.x { border: 0; background: none; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.mini { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; }
.mini:hover { border-color: var(--line-strong); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--accent-soft); color: var(--accent); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.search { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 15px; min-width: 0; width: 230px; max-width: 100%; }
.hexmatch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px 4px 4px; background: var(--surface); font-size: 13px; }
.hexmatch input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; border-radius: 50%; }
.empty { padding: 40px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); text-align: center; background: var(--surface); }

/* ---------- Planner ---------- */
.planner { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 36px; align-items: start; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); display: grid; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; max-height: calc(100vh - 104px); overflow: auto; box-shadow: var(--shadow); counter-reset: step; }
.rail > .field:first-child { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.rail .eyebrow { color: var(--accent); }
.rail h3 { font: 500 20px/1.2 var(--f-display); }
.field { display: grid; gap: 10px; }
.field > label, .field > .lbl { font-weight: 700; font-size: 13px; }
.stepper-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 0; }
.stepper-row + .stepper-row { border-top: 1px solid var(--line); }
.stepper-row small { display: block; color: var(--muted); font-size: 12px; }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 999px; padding: 2px; }
.stepper button { width: 32px; height: 32px; border: 0; background: var(--surface); font-size: 17px; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.stepper button:disabled { opacity: .35; cursor: default; box-shadow: none; background: transparent; }
.stepper output { min-width: 30px; text-align: center; font: 600 14px var(--f-mono); }
.owned { display: grid; gap: 6px; }
.slot { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.slot .role { color: var(--muted); font-size: 12px; }
.slot-btn { display: flex; align-items: center; gap: 8px; border: 1px dashed var(--line-strong); background: none; border-radius: var(--r-sm); padding: 6px 9px; text-align: left; min-width: 0; }
.slot-btn.set { border-style: solid; background: var(--surface-2); }
.slot-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; min-width: 0; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 20px; background: var(--panel); color: var(--panel-ink); overflow: hidden; }
.stat { padding: 22px 22px 20px; border-left: 1px solid rgba(255,255,255,.12); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 500 48px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat b small { color: inherit !important; opacity: .55; }
.stat span { font-size: 12px; opacity: .7; }
.stat.hero b { color: var(--panel-accent); }
.verdict { margin-top: 14px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Shopping list */
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 14px; }
.piece { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; transition: transform .2s, box-shadow .2s; }
.piece:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.piece .sw { height: 110px; position: relative; }
.piece .sw .tag { position: absolute; left: 10px; top: 10px; font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.9); color: #2A1F2D; padding: 3px 8px; border-radius: 999px; }
.piece .meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.piece .name { font: 500 19px/1.2 var(--f-display); }
.piece .uses { font-size: 12px; color: var(--muted); }
.piece .owned-flag { font-size: 11px; color: var(--ok); font-weight: 700; }

/* Matrix */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.matrix { border-collapse: collapse; width: 100%; font-size: 13px; }
.matrix th, .matrix td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.matrix thead th { font-weight: 700; white-space: nowrap; background: var(--surface-2); }
.matrix tr:last-child td, .matrix tr:last-child th { border-bottom: 0; }
.matrix .hd { display: flex; align-items: center; gap: 8px; }
.cell-ok { display: inline-flex; align-items: center; gap: 7px; color: var(--ok); font-weight: 700; }
.cell-no { color: var(--muted); opacity: .6; }
.duo { display: inline-flex; width: 30px; height: 20px; border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--fig-line); }
.duo i { flex: 1; }

/* Lookbook: arch-topped photos, like the logo */
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.look { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; display: grid; grid-template-rows: auto 1fr; overflow: hidden; padding: 8px; transition: transform .2s, box-shadow .2s; }
.look:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.look .stage { background: var(--stage); position: relative; border-radius: 999px 999px 14px 14px; overflow: hidden; }
.look .no { position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; top: auto; right: auto; z-index: 1; font: 500 10.5px var(--f-mono); background: rgba(255,255,255,.9); color: #2A1F2D; padding: 3px 9px; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.look .body { padding: 14px 8px 8px; display: grid; gap: 10px; align-content: start; }
.roles { display: grid; gap: 5px; font-size: 13px; }
.roles div { display: grid; grid-template-columns: 14px 56px 1fr; gap: 8px; align-items: center; }
.roles .dot { width: 14px; height: 14px; }
.roles em { font-style: normal; color: var(--muted); font-size: 12px; }
.look p { margin: 0; font-size: 13px; color: var(--muted); }
.look .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px 6px 12px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.day .photo-fig { width: 100%; border-radius: 999px 999px 10px 10px; overflow: hidden; }
.day b { font-size: 12px; }
.day span { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* ---------- Finder ---------- */
.finder-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 22px; }
.focus { display: flex; gap: 18px; align-items: center; }
.focus .big { width: 80px; height: 100px; border-radius: 999px 999px 12px 12px; box-shadow: inset 0 0 0 1px var(--fig-line); flex: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 18px; scrollbar-width: thin; }
.strip button { flex: none; width: 32px; height: 40px; border-radius: 999px 999px 6px 6px; border: 0; box-shadow: inset 0 0 0 1px var(--fig-line); transition: transform .15s; }
.strip button:hover { transform: translateY(-2px); }
.strip button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Library ---------- */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.sw-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: 92px auto; transition: transform .2s, box-shadow .2s; }
.sw-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sw-card .meta { padding: 11px 12px 12px; display: grid; gap: 3px; }
.sw-card .name { font-weight: 700; font-size: 13px; line-height: 1.3; }
.sw-card .actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* ---------- AI photo stylist ---------- */
.sty { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px; align-items: start; }
.sty-left { display: grid; gap: 12px; }
.drop { display: grid; place-items: center; min-height: 340px; border: 1.5px dashed var(--line-strong); border-radius: 22px; background: var(--surface); cursor: pointer; overflow: hidden; position: relative; transition: border-color .2s, background .2s; }
.drop:hover { border-color: var(--accent); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.tapping { cursor: crosshair; border-style: solid; border-color: var(--accent); }
.drop canvas { width: 100%; height: auto; display: block; }
.drop-empty { display: grid; gap: 6px; text-align: center; padding: 24px; }
.drop-empty b { font: 500 22px var(--f-display); }
.drop-empty span { color: var(--muted); font-size: 13px; }
.progress { height: 32px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; display: flex; align-items: center; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent-soft); transition: width .2s; }
.progress span { position: relative; padding: 0 14px; font-size: 12px; }
.found { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.found .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; }
.match { display: flex; align-items: center; gap: 10px; }
.match .pair { display: flex; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--fig-line); flex: none; }
.match .pair i { width: 34px; height: 42px; }
.match small { display: block; color: var(--muted); font-size: 11px; }
.verdict-box { border-radius: var(--r); padding: 18px 20px; display: grid; gap: 4px; }
.verdict-box.yes { background: var(--ok-soft); color: var(--ok); }
.verdict-box.no { background: var(--accent-soft); color: var(--accent); }
.verdict-box b { font: 500 24px/1.2 var(--f-display); }
.verdict-box span { color: var(--ink); font-size: 14px; }

/* ---------- Photo model ---------- */
.photo-fig { position: relative; background: var(--stage); }
.photo-fig canvas { display: block; width: 100%; height: auto; aspect-ratio: 545 / 1200; }
.look .photo-fig canvas { aspect-ratio: 545 / 917; object-fit: cover; object-position: 50% 0; }
.day .photo-fig canvas { aspect-ratio: 545 / 842; object-fit: cover; object-position: 50% 0; }

/* Zoom: tap any model photo to see the outfit up close (assets/js/zoom.js) */
canvas.model { cursor: zoom-in; }
.zoom-btn { position: absolute; right: 10px; top: 36%; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.9); color: #2A1F2D; box-shadow: 0 2px 8px rgba(42,31,45,.18); opacity: .92; transition: transform .15s, opacity .15s; }
.zoom-btn:hover, .zoom-btn:focus-visible { opacity: 1; transform: scale(1.08); }
.day .zoom-btn { display: none; }
dialog.zoom { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; background: var(--bg); box-shadow: none; overflow: hidden; }
dialog.zoom[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.zoom-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.zoom-info { min-width: 0; display: grid; gap: 6px; }
.zoom-sw { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.zoom-sw span { display: inline-flex; align-items: center; gap: 6px; }
.zoom-sw i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--fig-line); flex: none; }
.zoom-sw b { font-weight: 600; color: var(--muted); }
.zoom-cap { margin: 0; font: 500 11px var(--f-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoom-tools { display: flex; gap: 6px; flex: none; }
.zbtn { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 18px; line-height: 1; }
.zbtn.fit { font-size: 13px; font-weight: 600; }
.zbtn.close { background: var(--ink); color: var(--bg); border-color: var(--ink); font-size: 15px; margin-left: 4px; }
.zbtn:disabled { opacity: .35; cursor: default; }
.zoom-view { position: relative; overflow: hidden; background: var(--stage); touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.zoom-view.zoomed { cursor: grab; }
.zoom-view.zoomed:active { cursor: grabbing; }
.zoom-view canvas { position: absolute; left: 50%; top: 50%; transform-origin: center; will-change: transform; }
.zoom-hint { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(42,31,45,.72); color: #F2EADF; font-size: 12px; white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.zoom-view.zoomed .zoom-hint { opacity: 0; }
@media (max-width: 640px) {
  .zoom-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .zoom-tools { justify-content: flex-end; }
  .zoom-cap { display: none; }
  .zoom-btn { width: 30px; height: 30px; right: 8px; }
}

/* ---------- Picker dialog ---------- */
dialog { border: 1px solid var(--line); border-radius: 22px; padding: 0; background: var(--surface); color: var(--ink); width: min(700px, calc(100vw - 32px)); max-height: min(82vh, 740px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); }
dialog::backdrop { background: rgba(23,18,26,.5); backdrop-filter: blur(3px); }
.dlg { display: grid; grid-template-rows: auto auto 1fr; max-height: min(82vh, 740px); }
.dlg header { padding: 20px 22px 10px; display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.dlg .tools { padding: 0 22px 14px; display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dlg .grid { overflow: auto; padding: 16px 22px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.opt { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 0; overflow: hidden; text-align: left; display: grid; grid-template-rows: 48px auto; }
.opt i { display: block; }
.opt span { padding: 7px 9px; font-size: 12px; line-height: 1.25; }
.opt.hit { outline: 2px solid var(--accent); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 40; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------- Footer ---------- */
.foot { background: #2A1F2D; color: #CDBFC9; font-size: 12.5px; padding-block: 36px 44px; }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: #F2EADF; }
.foot-brand b { font: italic 500 20px var(--f-display); }
.foot p { margin: 0; max-width: 90ch; line-height: 1.6; }
.foot a { color: #F2EADF; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  section.hero { grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; padding-block: 40px 28px; }
}
@media (max-width: 900px) {
  .planner { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .finder-top { grid-template-columns: 1fr; }
  .sty { grid-template-columns: minmax(0, 1fr); }
  .topbar-in { flex-wrap: wrap; gap: 10px; }
  .tabs { width: 100%; }
  .tabs [role="tablist"] { width: 100%; }
  .tab { flex: 1; padding: 8px 10px; }
}
@media (max-width: 640px) {
  section.hero { grid-template-columns: minmax(0, 1fr); padding-block: 28px 12px; }
  .hero-fig { order: -1; }
  .arch { width: 220px; }
  .hero-stats > div { padding-right: 18px; margin-right: 18px; }
  .hero-stats dd { font-size: 28px; }
  .lede { font-size: 15.5px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
  .stat b { font-size: 38px; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .looks { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .found { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .logo-text small { display: none; }
  .tab { font-size: 13px; padding: 8px 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
