/* ============ Tokens ============ */
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --surface-3: #e6e0d6;
  --text: #141414;
  --muted: #7a756d;
  --line: #e4dfd6;
  --accent: #141414;
  --accent-contrast: #ffffff;
  --heart: #d0473a;
  --ok: #3a7d44;
  --warn: #c07a12;
  --danger: #c0392b;
  --board: #ffffff;
  --tile: #ffffff;
  --shadow: 0 1px 2px rgba(20,20,20,.05), 0 8px 24px rgba(20,20,20,.07);
  --shadow-lg: 0 -8px 40px rgba(0,0,0,.18);
  --radius: 18px;
  --radius-sm: 12px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e; --surface: #1a1a1a; --surface-2: #232323; --surface-3: #2e2e2e;
    --text: #f3f0ea; --muted: #9a958c; --line: #2c2c2c;
    --accent: #f3f0ea; --accent-contrast: #111111; --board: #1f1d1a; --tile: #24221f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e0e; --surface: #1a1a1a; --surface-2: #232323; --surface-3: #2e2e2e;
  --text: #f3f0ea; --muted: #9a958c; --line: #2c2c2c;
  --accent: #f3f0ea; --accent-contrast: #111111; --board: #1f1d1a; --tile: #24221f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-size: 16px; } /* verhindert iOS-Zoom */
[hidden] { display: none !important; }
.svg-i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.svg-i.fill { fill: currentColor; stroke: none; }

#view {
  padding: calc(var(--safe-t) + 8px) 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  max-width: 760px; margin: 0 auto; outline: none; min-height: 100dvh;
}
#view.no-tabbar { padding-bottom: calc(var(--safe-b) + 110px); }

/* ============ Tabbar ============ */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
#tabbar.hide { display: none; }
#tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--muted); padding: 6px 0; }
#tabbar a.active { color: var(--text); }
#tabbar a.active .svg-i { stroke-width: 2.2; }
#tabbar .tab-center { align-self: center; }
#tabbar .tab-center .ti {
  width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.22); transform: translateY(-6px);
  transition: transform .15s ease;
}
#tabbar .tab-center:active .ti { transform: translateY(-6px) scale(.94); }
#tabbar .tab-center .svg-i { width: 26px; height: 26px; }

/* ============ Header ============ */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-bottom: 4px; }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 4px; }
.topbar .title-sm { font-weight: 600; font-size: 17px; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.big-title { font-family: var(--serif); font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -.5px; margin: 4px 0 2px; }
.subtitle { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.section-title h2 { font-family: var(--serif); font-size: 22px; margin: 0; font-weight: 600; }
.section-title a, .section-title button { font-size: 14px; color: var(--muted); }

/* ============ Buttons ============ */
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); flex: none; position: relative; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.filled { background: var(--surface); box-shadow: var(--shadow); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--heart); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: var(--accent-contrast); transition: transform .1s ease, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn .svg-i { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.link-btn { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ============ Chips ============ */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin: 0 -16px; scroll-padding: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--text);
}
.chip.on { background: var(--accent); color: var(--accent-contrast); box-shadow: none; }
.chip .count { opacity: .55; font-size: 12px; }
.chip .sw { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

.swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); display: inline-block; flex: none; }
.swatch.pattern, .sw.pattern { background: conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c) !important; }

/* ============ Cards & grid ============ */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } .grid.two { grid-template-columns: repeat(3, 1fr); } }

.tile { position: relative; border-radius: var(--radius-sm); background: transparent; overflow: hidden; aspect-ratio: 1 / 1.15; display: block; }
.tile:active { background: var(--surface-2); }
.tile .img { position: absolute; inset: 4px 4px 24px; display: grid; place-items: center; }
.tile .img img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)) drop-shadow(0 5px 8px rgba(0,0,0,.10)); }
.tile .lbl { position: absolute; left: 8px; right: 8px; bottom: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .fav { position: absolute; top: 6px; right: 6px; color: var(--heart); }
.tile .fav .svg-i { width: 16px; height: 16px; }
.tile .sel { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.tile.selected { box-shadow: 0 0 0 2.5px var(--accent); }
.tile.selected .sel { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.tile .sel .svg-i { width: 14px; height: 14px; stroke-width: 3; }
.tile .badge { position: absolute; top: 6px; left: 6px; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

.otile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--board); aspect-ratio: 4 / 5; box-shadow: var(--shadow); display: block; }
.otile img { width: 100%; height: 100%; object-fit: cover; }
.otile .lbl { position: absolute; left: 10px; bottom: 8px; right: 34px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #222; }
.otile .fav { position: absolute; right: 8px; bottom: 6px; color: var(--heart); }
.otile .fav .svg-i { width: 18px; height: 18px; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x mandatory; scroll-padding: 16px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; scroll-snap-align: start; }
.hscroll .tile { width: 112px; }
.hscroll .otile { width: 150px; }

/* ============ Empty states ============ */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ill { width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 14px; color: var(--text); }
.empty .ill .svg-i { width: 38px; height: 38px; stroke-width: 1.4; }
.empty h3 { color: var(--text); font-family: var(--serif); font-size: 22px; margin: 0 0 6px; }
.empty p { margin: 0 auto 18px; max-width: 300px; font-size: 15px; }

/* ============ Search ============ */
.search { position: relative; margin: 8px 0 12px; }
.search input { width: 100%; height: 42px; border-radius: 12px; border: 0; background: var(--surface-2); padding: 0 40px 0 40px; outline: none; }
.search .svg-i { position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; color: var(--muted); }
.search .clear { position: absolute; right: 6px; top: 5px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }

.segmented { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; margin: 6px 0 12px; }
.segmented button { flex: 1; height: 34px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 10px; font-size: 13px; color: var(--muted); }

/* ============ Forms ============ */
.field { margin-bottom: 16px; }
.field > label, .field .label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .4px; }
.input, .field input:not([type=checkbox]):not([type=range]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  padding: 10px 14px; outline: none; -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=date] { min-width: 0; }
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: .2s; }
.toggle span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.toggle input:checked + span { background: var(--ok); }
.toggle input:checked + span::before { transform: translateX(20px); }

/* ============ List ============ */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list .row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 54px; width: 100%; text-align: left; }
.list .row + .row { border-top: 1px solid var(--line); }
.list .row .grow { flex: 1; min-width: 0; }
.list .row .t { font-weight: 500; }
.list .row .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .row .v { color: var(--muted); font-size: 14px; }
.list .row .chev { color: var(--muted); width: 18px; height: 18px; }
.list .row.danger { color: var(--danger); }
.list .row .thumb { width: 44px; height: 44px; border-radius: 10px; background: var(--tile); display: grid; place-items: center; overflow: hidden; flex: none; }
.list .row .thumb img { max-width: 86%; max-height: 86%; object-fit: contain; }
.list .row .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.list .row .ico .svg-i { width: 19px; height: 19px; }
.list-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; margin: 22px 4px 8px; }

/* ============ Sheet ============ */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.38); z-index: 90; opacity: 0; transition: opacity .25s ease; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-width: 760px; margin: 0 auto; padding-bottom: var(--safe-b);
}
.sheet.open { transform: translateY(0); }
.sheet.sheet-full { height: 92dvh; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 8px auto 2px; flex: none; touch-action: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 6px 20px; flex: none; touch-action: none; }
.sheet-head h3 { margin: 0; font-size: 18px; font-weight: 650; }
.sheet-body { overflow-y: auto; padding: 6px 16px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.sheet-msg { text-align: center; color: var(--muted); margin: 6px 6px 16px; }
.sheet-msg strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px);
  background: var(--accent); color: var(--accent-contrast); padding: 12px 18px; border-radius: 14px; z-index: 200;
  font-size: 14.5px; font-weight: 500; opacity: 0; transition: .25s ease; display: flex; gap: 14px; align-items: center;
  max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast button { font-weight: 700; text-decoration: underline; color: inherit; }

/* ============ Item detail ============ */
.hero { background: var(--tile); border-radius: 24px; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 26px; box-shadow: var(--shadow); position: relative; }
.hero img { position: absolute; inset: 26px; margin: auto; max-width: calc(100% - 52px); max-height: calc(100% - 52px); object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.14)) drop-shadow(0 14px 22px rgba(0,0,0,.14)); }
.hero .fav-btn { position: absolute; right: 12px; top: 12px; }
.detail-name { font-family: var(--serif); font-size: 28px; margin: 18px 0 2px; line-height: 1.15; }
.detail-meta { color: var(--muted); font-size: 15px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.kv > div { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.kv b { display: block; font-size: 20px; font-weight: 650; }
.kv span { font-size: 12px; color: var(--muted); }
.props { margin-top: 6px; }
.props .row .t { color: var(--muted); font-weight: 400; flex: none; width: 110px; }
.props .row .grow { text-align: right; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; align-items: center; }

.sticky-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(var(--safe-b) + 12px);
  background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; gap: 10px; max-width: 760px; margin: 0 auto;
}
.sticky-actions > .btn { flex: 1; }

/* ============ Editor ============ */
.photo-stage.sticker { background: var(--board); }
.photo-stage {
  position: relative; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  background-color: var(--surface); box-shadow: var(--shadow);
}
.photo-stage.checker {
  background-image: linear-gradient(45deg, var(--surface-2) 25%, transparent 25%), linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--surface-2) 75%), linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
  background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.photo-stage > img, .photo-stage > canvas { position: absolute; inset: 0; margin: auto; max-width: 86%; max-height: 86%; width: auto !important; height: auto; object-fit: contain; }
.photo-stage .ph { text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 20px; }
.photo-stage .ph > .svg-i { width: 44px; height: 44px; stroke-width: 1.3; color: var(--text); }
.photo-stage .busy { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.photo-tools { display: flex; gap: 8px; margin: 12px 0 18px; flex-wrap: wrap; }
.photo-tools .btn { flex: 1 1 auto; }
.bg-panel { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 18px; }
.bg-panel .r { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bg-panel .r + .r { margin-top: 10px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--text); animation: spin .8s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Board (collage) ============ */
.board { position: relative; width: 100%; aspect-ratio: 4 / 5; background: var(--board); border-radius: 22px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: var(--shadow); }
.board .layer { position: absolute; transform-origin: center center; will-change: transform; }
.board .layer img { width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.14)) drop-shadow(0 8px 14px rgba(0,0,0,.12)); }
.board .layer.sel::after { content: ""; position: absolute; inset: -6px; border: 1.5px dashed var(--text); border-radius: 8px; opacity: .55; pointer-events: none; }
.board .board-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px; font-size: 15px; }
.board.static { touch-action: auto; }
.board-tools { display: flex; justify-content: center; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.board-tools .icon-btn { background: var(--surface); box-shadow: var(--shadow); }
.board-tools .icon-btn:disabled { opacity: .35; }
.bg-swatches { display: flex; gap: 10px; justify-content: center; margin: 4px 0 12px; }
.bg-swatches button { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.builder-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px calc(var(--safe-b) + 10px); background: #141414; max-width: 760px; margin: 0 auto; }
.builder-bar button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 12px; background: #3a3a3a; color: #fff; font-size: 12.5px; font-weight: 500; }
.builder-bar button.on { background: #fff; color: #141414; }
.builder-bar .svg-i { width: 22px; height: 22px; }
.bg-swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }

/* ============ Stylist ============ */
.weather-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }
.weather-pill .svg-i { width: 20px; height: 20px; }
.stylist-card { position: relative; touch-action: pan-y; transition: transform .25s ease, opacity .25s ease; }
.stylist-card.swipe-l { transform: translateX(-120%) rotate(-8deg); opacity: 0; }
.stylist-card.swipe-r { transform: translateX(120%) rotate(8deg); opacity: 0; }
.harmony { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 12px 0 4px; font-size: 14px; color: var(--muted); flex-wrap: wrap; text-align: center; }
.harmony b { color: var(--text); }
.slot-list { margin-top: 12px; }
.slot-list .row .act { display: flex; gap: 2px; }
.slot-list .row .act .icon-btn { width: 36px; height: 36px; }
.slot-list .row .act .icon-btn.on { background: var(--accent); color: var(--accent-contrast); }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.big-actions .btn { height: 52px; }

/* ============ Today ============ */
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.weather-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin: 14px 0 6px; }
.weather-card .temp { font-size: 34px; font-weight: 300; letter-spacing: -1px; }
.weather-card .wi { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; }
.weather-card .wi .svg-i { width: 28px; height: 28px; }
.weather-card .info { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); }
.weather-card .info b { color: var(--text); font-size: 15px; display: block; }
.today-outfit { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: center; }
.today-outfit .board { border-radius: 18px; }
.today-outfit .meta h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 6px; line-height: 1.15; }
.today-outfit .meta p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.today-outfit .meta .btn { width: 100%; margin-bottom: 8px; }
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-strip > a, .stats-strip > div { background: var(--surface); border-radius: 16px; padding: 14px 12px; box-shadow: var(--shadow); }
.stats-strip b { display: block; font-size: 22px; font-weight: 650; }
.stats-strip span { font-size: 12.5px; color: var(--muted); }
.worn-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.worn-badge .svg-i { width: 18px; height: 18px; stroke-width: 2.5; }

.onboard { background: var(--surface); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); margin-top: 16px; }
.onboard h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; line-height: 1.15; }
.onboard p { color: var(--muted); margin: 0 0 16px; }
.steps { list-style: none; padding: 0; margin: 0 0 18px; counter-reset: s; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: 15px; }
.steps li::before { counter-increment: s; content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* ============ Planner ============ */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 8px; }
.cal-head h2 { font-family: var(--serif); font-size: 22px; margin: 0; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.cal .day { position: relative; aspect-ratio: 4 / 5.4; border-radius: 10px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; align-items: center; padding-top: 3px; font-size: 12px; font-weight: 600; }
.cal .day.out { background: transparent; color: var(--muted); opacity: .5; }
.cal .day.today .n { background: var(--accent); color: var(--accent-contrast); border-radius: 999px; padding: 0 6px; }
.cal .day img { position: absolute; inset: 18px 2px 2px; width: calc(100% - 4px); height: calc(100% - 20px); object-fit: cover; border-radius: 7px; }
.cal .day .worn { position: absolute; bottom: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; z-index: 2; }
.cal .day .worn .svg-i { width: 10px; height: 10px; stroke-width: 3.5; }
.cal .day .wx { font-size: 10px; font-weight: 500; color: var(--muted); margin-top: auto; margin-bottom: 4px; }
.cal .day .dotm { width: 5px; height: 5px; border-radius: 50%; background: var(--text); margin-top: 6px; }
.week-list .row .date { width: 44px; text-align: center; flex: none; }
.week-list .row .date b { display: block; font-size: 19px; line-height: 1; }
.week-list .row .date span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.week-list .row .ot { width: 44px; height: 55px; border-radius: 8px; overflow: hidden; background: var(--board); flex: none; }
.week-list .row .ot img { width: 100%; height: 100%; object-fit: cover; }

/* ============ Stats ============ */
.bars .bar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; font-size: 13.5px; margin: 8px 0; }
.bars .bar .track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bars .bar .fill { height: 100%; border-radius: 6px; background: var(--text); }
.bars .bar .n { text-align: right; color: var(--muted); }
.colorbar { display: flex; height: 26px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.colorbar > div { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 130px; }
.months > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11.5px; color: var(--muted); gap: 4px; }
.months .col { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: var(--text); min-height: 3px; }
.months b { color: var(--text); font-size: 12px; }

/* ============ Trips ============ */
.progress { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin: 8px 0 4px; }
.progress > div { height: 100%; background: var(--ok); border-radius: 5px; transition: width .3s; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check .svg-i { width: 15px; height: 15px; stroke-width: 3; }
.row.done .t { text-decoration: line-through; color: var(--muted); }

/* ============ Picker ============ */
.picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .picker-grid { grid-template-columns: repeat(4, 1fr); } }
.picker-grid .tile { aspect-ratio: 1 / 1; background: var(--surface); }
.picker-grid .tile .img { inset: 8px; }

.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.color-pick button .swatch { width: 22px; height: 22px; }
.color-pick button.on { box-shadow: inset 0 0 0 2px var(--text); font-weight: 600; }

.rec-box { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 16px; padding: 12px 14px; margin-bottom: 18px; box-shadow: var(--shadow); }
.rec-box > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.rec-box.ok .svg-i { color: var(--ok); }
.spinner.sm { width: 20px; height: 20px; border-width: 2.5px; margin: 0; flex: none; }
.stage-badge { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); }
.btn .spinner.sm { border-color: rgba(127,127,127,.35); border-top-color: currentColor; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.small { font-size: 13px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
