/* Consolidated wardrobe prototype surfaces; scoped to the existing Nest/Handlebars views. */
/* Shell, dialogs and tap builder are native progressive enhancements of real records. */
body:has(.thread){--thread-canvas:#f8f6fc;--thread-surface:#fff;--thread-ink:#2d263b;--thread-muted:#766c86;--thread-stage:#f0ebf7;--thread-outline:#d7cde6;--thread-lilac:#e9e2f6;--thread-primary:#6850a4}
html[data-theme=dark] body:has(.thread){--thread-canvas:#151019;--thread-surface:#1f1a26;--thread-ink:#eee7f7;--thread-muted:#b7acc8;--thread-stage:#2a2333;--thread-outline:#4a4158;--thread-lilac:#4f378b;--thread-primary:#d0bcff}
body:has(.thread)>.navbar{display:none}
.thread-rail{position:fixed;inset:0 auto 0 0;width:88px;display:flex;flex-direction:column;align-items:center;padding:24px 6px;gap:8px;background:var(--thread-canvas);z-index:25;color:var(--thread-muted)}
.thread-rail a{display:flex;flex-direction:column;align-items:center;gap:5px;width:76px;padding:12px 4px;border-radius:18px;font-size:11px;font-weight:600;text-decoration:none}
.thread-rail a>span{font-size:24px;line-height:1}.thread-rail a[aria-current=page]{background:var(--thread-lilac);color:var(--thread-ink)}
.thread-rail .rail-logo{width:44px;margin-bottom:16px;background:var(--thread-primary);color:var(--thread-surface);font-size:18px;border-radius:50% 50% 35% 50%}
.thread-rail button{margin-top:auto}.thread-tools{position:absolute;right:36px;top:28px;display:flex;gap:8px;align-items:center;z-index:10}
.thread-tools button,.thread-rail button,.thread-sheet header button{border:0;width:42px;height:42px;border-radius:50%;background:var(--thread-stage);color:var(--thread-ink);font-size:23px;cursor:pointer}
.thread-sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:min(680px,100%);max-height:88dvh;padding:20px;border:1px solid var(--thread-outline);border-radius:30px 30px 0 0;background:var(--thread-surface);color:var(--thread-ink);overflow:auto;box-shadow:0 24px 60px #0004}
.thread-sheet::backdrop,.palette-dialog::backdrop{background:#20183070}.thread-sheet header{display:flex;align-items:center;gap:12px;margin-bottom:16px}.thread-sheet h2{flex:1;font-size:20px;font-weight:700}.sheet-stage{display:flex;justify-content:center;gap:8px;background:var(--thread-stage);border-radius:22px;padding:20px;height:260px}.sheet-stage img{height:100%;max-width:100%;object-fit:contain}.sheet-stage>[data-piece]{min-width:0;flex:1}.sheet-stage>[data-piece] img{width:100%}.sheet-metadata{margin:18px 0}.sheet-metadata dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sheet-metadata dl>div{padding:12px;border-radius:16px;background:var(--thread-stage)}.sheet-metadata p{margin:14px 0;line-height:1.7}.sheet-metadata>a{display:block;padding:10px;background:var(--thread-stage);border-radius:12px;margin:8px 0}.thread-sheet .thread-action{display:inline-block;margin:8px 12px 8px 0;padding:12px 16px;border-radius:16px;background:var(--thread-primary);color:var(--thread-surface)}
.palette-trigger,.palette-clear{background:var(--thread-surface);color:var(--thread-ink);border:1px solid var(--thread-outline);border-radius:999px;padding:10px 16px;min-height:42px;font-size:13px}.palette-dialog{position:fixed;width:270px;max-height:75dvh;margin:auto;padding:12px;border:1px solid var(--thread-outline);border-radius:22px;background:var(--thread-surface);color:var(--thread-ink)}.palette-dialog button{display:block;width:100%;min-height:44px;text-align:left;padding:10px 14px;border-radius:14px}.palette-dialog button[aria-pressed=true]{background:var(--thread-lilac)}
.thread-builder>form{max-width:1000px}.builder-stage{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:center;min-height:200px;background:var(--thread-stage);border-radius:24px;padding:20px;margin-bottom:12px}.builder-stage:empty:after{content:'Tap pieces below to start';color:var(--thread-muted)}.builder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin:16px 0;max-height:480px;overflow:auto;padding:4px}.builder-piece,.builder-slot{border:2px solid var(--thread-outline);background:var(--thread-surface);color:var(--thread-ink);border-radius:20px;padding:10px;position:relative;text-align:left}.builder-piece[aria-pressed=true]{border-color:var(--thread-primary);background:var(--thread-lilac)}.builder-piece[aria-pressed=true]:after{content:'✓';position:absolute;top:8px;right:8px;background:var(--thread-primary);color:var(--thread-surface);border-radius:50%;padding:2px 6px}.builder-piece img{width:100%;height:100px;object-fit:contain}.builder-piece strong,.builder-slot strong{display:block;font-size:12px;margin-top:6px}.builder-piece small{font-size:11px;color:var(--thread-muted)}.builder-slot{width:110px}.builder-slot img{width:100%;height:80px;object-fit:contain}.builder-slot small{display:none}
@media(min-width:901px){body:has(.thread) .dock{display:none}.thread-tools~.thread,.thread-rail~.thread{margin-left:88px}.thread .thread-head:first-child{padding-right:130px}}
@media(max-width:900px){.thread-rail{display:none}.thread-tools{right:16px;top:18px}.thread .thread-head:first-child{padding-right:92px}.thread .thread-head:first-child .thread-action{position:fixed;right:18px;bottom:88px;z-index:20}.builder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.thread-sheet{padding:16px}.sheet-stage{height:220px}}

body:has(.thread){background:var(--thread-canvas)}
body:has(.thread) .dock{background:#fff;border-top:1px solid #e9e2f3;box-shadow:0 -6px 24px #38205b08;gap:4px}
body:has(.thread) .dock>a{min-width:0;min-height:52px;color:#766c86;border-radius:18px}
body:has(.thread) .dock>a.dock-active{color:#381e72;background:#e9e2f6}
.thread [hidden]{display:none!important}
.thread .tile-grid{align-items:start}
.thread .tile-info strong{display:block;line-height:1.45;overflow-wrap:anywhere}
.thread .tile-info p{line-height:1.5;overflow-wrap:anywhere}
.thread .outfit-photos>[data-piece]{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;max-width:25%;height:100%}
.thread .outfit-photos>[data-piece]>img{width:100%;height:100%;object-fit:contain}
.thread .outfit-photos>[data-piece]>.placeholder{width:100%;height:100%;padding:6px;text-align:center;font-size:11px;overflow-wrap:anywhere}
.thread .filter-row input[type=search]{border:1px solid #d7cde6;background:#fff;border-radius:999px;padding:11px 16px;font:inherit;font-size:13px;min-height:44px}
.thread :is(a,button,input,select):focus-visible{outline:3px solid #9476b5;outline-offset:3px}
.thread .palette-picker select{min-height:24px}
.thread .trip-copy p{line-height:1.6}
.thread .day-card form>strong{flex:1;min-width:140px}
@media(max-width:480px){.thread .outfit-photos{padding:10px;gap:4px}.thread .outfit-photos>[data-piece]{max-width:33.333%}.thread .day-card select{max-width:100%;flex:1}.thread .thread-head{flex-wrap:wrap}.thread .season-grid{scroll-snap-type:x proximity}.thread .season-tile{scroll-snap-align:start}}

.thread{--ink:var(--thread-ink);--muted:var(--thread-muted);--violet:var(--thread-primary);--lilac:var(--thread-lilac);--surface:var(--thread-surface);--canvas:var(--thread-canvas);--spring:cubic-bezier(.34,1.56,.64,1);background:var(--canvas);color:var(--ink);min-height:100dvh;font-family:Inter,'Segoe UI',sans-serif;padding:28px clamp(16px,3vw,40px) 112px}
.thread h1,.thread h2,.thread h3{font-family:Outfit,'Segoe UI',sans-serif}.thread h1{font-size:clamp(25px,3vw,34px);font-weight:700;letter-spacing:-.04em}.thread h2{font-size:20px;font-weight:600}.thread .subtle{color:var(--muted);font-size:13px}.thread .thread-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.thread .thread-head p{margin-top:4px}.thread .thread-action{background:var(--violet);color:white;border-radius:17px;padding:12px 18px;font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap}.thread .thread-action:hover{filter:brightness(1.1)}.thread .browse-title{font-size:16px;margin:20px 0 12px}.thread .season-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.thread .season-tile{position:relative;text-align:left;min-height:110px;padding:16px;border:2px solid transparent;border-radius:24px;background:var(--season-bg);color:#3e3255;transition:transform .23s var(--spring);cursor:pointer}.thread .season-tile:hover{transform:translateY(-4px)}.thread .season-tile[aria-pressed=true]{border-color:var(--violet)}.thread .season-tile strong{display:block;margin-top:20px;font:600 19px Outfit,'Segoe UI',sans-serif}.thread .season-tile small{font-size:11px}.thread .season-art{position:absolute;right:12px;top:12px;width:38px;height:38px;color:var(--season-color);opacity:.6}.thread .chip-group{margin-top:22px}.thread .chip-group>p{font-size:13px;color:var(--muted);margin-bottom:10px}.thread .chip-list{display:flex;gap:8px;flex-wrap:wrap}.thread .browse-chip,.thread .palette-picker{border:1px solid #d7cde6;background:var(--surface);color:var(--ink);border-radius:14px;padding:10px 17px;min-height:42px;font-size:13px;transition:transform .22s var(--spring),background .2s}.thread .browse-chip:hover{transform:translateY(-2px)}.thread .browse-chip[aria-pressed=true]{background:var(--lilac);color:#381e72;border-color:transparent;border-radius:20px}.thread .palette-picker{display:inline-flex;align-items:center;gap:10px;cursor:pointer;border-radius:999px;margin:14px 0}.thread .palette-picker select{background:transparent;border:0;max-width:150px;cursor:pointer}.thread .tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:18px}.thread .outfit-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.thread .tile{background:var(--surface);border:1px solid #e9e2f3;border-radius:24px;overflow:hidden;transition:transform .25s var(--spring),box-shadow .25s;animation:thread-rise .45s var(--spring) both;text-decoration:none;color:inherit}.thread .tile:hover{transform:translateY(-5px);box-shadow:0 8px 28px #38205b17}.thread .tile-photo{aspect-ratio:1;background:#f0ebf7;display:flex;align-items:center;justify-content:center;overflow:hidden}.thread .tile-photo img{width:100%;height:100%;object-fit:cover}.thread .tile-photo .placeholder{color:var(--muted);font-size:13px}.thread .tile-info{padding:13px 15px 16px}.thread .tile-info strong{font-size:14px}.thread .tile-info p{font-size:12px;color:var(--muted);margin-top:4px}.thread .outfit-photos{height:210px;display:flex;align-items:center;justify-content:center;gap:5px;background:#f0ebf7;padding:14px}.thread .outfit-photos img,.thread .outfit-photos .placeholder{width:23%;height:110px;object-fit:contain;border-radius:12px}.thread .outfit-photos .placeholder{display:grid;place-items:center;background:white}.thread .trip-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:20px}.thread .trip-art{height:140px;background:var(--trip-color,#9476b5);display:flex;align-items:center;padding:24px;color:white;font:700 32px Outfit,'Segoe UI',sans-serif}.thread .trip-copy{padding:22px}.thread .progress{height:6px;border-radius:8px;background:#f0ebf7;margin:18px 0 10px;overflow:hidden}.thread .progress span{display:block;height:100%;background:#00b8a9}.thread .trip-banner{background:var(--lilac);border-radius:28px;padding:24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.thread .trip-tabs{display:flex;background:#f0ebf7;border-radius:99px;padding:5px;width:max-content;max-width:100%;margin:22px 0}.thread .trip-tabs a{padding:12px 22px;border-radius:99px;font-size:13px;text-decoration:none;color:var(--muted)}.thread .trip-tabs a.active{background:var(--violet);color:white}.thread .day-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px}.thread .day-card,.thread .side-panel,.thread .pack-card{background:var(--surface);border:1px solid #e9e2f3;border-radius:24px;padding:20px;margin-bottom:16px}.thread .day-card>header{display:flex;justify-content:space-between;gap:12px}.thread .day-card .weather{background:#b5f2ee;border-radius:12px;padding:8px;color:#00201d;font-size:11px;white-space:nowrap}.thread .day-photos{display:flex;align-items:center;justify-content:center;gap:6px;min-height:120px;background:#f0ebf7;border-radius:18px;margin:16px 0;padding:10px}.thread .day-photos img{height:95px;max-width:22%;object-fit:contain}.thread .day-photos .placeholder{font-size:12px;color:var(--muted)}.thread .day-card form{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.thread .day-card select{max-width:200px;background:var(--lilac);padding:9px;border-radius:99px;font-size:12px}.thread .pack-card{border-radius:20px}.thread .pack-card form{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:10px}.thread input,.thread select{color:var(--ink)}.thread input[type=number],.thread input[type=text]{border:1px solid #d7cde6;background:white;border-radius:12px;padding:8px}.thread button[type=submit]{background:var(--lilac);border-radius:99px;padding:9px 16px;color:#381e72}.thread .side-panel{align-self:start}.thread .side-panel p{font-size:12px;color:var(--muted);line-height:1.6;margin-top:10px}.thread .muted-link{font-size:13px;color:var(--violet);text-decoration:none}.thread .filter-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0 20px}.thread .filter-row input{flex:1;min-width:180px}.thread .empty{background:white;border-radius:20px;padding:34px;color:var(--muted)}@keyframes thread-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@media(max-width:900px){.thread .season-grid{display:flex;overflow-x:auto;scrollbar-width:none}.thread .season-tile{min-width:128px;min-height:105px}.thread .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.thread .trip-grid,.thread .day-grid{grid-template-columns:1fr}.thread .side-panel{display:none}.thread .outfit-photos{height:160px}.thread .outfit-photos img,.thread .outfit-photos .placeholder{height:75px}.thread .trip-banner{padding:18px}}@media(max-width:480px){.thread{padding-left:16px;padding-right:16px}.thread .thread-head{align-items:flex-start}.thread .thread-action{padding:10px}.thread .trip-tabs a{padding:11px 16px}.thread .day-card>header{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){.thread *{animation:none!important;transition:none!important}}
