@charset "UTF-8";

:root {
  color-scheme: light;
  --ivory:#faf9f6;
  --paper:#fffefd;
  --rose:#f6e1e5;
  --mauve:#8e1428;
  --wine:#b91c35;
  --wine-deep:#14213d;
  --ink:#243653;
  --muted:#526178;
  --line:#e5e7eb;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, system-ui, sans-serif;
  --radius:18px;
  --shadow:0 12px 35px #581f3610;
  font: 16px/1.5 var(--sans);
  color:var(--ink);
  background:var(--ivory);
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; }
h1,h2,h3,p,blockquote,figure { margin:0; }
h1,h2,h3 { color:var(--wine-deep); }
h1,h2 { font-family:var(--serif); font-weight:400; letter-spacing:-.025em; }
h1 { font-size:clamp(2.6rem,6vw,4.7rem); line-height:1; }
h2 { font-size:clamp(1.55rem,3vw,2rem); line-height:1.16; }
h3 { font-size:1.02rem; }
p { color:var(--muted); }
small { color:var(--muted); }
button,input,textarea,select { font:inherit; }
button,select,input[type="color"],input[type="checkbox"] { cursor:pointer; }
button { color:inherit; }
a { color:var(--wine); }
:focus-visible { outline:3px solid var(--mauve); outline-offset:3px; }
main:focus { outline:none; }
[hidden] { display:none !important; }
.sr,.skip:not(:focus) {
  position:absolute; overflow:hidden; width:1px; height:1px; white-space:nowrap; clip-path:inset(50%);
}
.skip:focus { position:fixed; z-index:10; top:5px; left:5px; background:var(--paper); padding:.75rem; }
#header {
  position:sticky; top:0; z-index:3; display:flex; gap:2rem; align-items:center;
  justify-content:space-between; padding:.75rem max(1.5rem,calc((100vw - 1410px)/2));
  border-bottom:1px solid var(--line); background:var(--paper);
}
.brand { display:inline-flex; align-items:center; gap:.65rem; border:0; background:none; padding:0; font:1.75rem var(--serif); color:var(--wine-deep); }
nav { display:flex; gap:.2rem; }
.nav-item { display:flex; align-items:center; gap:.38rem; border:0; background:none; border-radius:12px; min-height:44px; padding:.4rem .8rem; font-size:.875rem; white-space:nowrap; }
.nav-item span { font-size:1.15rem; }
.nav-item[aria-current] { background:var(--rose); color:var(--wine-deep); font-weight:650; }
main { width:min(100%,1470px); margin:auto; padding:clamp(1.15rem,4vw,2.7rem) clamp(1rem,3vw,2rem) 4rem; }
.page-title { margin:.5rem 0 1.65rem; display:flex; justify-content:space-between; align-items:end; flex-wrap:wrap; gap:1rem; }
.page-title p { margin-top:.7rem; }
.row { display:flex; flex-wrap:wrap; gap:.55rem; align-items:center; }
.between { justify-content:space-between; }
.primary,.secondary,.chip,.danger,.quiet,.icon-btn,.photo-control {
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem; min-height:44px;
  border:1px solid var(--line); border-radius:11px; padding:.52rem .88rem; font-size:.91rem; font-weight:650; background:var(--paper);
}
.primary { background:var(--wine); border-color:var(--wine); color:white; }
.primary:hover { background:var(--wine-deep); }
.secondary,.chip,.icon-btn { color:var(--wine-deep); }
.secondary:hover,.chip:hover,.icon-btn:hover,.nav-item:hover { background:#f6e8eb; }
.chip { border-radius:100px; }
.chip[aria-pressed="true"],.tone[aria-pressed="true"] { border-color:var(--wine); background:var(--rose); }
.icon-btn { width:44px; padding:0; font-size:1.3rem; flex-shrink:0; }
.quiet { background:none; border-color:transparent; color:var(--wine); }
.danger { color:#851c42; }
button:disabled { opacity:.55; cursor:wait; }
.panel,.calendar-panel { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.panel { padding:clamp(1rem,3vw,1.55rem); margin-bottom:1rem; }
.panel h2,.panel h3 { margin-bottom:.55rem; }
.panel p + .row,.panel p + button,.panel p + .photo-control,.panel h3 + .rgb { margin-top:.8rem; }
.empty { padding-block:2.4rem; }
.empty p { max-width:42rem; }
.filters { margin-bottom:1rem; }
.fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }
.field { display:grid; gap:.25rem; min-width:0; font-size:.9rem; font-weight:600; }
.field>span { line-height:1.3; }
input:not([type="checkbox"]):not([type="file"]):not([type="color"]),select,textarea {
  min-height:44px; max-width:100%; min-width:0; border:1px solid #a8b1c0; border-radius:9px; background:#fffdfb; padding:.45rem .6rem; color:var(--ink);
}
input[type="date"] { width:9.6rem; }
.field input[type="date"] { width:100%; }
textarea { min-height:70px; resize:vertical; }
input[type="checkbox"] { width:1.1rem; height:1.1rem; accent-color:var(--wine); flex-shrink:0; }
form { display:grid; gap:.85rem; }
fieldset { margin:0; border:1px solid var(--line); border-radius:11px; padding:.6rem; min-width:0; }
legend { padding:0 .35rem; color:var(--wine-deep); }
.check { display:inline-flex; gap:.33rem; align-items:center; min-height:36px; }
.form-note { font-size:.88rem; }
.photo-control { justify-content:flex-start; flex-wrap:wrap; }
.photo-control input { max-width:100%; font-size:.875rem; font-weight:400; }
.photo-control input::file-selector-button { border:0; padding:.35rem .55rem; border-radius:6px; color:var(--wine-deep); background:var(--rose); margin-inline-end:.4rem; }
main[data-view="welcome"] { min-height:100svh; display:grid; align-items:center; max-width:1280px; }
.welcome { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.15fr); border-radius:29px; overflow:hidden; border:1px solid var(--line); box-shadow:0 30px 80px #581f361c; min-height:560px; }
.welcome-art { display:grid; place-items:center; position:relative; isolation:isolate; overflow:hidden;
  background:radial-gradient(ellipse at 42% 34%,#9f607d 0%,#77374f 42%,#4c1a31 100%); }
.welcome-art::before,.welcome-art::after {
  content:""; position:absolute; z-index:-1; border:1px solid #fff3e996; border-radius:50%; width:72%; height:78%; transform:rotate(22deg);
}
.welcome-art::after { transform:rotate(-22deg); border-color:#fff3e945; }
.welcome-letter { display:flex; flex-direction:column; justify-content:center; align-items:start; gap:1.3rem; background:var(--paper); padding:clamp(1.55rem,5vw,5rem); }
.welcome-letter h1 { font-size:clamp(3.2rem,7.6vw,7.3rem); }
.welcome-letter h1 em { color:var(--mauve); font-weight:400; }
.eyebrow { text-transform:uppercase; font-weight:700; letter-spacing:.14em; color:var(--wine); font-size:.77rem; }
blockquote { color:var(--wine-deep); font:clamp(1.15rem,2.3vw,1.65rem)/1.44 var(--serif); max-width:38ch; }
.signature { font-size:.9rem; }
.signature strong { color:var(--wine); font:italic 1.7rem var(--serif); }
.setup { max-width:62rem; }
.setup .row,.setup .field,.setup h3 { margin-top:.65rem; }
.setup-actions { border-top:1px solid var(--line); padding-top:1rem; margin-top:1.25rem !important; }
.selected-colors { display:flex; flex-wrap:wrap; gap:.4rem; margin:.9rem 0; }
.catalog { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:.4rem; max-height:16.5rem; overflow:auto; padding:.35rem; margin-top:.6rem; }
.tone { display:flex; align-items:center; text-align:left; gap:.38rem; border:1px solid var(--line); border-radius:9px; min-height:44px; background:var(--paper); padding:.3rem; font-size:.84rem; }
i[style*="--swatch"] { display:inline-block; flex-shrink:0; width:1.2rem; height:1.2rem; border:1px solid #24365336; border-radius:50%; background:var(--swatch); }
.rgb { display:grid; grid-template-columns:44px minmax(69px,1.45fr) repeat(3,minmax(48px,1fr)); gap:.45rem; align-items:end; max-width:410px; margin:.45rem 0 .75rem; }
.rgb input { width:100%; padding-inline:.35rem !important; }
.rgb .field { margin:0; }
.color-tool input { height:44px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
.calendar-panel { overflow:hidden; }
.calendar-toolbar { padding:1.15rem; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.8rem; }
.calendar-toolbar p { margin-top:.2rem; font-size:.9rem; }
.calendar-toolbar h2::first-letter { text-transform:uppercase; }
.week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); border-top:1px solid var(--line); }
.day { padding:.65rem; min-width:0; min-height:180px; border-inline-end:1px solid var(--line); background:#fffdfb; }
.day:last-child { border-inline-end:0; }
.day-head { display:flex; align-items:center; justify-content:space-between; gap:.15rem; margin-bottom:.55rem; }
.day-head .icon-btn { border-color:transparent; background:transparent; }
.day-number { display:grid; text-align:left; border:0; border-radius:8px; background:none; padding:.1rem .35rem; color:var(--wine-deep); }
.day-number span { font-size:.85rem; text-transform:capitalize; }
.day-number strong { font:1.75rem/1.1 var(--serif); }
.current-day { background:#faf0f1; }
.current-day .day-number { background:var(--rose); }
.day-add { min-height:44px; width:100%; border:1px dashed #d7bec9; color:var(--wine); background:none; border-radius:9px; padding:.35rem; font-size:.86rem; }
.day-note { background:var(--ivory); padding:.45rem; margin:.4rem 0; overflow-wrap:anywhere; font-size:.85rem; }
.look-card { border:1px solid var(--line); border-radius:10px; background:var(--paper); margin-bottom:.55rem; overflow:hidden; min-width:0; }
.look-open { display:block; text-align:left; border:0; background:none; width:100%; padding:.5rem; color:var(--wine-deep); }
.look-open:focus-visible { outline-offset:-3px; }
.look-open:hover { background:#fff3f4; }
.look-name { display:block; font-size:.87rem; font-weight:650; overflow-wrap:anywhere; margin-bottom:.4rem; }
.look-meta { font-size:.79rem; padding:0 .5rem .4rem; color:var(--muted); overflow-wrap:anywhere; }
.look-meta strong { color:var(--wine); }
.pieces { display:grid; grid-template-columns:repeat(auto-fill,minmax(105px,1fr)); gap:.55rem; }
.pieces figure { min-width:0; }
.pieces figcaption { overflow-wrap:anywhere; padding-top:.2rem; font-size:.84rem; }
.look-open .pieces { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.23rem; }
.piece-image,.piece-empty { display:block; width:100%; aspect-ratio:1; object-fit:contain; background:#edf0f4; border-radius:8px; }
.piece-empty { display:grid; place-items:center; background:var(--swatch); }
.piece-empty span { border-radius:50%; padding:0 .28rem; background:#fff9; color:var(--wine-deep); font-size:.9rem; }
.dots { display:flex; flex-wrap:wrap; gap:.24rem; margin-top:.42rem; }
.dots i[style*="--swatch"] { width:.7rem; height:.7rem; }
.single-day .day { border-top:1px solid var(--line); }
.single-day .look-card { max-width:30rem; }
.single-day .look-open .pieces { grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); }
.month,.year { display:grid; padding:.35rem 1rem 1rem; gap:.3rem; }
.month { grid-template-columns:repeat(7,minmax(0,1fr)); }
.year { grid-template-columns:repeat(4,minmax(0,1fr)); }
.month b { text-align:center; font-size:.85rem; color:var(--muted); }
.month-day { min-height:54px; display:grid; justify-items:start; align-content:start; text-align:left; padding:.38rem; border:1px solid var(--line); color:var(--wine-deep); background:#fffdfb; border-radius:8px; overflow-wrap:anywhere; }
.month-day:hover { background:var(--rose); }
.month-day span { font-size:.75rem; }
.year .month-day { text-transform:capitalize; }
.tray { margin-top:1rem; }
summary { color:var(--wine-deep); cursor:pointer; font-weight:650; }
.tray-item { display:grid; width:90px; gap:.22rem; background:none; border:1px solid var(--line); border-radius:8px; padding:.3rem; font-size:.8rem; cursor:grab; }
.tray-item img { pointer-events:none; }
.wardrobe,.saved-grid,.settings-grid,.palette-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:.85rem; }
.wardrobe { grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); }
.garment-card { border:1px solid var(--line); border-radius:14px; background:var(--paper); overflow:hidden; }
.garment-open { display:grid; gap:.55rem; width:100%; padding:.5rem; text-align:left; border:0; background:none; }
.garment-open strong { padding-inline:.35rem; overflow-wrap:anywhere; }
.garment-info { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; padding:0 .65rem .5rem; font-size:.82rem; gap:.25rem; }
.garment-info .icon-btn { margin-left:auto; }
.suggestion .pieces { grid-template-columns:repeat(auto-fit,minmax(110px,185px)); margin:.7rem 0; }
.suggestion p { margin-top:.75rem; }
.palette-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.25rem; margin-top:.7rem; }
.palette-strip span { display:grid; gap:.3rem; justify-items:center; }
.palette-strip i[style*="--swatch"] { width:100%; height:58px; border-radius:7px; }
.palette-strip code { font-size:.77rem; }
.saved-item > p { margin-bottom:.35rem; }
.dedication p { color:var(--wine-deep); font:1.18rem/1.5 var(--serif); }
dialog { width:min(680px,calc(100% - 1.2rem)); max-height:calc(100% - 1.3rem); overflow:auto; padding:1.05rem; background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:16px; box-shadow:0 20px 70px #33132650; }
dialog::backdrop { background:#14213d92; }
.modal-head { display:flex; justify-content:space-between; align-items:center; gap:.45rem; margin-bottom:.6rem; }
.modal-actions { border-top:1px solid var(--line); padding-top:.85rem; }
.image-row .piece-image,.image-row .piece-empty { width:70px; }
.choice-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:14rem; overflow:auto; gap:.2rem .55rem; }
.choice-list .check { border-bottom:1px solid var(--line); padding:.26rem 0; overflow-wrap:anywhere; }
.choice-list .piece-image,.choice-list .piece-empty { width:36px; flex-shrink:0; }
.candidate { border:1px solid var(--line); padding:.65rem; border-radius:10px; }
.candidate button { margin-top:.55rem; }
.plan-rows { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:.4rem; }
#toast:not(:empty),.modal-toast:not(:empty) { padding:.6rem .9rem; border-radius:9px; background:var(--wine-deep); color:white; box-shadow:var(--shadow); }
#toast { position:fixed; z-index:5; bottom:1rem; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 2rem); }
.modal-toast { position:sticky; bottom:0; margin-top:.25rem; }
@media (min-width:1450px) { .day { padding:.85rem; } }
@media (max-width:900px) { .day { padding:.4rem; } .day-head .icon-btn { width:36px; } }
@media (max-width:740px) {
  #header { position:static; padding:.75rem 1rem; }
  nav { position:fixed; z-index:4; inset:auto 0 0; padding:.3rem .12rem calc(.3rem + env(safe-area-inset-bottom)); background:var(--paper); border-top:1px solid var(--line); justify-content:space-around; gap:0; }
  .nav-item { flex:1; flex-direction:column; align-items:center; gap:0; min-width:0; padding:.2rem .05rem; font-size:.71rem; }
  .nav-item span { font-size:1.16rem; }
  main { padding-bottom:calc(5rem + env(safe-area-inset-bottom)); }
  main[data-view="welcome"] { padding:1rem; }
  .welcome { grid-template-columns:1fr; min-height:0; }
  .welcome-art { min-height:142px; }
  .welcome-art::before,.welcome-art::after { width:65%; height:105%; }
  .welcome-letter { gap:1rem; }
  .week { grid-template-columns:1fr; }
  .day { padding:.75rem; min-height:0; border-inline-end:0; border-bottom:1px solid var(--line); }
  .day:last-child { border-bottom:0; }
  .day-head .icon-btn { width:44px; }
  .look-open .pieces { grid-template-columns:repeat(auto-fill,minmax(62px,1fr)); }
  .calendar-toolbar { padding:.75rem; }
  .calendar-toolbar .row { gap:.3rem; }
  .month,.year { padding:.25rem .4rem .65rem; gap:.2rem; }
  .year { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .month-day { padding:.22rem; }
  #toast { bottom:calc(4.4rem + env(safe-area-inset-bottom)); }
}
@media (max-width:380px) {
  .nav-item { font-size:.65rem; }
  .wardrobe { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fields,.choice-list { grid-template-columns:1fr; }
}
@media (prefers-color-scheme:dark) {
  :root { color-scheme:dark; --ivory:#261e25; --paper:#30242e; --rose:#533548; --wine:#9a4969; --wine-deep:#f2dbe4; --ink:#f0e2e8; --muted:#ccb6c4; --line:#624b5b; --mauve:#d6a5bd; --shadow:none; }
  .primary:hover { background:#82405d; }
  .day,.month-day,input:not([type="checkbox"]):not([type="file"]):not([type="color"]),select,textarea { background:#382a35; }
  .current-day,.look-open:hover,.secondary:hover,.chip:hover,.icon-btn:hover,.nav-item:hover { background:#473040; }
  .danger,.quiet,.day-add,.signature strong,.eyebrow,.look-meta strong { color:var(--mauve); }
  #toast:not(:empty),.modal-toast:not(:empty) { background:#71364f; }
}
@media (prefers-reduced-motion:no-preference) {
  .welcome-letter { animation:appear .32s ease-out both; }
  @keyframes appear { from { opacity:.65; transform:translateY(4px); } to { opacity:1; transform:none; } }
}

/* Emily 1.1 */
.weather-panel p { margin-block:.25rem; }
.weather-day { margin:.3rem 0; overflow-wrap:anywhere; }
.weather-day ul { padding-inline-start:1.1rem; }
.weather-day .quiet { padding-inline:.25rem; }
.weather-context-rows { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:560px) { .weather-context-rows { grid-template-columns:repeat(2,minmax(0,1fr)); } }
:root { --action-ink:#8e1428; --radius:14px; --shadow:0 12px 35px #14213d0b; }
#header { padding-block:.56rem; }
.brand { font-size:1.75rem; letter-spacing:-.055em; }
.nav-item { padding-inline:.62rem; }
.nav-item[aria-current] { color:var(--action-ink); }
main { width:min(100%,1360px); padding-top:clamp(1rem,2.4vw,2rem); }
h1 { font-size:clamp(2rem,4.2vw,3.55rem); }
.page-title { margin:.25rem 0 1.12rem; gap:.75rem; }
.page-title p { margin-top:.4rem; }
.panel,.calendar-toolbar { padding:clamp(.85rem,2vw,1.15rem); }
.primary { transition:background-color .18s ease; }
.primary:hover { background:#8e1428; }
.secondary:hover,.chip:hover,.icon-btn:hover,.nav-item:hover,.look-open:hover { background:var(--rose); }
.chip[aria-pressed=true],.tone[aria-pressed=true] { color:var(--action-ink); }
.welcome { min-height:0; max-width:1080px; width:100%; margin:auto; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); border-radius:20px; box-shadow:0 20px 55px #14213d1a; }
.welcome-art { background:radial-gradient(ellipse at 24% 14%,#3b5277,#243653 43%,#14213d 82%); }
.welcome-art::before,.welcome-art::after { border-radius:45%; border-color:#edf1fb59; width:92%; height:104%; transform:translateX(-22%) rotate(35deg); }
.welcome-art::after { transform:translateX(12%) rotate(-32deg); border-color:#f15c745e; }
.welcome-letter { padding:clamp(1.45rem,4vw,3.2rem); gap:.95rem; }
.welcome-letter h1 { font-size:clamp(2.85rem,6.1vw,5.75rem); }
.welcome-letter h1 em,.signature strong,.eyebrow { color:var(--action-ink); }
blockquote { font-size:clamp(1.1rem,1.75vw,1.45rem); }
.calendar-toolbar h2 { font-size:clamp(1.35rem,2.25vw,1.85rem); }
.day { padding:.48rem; min-height:148px; }
.current-day .day-number { color:var(--action-ink); }
.look-card { border-radius:8px; }
.look-open { padding:.42rem; }
.wardrobe { grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); }
.wardrobe .piece-image,.wardrobe .piece-empty { aspect-ratio:5/4; }
.pieces { grid-template-columns:repeat(auto-fill,minmax(94px,1fr)); }
@media (min-width:741px) and (max-width:900px) {
  #header { gap:.7rem; padding-inline:1rem; }
  .nav-item { padding-inline:.44rem; }
  .day-head .icon-btn { width:44px; }
  .week .look-open .pieces { grid-template-columns:1fr; }
  .week .look-open .piece-image,.week .look-open .piece-empty { aspect-ratio:4/3; }
}
@media (max-width:740px) {
  #header { padding-block:.44rem; }
  .welcome { grid-template-columns:1fr; }
  .welcome-art { min-height:104px; }
  .day { min-height:0; }
  .look-open .pieces { grid-template-columns:repeat(auto-fill,minmax(68px,1fr)); }
  .wardrobe { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-color-scheme:dark) {
  :root { --action-ink:#ff9baa; --ivory:#101a2d; --paper:#18253d; --rose:#3b2338; --wine:#b91c35; --wine-deep:#edf0f7; --ink:#f2f4f9; --muted:#bdc9dc; --line:#42536d; --mauve:#ff9baa; }
  .day,.month-day,input:not([type=checkbox]):not([type=file]):not([type=color]),select,textarea { background:#1d2c46; }
  .current-day,.look-open:hover,.secondary:hover,.chip:hover,.icon-btn:hover,.nav-item:hover { background:#36283d; }
  #toast:not(:empty),.modal-toast:not(:empty) { background:#8e1428; }
  .photo-control input::file-selector-button { color:var(--action-ink); }
}
@media (max-width:380px) {
  .rgb { grid-template-columns:38px minmax(63px,1.35fr) repeat(3,minmax(36px,1fr)); gap:.26rem; }
  .wardrobe { gap:.55rem; }
}
@media (prefers-reduced-motion:reduce) { .primary { transition:none; } }
.photo-control { max-width:100%; min-width:0; }
.palette-grid,.saved-grid,.settings-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr)); }
/* Apple layout follows the viewport, including narrow windows and split view. */
body { min-height:100vh; min-height:100dvh; }
main { padding-inline-start:max(1rem,env(safe-area-inset-left)); padding-inline-end:max(1rem,env(safe-area-inset-right)); }
#pwa-update { margin: .55rem auto 0; width:min(calc(100% - 2rem),44rem); background:var(--paper); border:1px solid var(--line); padding:.55rem .8rem; border-radius:12px; }
#header { padding-top:max(.56rem,env(safe-area-inset-top)); }
dialog { max-height:calc(var(--visible-height,100dvh) - 1.3rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overscroll-behavior:contain; }
.look-composition { display:block; width:auto; max-width:100%; max-height:58dvh; object-fit:contain; margin:0 auto .8rem; }
.calendar-preview-trigger { display:none; }
.wardrobe-drop { display:none; margin-bottom:.65rem; }
.wardrobe .garment-card { content-visibility:auto; contain-intrinsic-size:auto 230px; }
@media (pointer:fine) { .wardrobe-drop { display:block; } }
@media (max-width:740px) {
  input:not([type=checkbox]):not([type=radio]),select,textarea { font-size:16px; }
  #header { padding-inline:max(1rem,env(safe-area-inset-left),env(safe-area-inset-right)); }
  nav { padding-inline:max(.12rem,env(safe-area-inset-left),env(safe-area-inset-right)); }
  dialog { margin:auto auto calc(max(8px,env(safe-area-inset-bottom)) + var(--keyboard-inset,0px)); }
}
@media (min-width:1100px) {
  body:has(#header:not([hidden])) { padding-inline-start:164px; }
  #header:not([hidden]) { position:fixed; inset:0 auto 0 0; width:164px; border-right:1px solid var(--line); border-bottom:0; flex-direction:column; align-items:stretch; justify-content:start; gap:1.6rem; padding:1.1rem .75rem; }
  #header nav { flex-direction:column; }
  #header .brand { padding-inline:.65rem; }
  .wardrobe { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); }
  .calendar-preview-trigger { display:inline-flex; min-height:36px; }
}
@media (min-width:1330px) {
  main[data-view=calendar]:has(.calendar-preview) { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:.7rem; }
  main[data-view=calendar]:has(.calendar-preview) > :not(.calendar-panel):not(.calendar-preview) { grid-column:1/-1; }
  .calendar-preview .pieces { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:no-preference) { dialog[open] { animation:appear .18s ease-out both; } }
