@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=DM+Sans:opsz,wght@9..40,400..700&display=swap');

/* Sky colors are registered so the whole backdrop can crossfade between weather moods. */
@property --s1 { syntax: '<color>'; inherits: true; initial-value: #2f78db; }
@property --s2 { syntax: '<color>'; inherits: true; initial-value: #4f95ea; }
@property --s3 { syntax: '<color>'; inherits: true; initial-value: #6aa6ea; }

:root {
  --ink: #141a2e;
  --ink-soft: #4b536e;
  --ink-faint: #8a91a8;
  --paper: #f6f7fb;
  --card: #ffffff;
  --card-border: rgba(20, 26, 46, 0.09);
  --glass: rgba(255, 255, 255, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 18px 40px -18px rgba(10, 20, 50, 0.45);
  --shadow: 0 18px 40px -18px rgba(10, 20, 50, 0.45);
  --shadow-sm: 0 4px 14px -6px rgba(10, 20, 50, 0.25);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --display: 'Bricolage Grotesque', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --on-sky: #ffffff;
  --on-sky-soft: rgba(255, 255, 255, 0.82);
  --sky-text-shadow: 0 2px 18px rgba(8, 20, 60, 0.35);

  --sunset: linear-gradient(120deg, #ffd166 0%, #ff9f5a 45%, #ff6f7d 100%);
  --brand: #ff7a50;
  --brand-dark: #e8592f;
  --brand-soft: #ffe9df;
  --warm: #c2551f;
  --cold: #3d6db5;
  --rain: #3d6db5;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, .61, .36, 1);

  --band-dondurucu: #3e6fd8;
  --band-dondurucu-soft: #e2ebff;
  --band-soguk: #3f8fe0;
  --band-soguk-soft: #e1efff;
  --band-serin: #17a58f;
  --band-serin-soft: #dcf6f0;
  --band-ilik: #57ad3c;
  --band-ilik-soft: #e6f6dd;
  --band-sicak: #f08a24;
  --band-sicak-soft: #ffeedd;
  --band-cok_sicak: #e8463f;
  --band-cok_sicak-soft: #ffe2df;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #2f78db;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; color: var(--ink); }
p { margin: 0; }

/* =========================================================
   Living sky backdrop
   ========================================================= */
.sky {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  --s1: #2f78db; --s2: #4f95ea; --s3: #6aa6ea;
  --cloud: #ffffff; --cloud-op: 0.9; --clouds-vis: 0.55;
  transition: --s1 1.6s ease, --s2 1.6s ease, --s3 1.6s ease;
}
.sky.is-day.k-clear   { --s1: #1f6fd6; --s2: #3e8fee; --s3: #5c9de6; --clouds-vis: 0.35; }
.sky.is-day.k-partly  { --s1: #2d72cf; --s2: #5a98e2; --s3: #6a9fd8; --clouds-vis: 0.9; }
.sky.is-day.k-cloudy  { --s1: #4e6485; --s2: #6d82a2; --s3: #7f90a8; --cloud: #e9eef5; --clouds-vis: 1; }
.sky.is-day.k-fog     { --s1: #6f7d92; --s2: #8592a4; --s3: #8e9aaa; --cloud: #eef1f5; --clouds-vis: 0.8; }
.sky.is-day.k-rain    { --s1: #2e3d58; --s2: #4a5c7a; --s3: #62748f; --cloud: #b9c3d3; --clouds-vis: 1; }
.sky.is-day.k-storm   { --s1: #161c2c; --s2: #2b3550; --s3: #444f6a; --cloud: #8a95aa; --clouds-vis: 1; }
.sky.is-day.k-snow    { --s1: #5f7ea6; --s2: #7792b5; --s3: #7f97b8; --cloud: #f4f7fb; --clouds-vis: 1; }
.sky.is-night         { --s1: #060a22; --s2: #141c48; --s3: #2c3470; --cloud: #5a6390; --clouds-vis: 0.5; }
.sky.is-night.k-partly { --clouds-vis: 0.8; }
.sky.is-night.k-cloudy, .sky.is-night.k-fog { --s1: #0d1226; --s2: #1f2742; --s3: #333c5c; --cloud: #4d5677; --clouds-vis: 1; }
.sky.is-night.k-rain, .sky.is-night.k-storm { --s1: #070a16; --s2: #151c30; --s3: #283149; --cloud: #3c4561; --clouds-vis: 1; }
.sky.is-night.k-snow  { --s1: #121a36; --s2: #263157; --s3: #3d4a75; --cloud: #8f9abd; --clouds-vis: 1; }

.sky-grad {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 85% -10%, rgba(255,255,255,0.22), transparent 60%),
    linear-gradient(180deg, var(--s1) 0%, var(--s2) 55%, var(--s3) 100%);
}
.sky-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30vh;
  background: linear-gradient(180deg, transparent, rgba(6, 12, 40, 0.18));
}

/* Stars */
.sky-stars {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%;
  opacity: 0; transition: opacity 1.6s ease;
  animation: twinkle 5s ease-in-out infinite;
}
.sky.is-night .sky-stars { opacity: 1; }
.sky.is-night.k-cloudy .sky-stars, .sky.is-night.k-rain .sky-stars,
.sky.is-night.k-storm .sky-stars, .sky.is-night.k-fog .sky-stars, .sky.is-night.k-snow .sky-stars { opacity: 0.15; }
@keyframes twinkle { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(0.55); } }

/* Sun */
.sky-sun, .sky-moon {
  position: absolute; top: -40px; right: -40px; width: 340px; height: 340px;
  opacity: 0; transform: translateY(40px) scale(0.8);
  transition: opacity 1.4s ease, transform 1.6s var(--ease-out);
}
.sky.is-day.k-clear .sky-sun, .sky.is-day.k-partly .sky-sun { opacity: 1; transform: none; }
.sky.is-day.k-partly .sky-sun { opacity: 0.85; }
.sun-glow {
  position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 150, 0.55) 0%, rgba(255, 210, 120, 0.18) 35%, transparent 65%);
  animation: pulse 6s ease-in-out infinite;
}
.sun-rays {
  position: absolute; inset: -6%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 240, 190, 0.35) 0deg 6deg, transparent 6deg 22deg);
  -webkit-mask: radial-gradient(circle, transparent 28%, #000 31%, transparent 70%);
          mask: radial-gradient(circle, transparent 28%, #000 31%, transparent 70%);
  animation: spin 80s linear infinite;
}
.sun-core {
  position: absolute; inset: 31%; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffbe0 0%, #ffe07a 45%, #ffb43a 100%);
  box-shadow: 0 0 60px 20px rgba(255, 200, 90, 0.55), 0 0 140px 60px rgba(255, 190, 90, 0.25);
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.8; } }

/* Moon */
.sky.is-night.k-clear .sky-moon, .sky.is-night.k-partly .sky-moon { opacity: 1; transform: none; }
.moon-glow {
  position: absolute; inset: -10%; border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 200, 255, 0.35) 0%, transparent 60%);
  animation: pulse 7s ease-in-out infinite;
}
.moon-core {
  position: absolute; inset: 34%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e6e8ff 55%, #b9bfe8 100%);
  box-shadow: inset -18px -10px 0 rgba(150, 160, 210, 0.35), 0 0 70px 14px rgba(190, 200, 255, 0.35);
}

/* Clouds — each one is three blurred puffs drifting across at its own pace. */
.sky-clouds { position: absolute; inset: 0; opacity: var(--clouds-vis); transition: opacity 1.6s ease; }
.cloud {
  position: absolute; left: 0; width: 360px; height: 120px;
  opacity: var(--cloud-op);
  animation: drift linear infinite;
  will-change: transform;
}
.cloud span {
  position: absolute; bottom: 0; border-radius: 50%;
  background: var(--cloud);
  filter: blur(14px);
  transition: background 1.6s ease;
}
.cloud span:nth-child(1) { left: 0; width: 46%; height: 64%; }
.cloud span:nth-child(2) { left: 24%; width: 52%; height: 100%; }
.cloud span:nth-child(3) { left: 58%; width: 42%; height: 70%; }
.cloud-1 { top: 6vh;  transform: scale(1.3); animation-duration: 95s;  animation-delay: -10s; }
.cloud-2 { top: 18vh; transform: scale(0.8); animation-duration: 120s; animation-delay: -60s; opacity: 0.75; }
.cloud-3 { top: 30vh; transform: scale(1.6); animation-duration: 150s; animation-delay: -95s; }
.cloud-4 { top: 2vh;  transform: scale(0.9); animation-duration: 110s; animation-delay: -30s; opacity: 0.6; }
.cloud-5 { top: 46vh; transform: scale(1.2); animation-duration: 135s; animation-delay: -75s; opacity: 0.7; }
.cloud-6 { top: 62vh; transform: scale(1.8); animation-duration: 170s; animation-delay: -20s; opacity: 0.55; }
.cloud-7 { top: 12vh; transform: scale(2.2); animation-duration: 190s; animation-delay: -140s; opacity: 0.5; }
.sky.k-clear .cloud-3, .sky.k-clear .cloud-5, .sky.k-clear .cloud-6, .sky.k-clear .cloud-7 { display: none; }
@keyframes drift {
  from { translate: -420px 0; }
  to   { translate: calc(100vw + 420px) 0; }
}

.sky-haze {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease;
  background:
    linear-gradient(180deg, transparent 20%, rgba(235, 240, 248, 0.55) 70%, rgba(235, 240, 248, 0.7)),
    repeating-linear-gradient(180deg, transparent 0 60px, rgba(255,255,255,0.08) 60px 120px);
  animation: haze 18s ease-in-out infinite alternate;
}
.sky.k-fog .sky-haze { opacity: 1; }
@keyframes haze { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

.sky-fx { position: absolute; inset: 0; }
.sky-flash { position: absolute; inset: 0; background: #eaf0ff; opacity: 0; }
.sky-flash.flash { animation: flash 0.9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 8% { opacity: 0.55; } 16% { opacity: 0.05; } 24% { opacity: 0.4; } 100% { opacity: 0; } }

/* =========================================================
   App shell
   ========================================================= */
.stage { position: relative; z-index: 1; min-height: 100vh; display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.sidebar-brand { display: none; }

.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: calc(18px + env(safe-area-inset-top)) 18px 120px;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen[data-tab="onboarding"] { padding-bottom: 28px; }

/* Glass surface used by every card */
:root[data-daytime="night"] { --glass: rgba(255, 255, 255, 0.84); --glass-strong: rgba(255, 255, 255, 0.92); }
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
          backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---------- Floating nav ---------- */
.bottom-nav {
  position: absolute;
  left: 14px; right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 4px;
  padding: 7px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
          backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px -14px rgba(8, 18, 50, 0.5);
  z-index: 20;
}
.nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none;
  font-size: 11px; font-weight: 600;
  color: var(--ink-faint);
  padding: 8px 4px;
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, transform 0.2s var(--spring);
}
.nav-btn .nav-icon { width: 22px; height: 22px; transition: transform 0.35s var(--spring); }
.nav-btn:active { transform: scale(0.9); }
.nav-btn.active { color: #fff; background: var(--ink); box-shadow: 0 8px 18px -8px rgba(20, 26, 46, 0.7); }
.nav-btn.active .nav-icon { transform: translateY(-1px) scale(1.12) rotate(-6deg); }

/* ---------- Header ---------- */
.brand {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.brand-name {
  font-family: var(--display);
  font-size: 24px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--on-sky);
  text-shadow: var(--sky-text-shadow);
}
.brand-right { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: var(--brand); border: 2px solid rgba(255,255,255,0.85);
  flex-shrink: 0; padding: 0; cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.4);
  transition: transform 0.25s var(--spring);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-mark:hover { transform: scale(1.06) rotate(-4deg); }
.brand-mark:active { transform: scale(0.92); }
.brand-mark .avatar-text { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }

.lang-menu { position: relative; }
.lang-menu-btn {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s var(--spring);
}
.lang-menu-btn:hover { background: rgba(255, 255, 255, 0.32); }
.lang-menu-btn svg { width: 11px; height: 11px; transform: rotate(90deg); transition: transform 0.25s ease; flex-shrink: 0; }
.lang-menu-btn.open svg { transform: rotate(-90deg); }
.lang-menu-btn:active { transform: scale(0.94); }
.lang-menu-list {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 6px; min-width: 160px; z-index: 40;
  display: flex; flex-direction: column; gap: 1px;
  opacity: 0; transform: translateY(-6px) scale(0.96); transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.25s var(--spring);
}
.lang-menu-list-open { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: none; background: none; text-align: left; width: 100%;
  padding: 9px 11px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: background 0.15s ease;
}
.lang-menu-item:hover { background: rgba(20, 26, 46, 0.06); }
.lang-menu-item.active { background: var(--ink); color: #fff; }
.lang-menu-item .lang-code { font-size: 10px; font-weight: 700; color: var(--ink-faint); letter-spacing: 0.04em; }
.lang-menu-item.active .lang-code { color: rgba(255,255,255,0.7); }
[dir="rtl"] .swap-btn { right: auto; left: 10px; }
[dir="rtl"] .lang-menu-list { right: auto; left: 0; transform-origin: top left; }

/* ---------- City ---------- */
.city-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.25s var(--spring);
}
.city-chip:hover { background: rgba(255, 255, 255, 0.3); }
.city-chip:active { transform: scale(0.95); }
.city-chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.city-chip svg:last-child { width: 12px; height: 12px; opacity: 0.8; }

.city-row { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 13.5px; font-weight: 500; }
.city-row svg { width: 15px; height: 15px; flex-shrink: 0; }
.city-name-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}

/* =========================================================
   Today
   ========================================================= */
.today-top { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.today-side { display: flex; flex-direction: column; gap: 14px; }

.hero {
  position: relative;
  min-height: 300px;
  padding: 6px 4px 34px;
  color: var(--on-sky);
}
.hero-main { position: relative; z-index: 2; }
.hero-temp {
  font-family: var(--display);
  font-size: clamp(96px, 29vw, 176px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.06em;
  margin: 18px 0 8px -6px;
  color: #fff;
  text-shadow: 0 10px 40px rgba(8, 20, 60, 0.35);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: flex-start;
}
.hero-deg { font-size: 0.5em; margin-top: 0.12em; opacity: 0.85; }
.hero-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; text-shadow: var(--sky-text-shadow); }
.hero-temp-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700;
  color: var(--on-sky);
}
.hero-thermo { font-size: 13.5px; color: var(--on-sky-soft); }
.hero-condition {
  font-family: var(--display);
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  margin: 6px 0 14px;
  text-shadow: var(--sky-text-shadow);
}
.hero-condition strong { font-weight: 700; }
.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; color: var(--on-sky-soft);
}
.stat-pill b { color: #fff; font-weight: 700; }
.stat-pill svg { width: 14px; height: 14px; color: #fff; }

.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-glyph {
  flex-shrink: 0;
  width: clamp(110px, 32vw, 190px);
  margin-right: -8px;
  filter: drop-shadow(0 20px 30px rgba(8, 20, 60, 0.3));
}
.hero-glyph .wglyph { animation: bob 6s ease-in-out infinite; }

.hero-landmark {
  position: relative;
  margin: 18px -18px -34px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 75%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 75%, transparent);
          mask-composite: intersect;
}
.hero-landmark > svg { width: 100%; height: auto; display: block; overflow: visible; }
.lm-back { fill: rgba(255, 255, 255, 0.2); }
.lm-win { fill: #ffd76b; opacity: 0; transition: opacity 1.5s ease; }
:root[data-daytime="night"] .lm-win { opacity: 0.85; animation: twinkle 4s ease-in-out infinite; }
.lm-front path, .lm-front text { fill: rgba(255, 255, 255, 0.92); }
.lm-front .lm-stroke { fill: none; stroke: rgba(255, 255, 255, 0.92); stroke-linecap: round; stroke-linejoin: round; }
.lm-text { font-family: var(--display); font-weight: 800; letter-spacing: 0.04em; }
:root[data-daytime="night"] .lm-front path, :root[data-daytime="night"] .lm-front text { fill: rgba(225, 232, 255, 0.82); }
:root[data-daytime="night"] .lm-front .lm-stroke { fill: none; stroke: rgba(225, 232, 255, 0.82); }
.lm-front { filter: drop-shadow(0 6px 16px rgba(8, 20, 60, 0.25)); }
.lm-back-wrap { animation: fadeIn 1.4s ease both 0.2s; }
.lm-front > * { animation: lm-rise 1.1s var(--spring) both 0.35s; transform-box: fill-box; }
@keyframes lm-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Day curve */
.daypart-card { border-radius: var(--radius-lg); padding: 16px 10px 14px; position: relative; }
.daypart-curve { position: absolute; left: 0; right: 0; top: 14px; width: 100%; height: 70px; overflow: visible; }
.draw-line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s var(--ease-out) forwards 0.35s; }
.daypart-cols { display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.daypart {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 82px; gap: 3px; text-align: center;
}
.daypart-dot {
  position: absolute; left: 50%;
  top: calc(var(--dot-y) * 1px - 7px);
  width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transform: translateX(-50%) scale(0);
  animation: dot-in 0.5s var(--spring) forwards;
}
.daypart:nth-child(1) .daypart-dot { animation-delay: 0.6s; }
.daypart:nth-child(2) .daypart-dot { animation-delay: 0.95s; }
.daypart:nth-child(3) .daypart-dot { animation-delay: 1.3s; }
@keyframes dot-in { to { transform: translateX(-50%) scale(1); } }
.daypart-temp { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.daypart-time { font-size: 11px; color: var(--ink-faint); font-weight: 700; letter-spacing: 0.06em; }
.daypart-sub { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-soft); }
.daypart-sub svg { width: 11px; height: 11px; }

/* Segmented control with sliding thumb */
.seg, .gender-select {
  position: relative;
  display: grid; grid-template-columns: repeat(var(--n, 3), 1fr);
  padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.seg-thumb {
  position: absolute; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / var(--n));
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px -6px rgba(10, 20, 50, 0.5);
  transform: translateX(calc(var(--i) * 100%));
  animation: seg-in 0.5s var(--spring);
}
@keyframes seg-in { from { transform: translateX(calc(var(--i) * 100%)) scale(0.7); opacity: 0; } }
.seg-btn, .gender-btn {
  position: relative; z-index: 1;
  border: none; background: none;
  padding: 11px 4px;
  font-size: 13.5px; font-weight: 700;
  color: #fff;
  border-radius: 999px; cursor: pointer;
  transition: color 0.3s ease, transform 0.2s var(--spring);
}
.seg-btn.active { color: var(--ink); }
.seg-btn:active, .gender-btn:active { transform: scale(0.94); }
/* Plain (thumb-less) variant used inside glass panels */
.gender-select { background: rgba(20, 26, 46, 0.06); border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gender-btn { color: var(--ink-soft); }
.gender-btn.active { background: var(--ink); color: #fff; box-shadow: 0 6px 14px -6px rgba(20, 26, 46, 0.6); }

/* Section headings on the sky */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; }
.section-big {
  font-size: 30px; font-weight: 800; letter-spacing: -0.035em;
  color: #fff; text-shadow: var(--sky-text-shadow);
}
.band-chip {
  flex-shrink: 0;
  background: var(--band-color, var(--ink));
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 7px 13px; border-radius: 999px;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.5);
}
.section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--on-sky); font-weight: 700; margin-bottom: 10px; text-shadow: var(--sky-text-shadow);
}

/* Outfit look cards */
.look-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.look-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}
.look-card.lead { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.look-card.lead .look-art { width: 42%; flex-shrink: 0; height: 150px; }
.look-art {
  position: relative;
  height: 128px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 60%, var(--band-soft, #eef2fb) 0%, transparent 70%);
}
.look-art .garment {
  width: 108px; height: 108px;
  animation: float 5.5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  filter: drop-shadow(0 10px 12px rgba(10, 20, 50, 0.18));
  transition: transform 0.4s var(--spring);
}
.look-body { padding: 4px 16px 16px; }
.look-card.lead .look-body { padding: 16px 18px 16px 4px; }
.look-slot {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--band-color, var(--ink-faint)); font-weight: 800;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.look-item {
  font-family: var(--display);
  font-size: 17px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2;
  color: var(--ink); margin-bottom: 6px;
}
.look-card.lead .look-item { font-size: 21px; }
.look-reason { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.look-card.is-mine { box-shadow: var(--glass-shadow), 0 0 0 2px rgba(255, 159, 90, 0.8); }
.wardrobe-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; text-transform: none; letter-spacing: 0; font-weight: 700;
  color: #fff; background: var(--sunset);
  padding: 2px 8px 2px 6px; border-radius: 999px;
}
.wardrobe-tag svg { width: 11px; height: 11px; }

/* Outfit section: figure + list of pieces */
.outfit-layout { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.pieces-card { border-radius: var(--radius-lg); padding: 4px 6px; }
.piece-row { position: relative; display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px; padding: 12px 10px; border-bottom: 1px solid var(--card-border); }
.piece-row:last-child { border-bottom: none; }
.piece-row.is-mine::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--sunset); }
.piece-art { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 60%, var(--band-soft, #eef2fb) 0%, rgba(255,255,255,0.4) 75%); }
.piece-art .garment { width: 62px; height: 62px; filter: drop-shadow(0 6px 8px rgba(10,20,50,0.18)); animation: float 6s ease-in-out infinite; animation-delay: var(--float-delay, 0s); transition: transform 0.4s var(--spring); }
.piece-body { min-width: 0; }
.piece-body .look-item { font-size: 17px; margin-bottom: 3px; }
.piece-body .look-reason { font-size: 12.5px; }
.piece-row .swap-btn { position: static; align-self: center; }
.piece-row.swapped .garment { animation: swap-in 0.7s var(--spring), float 6s ease-in-out infinite 0.7s; }
.piece-row.swapped .piece-body { animation: fadeSlideIn 0.5s var(--ease-out) both; }
@media (hover: hover) {
  .piece-row:hover .garment { transform: scale(1.12) rotate(-4deg); }
}
@media (min-width: 860px) {
  .outfit-layout { grid-template-columns: minmax(260px, 0.75fr) 1.5fr; gap: 18px; align-items: stretch; }
  .board-col { position: relative; }
  .board-col .board-card { position: sticky; top: 24px; }
  .piece-row { grid-template-columns: 84px 1fr auto; padding: 14px 14px; }
  .piece-art { width: 84px; height: 84px; }
  .piece-art .garment { width: 72px; height: 72px; }
}
@media (max-width: 420px) {
  .piece-row { grid-template-columns: 60px 1fr auto; gap: 10px; padding: 10px 6px; }
  .piece-art { width: 60px; height: 60px; border-radius: 16px; }
  .piece-art .garment { width: 52px; height: 52px; }
  .piece-body .look-item { font-size: 15.5px; }
}

/* Outfit figure */
.board-card { padding: 14px 12px 6px; align-items: center; justify-content: flex-start; }
.board-title { align-self: flex-start; padding-left: 4px; }
.board { position: relative; display: flex; justify-content: center; align-items: center; flex: 1; width: 100%; padding: 6px 0 12px; }
.board .figure { width: 100%; max-width: 260px; height: auto; display: block; overflow: visible; filter: drop-shadow(0 10px 14px rgba(10, 20, 50, 0.18)); animation: float 7s ease-in-out infinite; }

/* Editor: photo -> drawing, style picker */
.photo-arrow svg { width: 18px; height: 18px; color: var(--ink-faint); }
.art-preview { width: 92px; height: 92px; flex-shrink: 0; border-radius: 20px; background: radial-gradient(circle at 50% 55%, #eef2fb, #fff 75%); border: 1.5px solid var(--card-border); display: flex; align-items: center; justify-content: center; transition: transform 0.4s var(--spring); }
.art-preview .garment { width: 86%; height: 86%; }
.art-preview.is-loading { animation: pulse 1.2s ease-in-out infinite; }
.photo-tip { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); background: var(--brand-soft); border-radius: 12px; padding: 9px 12px; }
.photo-badge { position: absolute; right: 8px; bottom: 8px; width: 34px !important; height: 34px !important; border-radius: 50%; object-fit: cover; border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,0.25); }
.style-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.style-row::-webkit-scrollbar { display: none; }
.style-opt { flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px; border: 1.5px solid var(--card-border); background: var(--card); padding: 4px; cursor: pointer; transition: transform 0.3s var(--spring), border-color 0.2s ease; }
.style-opt .garment { width: 100%; height: 100%; }
.style-opt:hover { transform: translateY(-2px); }
.style-opt.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.pattern-row { margin-bottom: 0; flex-wrap: wrap; overflow: visible; }
.sheet .chip { background: rgba(20, 26, 46, 0.06); border-color: transparent; color: var(--ink-soft); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet .chip.active { background: var(--ink); color: #fff; }
.swatch-photo { display: flex; align-items: center; justify-content: center; }
.swatch-photo svg { width: 14px; height: 14px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }

/* Swap a piece */
.section-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.reset-chip {
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.45);
  color: var(--ink); font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  animation: popIn 0.5s var(--spring) both;
  transition: background 0.2s ease, transform 0.25s var(--spring);
}
.reset-chip:hover { background: #fff; }
/* "Only my wardrobe" switch and its tips */
.section-actions { flex-wrap: wrap; justify-content: flex-end; }
.mine-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16); color: var(--on-sky, #fff);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 700; padding: 7px 12px 7px 10px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s var(--spring);
}
.mine-toggle svg { width: 13px; height: 13px; }
.mine-toggle.on { background: var(--sunset); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(255, 120, 60, 0.7); }
.mine-toggle:active { transform: scale(0.94); }
.mine-tips { padding: 14px 12px 12px; }
.mine-tips ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.mine-tips li { font-size: 13px; line-height: 1.45; color: var(--ink); }
.mine-tips-text { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
/* Outfit feedback: "I'm wearing this", "how was it?", "last time you were cold" */
.wear-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 10px 12px; }
.mine-tips + .wear-row { border-top: 1px solid var(--card-border); }
.wear-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: none; border-radius: 999px; padding: 12px 18px; cursor: pointer;
  background: var(--sunset); color: #3b1d10; font-family: var(--display); font-weight: 800; font-size: 15px;
  box-shadow: 0 10px 22px -12px rgba(255, 120, 60, 0.8); transition: transform 0.25s var(--spring);
}
.wear-btn svg { width: 18px; height: 18px; }
.wear-btn:active { transform: scale(0.96); }
.wear-done { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.wear-done svg { width: 18px; height: 18px; flex-shrink: 0; color: #2f9e6e; }
.wear-undo { border: none; background: none; color: var(--ink-soft); font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; flex-shrink: 0; }
.memory-note { display: flex; gap: 10px; align-items: flex-start; margin: 8px 6px 4px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 209, 102, 0.25), rgba(255, 111, 125, 0.18)); color: var(--ink); font-size: 13.5px; line-height: 1.45; font-weight: 600; }
.memory-note svg { width: 18px; height: 18px; flex-shrink: 0; color: #e8742f; margin-top: 1px; }
.fb-card { border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; }
.fb-q { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.35; color: var(--ink); margin-bottom: 14px; }
.fb-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fb-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; border: 1.5px solid var(--card-border);
  background: var(--card); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; transition: transform 0.25s var(--spring), background 0.2s ease; }
.fb-opt:hover { background: #fff; }
.fb-opt:active { transform: scale(0.95); }
.fb-emoji { font-size: 24px; line-height: 1; }
.fb-skip { display: block; margin: 12px auto 0; border: none; background: none; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.learn-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.learn-text { margin-bottom: 8px; }
.learn-reset { border: none; background: none; padding: 0; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.reset-chip:active { transform: scale(0.94); }
.swap-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px 6px 8px; border-radius: 999px;
  border: 1px solid rgba(20, 26, 46, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 14px -6px rgba(10, 20, 50, 0.45);
  color: var(--ink); font-size: 11.5px; font-weight: 800; cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: transform 0.3s var(--spring), background 0.2s ease, color 0.2s ease;
}
.swap-btn svg { width: 15px; height: 15px; transition: transform 0.45s var(--spring); }
.swap-btn:hover { background: var(--ink); color: #fff; }
.swap-btn:hover svg { transform: rotate(180deg); }
.swap-btn:active { transform: scale(0.9); }
.look-card.swapped .garment { animation: swap-in 0.7s var(--spring), float 5.5s ease-in-out infinite 0.7s; }
.look-card.swapped .look-body { animation: fadeSlideIn 0.5s var(--ease-out) both; }
.look-card.swapped { animation: swap-glow 1s ease-out; }
@keyframes swap-in {
  0% { transform: rotateY(90deg) scale(0.6); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes swap-glow {
  0% { box-shadow: var(--glass-shadow), 0 0 0 0 rgba(255, 159, 90, 0.9); }
  100% { box-shadow: var(--glass-shadow), 0 0 0 14px rgba(255, 159, 90, 0); }
}

/* In-place updates (swap, gender) shouldn't replay the whole entrance show */
.quiet .fade-slide, .quiet .pop-in, .quiet .rise-in,
.quiet .look-card:not(.swapped), .quiet .seg-thumb, .quiet .lm-back-wrap, .quiet .lm-front > *,
.quiet .daypart-dot, .quiet .reset-chip { animation: none; opacity: 1; filter: none; }
.quiet .fade-slide, .quiet .pop-in, .quiet .rise-in:not(.swapped) { transform: none; }
.quiet .look-card.swapped { opacity: 1; filter: none; transform: none; }
.quiet .daypart-dot { transform: translateX(-50%) scale(1); }
.quiet .draw-line { animation: none; stroke-dashoffset: 0; }
.quiet .range-fill { animation: none; transform: none; }
.quiet .profile-avatar-lg, .quiet .title-word, .quiet .orbit, .quiet .onboard-chip, .quiet .wardrobe-card, .quiet .add-card { animation: none; opacity: 1; transform: none; filter: none; }

/* Tip */
.tip-card {
  position: relative; overflow: hidden;
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(20, 26, 46, 0.92), rgba(48, 38, 92, 0.92));
  color: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}
.tip-card::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 90, 0.45), transparent 70%);
  animation: pulse 5s ease-in-out infinite;
}
.tip-orb {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sunset); color: #3a1b0c;
  box-shadow: 0 8px 18px -6px rgba(255, 120, 80, 0.7);
}
.tip-orb svg { width: 20px; height: 20px; animation: sparkle 3s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(18deg) scale(1.12); } }
.tip-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65); font-weight: 700; margin-bottom: 5px;
  display: flex; align-items: center; gap: 8px;
}
.tip-text { font-size: 15px; line-height: 1.5; position: relative; z-index: 1; }
.smart-tip-badge {
  text-transform: none; letter-spacing: 0;
  font-size: 10px; font-weight: 800;
  color: #3a1b0c; background: var(--sunset);
  padding: 2px 8px; border-radius: 999px;
}

.footer-note {
  text-align: center; font-size: 11.5px;
  color: var(--on-sky-soft); text-shadow: var(--sky-text-shadow);
  padding: 18px 0 6px;
}

/* =========================================================
   Weather glyph animations
   ========================================================= */
.wglyph { width: 100%; height: auto; display: block; overflow: visible; }
.g-sun-rays { animation: spin 22s linear infinite; }
.g-sun-core { animation: pulse 4s ease-in-out infinite; }
.g-drift { animation: cloud-sway 7s ease-in-out infinite; }
.g-drift-slow { animation: cloud-sway 11s ease-in-out infinite reverse; }
.g-drop { animation: drop 1.1s linear infinite; }
.g-flake { animation: flake 2.6s linear infinite; }
.g-bolt { animation: bolt 2.8s ease-in-out infinite; }
.g-twinkle circle { animation: twinkle-dot 2.4s ease-in-out infinite; }
.g-twinkle circle:nth-child(2) { animation-delay: 0.6s; }
.g-twinkle circle:nth-child(3) { animation-delay: 1.2s; }
.g-twinkle circle:nth-child(4) { animation-delay: 1.8s; }
.g-moon { animation: bob 6s ease-in-out infinite; }
.g-fog path { animation: fog-slide 4s ease-in-out infinite alternate; }
.g-fog path:nth-child(2) { animation-delay: -1.5s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cloud-sway { 0%, 100% { translate: 0 0; } 50% { translate: 6px -2px; } }
@keyframes drop { 0% { transform: translateY(-10px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(18px); opacity: 0; } }
@keyframes flake { 0% { transform: translateY(-12px) rotate(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(16px) rotate(180deg); opacity: 0; } }
@keyframes bolt { 0%, 70%, 100% { opacity: 0.15; } 74%, 82% { opacity: 1; } 78% { opacity: 0.4; } }
@keyframes twinkle-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes fog-slide { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }

/* =========================================================
   Week
   ========================================================= */
.week-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.week-row {
  display: grid;
  grid-template-columns: 40px 50px 1fr 58px;
  align-items: center; gap: 10px;
  border-radius: var(--radius-md);
  padding: 12px 12px 12px 14px;
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}
.week-row-day { display: flex; flex-direction: column; align-items: center; }
.week-day-name { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); }
.week-day-num { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.week-glyph { width: 50px; }
.week-row-body { min-width: 0; }
.week-row-condition { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.week-range { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.range-track { position: relative; flex: 1; height: 7px; border-radius: 999px; background: rgba(20, 26, 46, 0.08); overflow: hidden; }
.range-fill {
  position: absolute; top: 0; bottom: 0; border-radius: 999px;
  transform-origin: left center; transform: scaleX(0);
  animation: grow 0.9s var(--ease-out) forwards;
}
@keyframes grow { to { transform: scaleX(1); } }
.week-temp-max { font-family: var(--display); font-size: 15px; font-weight: 800; color: var(--ink); min-width: 30px; text-align: right; }
.week-temp-min { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink-faint); min-width: 30px; }
.week-row-tip {
  font-size: 12.5px; font-weight: 500; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.week-piece .garment { width: 58px; height: 58px; animation: float 6s ease-in-out infinite; }
.week-row:nth-child(2n) .week-piece .garment { animation-delay: -2s; }
.week-row:nth-child(3n) .week-piece .garment { animation-delay: -4s; }

/* =========================================================
   Wardrobe
   ========================================================= */
.wardrobe-search { margin-bottom: 14px; }
.wardrobe-search .field-input {
  padding-left: 44px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-color: var(--glass-border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.search-wrap { position: relative; }
.search-wrap .field-input { padding-left: 44px; }
[dir="rtl"] .search-wrap .field-input { padding-left: 15px; padding-right: 44px; }
[dir="rtl"] .search-wrap svg { left: auto; right: 16px; }
.search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-soft); z-index: 1; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; padding: 2px 2px 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--spring);
}
.chip:hover { background: rgba(255, 255, 255, 0.36); }
.chip:active { transform: scale(0.93); }
.chip.active { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 8px 18px -8px rgba(0,0,0,0.45); }
.panel .chip { background: rgba(20, 26, 46, 0.06); border-color: transparent; color: var(--ink-soft); -webkit-backdrop-filter: none; backdrop-filter: none; }
.panel .chip.active { background: var(--ink); color: #fff; }

.wardrobe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 12px; }
.wardrobe-card {
  border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; padding: 0; text-align: left;
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}
.wardrobe-card:active { transform: scale(0.96); }
.wardrobe-thumb {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  background: rgba(20, 26, 46, 0.05);
}
.wardrobe-thumb.is-art { background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--tint, #b9c6dc) 22%, white) 0%, rgba(255,255,255,0.3) 75%); }
.wardrobe-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.wardrobe-thumb .garment { width: 72%; height: 72%; filter: drop-shadow(0 10px 12px rgba(10, 20, 50, 0.2)); transition: transform 0.45s var(--spring); }
.wardrobe-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.badge-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.badge-dot svg { width: 13px; height: 13px; color: var(--ink); }
.badge-rain svg { color: var(--band-soguk); }
.badge-wind svg { color: var(--band-serin); }
.wardrobe-info { padding: 10px 13px 13px; }
.wardrobe-name { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.25; margin-bottom: 3px; letter-spacing: -0.01em; }
.wardrobe-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 700; display: flex; align-items: center; }

.add-card {
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  cursor: pointer; color: #fff;
  transition: background 0.25s ease, transform 0.35s var(--spring);
}
.add-card svg {
  width: 26px; height: 26px; padding: 12px; box-sizing: content-box;
  border-radius: 50%; background: var(--sunset); color: #3a1b0c;
  box-shadow: 0 10px 22px -8px rgba(255, 120, 80, 0.8);
  transition: transform 0.4s var(--spring);
}
.add-card span { font-size: 13.5px; font-weight: 700; text-shadow: var(--sky-text-shadow); }
.add-card:active { transform: scale(0.96); }

.empty-state { text-align: center; padding: 30px 24px 28px; color: var(--ink-soft); border-radius: var(--radius-lg); }
.empty-art { display: flex; justify-content: center; align-items: flex-end; margin-bottom: 14px; height: 120px; }
.empty-art .garment { width: 96px; height: 96px; animation: float 5s ease-in-out infinite; }
.empty-art .garment:nth-child(1) { transform-origin: bottom; margin-right: -18px; animation-delay: -1s; }
.empty-art .garment:nth-child(2) { width: 116px; height: 116px; position: relative; z-index: 1; }
.empty-art .garment:nth-child(3) { margin-left: -18px; animation-delay: -2.5s; }
.empty-state p { font-size: 15px; line-height: 1.55; margin-bottom: 18px; color: var(--ink); }

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--sunset); color: #2a1406;
  padding: 14px 24px; border-radius: 999px; border: none;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 28px -12px rgba(255, 110, 80, 0.9), 0 1px 0 rgba(255,255,255,0.6) inset;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease, filter 0.2s ease;
}
.btn-primary:active { transform: scale(0.95); }
.btn-primary svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary:disabled { opacity: 0.7; cursor: default; }
.btn-primary:disabled:active { transform: none; }

.btn-ghost {
  flex: 1;
  padding: 14px; border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.6); color: var(--ink-soft);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s var(--spring), background 0.2s ease;
}
.btn-save {
  flex: 2;
  padding: 14px; border-radius: 999px; border: none;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(20, 26, 46, 0.8);
  transition: transform 0.3s var(--spring);
}
.btn-save:active, .btn-ghost:active { transform: scale(0.96); }

.btn-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}
.tip-orb .btn-spinner { margin: 0; border-color: rgba(58, 27, 12, 0.25); border-top-color: #3a1b0c; }
.btn-spinner-dark { border: 2px solid rgba(20, 26, 46, 0.12); border-top-color: var(--ink-soft); }

/* =========================================================
   Sheets & forms
   ========================================================= */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 14, 36, 0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 30;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: 520px;
  background: var(--paper);
  border-radius: 30px 30px 0 0;
  padding: 14px 22px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.5s var(--spring);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.3);
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet-handle { width: 42px; height: 5px; background: rgba(20, 26, 46, 0.15); border-radius: 999px; margin: 0 auto 18px; }
.sheet-title { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.field-input {
  width: 100%;
  border: 1.5px solid var(--card-border);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 15px; font-family: var(--sans); color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 122, 80, 0.18); }
.locate-btn {
  width: 100%; margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 14px; border-radius: var(--radius-sm);
  border: none; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.locate-btn svg { width: 16px; height: 16px; }
.locate-btn:active { transform: scale(0.97); }
.city-results { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.city-result {
  text-align: left; padding: 12px; border-radius: var(--radius-sm);
  border: none; background: none;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: background 0.15s ease, transform 0.2s ease;
}
.city-result:hover, .city-result:active { background: var(--brand-soft); transform: translateX(4px); }
.city-result .sub { display: block; font-size: 12px; font-weight: 500; color: var(--ink-faint); margin-top: 1px; }
.sheet-msg { font-size: 13px; color: var(--ink-faint); margin-top: 10px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-faint); font-weight: 800; }
.recent-clear { background: none; border: none; color: var(--brand-dark); font-size: 12.5px; font-weight: 700; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.recent-clear:hover { background: var(--brand-soft); }
.recent-list { margin-top: 4px; }
.recent-row { display: flex; align-items: center; gap: 4px; }
.recent-row .city-result { flex: 1; display: flex; align-items: center; gap: 10px; }
.city-text { display: block; }
.recent-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: rgba(20, 26, 46, 0.06); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.recent-icon svg { width: 15px; height: 15px; }
.city-result.is-current .recent-icon { background: var(--ink); color: #fff; }
.recent-remove { width: 34px; height: 34px; flex-shrink: 0; border: none; background: none; border-radius: 50%; color: var(--ink-faint); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.recent-remove:hover { background: rgba(20, 26, 46, 0.06); color: var(--ink); }
.recent-remove svg { width: 15px; height: 15px; }
[dir="rtl"] .city-result { text-align: right; }

.editor-sheet .sheet { max-height: 90vh; overflow-y: auto; }
.field-group { margin-bottom: 18px; }
.field-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-faint); font-weight: 800; margin-bottom: 8px; display: block; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--card-border); background: var(--card);
  color: var(--ink-soft); cursor: pointer;
  font-size: 12px; font-weight: 700;
  transition: transform 0.3s var(--spring), background 0.2s ease, color 0.2s ease;
}
.cat-btn svg { width: 20px; height: 20px; }
.cat-btn:active { transform: scale(0.93); }
.cat-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.warmth-row { display: flex; align-items: center; gap: 10px; }
.warmth-end { font-size: 11px; color: var(--ink-faint); font-weight: 700; width: 50px; }
.warmth-end.right { text-align: right; }
.warmth-dots { display: flex; gap: 8px; flex: 1; justify-content: center; }
.warmth-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--card-border); background: var(--card);
  cursor: pointer; transition: transform 0.3s var(--spring), background 0.2s ease;
}
.warmth-dot:active { transform: scale(0.85); }
.warmth-dot.filled { border-color: transparent; background: var(--sunset); box-shadow: 0 4px 10px -4px rgba(255, 110, 80, 0.8); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--card-border); }
.toggle-row:last-of-type { border-bottom: none; }
.toggle-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; background: rgba(20, 26, 46, 0.14); border: none; cursor: pointer; flex-shrink: 0; transition: background 0.25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25); transition: transform 0.35s var(--spring); }
.switch.on { background: var(--brand); }
.switch-rain.on { background: var(--band-soguk); }
.switch-wind.on { background: var(--band-serin); }
.switch.on::after { transform: translateX(20px); }

.photo-picker { display: flex; align-items: center; gap: 14px; }
.photo-thumb {
  width: 76px; height: 76px; border-radius: 18px;
  background: rgba(20, 26, 46, 0.05);
  overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .garment { width: 80%; height: 80%; }
.photo-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  border: none; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: transform 0.3s var(--spring);
}
.photo-btn:active { transform: scale(0.95); }
.photo-btn svg { width: 15px; height: 15px; }

.ai-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; }
.ai-status svg { width: 14px; height: 14px; flex-shrink: 0; }
.ai-status-loading { color: var(--ink-soft); }
.ai-status-done { color: var(--band-serin); }
.ai-status-error { color: #c43c33; }

.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.delete-link { text-align: center; margin-top: 14px; }
.delete-link button { background: none; border: none; color: #c43c33; font-size: 13px; font-weight: 700; cursor: pointer; }

/* Colors */
.color-dot {
  display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%;
  margin-inline-end: 7px; vertical-align: 1px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}
.color-dot.patterned { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.55) 0 2px, transparent 2px 4px) !important; }
.look-item .color-dot { width: 12px; height: 12px; }
.swatch-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 9px; }
.swatch {
  aspect-ratio: 1 / 1; width: 100%; max-width: 38px; justify-self: center;
  border-radius: 50%; border: none; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
  transition: transform 0.3s var(--spring), box-shadow 0.2s ease;
}
.swatch:hover { transform: scale(1.12); }
.swatch:active { transform: scale(0.88); }
.swatch.active { transform: scale(1.1); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.color-current { text-transform: none; letter-spacing: 0; color: var(--ink); }

/* =========================================================
   Loading / state
   ========================================================= */
.state-msg {
  text-align: center; padding: 70px 20px;
  color: #fff; font-size: 15px; font-weight: 600; line-height: 1.6;
  text-shadow: var(--sky-text-shadow);
}
.state-msg.glass { color: var(--ink); text-shadow: none; border-radius: var(--radius-lg); padding: 40px 24px; margin-top: 30px; }
.loader-orb { width: 120px; margin: 0 auto 16px; animation: bob 2.4s ease-in-out infinite; }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; margin: 0 auto 14px; animation: spin 0.8s linear infinite; }

/* =========================================================
   Entrance animations
   ========================================================= */
.fade-slide { opacity: 0; transform: translateY(14px); animation: fadeSlideIn 0.7s var(--ease-out) forwards; }
@keyframes fadeSlideIn { to { opacity: 1; transform: none; } }
.pop-in { opacity: 0; transform: scale(0.6) translateY(20px); animation: popIn 0.9s var(--spring) forwards; }
@keyframes popIn { to { opacity: 1; transform: none; } }
.rise-in { opacity: 0; transform: translateY(40px) scale(0.94); filter: blur(6px); animation: riseIn 0.85s var(--spring) forwards; }
@keyframes riseIn { to { opacity: 1; transform: none; filter: blur(0); } }
.screen-enter { animation: screenFade 0.45s var(--ease-out) forwards; }
@keyframes screenFade { from { opacity: 0.4; } to { opacity: 1; } }

@media (hover: hover) {
  .look-card:hover { transform: translateY(-6px) rotate(-0.4deg); box-shadow: var(--glass-shadow), 0 30px 50px -24px rgba(10, 20, 50, 0.6); }
  .look-card:hover .garment { transform: scale(1.12) rotate(-4deg); }
  .look-card.is-mine:hover { box-shadow: 0 30px 50px -24px rgba(10, 20, 50, 0.6), 0 0 0 2px rgba(255, 159, 90, 0.9); }
  .wardrobe-card:hover { transform: translateY(-6px); box-shadow: var(--glass-shadow), 0 26px 44px -22px rgba(10, 20, 50, 0.6); }
  .wardrobe-card:hover .garment { transform: scale(1.1) rotate(-5deg); }
  .wardrobe-card:hover .wardrobe-thumb img { transform: scale(1.06); }
  .week-row:hover { transform: translateX(6px); }
  .add-card:hover { background: rgba(255, 255, 255, 0.24); }
  .add-card:hover svg { transform: rotate(90deg) scale(1.08); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -12px rgba(255, 110, 80, 1), 0 1px 0 rgba(255,255,255,0.6) inset; }
  .nav-btn:not(.active):hover { color: var(--ink); background: rgba(20, 26, 46, 0.06); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-slide, .pop-in, .rise-in { opacity: 1; transform: none; filter: none; animation: none; }
  .screen-enter { animation: none; }
  .draw-line { stroke-dashoffset: 0; }
  .range-fill { transform: none; }
  .daypart-dot { transform: translateX(-50%); }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* =========================================================
   Onboarding
   ========================================================= */
.onboard { min-height: 100%; display: flex; flex-direction: column; }
.onboard-lang { align-self: flex-end; margin-bottom: 6px; }
.onboard-welcome { flex: 1; justify-content: space-between; text-align: center; }
.onboard-hero {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 12px 6px 8px;
}
.onboard-hero-sm { flex: none; padding: 6px 6px 2px; gap: 8px; }
.onboard-stage { position: relative; width: 260px; height: 230px; margin-bottom: 4px; }
.onboard-glyph { position: absolute; left: 50%; top: 50%; width: 170px; margin: -85px 0 0 -85px; filter: drop-shadow(0 20px 30px rgba(8, 20, 60, 0.35)); }
.onboard-glyph .wglyph { animation: bob 5s ease-in-out infinite; }
.orbit { position: absolute; width: 70px; height: 70px; opacity: 0; animation: orbit-in 0.9s var(--spring) forwards; }
.orbit .garment { width: 100%; height: 100%; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 12px 14px rgba(8, 20, 60, 0.3)); }
.orbit-1 { left: -6px; top: 10px; animation-delay: 0.35s; }
.orbit-2 { right: -10px; top: 0; width: 78px; height: 78px; animation-delay: 0.5s; }
.orbit-2 .garment { animation-delay: -1.5s; }
.orbit-3 { left: 6px; bottom: -4px; width: 64px; height: 64px; animation-delay: 0.65s; }
.orbit-3 .garment { animation-delay: -3s; }
.orbit-4 { right: 4px; bottom: 6px; width: 62px; height: 62px; animation-delay: 0.8s; }
.orbit-4 .garment { animation-delay: -2s; }
@keyframes orbit-in { from { opacity: 0; transform: scale(0.3) rotate(-30deg); } to { opacity: 1; transform: none; } }

.onboard-mark { width: 120px; margin: 0 auto; filter: drop-shadow(0 14px 22px rgba(8, 20, 60, 0.3)); }
.onboard-title {
  font-family: var(--display);
  font-size: clamp(60px, 18vw, 92px);
  font-weight: 800; letter-spacing: -0.06em; line-height: 0.95;
  color: #fff; text-shadow: 0 10px 40px rgba(8, 20, 60, 0.35);
  display: flex; gap: 0.02em;
}
.title-word { display: inline-block; opacity: 0; transform: translateY(40px) rotate(6deg); animation: word-in 0.9s var(--spring) forwards; }
.title-word:nth-child(2) { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 8px 24px rgba(255, 120, 80, 0.45)); }
@keyframes word-in { to { opacity: 1; transform: none; } }
.onboard-title-sm { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; text-align: center; }
.onboard-tag { font-size: 17px; color: var(--on-sky); max-width: 300px; line-height: 1.45; margin: 0 auto; text-shadow: var(--sky-text-shadow); font-weight: 500; }
.onboard-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.55; text-align: center; max-width: 320px; margin: 0 auto 22px; }
.onboard-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.onboard-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 12.5px; font-weight: 700; color: #fff;
  opacity: 0; animation: fadeSlideIn 0.6s var(--ease-out) forwards;
}
.onboard-chip:nth-child(1) { animation-delay: 0.9s; }
.onboard-chip:nth-child(2) { animation-delay: 1.0s; }
.onboard-chip:nth-child(3) { animation-delay: 1.1s; }
.onboard-chip svg { width: 15px; height: 15px; color: #fff; flex-shrink: 0; }
.onboard-cta { width: 100%; justify-content: center; margin-bottom: 10px; padding: 17px; font-size: 16px; }
.onboard-cta.btn-ghost { flex: none; }

/* Form steps sit in a glass card on the sky */
.onboard-profile, .onboard-location {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-xl);
  padding: 18px 20px 20px;
  min-height: auto;
  margin-top: 6px;
}
.onboard-profile .lang-menu-btn, .onboard-location .lang-menu-btn { background: rgba(20, 26, 46, 0.07); color: var(--ink); border-color: transparent; }
.onboard-profile .onboard-title-sm, .onboard-profile .onboard-sub { text-align: center; }
.onboard-dots { display: flex; justify-content: center; gap: 6px; margin: 2px 0 14px; }
.onboard-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(20, 26, 46, 0.15); transition: all 0.35s var(--spring); }
.onboard-dot.active { background: var(--brand); width: 24px; border-radius: 4px; }
.onboard-step-label { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 800; margin-bottom: 8px; }
.onboard-gender { margin-top: 2px; }
.onboard-style-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; line-height: 1.4; }
.onboard-msg { text-align: center; margin: 4px 0 0; }
.onboard-back {
  margin: 16px auto 0; display: flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--ink-faint);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.onboard-back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.onboard-back:active { transform: scale(0.96); }
.onboard-location .chip-row .chip, .onboard-profile .chip-row .chip { background: rgba(20, 26, 46, 0.06); border-color: transparent; color: var(--ink-soft); -webkit-backdrop-filter: none; backdrop-filter: none; }
.onboard-location .chip-row .chip.active, .onboard-profile .chip-row .chip.active { background: var(--ink); color: #fff; }
.field-error { font-size: 12.5px; color: #c43c33; margin-top: 6px; font-weight: 600; }

/* =========================================================
   Profile
   ========================================================= */
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 0 22px; }
.profile-avatar-lg {
  width: 104px; height: 104px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.9); padding: 0; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px; flex-shrink: 0;
  box-shadow: 0 18px 40px -14px rgba(8, 20, 60, 0.6);
  animation: popIn 0.9s var(--spring) both;
  transition: transform 0.35s var(--spring);
}
.profile-avatar-lg:hover { transform: scale(1.05) rotate(-3deg); }
.profile-avatar-lg:active { transform: scale(0.94); }
.profile-avatar-lg .avatar-text { font-family: var(--display); font-size: 36px; font-weight: 800; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.brand-mark .avatar-img { width: 100%; height: 100%; }
.avatar-picker { width: 100%; background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; text-align: left; box-shadow: var(--shadow-sm); }
.avatar-swatches { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.avatar-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.3s var(--spring); }
.avatar-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper); }
.avatar-swatch:active { transform: scale(0.88); }
.avatar-picker-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.avatar-remove-btn { flex: none; padding: 10px 16px; font-size: 13px; }
.profile-hero-name { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: #fff; text-shadow: var(--sky-text-shadow); }
.profile-hero-sub { font-size: 14px; color: var(--on-sky-soft); max-width: 300px; line-height: 1.5; text-shadow: var(--sky-text-shadow); }
.panel { border-radius: var(--radius-xl); padding: 20px 20px 16px; }
.style-vibe-row { margin-bottom: 0; flex-wrap: wrap; overflow: visible; }
.profile-city-row {
  width: 100%; justify-content: space-between;
  padding: 13px 15px; border: 1.5px solid var(--card-border); border-radius: var(--radius-sm); background: var(--card);
}
.profile-city-row span:nth-child(2) { flex: 1; text-align: left; margin-left: 4px; color: var(--ink); font-weight: 600; }
.profile-city-change { font-size: 12.5px; font-weight: 800; color: var(--brand-dark); }
.profile-save-btn { width: 100%; margin: 6px 0 4px; }

/* Profile v2 */
.back-btn { display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 6px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s ease, transform 0.25s var(--spring); }
.back-btn svg { width: 15px; height: 15px; transform: rotate(180deg); }
[dir="rtl"] .back-btn svg { transform: none; }
.back-btn:hover { background: rgba(255,255,255,0.34); }
.back-btn:active { transform: scale(0.95); }
.profile-avatar-lg { position: relative; overflow: visible; }
.profile-avatar-lg > .avatar-img, .profile-avatar-lg > .avatar-art { border-radius: 50%; }
.avatar-art { width: 70%; height: 70%; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25)); }
.brand-mark .avatar-art { width: 74%; height: 74%; }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; border: 3px solid rgba(255,255,255,0.9); }
.avatar-edit svg { width: 15px; height: 15px; }
.profile-hero-sub { display: inline-flex; align-items: center; gap: 5px; }
.profile-hero-sub svg { width: 14px; height: 14px; }
.avatar-picker { max-width: 560px; margin: 0 auto 16px; border-radius: var(--radius-lg); padding: 16px; text-align: center; }
.avatar-options { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 4px 0 14px; }
.avatar-option { width: 58px; height: 58px; border-radius: 50%; border: 3px solid transparent; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px -6px rgba(10,20,50,0.5); transition: transform 0.3s var(--spring), border-color 0.2s ease; }
.avatar-option:hover { transform: translateY(-3px) scale(1.05); }
.avatar-option.active { border-color: #fff; box-shadow: 0 0 0 3px var(--ink), 0 8px 18px -6px rgba(10,20,50,0.6); }
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.profile-card { margin: 0; }
.profile-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.profile-card-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.link-btn { display: inline-flex; align-items: center; gap: 2px; background: none; border: none; color: var(--brand-dark); font-size: 13px; font-weight: 800; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.link-btn svg { width: 14px; height: 14px; }
.link-btn:hover { background: var(--brand-soft); }
.profile-hint { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 12px; }
.profile-empty { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.name-row { display: flex; gap: 8px; }
.name-row .field-input { flex: 1; }
.name-row .profile-save-btn { flex: none; width: auto; margin: 0; padding: 0 18px; }
.comfort-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.comfort-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; border: 1.5px solid var(--card-border); background: var(--card); color: var(--ink-soft); font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.25; cursor: pointer; transition: transform 0.3s var(--spring), background 0.2s ease, color 0.2s ease; }
.comfort-opt:active { transform: scale(0.95); }
.comfort-emoji { width: 34px; height: 34px; border-radius: 50%; background: rgba(20,26,46,0.06); display: flex; align-items: center; justify-content: center; }
.comfort-emoji svg { width: 20px; height: 20px; }
.comfort-opt[data-comfort="cold"] .comfort-emoji { color: var(--band-soguk); }
.comfort-opt[data-comfort="warm"] .comfort-emoji { color: var(--band-sicak); }
.comfort-opt.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.comfort-opt.active .comfort-emoji { background: rgba(255,255,255,0.15); color: #fff; }
.stat-big { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.stat-big b { font-family: var(--display); font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; margin-right: 4px; }
.cat-bars { display: flex; flex-direction: column; gap: 7px; }
.cat-bar { display: grid; grid-template-columns: 22px 82px 1fr 22px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.cat-bar-icon svg { width: 18px; height: 18px; color: var(--ink-soft); }
.cat-bar-track { height: 8px; border-radius: 999px; background: rgba(20,26,46,0.07); overflow: hidden; }
.cat-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--sunset); }
.cat-bar-n { text-align: right; font-weight: 800; color: var(--ink); }
.palette-label { margin-top: 16px; }
.palette-strip { display: flex; height: 26px; border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.palette-strip span { flex: 1; }
.recent-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.recent-chip { display: inline-flex; align-items: center; gap: 6px; }
.panel .recent-chip { background: rgba(20,26,46,0.06); color: var(--ink); }
.recent-chip svg { width: 13px; height: 13px; opacity: 0.6; }
.profile-reset { margin: 18px 0 6px; }
.profile-reset button { color: #fff; text-shadow: var(--sky-text-shadow); opacity: 0.85; }
@media (min-width: 860px) {
  .profile-grid { grid-template-columns: 1fr 1fr; max-width: 980px; margin: 0 auto; align-items: start; }
  .profile-hero { padding-top: 0; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 104px;
  transform: translate(-50%, 16px) scale(0.95);
  background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 700;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.4s var(--spring);
  z-index: 50; white-space: nowrap;
}
.toast-show { opacity: 1; transform: translate(-50%, 0) scale(1); }

@media (max-width: 859px) {
  .sky-sun, .sky-moon { width: 230px; height: 230px; top: -100px; right: -100px; }
}

/* =========================================================
   Desktop
   ========================================================= */
@media (min-width: 860px) {
  .stage { padding: 28px; align-items: flex-start; }
  .phone { max-width: 1280px; height: auto; min-height: calc(100vh - 56px); flex-direction: row; gap: 28px; }
  .screen { overflow: visible; padding: 8px 6px 40px; }
  .screen[data-tab="onboarding"] { max-width: 560px; margin: 0 auto; }

  .bottom-nav {
    position: sticky; top: 28px; left: auto; right: auto; bottom: auto;
    order: -1; align-self: flex-start;
    flex-direction: column; align-items: stretch;
    width: 236px; flex-shrink: 0;
    padding: 16px 12px; gap: 4px;
    border-radius: 28px;
  }
  .sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; margin-bottom: 8px; border-bottom: 1px solid var(--card-border); }
  .sidebar-brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--sunset); color: #3a1b0c; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 8px 18px -8px rgba(255, 110, 80, 0.8); }
  .sidebar-brand-mark svg { width: 18px; height: 18px; }
  .sidebar-brand-name { font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
  .nav-btn { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; font-size: 14.5px; border-radius: 16px; }
  .nav-btn .nav-icon { width: 21px; height: 21px; }

  .brand-name { visibility: hidden; }

  .today-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: end; }
  .hero { min-height: 340px; }
  .hero-glyph { width: 180px; }
  .look-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .look-card.lead { grid-column: span 2; }
  .wardrobe-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .week-row { grid-template-columns: 48px 64px 1fr 80px; padding: 14px 18px; }
  .week-glyph { width: 60px; }
  .week-piece .garment { width: 74px; height: 74px; }
  .toast { bottom: 40px; }
}
@media (min-width: 1180px) {
  .wardrobe-grid { grid-template-columns: repeat(4, 1fr); }
  .look-grid { grid-template-columns: repeat(4, 1fr); }
}
