@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');
:root{--paper:#fcfaf7;--card:#fffaf2;--cream:#f4ede3;--sand:#ded0bd;--brown:#59452f;--brown2:#77644f;--ink:#29251f;--muted:#82796d;--line:#e6dbcc;--shadow:0 5px 18px #4937220c;--radius:20px}
*{box-sizing:border-box}html{background:var(--paper);min-height:100%;}body{margin:0;background:radial-gradient(ellipse at 10% 0%,#fff9ef 0,transparent 48%),var(--paper);color:var(--ink);font:14px 'DM Sans',sans-serif;min-height:100dvh;-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #9b8060;outline-offset:2px}.app-shell{max-width:760px;min-height:100dvh;margin:auto;padding:env(safe-area-inset-top) 16px calc(92px + env(safe-area-inset-bottom));}.topbar{height:60px;display:flex;align-items:center;justify-content:space-between; position:relative;}.brand{font:500 30px 'Playfair Display',serif; position:absolute;
  left:50%;
  top:0;
  transform:translateX(-50%);
  white-space:nowrap;
  line-height:60px;serif;color:var(--ink);text-decoration:none}.icon-button{width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:var(--card);font-size:20px;color:var(--brown)}h1,h2,h3,.serif{font-family:'Playfair Display',serif;font-weight:400}h1{font-size:30px;margin:8px 0}h2{font-size:25px;margin:4px 0 16px}h3{font-size:19px;margin:0 0 7px}p{line-height:1.55}.subtle{color:var(--muted)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:10px;color:var(--muted)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 16px}.btn{border:1px solid var(--brown);border-radius:999px;padding:12px 18px;min-height:44px;background:var(--brown);color:#fffaf2;font-weight:500}.btn.secondary{background:transparent;color:var(--brown)}.btn.soft{background:var(--cream);border-color:var(--cream);color:var(--brown)}.btn.small{padding:8px 13px;min-height:36px;font-size:12px}.pill-row{display:flex;gap:7px;overflow:auto;padding:3px 0 12px;scrollbar-width:none}.pill{white-space:nowrap;border:0;border-radius:999px;background:#eee6da;color:var(--brown2);padding:9px 14px;font-size:12px}.pill.active{background:var(--brown);color:white}.card{background:linear-gradient(145deg,#fffaf3,#f9f1e6);border:1px solid #eee4d7;border-radius:var(--radius);box-shadow:var(--shadow)}.hero{padding:22px 20px;background:linear-gradient(135deg,#e9ddca,#f9f1e5);margin:6px 0 18px;min-height:140px}.hero p{max-width:270px;margin:8px 0 0;color:#665747}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quick-card{padding:18px 15px;min-height:115px;text-align:left;border:1px solid var(--line);border-radius:17px;background:var(--card);color:var(--ink);box-shadow:var(--shadow)}.quick-icon{font-size:25px;color:var(--brown);display:block;margin-bottom:13px}.quick-card strong{display:block;font-weight:600}.quick-card small{display:block;color:var(--muted);margin-top:5px;line-height:1.4}.search{width:100%;border:1px solid var(--line);background:#fffaf4;border-radius:999px;padding:13px 16px;margin-bottom:10px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.item-card{position:relative;overflow:hidden;padding:8px;min-width:0}.item-image{height:160px;background:#eee5d8;border-radius:13px;display:flex;align-items:center;justify-content:center;overflow:hidden}.item-image img{width:100%;height:100%;object-fit:contain}.item-name{font-weight:600;font-size:13px;margin:10px 2px 3px;overflow-wrap:anywhere}.item-meta{font-size:11px;color:var(--muted);margin:0 2px 5px}.heart{position:absolute;top:14px;right:14px;border:0;border-radius:50%;width:32px;height:32px;background:#fffaf0e8;color:var(--brown);font-size:17px}.heart.on{color:#8b3e31}.empty{padding:35px 20px;text-align:center;border:1px dashed #d6c7b4;border-radius:20px;background:#fbf6ee}.empty-symbol{font-size:30px;color:#9c876c;margin-bottom:12px}.empty p{color:var(--muted);max-width:260px;margin:8px auto 18px}.form-card{padding:18px;margin-bottom:16px}.field{display:block;margin:12px 0}.field span{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fffaf3;color:var(--ink);min-height:44px}.field textarea{min-height:82px;resize:vertical}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.item-size-color-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:start}.item-size-brand{min-width:0}.item-size-brand .field{margin:0 0 12px}.item-size-color-row>.field{margin:0}.color-picks{display:flex;gap:10px;flex-wrap:wrap;padding:3px 2px 6px}.color-pick{appearance:none;flex:0 0 30px;width:30px;height:30px;padding:0;border-radius:50%;border:2px solid #fffaf2;box-shadow:0 0 0 1px var(--line);cursor:pointer}.color-pick.selected{box-shadow:0 0 0 2px var(--brown);transform:scale(1.06)}.color-pick[style*='#FFFFFF']{border-color:#d8d0c5}.color-pick:focus-visible{outline:2px solid var(--brown);outline-offset:4px}#selectedColorName{display:block;margin-top:7px;font-size:11px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.bottom-nav{position:fixed;z-index:10;bottom:0;left:0;right:0;display:flex;justify-content:space-around;gap:2px;padding:9px 8px calc(9px + env(safe-area-inset-bottom));background:#f8f2e9f2;border-top:1px solid #e7dccd;backdrop-filter:blur(14px);max-width:760px;margin:auto}.nav-item{flex:1;border:0;background:transparent;color:#958a7b;display:flex;flex-direction:column;align-items:center;gap:4px;padding:5px 0;min-width:0}.nav-item span{font-size:22px;line-height:22px}.nav-item small{font-size:10px}.nav-item.active{color:var(--brown);font-weight:600}.outfit-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;background:#eee5d8;border-radius:15px;padding:10px;min-height:130px}.outfit-preview img{width:100%;height:130px;object-fit:contain}.outfit-card{padding:9px;overflow:hidden}.calendar-head{display:flex;align-items:center;justify-content:space-between;margin:12px 0}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.weekday,.day{font-size:11px;text-align:center;padding:8px 0}.weekday{color:var(--muted)}.day{border:0;border-radius:50%;background:transparent;color:var(--ink);aspect-ratio:1;padding:0;position:relative}.day.today{box-shadow:inset 0 0 0 1px var(--brown)}.day.selected{background:var(--brown);color:white}.day.has-entry:after{content:'';position:absolute;bottom:3px;left:calc(50% - 2px);width:4px;height:4px;background:#a48a64;border-radius:50%}.day.selected.has-entry:after{background:white}.list-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.list-row:last-child{border-bottom:0}.list-row .grow{flex:1;min-width:0}.check{accent-color:var(--brown);width:18px;height:18px}.progress{height:6px;background:#e5d9c8;border-radius:99px;overflow:hidden}.progress>span{height:100%;display:block;background:var(--brown);border-radius:99px}.modal-backdrop{position:fixed;inset:0;z-index:30;background:#2c2117a0;display:flex;align-items:flex-end;justify-content:center;padding:12px}.modal{width:min(100%,600px);max-height:90dvh;overflow:auto;background:var(--paper);border-radius:24px 24px 16px 16px;padding:20px 17px calc(20px + env(safe-area-inset-bottom))}
/* Center only the Outfit Details and Edit Outfit dialogs; the antique Outfit Phone panels keep their own styling. */
.modal-backdrop.centered-outfit-backdrop{align-items:center;z-index:50;padding:16px}
.modal.centered-outfit-modal{border-radius:24px;max-height:min(88dvh,760px)}.modal-head{display:flex;justify-content:space-between;align-items:center}.close{border:0;background:transparent;font-size:24px;color:var(--brown)}#toast{position:fixed;z-index:60;bottom:calc(90px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:var(--brown);color:white;padding:11px 17px;border-radius:99px;display:none;max-width:90vw;text-align:center}.loading{text-align:center;padding:40px}.settings-note{font-size:12px;color:var(--muted);line-height:1.5}
@media(min-width:560px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.item-image{height:190px}.app-shell{padding-left:24px;padding-right:24px}.hero{padding:28px}.quick-card{padding:22px}}
@media(max-width:360px){.app-shell{padding-left:11px;padding-right:11px}.item-image{height:130px}.nav-item small{font-size:9px}.field-row{grid-template-columns:1fr}.item-size-color-row{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:no-preference){button,.card{transition:background .15s ease,transform .15s ease}button:active{transform:scale(.98)}}

/* Calendar outfit thumbnails */
.calendar-entry {
  align-items: center;
}

.calendar-outfit-images {
  display: flex;
  flex: 0 0 82px;
  gap: 4px;
  width: 82px;
  height: 76px;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
}

.calendar-outfit-images img {
  width: 100%;
  min-width: 0;
  height: 100%;
  object-fit: contain;
}

/* Packing-list wardrobe thumbnails */
.packing-item-image {
  flex: 0 0 58px;
  width: 58px;
  height: 68px;
  object-fit: contain;
  border-radius: 10px;
  background: transparent;
}

.packing-row .grow {
  overflow-wrap: anywhere;
}

/* Destination photo preview */
#tripPhotoPreview img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 14px;
}


/* Calendar outfit preview: tap the collage to open large photos */
.calendar-outfit-images {
  appearance: none;
  padding: 4px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px;
  background: transparent;
}
.calendar-outfit-images img { width: 100%; height: 100%; min-width: 0; object-fit: contain; background: transparent; border-radius: 6px; }
.calendar-outfit-images img:first-child:last-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.calendar-outfit-large-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.calendar-outfit-large-item { min-width: 0; text-align: center; color: var(--ink); font-size: 12px; }
.calendar-outfit-large-item img { width: 100%; height: clamp(190px, 38vh, 320px); object-fit: contain; border-radius: 14px; background: transparent; }
.calendar-outfit-large-item div { margin-top: 7px; overflow-wrap: anywhere; }
@media(max-width:380px) { .calendar-outfit-images { flex-basis: 88px; width: 88px; height: 96px; } .calendar-outfit-large-grid { grid-template-columns: 1fr; } }


/* Outfit arrangement editor: drag clothing photos into the desired positions */
.outfit-arrange-help { margin: 6px 0 12px; }
.outfit-arrange-stage {
  position: relative;
  width: 100%;
  height: min(62vh, 560px);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: transparent;
  background-image: none;
  touch-action: none;
}
.draggable-outfit-item {
  position: absolute;
  width: 42%;
  height: 170px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid #e4d7c7;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 3px 12px #49372218;
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: 1;
}
.draggable-outfit-item.is-dragging {
  cursor: grabbing;
  z-index: 5;
  box-shadow: none;
  border-color: transparent;
}
.draggable-outfit-item img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: contain;
  pointer-events: none;
}
.draggable-outfit-item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--ink);
  pointer-events: none;
}
.outfit-no-image { display:flex; align-items:center; justify-content:center; height:132px; color:var(--muted); font-size:12px; }
.outfit-arrange-actions { position: sticky; bottom: 0; padding-top: 10px; background: var(--paper); }
@media (max-width: 420px) {
  .outfit-arrange-stage { min-height: 360px; height: 58vh; }
  .draggable-outfit-item { width: 46%; height: 145px; padding: 5px; }
  .draggable-outfit-item img, .outfit-no-image { height: 110px; }
}

/* Outfit Phone embedded immediately below the home greeting */
.outfit-phone-home{width:100%;margin:0 0 18px;overflow:hidden;border-radius:20px;background:#fcfaf7;border:1px solid #e6dbcc;box-shadow:var(--shadow)}
.outfit-phone-home iframe{display:block;width:100%;min-height:900px;height:1050px;border:0;background:#fcfaf7;overflow:visible}

/* Show the complete telephone without cropping */
.outfit-phone-home{overflow:visible;background:#fcfaf7;}
.outfit-phone-home iframe{overflow:visible;}

/* Compact embedded Outfit Phone for narrow screens */
.outfit-phone-home{overflow:hidden;}
.outfit-phone-home iframe{min-height:0;height:660px;overflow:hidden;}

/* Coordinated outline icons for Wardrobe and Pack & Go */
.bottom-nav .nav-item span svg{display:block;width:23px;height:23px;margin:auto}.quick-icon svg{display:block;width:29px;height:29px;margin:auto}

/* Home navigation cards: consistent left-aligned icons beside labels */
.quick-grid .quick-card{display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;align-items:center;column-gap:11px;row-gap:5px;text-align:left}
.quick-grid .quick-card .quick-icon{grid-column:1;grid-row:1/span 2;margin:0;display:flex;align-items:center;justify-content:flex-start;min-height:32px;font-size:25px}
.quick-grid .quick-card .quick-icon svg{width:27px;height:27px;margin:0}
.quick-grid .quick-card strong{grid-column:2;grid-row:1;font-size:13px;line-height:1.3}
.quick-grid .quick-card small{grid-column:2;grid-row:2;margin:0;font-size:11px}
.dress-login[hidden]{display:none!important}
body.login-locked{overflow:hidden}
.dress-login{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));background:#d9c1a6 url('./assets_Romantic Vintage Wardrobe Corner.png') center center/cover no-repeat}
.dress-login-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(37,24,15,.10),rgba(37,24,15,.26))}
.dress-login-card{position:relative;z-index:1;width:min(100%,360px);padding:29px 27px 30px;background:rgba(255,250,242,.92);border:1px solid rgba(255,255,255,.65);border-radius:20px;box-shadow:0 18px 55px rgba(44,29,18,.24);backdrop-filter:blur(12px);color:#574331;text-align:center}
.dress-login-eyebrow{font-size:9px;letter-spacing:.20em;color:#8d745e;margin:0 0 9px}
.dress-login-card h1{font-family:'Playfair Display',Georgia,serif;font-weight:400;font-size:38px;line-height:1.2;margin:0}
.dress-login-subtitle{font-family:Georgia,serif;font-style:italic;font-size:13px;color:#907963;margin:7px 0 23px}
.dress-login-card form{text-align:left}
.dress-login-card label{display:block;font-size:11px;color:#796451;margin:13px 0 6px}
.dress-login-card input{display:block;width:100%;height:44px;background:#fffaf4;border:1px solid #d9c9b7;border-radius:10px;padding:10px 13px;font-size:14px;color:#503d2e}
.dress-login-card form button{width:100%;margin-top:20px;background:#70543e;color:#fffaf4;border:0;border-radius:99px;min-height:45px;font-size:13px;font-weight:600;letter-spacing:.02em}
.dress-login-card form button span{margin-left:7px}
.dress-login-error{font-size:11px;color:#a14436;margin:10px 0 0}
@media(max-width:390px){.dress-login-card{padding:23px 20px}.quick-grid .quick-card{padding:14px 9px;column-gap:6px;grid-template-columns:26px minmax(0,1fr)}.quick-grid .quick-card .quick-icon svg{width:24px;height:24px}.quick-grid .quick-card strong{font-size:12px}.quick-grid .quick-card small{font-size:10px}}

/* Fixed-on-scroll application masthead across all screens. */
.app-shell .topbar{
  position:sticky;
  top:env(safe-area-inset-top, 0px);
  z-index:100;
  background:rgba(252,250,247,.97);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  margin:0 -16px 16px;
  padding:0 16px;
}

/* Automatic outfit generator */
.generated-look-list{display:grid;gap:12px;margin-top:10px}.generated-look{padding:11px;overflow:hidden}.generated-look-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:2px 2px 10px}.generated-look-title span{font-size:11px;color:var(--muted);text-align:right}.generated-look-collage{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;align-items:stretch}.generated-look-piece{min-width:0;background:#f0e7da;border-radius:12px;padding:6px;text-align:center;display:flex;flex-direction:column;justify-content:space-between}.generated-look-piece img{width:100%;height:145px;object-fit:contain}.generated-look-piece small{display:block;font-size:10px;line-height:1.35;margin-top:5px;overflow-wrap:anywhere;color:var(--brown2)}.generated-no-photo{height:145px;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--muted);overflow-wrap:anywhere}.generated-look-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}.generated-look-actions .subtle{font-size:11px}@media(max-width:380px){.generated-look-piece img,.generated-no-photo{height:115px}.generated-look-piece{padding:4px}}

/* Compact styling board: keep every draggable item inside the frame */
.generated-outfit-stage{height:clamp(300px,45dvh,430px);min-height:0;contain:layout paint}
.generated-stage-piece{min-width:0;width:clamp(64px,24%,150px);max-width:34%;max-height:39%;padding:4px 4px 5px;gap:2px;overflow:hidden}
.generated-stage-piece img{height:clamp(62px,10dvh,92px);max-height:24%;min-height:0;object-fit:contain}
.generated-stage-piece small{font-size:clamp(7px,1.1dvh,9px);line-height:1.15;max-height:2.3em;overflow:hidden}
@media(max-width:420px){.generated-outfit-stage{height:clamp(280px,42dvh,360px)}.generated-stage-piece{width:clamp(58px,27%,105px);max-width:32%;max-height:40%;padding:3px}.generated-stage-piece img{height:clamp(52px,8.5dvh,76px);max-height:24%}.generated-stage-piece small{font-size:7px}}
@media(max-height:700px){.generated-outfit-stage{height:clamp(260px,40dvh,340px)}.generated-stage-piece img{height:clamp(48px,8dvh,72px)}}

/* Clean editorial outfit collage: no grey tiles or labels; all pieces stay within the board. */
.generated-outfit-stage{position:relative;width:100%;height:clamp(390px,58dvh,620px);max-height:620px;min-height:350px;overflow:hidden;border-radius:14px;background:#f7f6f3;touch-action:pan-y;box-sizing:border-box}
.generated-stage-caption{display:none!important}
.generated-stage-piece{position:absolute;transform:translate(-50%,-50%);display:block;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;max-width:42%;max-height:48%;min-width:0;overflow:visible;touch-action:none;cursor:grab}
.generated-stage-piece.is-dragging{z-index:20;cursor:grabbing}
.generated-stage-piece img{display:block;width:100%;height:clamp(105px,19dvh,190px);max-height:none;min-height:0;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.06))}
.generated-stage-piece small{display:none!important}
.generated-stage-piece .generated-no-photo{background:transparent;height:100px}
@media(max-width:420px){.generated-outfit-stage{height:clamp(420px,60dvh,600px);min-height:390px}.generated-stage-piece{max-width:43%;max-height:48%}.generated-stage-piece img{height:clamp(105px,17dvh,155px)}}
@media(max-height:700px){.generated-outfit-stage{height:clamp(350px,58dvh,450px);min-height:330px}.generated-stage-piece img{height:clamp(85px,15dvh,120px)}}

/* Final generator refinement: slightly larger garment cutouts and only two arrow controls. */
.generated-stage-piece{max-width:46%;}
.generated-stage-piece img{height:clamp(125px,21dvh,205px);}
.generated-carousel-controls{justify-content:center;gap:18px;margin:10px 0 5px}
.generated-carousel-controls .generated-arrow{width:44px;height:40px;padding:0;font-size:23px;line-height:1;border-radius:999px;display:flex;align-items:center;justify-content:center}
.generated-dots{display:none!important}
@media(max-width:420px){.generated-stage-piece{max-width:47%}.generated-stage-piece img{height:clamp(120px,19dvh,175px)}.generated-carousel-controls .generated-arrow{width:42px;height:38px}}
@media(max-height:700px){.generated-stage-piece img{height:clamp(100px,17dvh,145px)}}

/* Generator layout: larger pieces, top above bottoms, and one horizontal action row. */
.generated-stage-piece{max-width:49%;}
.generated-stage-piece img{height:clamp(145px,24dvh,225px);}
.generated-bottom-controls{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;margin:12px 0 4px;width:100%;}
.generated-bottom-controls .btn{min-width:0;white-space:nowrap;flex:0 1 auto;padding:10px 12px;font-size:12px;}
.generated-bottom-controls .generated-arrow{height:40px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:5px;}
.generated-bottom-controls .generated-save-inline{flex:0 0 auto;}
@media(max-width:420px){.generated-stage-piece{max-width:50%;}.generated-stage-piece img{height:clamp(135px,22dvh,195px);}.generated-bottom-controls{gap:5px}.generated-bottom-controls .btn{padding:9px 8px;font-size:11px}}


/* Final refinement: larger garment photos and a tighter top/bottom outfit silhouette. */
.generated-stage-piece{max-width:56%;}
.generated-stage-piece img{height:clamp(165px,28dvh,255px);}
@media(max-width:420px){.generated-stage-piece{max-width:58%;}.generated-stage-piece img{height:clamp(155px,26dvh,220px);}}
@media(max-height:700px){.generated-stage-piece img{height:clamp(125px,23dvh,175px);}}

/* Mobile outfit board: larger garment cutouts and a compact top-to-bottom silhouette. */
.generated-stage-piece{max-width:60%;max-height:62%;}
.generated-stage-piece img{height:clamp(155px,25dvh,235px);}
@media(max-width:420px){.generated-stage-piece{max-width:62%;max-height:64%;}.generated-stage-piece img{height:clamp(165px,27dvh,250px);}}
@media(max-height:700px){.generated-stage-piece img{height:clamp(145px,23dvh,205px);}}
/* Multi-colour item picker */
.color-picks{gap:11px;padding:5px 2px 8px}
.color-pick{flex-basis:34px;width:34px;height:34px}
/* Larger clothing photos and a tighter top/bottom styling layout */
.generated-stage-piece{max-width:68%;}
.generated-stage-piece img{height:clamp(190px,30dvh,285px);}
@media(max-width:420px){.generated-stage-piece{max-width:70%;}.generated-stage-piece img{height:clamp(175px,29dvh,255px)}}
@media(max-height:700px){.generated-stage-piece img{height:clamp(155px,26dvh,215px)}}

/* Generate Outfit opens as a near-full-screen styling workspace, centered instead of bottom-anchored. */
.modal-backdrop.generated-outfit-backdrop{align-items:center;padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));}
.modal.generated-outfit-modal{width:min(100%,760px);height: min(94dvh, 980px);max-height:94dvh;min-height:0;overflow-y:auto;overscroll-behavior:contain;border-radius:24px;padding:18px 14px calc(18px + env(safe-area-inset-bottom));box-sizing:border-box;}
.modal.generated-outfit-modal .modal-head{position:sticky;top:-18px;z-index:5;background:var(--paper);padding:5px 0 8px;}
@media(max-width:420px){.modal.generated-outfit-modal{width:100%;height:94dvh;max-height:94dvh;padding:14px 12px calc(14px + env(safe-area-inset-bottom));border-radius:22px;}}

/* Keep the Generate Outfit popup above the sticky Dress Me logo/header. */
.modal-backdrop.generated-outfit-backdrop{z-index:1000;}
.modal.generated-outfit-modal{position:relative;z-index:1001;}

/* Modal overlays must cover the fixed Dress Me logo/header bar. */
.modal-backdrop{z-index:10000}


/* Wardrobe item detail and season icon controls */
.wardrobe-photo-trigger,.wardrobe-item-text{display:block;width:100%;border:0;background:transparent;padding:0;text-align:left;color:inherit;cursor:pointer}
.wardrobe-photo-trigger .item-image{width:100%}
.wardrobe-item-detail{width:100%}
.wardrobe-item-large-photo{display:block;width:100%;height:min(52dvh,460px);min-height:220px;object-fit:contain;background:#f2eadf;border-radius:16px}
.wardrobe-item-large-photo.no-photo{display:flex;align-items:center;justify-content:center;color:var(--muted)}
.wardrobe-item-detail-meta{padding:10px 2px 0}
.wardrobe-item-detail-meta h3{margin-bottom:4px}
.season-icon-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.season-icon{min-width:0;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:8px 3px;border:1px solid var(--line);border-radius:14px;background:#fffaf3;color:var(--brown2);cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.season-icon>span{display:flex;align-items:center;justify-content:center;width:31px;height:31px;border-radius:50%;background:#eee5d8;color:var(--brown);font-size:20px;line-height:1}
.season-icon small{font-size:9px;line-height:1.15;text-align:center;overflow-wrap:anywhere}
.season-icon.selected{border-color:var(--brown);background:#e9ddca;box-shadow:0 0 0 1px var(--brown)}
.season-icon.selected>span{background:var(--brown);color:#fffaf2}
@media(max-width:360px){.season-icon-row{gap:4px}.season-icon{min-height:64px}.season-icon small{font-size:8px}}

/* Season icons: fine brown line art without circular icon backgrounds. */
.season-icon>span{display:flex;align-items:center;justify-content:center;width:31px;height:31px;border-radius:0;background:transparent;color:var(--brown);font-size:20px;line-height:1}
.season-icon>span svg{display:block;width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
.season-icon.selected>span{background:transparent;color:var(--brown)}
.season-icon.selected{background:#f4ecdf;border-color:var(--brown);box-shadow:0 0 0 1px var(--brown)}
.outfit-card{position:relative}
.outfit-card>.heart{z-index:3;top:12px;right:12px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:0;background:transparent;color:var(--brown);font-size:22px;line-height:1;cursor:pointer}
.outfit-card>.heart.on{color:var(--brown)}

/* Requested form alignment: Size and Brand use matching full-width input boxes. */
#itemForm .item-size-brand .field input { display:block; box-sizing:border-box; width:100%; min-width:0; }
#itemForm .item-size-brand .field { width:100%; min-width:0; }
/* Edit Outfit actions stay on one horizontal line when space allows. */
#outfitForm .actions { display:flex; flex-wrap:nowrap; align-items:stretch; gap:8px; }
#outfitForm .actions > .btn { flex:1 1 0; min-width:0; padding-left:10px; padding-right:10px; white-space:nowrap; }
/* Winter snowflake turns white only while selected; its unselected line art remains brown. */
.season-icon[data-season-value="Winter"].selected > span { color:#fffaf2; }
.season-icon[data-season-value="Winter"].selected > span svg { stroke:#fffaf2; }
/* Winter snowflake stays brown whether selected or not. */
.season-icon[data-season-value="Winter"].selected > span { color: var(--brown) !important; }
.season-icon[data-season-value="Winter"].selected > span svg { stroke: var(--brown) !important; }

/* Center Wardrobe item, Edit Item, Edit Outfit, and Arrange Outfit dialogs.
   The antique telephone UI uses its own panels and is intentionally untouched. */
.modal-backdrop.centered-dialog-backdrop{align-items:center;justify-content:center;padding:16px;z-index:100000;}
.modal.centered-dialog-modal{position:relative;z-index:100001;border-radius:24px;max-height:min(88dvh,760px);margin:auto;}
.modal-backdrop.centered-dialog-backdrop .modal{width:min(100%,600px);}
.modal-backdrop.centered-dialog-backdrop .modal.generated-outfit-modal{width:min(100%,760px);}

/* Display item color swatches in four columns. */
.color-picks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:5px 2px 8px;justify-items:center}
.color-pick{flex:none;width:30px;height:30px}
.clickable-item-photo{cursor:pointer;}
.clickable-item-photo:focus-visible{outline:2px solid var(--accent,#725C50);outline-offset:3px;}
