/* 穿搭衣櫃 v1.0 — Nora-OS Borderless Frosted-Glass Shell (Seoul Clean Fit Oat & Charcoal + Washed Denim) */
:root {
  font-family: "DM Sans", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: light;
  --ink: #1b2028;
  --muted: #5c6673;
  --accent: #3a5c7e;
  --accent-hover: #2d4965;
  --accent-ink: #274461;
  --accent-soft: rgba(58, 92, 126, 0.13);
  --good-bg: rgba(34, 130, 92, 0.14);
  --good-ink: #166544;
  --warn-bg: rgba(196, 128, 36, 0.16);
  --warn-ink: #8a530a;
  --bad-bg: rgba(186, 54, 66, 0.14);
  --bad-ink: #9f2532;
  --glass-card: linear-gradient(142deg, rgba(255, 255, 255, 0.84), rgba(250, 248, 244, 0.50) 78%), rgba(246, 243, 238, 0.62);
  --glass-sub: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(246, 243, 238, 0.36) 80%), rgba(238, 235, 229, 0.54);
  --glass-ctrl: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(247, 244, 240, 0.58)), rgba(240, 238, 233, 0.72);
  --glass-rail: linear-gradient(168deg, rgba(252, 250, 247, 0.88), rgba(241, 239, 234, 0.78));
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.90), 0 12px 28px -10px rgba(24, 30, 40, 0.10);
  --glass-sub-edge: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 6px 16px -8px rgba(24, 30, 40, 0.08);
  --glass-ctrl-edge: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 4px 12px -4px rgba(24, 30, 40, 0.10);
  --rail-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.56), 6px 0 26px rgba(24, 30, 40, 0.07);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f3f6;
  --muted: #9faab8;
  --accent: #8ab0d6;
  --accent-hover: #a1c3e4;
  --accent-ink: #b9d5f0;
  --accent-soft: rgba(138, 176, 214, 0.18);
  --good-bg: rgba(54, 178, 128, 0.18);
  --good-ink: #7ce0b6;
  --warn-bg: rgba(232, 168, 68, 0.18);
  --warn-ink: #f8cf86;
  --bad-bg: rgba(226, 86, 98, 0.20);
  --bad-ink: #ff9ba5;
  --glass-card: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(138, 176, 214, 0.035) 58%, rgba(20, 25, 32, 0.10)), rgba(24, 29, 37, 0.72);
  --glass-sub: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(138, 176, 214, 0.025) 62%, transparent), rgba(32, 38, 48, 0.66);
  --glass-ctrl: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), rgba(38, 45, 56, 0.76);
  --glass-rail: linear-gradient(168deg, rgba(21, 26, 33, 0.88), rgba(15, 19, 25, 0.94));
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 14px 28px -8px rgba(0, 0, 0, 0.50);
  --glass-sub-edge: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 18px -8px rgba(0, 0, 0, 0.38);
  --glass-ctrl-edge: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 14px rgba(0, 0, 0, 0.34);
  --rail-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06), 8px 0 30px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; color: var(--ink); }
body {
  min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(140, 174, 208, 0.24), transparent 48%),
    radial-gradient(ellipse at 12% 35%, rgba(255, 255, 255, 0.80), transparent 55%),
    radial-gradient(ellipse at 68% 88%, rgba(218, 207, 190, 0.36), transparent 50%),
    #eeece7;
  background-attachment: fixed;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 84% 12%, rgba(78, 114, 152, 0.24), transparent 48%),
    radial-gradient(ellipse at 14% 64%, rgba(52, 66, 86, 0.28), transparent 52%),
    radial-gradient(ellipse at 70% 92%, rgba(124, 112, 98, 0.14), transparent 46%),
    #11151b;
  background-attachment: fixed;
}
h1, h2, h3, p { margin-top: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Shell */
.app-shell { min-height: 100vh; }
.mobile-header { display: none; }
.sidebar-rail {
  position: fixed; inset: 0 auto 0 0; width: 204px; z-index: 40; border: 0;
  background: var(--glass-rail); box-shadow: var(--rail-shadow);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.sidebar-inner { height: 100%; display: flex; flex-direction: column; padding: 26px 14px 20px; gap: 26px; }
.sidebar-brand, .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-brand { padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; display: block; }
.brand-title { display: block; font-weight: 800; font-size: 1rem; letter-spacing: 0.02em; white-space: nowrap; }
.brand-sub { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 1px; white-space: nowrap; }

.sidebar-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-btn {
  position: relative; display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 10px 14px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font-size: 0.93rem; font-weight: 650; text-align: left; cursor: pointer;
}
.nav-btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:hover { background: var(--accent-soft); color: var(--ink); }
.nav-btn[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav-btn[aria-selected="true"]::before {
  content: ""; position: absolute; left: 4px; top: 11px; bottom: 11px; width: 3px;
  border-radius: 999px; background: var(--accent);
}

.sidebar-footer { padding-top: 14px; border-top: 1px solid rgba(128, 138, 152, 0.16); }
.sidebar-tools, .utility-icons { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn svg, .theme-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.theme-switch {
  display: inline-flex; padding: 3px; border-radius: 999px; border: 0; gap: 2px;
  background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge);
}
.theme-switch button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }

/* Main Workspace */
.workspace-body { margin-left: 204px; min-width: 0; }
.container { max-width: 1180px; margin: 0 auto; padding: 28px 32px 56px; }
.tab-panel { display: flex; flex-direction: column; gap: 20px; }
.hero-strip { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.eyebrow { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; color: var(--accent-ink); margin-bottom: 4px; }
.page-title { font-size: clamp(1.55rem, 2.5vw, 2.1rem); margin-bottom: 6px; letter-spacing: -0.02em; }
.page-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; max-width: 680px; }

.weather-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  background: var(--glass-card); box-shadow: var(--glass-sub-edge); white-space: nowrap;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 0.84rem; font-weight: 650;
}
.weather-pill select {
  width: auto !important; min-height: 0 !important; box-shadow: none !important;
  border: 0; background: transparent !important; font-weight: 800; color: var(--accent-ink);
  cursor: pointer; padding: 2px 4px !important; outline: none;
}

.cloud-banner {
  margin-bottom: 14px; padding: 14px 18px; border-radius: 18px;
  background: var(--accent-soft); color: var(--accent-ink); box-shadow: var(--glass-sub-edge);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.86rem;
}
.cloud-banner strong { margin-right: 6px; }
.demo-banner {
  margin-bottom: 18px; padding: 14px 18px; border-radius: 18px;
  background: var(--warn-bg); color: var(--warn-ink); box-shadow: var(--glass-sub-edge);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.86rem;
}
.demo-banner strong { margin-right: 4px; }

/* Cards & Grids */
.card, .kpi-card, .outfit-card, .item-card, .gap-card, .modal-card {
  border: 0; border-radius: 22px; background: var(--glass-card); box-shadow: var(--glass-edge);
  backdrop-filter: blur(18px) saturate(135%); -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.card { padding: 20px 22px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font-size: 1.1rem; margin-bottom: 4px; }
.muted { color: var(--muted); font-size: 0.84rem; margin-bottom: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 5px; }
.kpi-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.kpi-value { font-size: 1.44rem; font-weight: 800; letter-spacing: -0.02em; }
.kpi-sub { font-size: 0.78rem; color: var(--muted); }

/* Controls & Buttons */
.bi { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: 999px;
  font-size: 0.88rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn-sm { min-height: 34px; padding: 6px 13px; font-size: 0.82rem; }
.btn-primary {
  background: var(--accent); color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 6px 16px -4px rgba(58, 92, 126, 0.44);
}
:root[data-theme="dark"] .btn-primary { color: #0e141c; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge); color: var(--ink); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--ink); }
.file-btn { cursor: pointer; }

.controls-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill-group, .filter-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn {
  min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge); color: var(--muted);
  font-size: 0.84rem; font-weight: 700;
}
.pill-btn.active { background: var(--accent); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 5px 14px -4px rgba(58, 92, 126, 0.40); }
:root[data-theme="dark"] .pill-btn.active { color: #0e141c; }

.tag {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 800; white-space: nowrap;
}
.tag-good { background: var(--good-bg); color: var(--good-ink); }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag-bad { background: var(--bad-bg); color: var(--bad-ink); }
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag-neutral { background: var(--glass-sub); color: var(--muted); }

/* Outfit Cards */
.outfit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.outfit-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.outfit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.outfit-head h3 { font-size: 1.04rem; margin-bottom: 3px; }
.score-badge {
  min-width: 56px; padding: 5px 11px; border-radius: 14px; text-align: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 0.88rem;
  white-space: nowrap; flex: none;
}
.outfit-pieces { display: flex; flex-direction: column; gap: 8px; }
.piece-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px;
  background: var(--glass-sub); box-shadow: var(--glass-sub-edge);
}
.piece-thumb {
  width: 44px; height: 44px; border-radius: 11px; flex: none; overflow: hidden;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(128, 138, 152, 0.22);
}
.piece-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.piece-info { min-width: 0; flex: 1; }
.piece-info strong { display: block; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piece-info span { display: block; font-size: 0.76rem; color: var(--muted); }
.tip-box {
  padding: 10px 12px; border-radius: 14px; background: var(--glass-sub); font-size: 0.81rem; color: var(--muted);
  display: flex; flex-direction: column; gap: 4px;
}
.tip-box strong { color: var(--ink); font-size: 0.82rem; }
.rain-banner {
  padding: 8px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink);
  font-size: 0.79rem; font-weight: 650;
}

/* Wardrobe Grid */
.wardrobe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.item-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.item-visual {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 15px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: inset 0 0 0 1px rgba(128, 138, 152, 0.16);
}
.item-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-visual .swatch-dot { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.item-visual .demo-chip {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px;
  background: rgba(20, 25, 32, 0.72); color: #fff; font-size: 0.68rem; font-weight: 700;
}
.item-title { font-size: 0.94rem; margin-bottom: 2px; }
.item-meta { font-size: 0.77rem; color: var(--muted); }
.item-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.icon-action-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge); color: var(--muted);
  display: grid; place-items: center; flex: none;
}
.icon-action-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-action-btn.danger:hover { background: var(--bad-bg); color: var(--bad-ink); }
.icon-action-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Gaps, Audit, Logs, Nora */
.audit-list, .log-list, .health-box { display: flex; flex-direction: column; gap: 10px; }
.audit-row, .log-row, .health-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 15px; background: var(--glass-sub); box-shadow: var(--glass-sub-edge);
}
.gaps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gap-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.two-col-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.guide-steps strong { color: var(--ink); }
.empty-state { grid-column: 1 / -1; padding: 22px; text-align: center; border-radius: 16px; background: var(--glass-sub); color: var(--muted); font-size: 0.88rem; }

/* Forms & Modals */
dialog.modal { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 24px)); width: 100%; }
dialog.modal::backdrop { background: rgba(12, 16, 22, 0.56); backdrop-filter: blur(6px); }
.modal-card { padding: 22px 24px; border-radius: 26px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.modal-form label.btn { flex-direction: row; align-items: center; gap: 7px; font-size: 0.88rem; color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input[type="text"], input[type="number"], select {
  width: 100%; min-height: 40px; padding: 8px 15px; border: 0; border-radius: 999px;
  background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge); color: var(--ink);
}
textarea {
  width: 100%; padding: 11px 15px; border: 0; border-radius: 18px; resize: vertical;
  background: var(--glass-ctrl); box-shadow: var(--glass-ctrl-edge); color: var(--ink);
}
.photo-uploader { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.photo-preview {
  width: 96px; height: 96px; border-radius: 16px; overflow: hidden; flex: none;
  background: var(--glass-sub); box-shadow: var(--glass-sub-edge);
  display: grid; place-items: center; text-align: center; padding: 8px; font-size: 0.72rem; color: var(--muted);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.live-audit-box { padding: 10px 14px; border-radius: 14px; font-size: 0.82rem; font-weight: 650; }
.live-audit-box.avoid { background: var(--bad-bg); color: var(--bad-ink); }
.live-audit-box.caution { background: var(--warn-bg); color: var(--warn-ink); }
.live-audit-box.great { background: var(--good-bg); color: var(--good-ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.feedback { margin: 8px 0 0; font-size: 0.84rem; color: var(--muted); }
.site-footer {
  max-width: 1180px; margin: 0 auto; padding: 0 32px 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted);
}
.site-footer a { color: var(--accent-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 12px 18px; border-radius: 999px;
  background: #1c232d; color: #f5f7fa; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28); font-size: 0.86rem; font-weight: 650;
}

/* Responsive: Mobile <= 900px matches Nora OS bottom dock */
@media (max-width: 1120px) {
  .outfit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wardrobe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mobile-header {
    position: sticky; top: 0; z-index: 35; height: 54px; padding: 0 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: rgba(247, 245, 241, 0.94); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.56), 0 6px 18px rgba(20, 26, 34, 0.08);
    backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%);
  }
  .sidebar-rail {
    inset: auto 0 0 0; width: 100%; height: auto;
    background: rgba(247, 245, 241, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 -10px 26px rgba(20, 26, 34, 0.14);
    backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%);
  }
  :root[data-theme="dark"] .mobile-header,
  :root[data-theme="dark"] .sidebar-rail {
    background: rgba(17, 21, 27, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 -10px 26px rgba(0, 0, 0, 0.44);
  }
  .sidebar-inner { flex-direction: row; padding: 4px 6px max(6px, env(safe-area-inset-bottom)); gap: 0; }
  .sidebar-brand, .sidebar-footer { display: none; }
  .sidebar-nav { flex-direction: row; gap: 2px; }
  .nav-btn {
    flex: 1; flex-direction: column; justify-content: center; gap: 4px;
    min-width: 0; min-height: 54px; padding: 6px 2px; font-size: 0.70rem; border-radius: 8px; text-align: center;
  }
  .nav-btn[aria-selected="true"]::before {
    left: 26%; right: 26%; top: 3px; bottom: auto; width: auto; height: 3px;
  }
  .workspace-body { margin-left: 0; }
  .container { padding: 18px 14px calc(88px + env(safe-area-inset-bottom)); }
  .site-footer { padding: 0 14px calc(92px + env(safe-area-inset-bottom)); }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .outfit-grid, .gaps-grid, .two-col-grid { grid-template-columns: 1fr; }
  .wardrobe-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); text-align: center; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar-rail, .mobile-header, .card, .kpi-card, .outfit-card, .item-card, .gap-card, .modal-card {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
}
