    :root {
      --bg: #faf8f5;
      --panel: #ffffff;
      --border: #e8e2da;
      --text: #2b2523;
      --muted: #8a7e76;
      --accent: #d4654a;
      --accent-dim: #b84e36;
      --danger: #c44545;
      --ok: #3a8f5c;
      --radius: 14px;
      --shadow: 0 10px 28px rgba(43, 37, 35, 0.07);
    }
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: "DM Sans", system-ui, sans-serif;
      background: radial-gradient(1200px 800px at 10% -10%, #f0e6dc 0%, transparent 55%),
        radial-gradient(900px 600px at 100% 0%, #f5ede4 0%, transparent 50%),
        var(--bg);
      color: var(--text);
      line-height: 1.5;
    }
    header {
      position: relative;
      padding: 0.75rem 1.25rem;
      max-width: 1100px;
      margin: 0 auto;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      text-align: left;
      gap: 0.75rem 1rem;
    }
    .header-brand {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 0.65rem 1rem;
    }
    .header-actions {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      justify-content: flex-end;
      flex-shrink: 0;
      align-items: center;
    }
    .brand-logo {
      display: block;
      height: auto;
      flex-shrink: 0;
    }
    .brand-logo--header {
      width: auto;
      height: 44px;
      max-width: min(160px, 42vw);
      margin: 0;
    }
    .brand-logo--onboard {
      width: auto;
      height: 56px;
      max-width: min(200px, 70vw);
      margin: 0;
    }
    h1 {
      font-family: "Fraunces", Georgia, serif;
      font-weight: 600;
      font-size: clamp(1.75rem, 4vw, 2.25rem);
      margin: 0 0 0.35rem;
      letter-spacing: -0.02em;
    }
    .sub {
      color: var(--muted);
      margin: 0;
      text-align: left;
      font-size: 0.8125rem;
      line-height: 1.35;
      max-width: 22rem;
    }
    /* Login / register — centered marketing header */
    body.is-auth-screen header {
      flex-direction: column;
      align-items: center;
      text-align: center;
      max-width: 520px;
      padding: 1.25rem 1.5rem 0.5rem;
    }
    body.is-auth-screen .header-brand {
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
    }
    body.is-auth-screen .sub {
      text-align: center;
      max-width: 20rem;
    }
    /* Logged-in — slim bar aligned with app card (no empty center gap) */
    body.is-logged-in header {
      max-width: 460px;
      margin: 0 auto;
      padding: 0.45rem 1rem 0.15rem;
      gap: 0.5rem;
    }
    body.is-logged-in .header-brand {
      flex: 0 0 auto;
    }
    body.is-logged-in header .sub {
      display: none;
    }
    body.is-logged-in .header-actions {
      flex: 1;
      justify-content: flex-end;
      min-width: 0;
      gap: 0.35rem 0.5rem;
    }
    body.is-logged-in #userEmail {
      font-size: 0.75rem;
      color: var(--muted);
      max-width: min(160px, 38vw);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    body.is-logged-in #logoutBtn {
      flex-shrink: 0;
      min-height: 36px;
      padding: 0.4rem 0.75rem;
      font-size: 0.8rem;
    }
    body.is-logged-in main {
      max-width: 460px;
      padding: 0.25rem 1rem 3rem;
    }
    @media (max-width: 640px) {
      body.is-logged-in header,
      body.is-logged-in main {
        max-width: 100%;
      }
      .brand-logo--header {
        height: 40px;
        max-width: min(140px, 50vw);
      }
    }
    main {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 1.5rem 3rem;
      display: grid;
      gap: 1.25rem;
    }
    @media (min-width: 900px) {
      .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
    }
    .card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.25rem 1.35rem;
      box-shadow: var(--shadow);
    }
    .card h2 {
      margin: 0 0 1rem;
      font-size: 1rem;
      font-weight: 600;
      color: var(--accent);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    label {
      display: block;
      font-size: 0.8rem;
      color: var(--muted);
      margin-bottom: 0.35rem;
    }
    input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
      width: 100%;
      min-height: 44px;
      padding: 0.62rem 0.72rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #faf8f5;
      color: var(--text);
      font: inherit;
    }
    textarea { min-height: 72px; resize: vertical; }
    input:focus, select:focus, textarea:focus {
      outline: 2px solid var(--accent-dim);
      border-color: var(--accent-dim);
    }
    .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .checks { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin-top: 0.5rem; }
    .checks label { display: flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--text); font-size: 0.9rem; }
    button, .btn {
      font: inherit;
      cursor: pointer;
      border-radius: 10px;
      border: none;
      min-height: 42px;
      padding: 0.6rem 1rem;
      font-weight: 600;
    }
    .btn-primary {
      background: linear-gradient(135deg, #e07058, #d4654a);
      color: #ffffff;
      box-shadow: 0 8px 16px rgba(212, 101, 74, 0.3);
    }
    .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-ghost {
      background: transparent;
      color: var(--accent);
      border: 1px solid var(--border);
    }
    .btn-danger { background: #3a2222; color: var(--danger); border: 1px solid #5a3333; }
    .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
    .btn-block { width: 100%; }
    .suggest-toolbar {
      display: grid;
      gap: 0.5rem;
      margin-bottom: 0.75rem;
    }
    .suggest-toolbar label { margin-bottom: 0; }
    .items {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 0.75rem;
    }
    .item {
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      background: #ffffff;
      box-shadow: 0 6px 14px rgba(43, 37, 35, 0.06);
    }
    .item img {
      width: 100%;
      aspect-ratio: 3/4;
      object-fit: cover;
      object-position: center top;
      display: block;
      background: #f5f0eb;
    }
    .item-media {
      position: relative;
    }
    .item-caption {
      padding: 0.55rem 0.6rem 0.65rem;
    }
    .item-caption strong {
      display: block;
      color: var(--text);
      font-size: 0.82rem;
    }
    .item-caption-sub {
      margin: 0.2rem 0 0;
      font-size: 0.74rem;
      color: var(--muted);
      line-height: 1.35;
    }
    .item-caption .color-tag {
      display: inline-block;
      background: var(--accent-soft);
      color: var(--primary);
      padding: 0.1rem 0.4rem;
      border-radius: 6px;
      font-size: 0.68rem;
      font-weight: 600;
      margin-top: 0.25rem;
      text-transform: capitalize;
    }
    .item .meta { padding: 0.5rem 0.6rem 0.65rem; font-size: 0.78rem; color: var(--muted); }
    .item .meta strong { color: var(--text); display: block; font-size: 0.82rem; }
    .item .meta .color-tag { display: inline-block; background: var(--accent-soft); color: var(--primary); padding: 0.1rem 0.4rem; border-radius: 6px; font-size: 0.68rem; font-weight: 600; margin-top: 0.2rem; text-transform: capitalize; }
    .item .meta .rain-badge { font-size: 0.72rem; }
    .item .meta .conf-badge { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 6px; font-size: 0.62rem; font-weight: 700; margin-top: 0.15rem; }
    .item .meta .conf-badge.low { background: #fff3cd; color: #856404; }
    .item .meta .conf-badge.new { background: #d4edda; color: #155724; }
    .item .btns { display: flex; gap: 0.35rem; padding: 0 0.6rem 0.6rem; }
    .item .btns button { flex: 1; font-size: 0.72rem; padding: 0.35rem; }
    .outfit {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 1rem;
      margin-bottom: 0.75rem;
      background: #ffffff;
      box-shadow: 0 8px 18px rgba(43, 37, 35, 0.06);
    }
    .outfit h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
    .outfit p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.9rem; }
    .outfit-actions { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
    .outfit-actions button { flex: 1; padding: 0.55rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; }
    .btn-accept { background: #28a745; color: #fff; }
    .btn-accept:hover { background: #218838; }
    .btn-skip { background: #f8f9fa; color: #6c757d; border: 1px solid #dee2e6 !important; }
    .btn-skip:hover { background: #e9ecef; color: #495057; }
    .outfit.accepted { border-left: 3px solid #28a745; opacity: 1; }
    .outfit.skipped { opacity: 0.4; border-left: 3px solid #dc3545; }
    .outfit-counter { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.3rem; }
    .queue-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
      margin: 0 0 0.85rem;
      padding: 0.35rem 0;
    }
    .queue-pos {
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--muted);
      flex: 1 1 auto;
      min-width: 0;
    }
    .queue-nav-actions {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      flex: 0 0 auto;
      margin-left: auto;
    }
    .queue-nav-prev,
    .queue-nav-next {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      flex: 0 0 auto;
      padding: 0.45rem 0.9rem;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
    }
    .queue-nav-prev .material-symbols-outlined {
      font-size: 1.05rem;
    }
    .queue-nav-next .material-symbols-outlined {
      font-size: 1.05rem;
    }
    .btn-sm {
      padding: 0.4rem 0.75rem;
      min-height: 34px;
      font-size: 0.78rem;
      border-radius: 999px;
    }
    .outfit-confirmed {
      text-align: center;
      padding: 1.2rem 1rem;
      border: 1px solid #bfe8cf;
      border-radius: 12px;
      background: linear-gradient(135deg, #e9f8ef, #f3fbf6);
      margin-top: 0.75rem;
    }
    .outfit-confirmed .conf-icon { font-size: 2rem; margin-bottom: 0.3rem; }
    .outfit-confirmed strong { display: block; font-size: 1rem; color: #1a5632; margin-bottom: 0.15rem; }
    .outfit-confirmed span { font-size: 0.85rem; color: #3a6f50; }
    .outfit-confirmed .see-more-link {
      display: inline-block;
      margin-top: 0.7rem;
      font-size: 0.82rem;
      color: var(--accent);
      cursor: pointer;
      text-decoration: underline;
      background: none;
      border: none;
      font-family: inherit;
      font-weight: 600;
    }
    .outfit-confirmed .see-more-link:hover { color: var(--accent-dim); }
    .outfit-queue-end {
      border: 1px dashed var(--border);
      border-radius: 12px;
      background: #fff;
      margin: 0.5rem 0 0.75rem;
    }
    .outfit-queue-end-inner {
      text-align: center;
      padding: 1.25rem 1rem;
    }
    .outfit-queue-end-icon {
      font-size: 2rem;
      opacity: 0.45;
      margin-bottom: 0.4rem;
    }
    .outfit-queue-end-inner strong {
      display: block;
      margin-bottom: 0.35rem;
      font-size: 1rem;
    }
    .outfit-queue-end-inner p {
      color: var(--muted);
      font-size: 0.9rem;
      margin: 0;
      line-height: 1.5;
    }
    .pieces {
      display: flex;
      flex-wrap: wrap;
      gap: 0.65rem;
      align-items: flex-start;
      justify-content: flex-start;
    }
    .piece {
      width: 76px;
      flex: 0 0 76px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      font-size: 0.7rem;
      color: var(--muted);
    }
    .piece img {
      width: 76px;
      height: 96px;
      object-fit: cover;
      object-position: center top;
      border-radius: 8px;
      border: 1px solid var(--border);
      display: block;
      margin-bottom: 0.35rem;
    }
    .piece-name {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      min-height: 2.5em;
      width: 100%;
      line-height: 1.25;
      word-break: break-word;
      hyphens: auto;
    }
    .banner {
      font-size: 0.85rem;
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      margin-bottom: 0.75rem;
      border: 1px solid var(--border);
    }
    .banner.info { background: #fdf5f2; color: #5a4440; }
    .banner.warn { background: #fff5ea; color: #93622d; border-color: #f0d2aa; }
    .banner.ok { background: #e9f8ef; color: #226f46; border-color: #bfe8cf; }
    .hidden { display: none !important; }
    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    .status { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }
    .auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
    .auth-tabs button {
      background: transparent;
      color: var(--muted);
      border: 1px solid transparent;
      padding: 0.4rem 0.75rem;
    }
    .auth-tabs button.active {
      color: var(--accent);
      border-color: var(--border);
      border-radius: 8px;
    }
    .city-results {
      margin-top: 0.35rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      max-height: 200px;
      overflow-y: auto;
      background: #ffffff;
      box-shadow: var(--shadow);
    }
    .city-results button {
      display: block;
      width: 100%;
      text-align: left;
      padding: 0.5rem 0.65rem;
      border: none;
      border-bottom: 1px solid var(--border);
      background: transparent;
      color: var(--text);
      font-size: 0.85rem;
      cursor: pointer;
    }
    .city-results button:last-child { border-bottom: none; }
    .city-results button:hover { background: #fdf5f2; }
    .selected-place {
      font-size: 0.85rem;
      color: var(--ok);
      margin-top: 0.35rem;
    }
    .location-error {
      font-size: 0.85rem;
      color: #b91c1c;
      margin: 0.5rem 0;
      line-height: 1.45;
    }
    .location-confirm {
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0.85rem 1rem;
      margin: 0.75rem 0;
      background: #faf9f7;
    }
    .location-confirm__title {
      font-size: 0.8rem;
      color: var(--muted);
      margin: 0 0 0.25rem;
    }
    .location-confirm__label {
      font-size: 1rem;
      font-weight: 700;
      margin: 0 0 0.75rem;
    }
    .location-confirm__actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      align-items: center;
    }
    .location-manual-label {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--muted);
      margin: 0.75rem 0 0.35rem;
    }
    .ob-device-loc-btn {
      margin-bottom: 0.5rem;
    }
    .source-row {
      display: flex;
      gap: 1.25rem;
      flex-wrap: wrap;
      margin-bottom: 0.75rem;
      align-items: center;
    }
    .source-row label.inline {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      color: var(--text);
      margin: 0;
      font-size: 0.9rem;
    }
    .preview-box {
      margin: 0.75rem 0;
      max-height: 240px;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--border);
      background: #0c0e12;
      display: none;
    }
    .preview-box.visible { display: block; }
    .preview-box img {
      max-width: 100%;
      max-height: 240px;
      display: block;
      margin: 0 auto;
      object-fit: contain;
    }
    .analyze-banner {
      font-size: 0.85rem;
      margin: 0.5rem 0;
      padding: 0.55rem 0.7rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: #fdfaf7;
      color: var(--muted);
    }
    .analyze-banner.ok { border-color: #bfe8cf; color: #226f46; background: #e9f8ef; }
    .analyze-banner.warn { border-color: #f0d2aa; color: #93622d; background: #fff5ea; }
    .section-label {
      margin: 0.3rem 0 0.15rem;
      color: var(--accent);
      font-weight: 700;
      letter-spacing: 0.06em;
      font-size: 0.82rem;
      text-transform: uppercase;
    }
    .section-sub {
      margin: 0 0 0.7rem;
      color: var(--muted);
      font-size: 0.87rem;
    }
    .wardrobe-card .item img {
      aspect-ratio: 4/5;
    }
    .app-shell {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
      align-items: start;
      max-width: 460px;
      margin: 0 auto;
    }
    .app-content {
      min-width: 0;
      display: grid;
      gap: 1rem;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 22px;
      box-shadow: 0 16px 36px rgba(43, 37, 35, 0.1);
      padding: 1rem 1rem 5.5rem;
    }
    .mobile-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 0.7rem 0.8rem;
      background: linear-gradient(140deg, #faf5f0, #ffffff);
      box-shadow: 0 8px 20px rgba(43, 37, 35, 0.07);
    }
    .mobile-topbar > div:first-child {
      min-width: 0;
      flex: 1;
    }
    .mobile-topbar strong {
      display: block;
      font-size: 0.95rem;
      line-height: 1.2;
    }
    .mobile-topbar span {
      font-size: 0.78rem;
      color: var(--muted);
    }
    .avatar-pill {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #d4654a, #c0553d);
      color: #ffffff;
      font-weight: 900;
      font-size: 0.95rem;
      letter-spacing: 0.05em;
      -webkit-text-stroke: 0.3px #ffffff;
      text-shadow: none;
      border: 2.5px solid rgba(255, 255, 255, 0.85);
      flex-shrink: 0;
    }
    .profile-hero {
      border: 1px solid var(--border);
      border-radius: 14px;
      background: linear-gradient(140deg, #faf5f0, #ffffff);
      box-shadow: 0 8px 20px rgba(43, 37, 35, 0.07);
      padding: 0.8rem;
      display: grid;
      gap: 0.6rem;
    }
    .profile-hero-main {
      display: flex;
      align-items: center;
      gap: 0.7rem;
    }
    .profile-hero-main h3 {
      margin: 0;
      font-size: 1rem;
    }
    .profile-hero-main p {
      margin: 0.1rem 0 0;
      color: var(--muted);
      font-size: 0.82rem;
    }
    .profile-stats {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.55rem;
    }
    .profile-stat {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.5rem 0.6rem;
      background: #ffffff;
    }
    .profile-stat strong {
      display: block;
      font-size: 1rem;
      line-height: 1.1;
      color: var(--accent);
    }
    .profile-stat span {
      font-size: 0.76rem;
      color: var(--muted);
    }
    .wardrobe-tools {
      display: grid;
      gap: 0.55rem;
      margin-bottom: 0.65rem;
    }
    .wardrobe-page-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.6rem;
      margin-bottom: 0.65rem;
      flex-wrap: wrap;
    }
    .wardrobe-page-actions .status {
      margin: 0;
    }
    .add-clothing-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.6rem;
      margin-bottom: 0.55rem;
      flex-wrap: wrap;
    }
    .add-clothing-header h2 {
      margin: 0;
    }
    .wardrobe-tools input {
      min-height: 40px;
      border-radius: 999px;
      padding: 0.55rem 0.85rem;
    }
    .filter-tabs {
      display: flex;
      gap: 0.45rem;
      flex-wrap: wrap;
    }
    .filter-tabs button {
      min-height: 34px;
      border-radius: 999px;
      padding: 0.35rem 0.72rem;
      border: 1px solid var(--border);
      background: #faf8f5;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 600;
    }
    .filter-tabs button.active {
      border-color: rgba(212, 101, 74, 0.42);
      color: #ffffff;
      background: linear-gradient(135deg, #e07058, #d4654a);
    }
    .side-nav {
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      bottom: calc(10px + env(safe-area-inset-bottom, 0));
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 0.2rem;
      border: 1px solid var(--border);
      background: #2b2523;
      border-radius: 999px;
      padding: 0.38rem;
      box-shadow: 0 10px 24px rgba(43, 37, 35, 0.35);
      z-index: 35;
      max-width: calc(100vw - 1.5rem);
    }
    .side-nav h3 {
      display: none;
    }
    .side-nav a {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      color: #d4ccc6;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 0.35rem 0.55rem 0.3rem;
      margin: 0;
      font-size: 0.62rem;
      font-weight: 600;
      background: transparent;
      min-width: 52px;
      gap: 0.1rem;
      line-height: 1.1;
      transition: all 0.18s ease;
    }
    .side-nav a .nav-icon {
      font-size: 1.1rem;
      line-height: 1;
    }
    .side-nav a.active {
      border-color: rgba(212, 101, 74, 0.42);
      color: #ffffff;
      background: linear-gradient(135deg, #e07058, #d4654a);
    }
    .side-nav a.disabled {
      opacity: 0.45;
      cursor: not-allowed;
      pointer-events: none;
    }
    .side-nav a:hover {
      color: #ffffff;
    }
    .side-nav a:last-child { margin-bottom: 0; }
    @media (max-width: 980px) {
      .app-shell { max-width: 100%; }
      .side-nav a {
        min-width: 48px;
        font-size: 0.58rem;
        padding: 0.3rem 0.45rem 0.25rem;
      }
      .app-content {
        padding-bottom: 5.6rem;
      }
    }
    .flow-section { display: grid; gap: 0.35rem; }
    .section-label {
      font-size: 0.95rem;
      letter-spacing: 0.05em;
    }
    .item {
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .item:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 20px rgba(43, 37, 35, 0.1);
    }
    .outfit {
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .outfit:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 20px rgba(43, 37, 35, 0.1);
    }
    .edit-dialog {
      width: min(560px, calc(100vw - 2rem));
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--panel);
      color: var(--text);
      padding: 0;
    }
    .edit-dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
    .edit-dialog .inner { padding: 1rem 1.1rem; }
    .edit-dialog h3 { margin: 0 0 0.6rem; color: var(--accent); font-size: 1rem; }
    .edit-dialog .actions { justify-content: flex-end; }
    .model-busy {
      position: fixed;
      inset: 0;
      z-index: 60;
      background: rgba(17, 24, 39, 0.42);
      backdrop-filter: blur(2px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }
    .model-busy-card {
      width: min(360px, calc(100vw - 2rem));
      border-radius: 14px;
      border: 1px solid var(--border);
      background: #ffffff;
      color: var(--text);
      padding: 1rem 1.1rem;
      box-shadow: 0 18px 35px rgba(17, 24, 39, 0.28);
      display: grid;
      grid-template-columns: 28px 1fr;
      gap: 0.75rem;
      align-items: center;
    }
    .spinner {
      width: 24px;
      height: 24px;
      border-radius: 999px;
      border: 3px solid #e8e2da;
      border-top-color: var(--accent);
      animation: spin 0.8s linear infinite;
    }
    .model-busy-card strong {
      display: block;
      font-size: 0.94rem;
      margin-bottom: 0.15rem;
    }
    .model-busy-card span {
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.4;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    .item.unavailable { opacity: 0.45; position: relative; }
    .item.unavailable::after {
      content: "In Laundry";
      position: absolute;
      top: 8px; left: 8px;
      background: #e2e3e5;
      color: #383d41;
      font-size: 0.68rem;
      font-weight: 700;
      padding: 0.15rem 0.45rem;
      border-radius: 6px;
    }
    .history-stats {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 0.55rem;
      margin-bottom: 1rem;
    }
    .history-stat {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.55rem 0.65rem;
      background: linear-gradient(140deg, #faf5f0, #ffffff);
      text-align: center;
    }
    .history-stat strong {
      display: block;
      font-size: 1.15rem;
      color: var(--accent);
      line-height: 1.2;
    }
    .history-stat span {
      font-size: 0.7rem;
      color: var(--muted);
    }
    .history-filters {
      display: flex;
      gap: 0.45rem;
      flex-wrap: wrap;
      margin-bottom: 0.85rem;
    }
    .history-filters button {
      min-height: 32px;
      border-radius: 999px;
      padding: 0.3rem 0.7rem;
      border: 1px solid var(--border);
      background: #faf8f5;
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
    }
    .history-filters button.active {
      border-color: rgba(212, 101, 74, 0.42);
      color: #ffffff;
      background: linear-gradient(135deg, #e07058, #d4654a);
    }
    .history-filter-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
      margin: 0.5rem 0 0.35rem;
    }
    .history-filter-hint {
      margin: 0 0 0.65rem;
      font-size: 0.84rem;
      color: var(--muted);
      line-height: 1.45;
    }
    .history-date-picker {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.5rem;
      margin-bottom: 0.65rem;
    }
    .history-date-tab {
      min-width: 0;
      min-height: 4.5rem;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fff;
      padding: 0.55rem 0.5rem;
      cursor: pointer;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    }
    .history-date-tab:hover {
      border-color: rgba(212, 101, 74, 0.35);
    }
    .history-date-tab.active {
      border-color: var(--accent);
      background: rgba(212, 101, 74, 0.08);
    }
    .history-date-tab.empty {
      opacity: 0.72;
    }
    .history-date-tab .day-weekday {
      display: block;
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 0.15rem;
    }
    .history-date-tab.active .day-weekday {
      color: var(--accent);
    }
    .history-date-tab .day-label {
      display: block;
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--text);
    }
    .history-date-tab.active .day-label {
      color: var(--accent);
    }
    .history-date-tab .day-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 0.35rem;
      min-width: 1.5rem;
      min-height: 1.5rem;
      padding: 0 0.35rem;
      border-radius: 999px;
      background: #eef2f7;
      font-size: 0.68rem;
      font-weight: 700;
      line-height: 1;
      color: var(--text);
    }
    .history-date-tab.active .day-count {
      background: var(--accent);
      color: #fff;
    }
    .history-date-tab--calendar {
      min-height: 4.5rem;
      flex-direction: column;
      gap: 0.35rem;
      justify-content: center;
    }

    .history-date-tab--calendar .day-label {
      font-size: 0.72rem;
    }
    .history-date-tab--calendar .material-symbols-outlined {
      font-size: 1.1rem;
      color: var(--muted);
    }
    .history-date-tab--calendar.active .material-symbols-outlined {
      color: var(--accent);
    }
    .history-selected-day {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      margin: 0 0 0.85rem;
      padding-bottom: 0.35rem;
      border-bottom: 1px solid var(--border);
      font-weight: 700;
    }
    .history-selected-day span:last-child {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--muted);
    }
    .history-calendar-dialog {
      width: min(380px, calc(100vw - 2rem));
    }
    .history-calendar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.75rem;
    }
    .history-calendar-header h3 {
      margin: 0;
      font-size: 1.05rem;
      flex: 1;
      text-align: center;
    }
    .history-calendar-weekdays {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 0.15rem;
      margin-bottom: 0.35rem;
    }
    .history-calendar-weekdays span {
      text-align: center;
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
    }
    .history-calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 0.2rem;
    }
    .history-cal-cell {
      aspect-ratio: 1;
      border: none;
      border-radius: 10px;
      background: transparent;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.15rem;
      font: inherit;
    }
    .history-cal-cell.recent {
      background: rgba(212, 101, 74, 0.06);
    }
    .history-cal-cell.selected {
      background: var(--accent);
      color: #fff;
    }
    .history-cal-cell:disabled {
      opacity: 0.25;
      cursor: not-allowed;
    }
    .history-cal-cell .cal-dot {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--accent);
      margin-top: 2px;
    }
    .history-cal-cell.selected .cal-dot {
      background: #fff;
    }
    .history-calendar-hint {
      margin: 0.75rem 0 0;
      font-size: 0.78rem;
      color: var(--muted);
      text-align: center;
      line-height: 1.45;
    }
    .settings-section-card {
      margin-bottom: 1.25rem;
    }
    .settings-accordion {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 0.5rem;
    }
    .settings-version-footer {
      margin-top: 1.25rem;
      margin-bottom: 5rem;
      text-align: center;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--muted);
      opacity: 0.8;
      letter-spacing: 0.02em;
    }
    #profile-section {
      padding-bottom: 0.25rem;
    }
    .settings-panel {
      border: 1px solid var(--border);
      border-radius: 14px;
      background: var(--surface);
      overflow: hidden;
    }
    .settings-panel.expanded {
      border-color: rgba(212, 101, 74, 0.35);
      box-shadow: 0 4px 18px rgba(212, 101, 74, 0.08);
    }
    .settings-panel-header {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      padding: 1rem 1.1rem;
      border: none;
      background: transparent;
      cursor: pointer;
      text-align: left;
      font: inherit;
      color: inherit;
    }
    .settings-panel-header:hover {
      background: rgba(212, 101, 74, 0.04);
    }
    .settings-panel-heading {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      min-width: 0;
      flex: 1;
    }
    .settings-panel-title {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
    }
    .settings-panel-summary {
      font-size: 0.84rem;
      color: var(--muted);
      line-height: 1.4;
    }
    .settings-panel-chevron {
      font-size: 1.35rem;
      color: var(--muted);
      transition: transform 0.18s ease;
      flex-shrink: 0;
    }
    .settings-panel.expanded .settings-panel-chevron {
      transform: rotate(90deg);
      color: var(--accent);
    }
    .settings-panel-body {
      padding: 0 1.1rem 1.1rem;
      border-top: 1px solid var(--border);
    }
    .settings-panel-body > .card {
      margin-top: 0.85rem;
    }
    .settings-panel-actions {
      display: flex;
      gap: 0.65rem;
      flex-wrap: wrap;
      margin-top: 1rem;
      align-items: center;
    }
    .settings-subsection .settings-section-card:first-of-type {
      margin-top: 0.5rem;
    }
    .profile-legal-footer {
      margin-top: 1.5rem;
      padding-top: 1.25rem;
      border-top: 1px solid var(--border);
    }
    .profile-legal-title {
      margin: 0 0 0.35rem;
      font-size: 1rem;
    }
    .profile-legal-help {
      margin: 0 0 0.85rem;
      color: var(--muted);
      font-size: 0.88rem;
      line-height: 1.5;
    }
    .profile-legal-links {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      align-items: stretch;
    }
    .profile-legal-links .btn-ghost {
      width: 100%;
      text-align: left;
    }
    .profile-danger-btn {
      color: #b91c1c;
      border-color: #fecaca;
    }
    .history-group { margin-bottom: 1.15rem; }
    .history-date {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: 700;
      font-size: 0.85rem;
      color: var(--accent);
      margin-bottom: 0.55rem;
      padding-bottom: 0.3rem;
      border-bottom: 1px solid var(--border);
    }
    .history-date .date-count {
      font-weight: 500;
      font-size: 0.72rem;
      color: var(--muted);
      background: #f5ede6;
      padding: 0.1rem 0.45rem;
      border-radius: 999px;
    }
    .history-outfit {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
      padding: 0.85rem;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #ffffff;
      box-shadow: 0 4px 12px rgba(43, 37, 35, 0.04);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .history-outfit:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(43, 37, 35, 0.08);
    }
    .history-outfit-body {
      display: flex;
      align-items: flex-start;
      gap: 0.75rem;
    }
    .history-outfit-pieces {
      display: flex;
      gap: 0.5rem;
      flex: 1;
      min-width: 0;
      overflow-x: auto;
      padding-bottom: 0.15rem;
      scrollbar-width: thin;
    }
    .history-outfit .piece {
      width: 72px;
      flex: 0 0 72px;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.35rem;
      font-size: 0.68rem;
      color: var(--muted);
    }
    .history-outfit .piece-image {
      width: 72px;
      height: 88px;
      border-radius: 8px;
      overflow: hidden;
      background: #f3f3f3;
      border: 1px solid var(--border);
    }
    .history-outfit .piece img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
      display: block;
    }
    .history-outfit .piece-name {
      display: block;
      min-height: 2.4em;
      line-height: 1.25;
      text-align: center;
      overflow: hidden;
    }
    .history-outfit .history-meta {
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.35rem;
      font-size: 0.76rem;
      color: var(--muted);
      text-align: right;
      padding-top: 0.15rem;
    }
    .history-outfit .history-time {
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
    }
    .history-outfit-footer .look-board-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.5rem;
      width: 100%;
      margin-top: 0;
    }
    .history-outfit-footer .look-board-actions button {
      width: 100%;
      justify-content: center;
    }
    .history-outfit .history-meta .occasion-tag {
      display: inline-block;
      background: #fdf5f2;
      color: var(--accent);
      padding: 0.08rem 0.4rem;
      border-radius: 6px;
      font-size: 0.66rem;
      font-weight: 600;
      margin-top: 0.15rem;
    }
    .history-load-more,
    .history-load-more-days {
      display: block;
      width: 100%;
      text-align: center;
      padding: 0.65rem;
      border-radius: 10px;
      border: 1px dashed var(--border);
      background: #fdfaf7;
      color: var(--accent);
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      margin-top: 0.5rem;
      transition: background 0.15s;
    }
    .history-load-more:hover,
    .history-load-more-days:hover {
      background: #f5ede6;
    }
    .history-empty {
      text-align: center;
      padding: 2rem 1rem;
      color: var(--muted);
    }
    .history-empty .empty-icon {
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
      opacity: 0.5;
    }
    .history-empty strong {
      display: block;
      font-size: 1rem;
      color: var(--text);
      margin-bottom: 0.25rem;
    }
    .week-day-card {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.8rem;
      margin-bottom: 0.65rem;
      background: #fdfaf7;
      border-left: 3px solid transparent;
      transition: border-color 0.2s, opacity 0.2s;
    }
    .week-day-card.confirmed {
      border-left-color: var(--ok);
      background: linear-gradient(135deg, #f5faf6, #fdfaf7);
    }
    .week-day-card.past {
      opacity: 0.55;
    }
    .week-day-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.45rem;
    }
    .week-day-header strong { font-size: 0.95rem; color: var(--text); }
    .week-day-header .day-date { font-size: 0.72rem; color: var(--muted); margin-left: 0.4rem; font-weight: 400; }
    .week-day-header span { font-size: 0.78rem; color: var(--muted); }
    .week-day-header .confirmed-badge {
      display: inline-flex; align-items: center; gap: 0.25rem;
      font-size: 0.7rem; font-weight: 600; color: var(--ok);
      background: #e8f5e9; padding: 0.15rem 0.5rem; border-radius: 999px;
    }
    .week-day-pieces { display: flex; gap: 0.45rem; flex-wrap: wrap; }
    .week-day-pieces .piece img { width: 60px; height: 78px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
    .week-day-pieces .piece { text-align: center; font-size: 0.68rem; color: var(--muted); width: 64px; }
    .week-day-why { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
    .week-day-actions {
      display: flex; gap: 0.5rem; margin-top: 0.55rem; align-items: center;
    }
    .week-day-actions .btn-love {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.4rem 0.9rem; border-radius: 999px; border: none;
      background: linear-gradient(135deg, #e07058, #d4654a); color: #fff;
      font-size: 0.78rem; font-weight: 600; cursor: pointer;
    }
    .week-day-actions .btn-skip {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.4rem 0.9rem; border-radius: 999px;
      border: 1px solid var(--border); background: #fff; color: var(--text);
      font-size: 0.78rem; font-weight: 600; cursor: pointer;
    }
    .week-day-actions .btn-change {
      margin-left: auto; font-size: 0.74rem; color: var(--accent);
      background: none; border: none; cursor: pointer; font-weight: 600;
      text-decoration: underline;
    }
    .week-gaps-banner {
      display: flex; align-items: flex-start; gap: 0.5rem;
      padding: 0.6rem 0.8rem; border-radius: 10px;
      background: #fef9e7; border: 1px solid #f5e6a3;
      margin-bottom: 0.75rem; font-size: 0.82rem; color: #7a6c3a;
    }
    .week-gaps-banner .gap-icon { font-size: 1.1rem; flex-shrink: 0; }
    .week-header-bar {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 0.75rem;
    }
    .week-header-bar .week-label {
      font-size: 0.88rem; font-weight: 700; color: var(--text);
    }
    .week-header-bar .btn-new-week {
      font-size: 0.76rem; padding: 0.35rem 0.75rem; border-radius: 999px;
      border: 1px solid var(--border); background: #fff; color: var(--accent);
      font-weight: 600; cursor: pointer;
    }

    /* ── Insights ── */
    .insights-grid { display: grid; gap: 0.65rem; margin-bottom: 1rem; }
    .insight-card {
      display: flex; align-items: flex-start; gap: 0.6rem;
      padding: 0.7rem 0.85rem; border-radius: 10px;
      border: 1px solid var(--border); background: #fdfaf7;
      font-size: 0.84rem; color: var(--text); line-height: 1.45;
    }
    .insight-card.high { border-left: 3px solid #e07058; background: #fef6f4; }
    .insight-card.medium { border-left: 3px solid #e8a849; background: #fef9ee; }
    .insight-card.low { border-left: 3px solid #9cb8a5; background: #f5faf7; }
    .insight-icon { font-size: 1.35rem; flex-shrink: 0; }
    .insight-text { flex: 1; }
    .stat-ring {
      display: flex; flex-direction: column; gap: 0.55rem;
      margin-bottom: 1rem;
    }
    .wi-charts-wrap { display: flex; flex-direction: column; gap: 0.85rem; }
    .wi-chart-block {
      padding: 0.85rem 0.95rem; border-radius: 12px;
      border: 1px solid var(--border); background: #fff;
    }
    .wi-chart-title { font-size: 0.84rem; font-weight: 700; color: var(--text); margin-bottom: 0.55rem; }
    .wi-chart-help { font-size: 0.72rem; color: var(--muted); margin: -0.2rem 0 0.45rem; }
    .wi-chart-body { display: flex; flex-direction: column; gap: 0.55rem; }
    .wi-hero-row { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; }
    .wi-hero-count { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
    .wi-hero-label { font-size: 0.84rem; font-weight: 600; color: var(--muted); }
    .wi-segment-track {
      display: flex; height: 14px; border-radius: 6px; overflow: hidden;
      background: #f3f3f4; margin-bottom: 0.55rem;
    }
    .wi-segment { min-width: 4px; }
    .wi-segment--available { background: #3a8f5c; border-radius: 6px 0 0 6px; }
    .wi-segment--laundry { background: #e8a849; border-radius: 0 6px 6px 0; }
    .wi-segment--rounded-right { border-radius: 6px; }
    .wi-segment--rounded-left { border-radius: 6px; }
    .wi-legend-row { display: flex; flex-wrap: wrap; gap: 1rem; }
    .wi-legend-item { display: flex; align-items: center; gap: 0.35rem; }
    .wi-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
    .wi-legend-dot--available { background: #3a8f5c; }
    .wi-legend-dot--laundry { background: #e8a849; }
    .wi-legend-text { font-size: 0.78rem; font-weight: 600; color: var(--text); }
    .wi-legend-pct { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
    .wi-bar-row { display: flex; flex-direction: column; gap: 0.3rem; }
    .wi-bar-label-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
    .wi-bar-label { font-size: 0.78rem; font-weight: 600; color: var(--text); }
    .wi-bar-count { font-size: 0.78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
    .wi-bar-track {
      height: 10px; border-radius: 5px; overflow: hidden; background: #f3f3f4;
    }
    .wi-bar-fill { height: 100%; border-radius: 5px; min-width: 4px; }
    .wi-bar-fill--light { border: 1px solid var(--border); box-sizing: border-box; }
    .wi-more-hint { font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-top: 0.15rem; padding: 0.2rem 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
    .wi-more-hint:hover { text-decoration: underline; }
    .stat-pill-row {
      display: flex; flex-wrap: wrap; gap: 0.55rem;
    }
    .stat-pill {
      display: flex; align-items: center; gap: 0.35rem;
      padding: 0.4rem 0.75rem; border-radius: 999px;
      border: 1px solid var(--border); background: #fff;
      font-size: 0.78rem; font-weight: 600; color: var(--text);
    }
    .stat-pill .stat-val { color: var(--accent); font-weight: 700; }
    .dup-card {
      padding: 0.6rem 0.8rem; border-radius: 10px;
      border: 1px solid var(--border); background: #fdfaf7;
      font-size: 0.82rem; color: var(--text); margin-bottom: 0.5rem;
    }
    .dup-card .dup-badge {
      display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
      background: #ffeee7; color: #d4654a; font-size: 0.72rem; font-weight: 700;
      margin-right: 0.4rem;
    }
    .seasonal-card {
      display: flex; align-items: flex-start; gap: 0.5rem;
      padding: 0.65rem 0.8rem; border-radius: 10px;
      background: linear-gradient(135deg, #f5f0eb, #fdfaf7);
      border: 1px solid var(--border); font-size: 0.82rem; color: var(--text);
      margin-bottom: 0.5rem;
    }
    .seasonal-icon { font-size: 1.25rem; flex-shrink: 0; }
    .forecast-strip {
      display: flex; gap: 0.55rem; overflow-x: auto; padding-bottom: 0.4rem;
      -webkit-overflow-scrolling: touch; margin-bottom: 1rem;
    }
    .forecast-day {
      min-width: 100px; padding: 0.65rem 0.7rem;
      border-radius: 10px; border: 1px solid var(--border);
      background: #fff; text-align: center; flex-shrink: 0;
    }
    .forecast-day .fc-date { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
    .forecast-day .fc-icon { font-size: 1.6rem; margin: 0.2rem 0; }
    .forecast-day .fc-temp { font-size: 0.88rem; font-weight: 700; color: var(--text); }
    .forecast-day .fc-label { font-size: 0.7rem; color: var(--muted); }
    .forecast-day.rainy { border-color: #b3d4ff; background: #f0f7ff; }
    .insights-empty {
      text-align: center; padding: 2rem 1rem; color: var(--muted);
    }
    .insights-empty .ie-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
    .insights-empty .ie-title { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 0.25rem; }
    .insights-empty .ie-sub { font-size: 0.85rem; }
    .tip-card {
      display: flex; align-items: flex-start; gap: 0.6rem;
      padding: 0.65rem 0.8rem; border-radius: 10px;
      background: linear-gradient(135deg, #fdfaf7, #f9f5f0);
      border: 1px solid var(--border);
      font-size: 0.84rem; color: var(--text); line-height: 1.5;
      margin-bottom: 0.5rem;
    }
    .tip-card .tip-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.05rem; }
    .tip-card .tip-text { flex: 1; }
    .tip-card.cat-weather { border-left: 3px solid #4a90d9; }
    .tip-card.cat-body { border-left: 3px solid #9b7ed8; }
    .tip-card.cat-color { border-left: 3px solid #e07058; }
    .tip-card.cat-profession { border-left: 3px solid #e8a849; }
    .tip-card.cat-wardrobe { border-left: 3px solid #9cb8a5; }
    .tip-card.cat-forecast { border-left: 3px solid #4a90d9; }
    .section-divider {
      margin: 0.8rem 0 0.5rem; font-size: 0.82rem; font-weight: 700; color: var(--text);
      letter-spacing: 0.01em;
    }

    /* ── Toast / Snackbar ── */
    .toast-container {
      position: fixed;
      top: 1rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 90;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      pointer-events: none;
    }
    .toast {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.7rem 1.1rem;
      border-radius: 12px;
      background: #2b2523;
      color: #fff;
      font-size: 0.88rem;
      font-weight: 600;
      box-shadow: 0 10px 28px rgba(43, 37, 35, 0.25);
      pointer-events: auto;
      animation: toastIn 0.35s ease both;
      max-width: min(400px, calc(100vw - 2rem));
    }
    .toast.ok { background: linear-gradient(135deg, #2d7a4a, #3a8f5c); }
    .toast.warn { background: linear-gradient(135deg, #93622d, #b87a3a); }
    .toast.error { background: linear-gradient(135deg, #8b3030, #c44545); }
    .toast .toast-icon { font-size: 1.15rem; flex-shrink: 0; }
    .toast.leaving { animation: toastOut 0.3s ease both; }
    @keyframes toastIn {
      from { opacity: 0; transform: translateY(-12px) scale(0.95); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes toastOut {
      from { opacity: 1; transform: translateY(0) scale(1); }
      to { opacity: 0; transform: translateY(-12px) scale(0.9); }
    }

    /* ── Onboarding Wizard ── */
    .onboard-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: radial-gradient(900px 700px at 50% 20%, #fdf5f0 0%, #faf8f5 50%, #f0e6dc 100%);
      display: flex; flex-direction: column; align-items: center;
      overflow-y: auto; padding: 1.5rem 1rem 3rem;
    }
    .onboard-brand {
      margin-bottom: 1rem;
      text-align: left;
      align-self: flex-start;
      width: 100%;
      max-width: 520px;
    }
    .onboard-brand h1 {
      font-family: "Fraunces", Georgia, serif;
      font-weight: 600; font-size: 1.65rem; margin: 0;
      color: var(--text); letter-spacing: -0.02em;
    }
    .onboard-brand span { font-size: 0.82rem; color: var(--muted); }

    .onboard-progress {
      display: flex; align-items: center; gap: 0.35rem;
      margin-bottom: 1.5rem;
    }
    .onboard-progress .dot {
      width: 10px; height: 10px; border-radius: 50%;
      background: var(--border); transition: all 0.35s ease;
    }
    .onboard-progress .dot.active {
      background: var(--accent); width: 28px; border-radius: 999px;
    }
    .onboard-progress .dot.done {
      background: var(--ok);
    }

    .onboard-card {
      width: min(420px, calc(100vw - 2rem));
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 2rem 1.5rem;
      box-shadow: 0 18px 40px rgba(43, 37, 35, 0.1);
      text-align: center;
      animation: obFadeUp 0.4s ease both;
    }
    @keyframes obFadeUp {
      from { opacity: 0; transform: translateY(18px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .onboard-card .ob-icon {
      font-size: 2.8rem; margin-bottom: 0.5rem;
      display: block;
    }
    .onboard-card h2 {
      font-family: "Fraunces", Georgia, serif;
      font-weight: 600; font-size: 1.3rem;
      margin: 0 0 0.35rem; color: var(--text);
      text-transform: none; letter-spacing: 0;
    }
    .onboard-card .ob-sub {
      font-size: 0.88rem; color: var(--muted);
      margin: 0 0 1.2rem; line-height: 1.5;
    }
    .onboard-card .ob-actions {
      display: flex; gap: 0.6rem; justify-content: center;
      margin-top: 1.2rem;
    }
    .onboard-card .btn-primary { min-width: 140px; }
    .onboard-card .btn-ghost { min-width: 90px; }

    .ob-city-wrap { text-align: left; margin-bottom: 0.4rem; }
    .ob-city-wrap label { text-align: left; }
    .ob-city-results {
      margin-top: 0.3rem; border: 1px solid var(--border);
      border-radius: 8px; max-height: 160px; overflow-y: auto;
      background: #fff; box-shadow: var(--shadow);
    }
    .ob-city-results button {
      display: block; width: 100%; text-align: left;
      padding: 0.5rem 0.65rem; border: none;
      border-bottom: 1px solid var(--border);
      background: transparent; color: var(--text);
      font-size: 0.85rem; cursor: pointer;
    }
    .ob-city-results button:last-child { border-bottom: none; }
    .ob-city-results button:hover { background: #fdf5f2; }
    .ob-selected-city {
      margin-top: 0.45rem; font-size: 0.82rem; color: var(--ok); font-weight: 600;
    }
    .ob-weather-card {
      display: flex; align-items: center; gap: 0.65rem;
      border: 1px solid var(--border); border-radius: 12px;
      padding: 0.65rem 0.8rem; margin-top: 0.6rem;
      background: linear-gradient(135deg, #fdf8f4, #fff);
      animation: obFadeUp 0.35s ease both;
    }
    .ob-weather-card .weather-icon { font-size: 1.8rem; flex-shrink: 0; }
    .ob-weather-card .weather-info { text-align: left; }
    .ob-weather-card .weather-temp {
      font-size: 1.15rem; font-weight: 700; color: var(--text);
    }
    .ob-weather-card .weather-desc {
      font-size: 0.78rem; color: var(--muted); line-height: 1.3;
    }

    .ob-tile-grid {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: 0.55rem; text-align: left; margin-bottom: 0.5rem;
    }
    .ob-tile-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
    .ob-tile {
      border: 2px solid var(--border);
      border-radius: 12px; padding: 0.65rem 0.6rem;
      cursor: pointer; transition: all 0.2s ease;
      background: #fff;
      display: flex; align-items: center; gap: 0.55rem;
    }
    .ob-tile:hover { border-color: var(--accent); background: #fdf5f2; }
    .ob-tile.selected {
      border-color: var(--accent);
      background: linear-gradient(135deg, #fdf5f2, #fce8e3);
      box-shadow: 0 4px 12px rgba(212, 101, 74, 0.15);
    }
    .ob-tile .tile-icon { font-size: 1.4rem; flex-shrink: 0; }
    .ob-tile .tile-text { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.25; }
    .ob-tile .tile-text span { display: block; font-weight: 400; font-size: 0.72rem; color: var(--muted); }

    .ob-section-label {
      font-size: 0.78rem; color: var(--muted); font-weight: 600;
      text-transform: uppercase; letter-spacing: 0.06em;
      text-align: left; margin: 0.8rem 0 0.4rem;
    }

    .chip-grid {
      display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.4rem;
    }
    .chip {
      display: inline-flex; align-items: center; gap: 0.3rem;
      padding: 0.35rem 0.7rem; border-radius: 20px;
      border: 1.5px solid var(--border); background: #fff;
      font-size: 0.78rem; font-weight: 500; color: var(--text);
      cursor: pointer; transition: all 0.18s ease; user-select: none;
    }
    .chip:hover { border-color: var(--accent); background: #fdf5f2; }
    .chip.selected {
      border-color: var(--accent); background: var(--accent); color: #fff;
    }
    .chip .chip-dot {
      width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1);
      flex-shrink: 0;
    }

    .ob-skip-wrap {
      text-align: center;
      margin-top: 0.85rem;
    }
    .ob-skip-link {
      display: inline-block;
      font-size: 0.8rem; color: var(--muted);
      cursor: pointer; text-decoration: underline;
      background: none; border: none; font-family: inherit;
      padding: 0;
    }
    .ob-skip-link:hover { color: var(--accent); }

    .ob-profession-list {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      margin-top: 1rem;
    }
    .ob-profession-row {
      width: 100%;
      text-align: left;
      border: 1.5px solid var(--border);
      border-radius: 12px;
      padding: 0.75rem 0.9rem;
      background: #fff;
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text);
      cursor: pointer;
      transition: all 0.18s ease;
      font-family: inherit;
    }
    .ob-profession-row:hover {
      border-color: var(--accent);
      background: #fdf5f2;
    }
    .ob-profession-row.selected {
      border-color: var(--accent);
      background: linear-gradient(135deg, #fdf5f2, #fce8e3);
      color: var(--accent);
    }

    .ob-celebration {
      animation: obPop 0.5s ease both;
    }
    @keyframes obPop {
      0% { opacity: 0; transform: scale(0.8); }
      60% { transform: scale(1.03); }
      100% { opacity: 1; transform: scale(1); }
    }
    .ob-celebration .ob-icon { font-size: 3.5rem; }
    .ob-stat-row {
      display: flex; gap: 0.6rem; justify-content: center;
      margin: 1rem 0 0.5rem;
    }
    .ob-stat {
      border: 1px solid var(--border); border-radius: 10px;
      padding: 0.5rem 0.8rem; background: #fdfaf7; text-align: center;
    }
    .ob-stat strong { display: block; font-size: 1.1rem; color: var(--accent); }
    .ob-stat span { font-size: 0.7rem; color: var(--muted); }

    .routine-row {
      padding: 18px 8px;
      border-bottom: 1px solid var(--border);
      display: grid;
      grid-template-columns: 56px 1fr;
      gap: 16px;
      align-items: center;
      transition: background 0.2s ease;
      background: transparent;
      border-radius: 0;
      margin-bottom: 0;
    }
    .routine-row:last-child { border-bottom: none; }
    .routine-row:hover {
      border-color: var(--border); box-shadow: none;
    }
    .routine-day-meta {
      text-align: left;
    }
    .routine-day-num {
      font-family: "Fraunces", Georgia, serif;
      font-size: 28px;
      font-weight: 400;
      line-height: 1;
      color: var(--text);
      font-feature-settings: "lnum";
    }
    .routine-day-name {
      font-size: 10px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--muted);
      margin-top: 6px;
    }
    .routine-selects {
      display: flex; gap: 8px; align-items: center; justify-content: flex-start;
      flex: 1;
      width: 100%;
    }
    .routine-select {
      appearance: none !important;
      -webkit-appearance: none !important;
      -moz-appearance: none !important;
      background: #fff !important;
      border: 1px solid var(--border);
      color: var(--text) !important;
      padding: 9px 14px 9px 12px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.005em;
      cursor: pointer;
      transition: all 0.2s ease;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%238a7f72' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
      background-repeat: no-repeat !important;
      background-position: right 12px center !important;
      padding-right: 30px !important;
      opacity: 1 !important;
      visibility: visible !important;
    }
    .routine-select:hover {
      border-color: var(--text);
      background-color: var(--bg-card);
    }
    .routine-select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(196,77,58,0.12);
    }
    
    .routine-type-select {
      background-color: #fff !important;
      min-width: 80px;
      width: 80px;
      flex-shrink: 0;
    }
    .routine-type-select.type-off {
      background-color: #e8c5b8 !important;
      border-color: transparent;
      color: #a83a28 !important;
    }
    .routine-type-select.type-off:hover {
      background-color: #ebb6a3;
    }

    .routine-formality-select {
      flex: 1;
      min-width: 120px;
      background-color: #fff !important;
      color: var(--text) !important;
      font-style: italic;
      font-family: "Fraunces", Georgia, serif;
      font-size: 14px;
      font-weight: 400;
      letter-spacing: 0.002em;
      text-align: left !important;
      -webkit-appearance: none !important;
      -moz-appearance: none !important;
      appearance: none !important;
    }
    .routine-formality-select:hover {
      color: var(--text);
    }

    /* off-day softening */
    .routine-row.is-off .routine-day-num { color: var(--accent); font-style: italic; }
    .routine-row.is-off {
      background: linear-gradient(90deg, transparent, rgba(232,197,184,0.15), transparent);
    }

    /* today highlight in weekly routine setup */
    .routine-row.is-today {
      background: rgba(196, 77, 58, 0.08);
      border-radius: 12px;
      border-left: 3px solid var(--accent);
      padding-left: 12px;
      margin: 0 -6px;
      padding-right: 6px;
    }
    .routine-row.is-today.is-off {
      background: linear-gradient(90deg, rgba(196, 77, 58, 0.1), rgba(232,197,184,0.18));
    }
    .routine-row.is-today .routine-day-num {
      color: var(--accent);
    }
    .routine-row.is-today .routine-day-name {
      color: var(--accent);
    }
    .routine-today-badge {
      display: inline-block;
      margin-left: 4px;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent);
      background: rgba(196, 77, 58, 0.14);
      vertical-align: middle;
    }

    .look-board-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 0.75rem;
    }

    .look-board-dialog {
      max-width: min(520px, 96vw);
      border: none;
      border-radius: 16px;
      padding: 0;
    }

    .look-board-dialog .inner {
      padding: 1rem 1rem 1.25rem;
    }

    .look-board-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.5rem;
    }

    .look-board-header h3 {
      margin: 0;
      font-family: var(--font-display);
    }

    .look-board-status {
      min-height: 1.25rem;
      margin: 0 0 0.5rem;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

    .look-board-frame {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      max-height: 70vh;
      display: flex;
      justify-content: center;
    }

    .look-board-frame img {
      display: block;
      width: 100%;
      height: auto;
      object-fit: contain;
    }

    .look-board-footer {
      margin-top: 0.85rem;
      justify-content: center;
    }

