/* Selena's atelier: presentation only; prices, unlocks and saving stay authoritative. */
#wardrobeModal{padding:140px 22px 20px;backdrop-filter:blur(5px);background:#13152188}
#wardrobeModal .wd-sheet{width:min(1180px,96vw);max-width:1180px;height:min(780px,calc(100dvh - 160px));max-height:calc(100dvh - 160px);overflow:visible;border:2px solid #d6ac6d;border-radius:24px;background:linear-gradient(110deg,#fff6e8,#fffdf7 60%,#f9ecda);box-shadow:0 0 0 5px #f9e5bb99,0 20px 80px #17101977;isolation:isolate}
#wardrobeModal .wd-atelier-header{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 130px;min-height:130px;padding:12px 22% 12px 20%;border:0;background:transparent;overflow:visible;z-index:3}
#wardrobeModal .wd-atelier-header::before{content:'';position:absolute;width:calc(100% + 28px);aspect-ratio:2172/724;left:-14px;top:50%;transform:translateY(-50%);background:url('../assets/wardrobe-ui/selena-banner.webp') center/contain no-repeat;z-index:-1;pointer-events:none}
#wardrobeModal .modal-title{font-family:Cinzel,serif;color:#662342;font-size:clamp(20px,2.1vw,30px);text-align:center;line-height:1.25;white-space:normal}
#wardrobeModal .wd-atelier-intro{font-size:12px;line-height:1.5;text-align:center;color:#747c91;margin:8px 0 0}
#wardrobeModal .modal-x{position:absolute;right:12px;top:18px;z-index:5;width:44px;height:44px;background:#fffaf4;border:1px solid #d9b8d6;border-radius:50%;color:#9251be;box-shadow:0 2px 6px #67315320}
#wardrobeModal #wdBody{position:relative;z-index:1;border-radius:0 0 22px 22px}
#wardrobeModal .wd-layout{gap:0;overflow:hidden;flex:1;min-height:0}
#wardrobeModal .wd-preview-col{position:relative;width:31%;min-width:250px;border:0;border-radius:0 20px 0 0;padding:0;display:block;background:url('../assets/wardrobe-ui/mirror-room.webp') center/cover no-repeat}
#wardrobeModal .wd-preview-wrap{position:absolute;left:12%;bottom:17%;width:76%;height:65%;min-height:0;background:none;border:0;overflow:visible;flex:none}
#wardrobeModal .wd-preview-layer{object-fit:contain;object-position:bottom center;filter:drop-shadow(0 4px 3px #59362c30)}
#wardrobeModal .wd-preview-name{position:absolute;left:10%;right:10%;bottom:8%;padding:7px 10px;border:1px solid #dcc4a5;border-radius:12px;background:#fff8ebed;color:#552e48;font-size:13px;min-height:0}
#wardrobeModal .wd-preview-name:empty{display:none}
#wardrobeModal .wd-preview-desc{position:absolute;left:6%;right:6%;bottom:1%;max-height:7%;overflow:auto;padding:4px 7px;border-radius:7px;background:#fff8ebd9;color:#685747;font-size:10px;min-height:0}
#wardrobeModal .wd-preview-desc:empty{display:none}
#wardrobeModal .wd-content-col{background:#fffcf7;border:1px solid #ead8bf;border-radius:16px 0 0 0;min-width:0}
#wardrobeModal .wd-tabs{background:linear-gradient(#fffaf1,#f8ecdf);border-bottom:2px solid #e8cda8;gap:5px;padding:0 12px}
#wardrobeModal .wd-tab{position:relative;min-height:65px;font-size:13px;padding:11px 5px 10px;border-radius:14px 14px 0 0;border-bottom:3px solid transparent;color:#405174}
#wardrobeModal .wd-tab.active{background:linear-gradient(#fff,#eeedff);border:1px solid #d3bc91;border-bottom:3px solid #7270ed;color:#5653d7;box-shadow:inset 0 0 0 2px #fff8}
#wardrobeModal .wd-tab-icon{font-size:22px}
#wardrobeModal .wd-atelier-tip{margin:13px 16px 0;padding:10px 12px;border:1px solid #e3d9f6;border-radius:11px;background:#f4f1ff;color:#686599;font-size:12px;line-height:1.5;flex-shrink:0}
#wardrobeModal .wd-grid-scroll{padding:16px;scrollbar-color:#a4a8c4 #f2eadf;scrollbar-width:thin}
#wardrobeModal .wd-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
#wardrobeModal .wd-card{position:relative;border:1px solid #dfd2c1;border-radius:14px;background:linear-gradient(#fffdf8,#f9f7fb);box-shadow:0 2px 5px #66513d12}
#wardrobeModal .wd-card::before{content:'';position:absolute;left:0;top:0;width:37px;height:36px;background:url('../assets/ui/zier-ecke.webp') center/contain no-repeat;opacity:.5;z-index:2;pointer-events:none;transform:rotate(180deg)}
#wardrobeModal .wd-card.wd-active{border:2px solid #7474ff;box-shadow:0 0 0 2px #aaa9ff60,0 4px 12px #6b64d322}
#wardrobeModal .wd-card.wd-active::after{content:'✓';position:absolute;right:5px;top:5px;width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#6869ff;color:white;border:2px solid #fff;box-shadow:0 1px 5px #5657cb66;font-size:16px;font-weight:900;z-index:3}
#wardrobeModal .wd-card.wd-locked{opacity:1;cursor:pointer}
#wardrobeModal .wd-card-img-wrap{aspect-ratio:3/3.5;background:radial-gradient(ellipse,#fffdf7,#f1eef7);margin:5px 5px 0;border-radius:10px;overflow:hidden}
#wardrobeModal .wd-card-overlay{background:#f1e7e015}
#wardrobeModal .wd-card-img{object-fit:contain}
#wardrobeModal .wd-card-label{font-size:11px;line-height:1.35;padding:7px 4px 9px;color:#34436c;font-weight:800}
#wardrobeModal .wd-badge{font-size:10px;bottom:3px;max-width:95%;padding:2px 7px}
#wardrobeModal .wd-badge.buy{background:#fff2c7;border-color:#ecc277;color:#bc6515}
#wardrobeModal .wd-service-bar,#wardrobeModal .wd-body-switcher,#wardrobeModal .wd-race-notice{border-color:#e4d5be;background:#faf3e9;border-radius:10px}
#wardrobeModal .wd-footer{position:relative;gap:16px;min-height:82px;padding:16px 24px;background:linear-gradient(#fffdf6,#f7eddd);border-top:2px solid #dfc394;box-shadow:0 -4px 12px #795a2910}
#wardrobeModal .wd-footer-costs{padding:10px 16px;background:#f4f0ff;border:1px solid #e4dcf6;border-radius:14px;flex:1}
#wardrobeModal .wd-cost-free{color:#574976;font-style:normal;font-weight:800}
#wardrobeModal .wd-save-btn{border-radius:18px;min-width:250px;min-height:52px;border:3px double #ebcd92;box-shadow:0 3px 9px #7565cd40,inset 0 0 0 2px #b8b5ff55;font:700 17px Cinzel,serif;background:linear-gradient(#8584ff,#5159ed);color:#fff}
#wardrobeModal .wd-save-btn:disabled{opacity:.55}
#wardrobeModal button:focus-visible{outline:3px solid #ac66b1;outline-offset:2px}
[data-theme=dark] #wardrobeModal .wd-sheet{background:#282631;border-color:#a78960}
[data-theme=dark] #wardrobeModal .wd-content-col{background:#282631;border-color:#6b5e50}
[data-theme=dark] #wardrobeModal .wd-tabs,[data-theme=dark] #wardrobeModal .wd-footer{background:linear-gradient(#34303a,#282631);border-color:#786343}
[data-theme=dark] #wardrobeModal .wd-tab{color:#d4cadc}
[data-theme=dark] #wardrobeModal .wd-tab.active{background:#423c5e;color:#ded8ff}
[data-theme=dark] #wardrobeModal .wd-atelier-tip,[data-theme=dark] #wardrobeModal .wd-footer-costs{background:#373147;border-color:#5c4b73;color:#ddd1ef}
[data-theme=dark] #wardrobeModal .wd-card{background:#36323e;border-color:#665969}
[data-theme=dark] #wardrobeModal .wd-card-label,[data-theme=dark] #wardrobeModal .wd-cost-free{color:#e0d8ef}
[data-theme=dark] #wardrobeModal .wd-service-bar,[data-theme=dark] #wardrobeModal .wd-body-switcher,[data-theme=dark] #wardrobeModal .wd-race-notice{background:#39323b;border-color:#6b5b52}
@media(max-width:1000px){#wardrobeModal .wd-sheet{height:min(730px,calc(100dvh - 160px))}#wardrobeModal .wd-preview-col{width:30%;min-width:215px}#wardrobeModal .wd-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#wardrobeModal .wd-atelier-header{flex-basis:105px;min-height:105px}#wardrobeModal .modal-title{font-size:22px}#wardrobeModal .wd-atelier-intro{font-size:10px}}
@media(max-width:640px){#wardrobeModal{padding:25px 9px 12px}#wardrobeModal .wd-sheet{width:100%;height:calc(100dvh - 55px);max-height:calc(100dvh - 55px);border-radius:18px}#wardrobeModal .wd-atelier-header{flex-basis:92px;min-height:92px;padding:15px 45px 8px 24px;background:linear-gradient(100deg,#fff0da,#fff9ef);border-radius:16px 16px 0 0}#wardrobeModal .wd-atelier-header::before{display:none}#wardrobeModal .modal-title{font-size:19px;color:#662342}#wardrobeModal .wd-atelier-intro{font-size:10px;margin-top:4px}#wardrobeModal .modal-x{right:5px;top:5px;width:36px;height:36px}#wardrobeModal .wd-layout{flex-direction:column}#wardrobeModal .wd-preview-col{width:100%;min-width:0;height:155px;min-height:155px;border-radius:0;background-position:center 76%;background-size:100% auto}#wardrobeModal .wd-preview-wrap{left:8%;bottom:4%;height:95%;width:40%}#wardrobeModal .wd-preview-name{left:51%;right:6%;bottom:45%;font-size:12px}#wardrobeModal .wd-preview-desc{left:51%;right:6%;bottom:8%;max-height:33%;font-size:10px}#wardrobeModal .wd-content-col{border-radius:0;border-left:0;border-right:0}#wardrobeModal .wd-tabs{padding:0 5px;gap:3px}#wardrobeModal .wd-tab{min-height:49px;padding:6px 3px;font-size:11px}#wardrobeModal .wd-tab-icon{font-size:17px}#wardrobeModal .wd-atelier-tip{margin:8px 8px 0;padding:7px 9px;font-size:10px}#wardrobeModal .wd-grid-scroll{padding:10px}#wardrobeModal .wd-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}#wardrobeModal .wd-card-label{font-size:10px}#wardrobeModal .wd-footer{flex-direction:row;gap:8px;min-height:66px;padding:9px}#wardrobeModal .wd-footer-costs{padding:7px 9px;min-width:0}#wardrobeModal .wd-cost-parts{flex-wrap:wrap;font-size:10px}#wardrobeModal .wd-cost-free{font-size:11px}#wardrobeModal .wd-save-btn{min-width:0;width:auto;flex:0 0 45%;font-size:12px;min-height:46px}#wardrobeModal .wd-badge{font-size:8px}}
@media(max-height:700px) and (min-width:641px){#wardrobeModal{padding-top:35px}#wardrobeModal .wd-sheet{height:calc(100dvh - 65px);max-height:calc(100dvh - 65px)}#wardrobeModal .wd-atelier-header{flex-basis:95px;min-height:95px}#wardrobeModal .wd-atelier-intro{display:none}}
#wardrobeModal .wd-atelier-header::before{margin-top:-16px}
#wardrobeModal .wd-footer-choice{display:flex;align-items:center;gap:10px;flex:1;min-width:0;color:#3f355a}
#wardrobeModal .wd-footer-choice img{width:45px;height:55px;object-fit:contain;border:1px solid #e3d5c2;border-radius:10px;background:#fffaf1}
#wardrobeModal .wd-footer-choice small{display:block;font-size:11px;color:var(--text2);margin-bottom:3px}
#wardrobeModal .wd-footer-choice strong{display:block;font-size:14px;line-height:1.3}
#wardrobeModal .wd-footer-costs{flex:0 1 30%}
[data-theme=dark] #wardrobeModal .wd-footer-choice{color:#e0d8ef}
@media(max-width:640px){#wardrobeModal .wd-footer-choice{display:none}#wardrobeModal .wd-footer-costs{flex:1}}

#wardrobeModal .wd-save-btn{padding:12px 18px}
@media(max-width:640px){#wardrobeModal .wd-save-btn{padding:10px 8px}}
@media(max-height:700px) and (min-width:641px){#wardrobeModal .wd-atelier-header::before{display:none}#wardrobeModal .wd-atelier-header{background:#fff4e2;border-radius:20px 20px 0 0}}
/* Crop the room's upper banner: the ornate header already supplies that decoration. */
@media(min-width:641px){#wardrobeModal .wd-preview-col{background-size:auto 128%;background-position:center bottom}}
/* Let the mirror room tuck beneath the header and blend into the catalogue. */
@media(min-width:641px){
#wardrobeModal .wd-layout{overflow:visible}
#wardrobeModal .wd-preview-col{background:none;border-radius:0;isolation:isolate}
#wardrobeModal .wd-preview-col::before{content:'';position:absolute;inset:-55px -16px 0 0;z-index:-1;pointer-events:none;background:url('../assets/wardrobe-ui/mirror-room.webp') center bottom/auto 128% no-repeat;mask-image:linear-gradient(to right,#000 0%,#000 87%,transparent 100%)}
#wardrobeModal .wd-content-col{position:relative;border-left:0;border-top-left-radius:0}
}/* Small cosmetic parts need compact swatches rather than outfit-sized cards. */
#wardrobeModal .wd-grid:has(.hair-wrap,.face-wrap){grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:10px}
#wardrobeModal .wd-card-img-wrap:is(.hair-wrap,.face-wrap){aspect-ratio:1/1;max-height:105px}
#wardrobeModal .wd-grid:has(.hair-wrap,.face-wrap) .wd-card-label{padding:5px 3px 7px;font-size:10px}
#wardrobeModal .wd-grid:has(.hair-wrap,.face-wrap) .wd-card.wd-active::after{width:19px;height:19px;font-size:12px}
@media(max-width:640px){#wardrobeModal .wd-grid:has(.hair-wrap,.face-wrap){grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:7px}}
/* Compare every cosmetic race in a single row; keep it scrollable on small screens. */
#wardrobeModal .wd-race-grid{display:flex;gap:8px;overflow-x:auto;padding:4px 3px 10px;scrollbar-width:thin}
#wardrobeModal .wd-race-card{flex:1 0 94px;min-width:0;padding:8px 5px 29px;background:linear-gradient(#fffaf1,#f4eef9)}
#wardrobeModal .wd-race-portrait{position:relative;width:100%;height:125px}
#wardrobeModal .wd-race-portrait img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom}
#wardrobeModal .wd-race-name{font-size:11px}
[data-theme=dark] #wardrobeModal .wd-race-card{background:#36323e}
@media(max-width:640px){#wardrobeModal .wd-race-portrait{height:100px}#wardrobeModal .wd-race-card{flex-basis:85px}}
/* Illustrated race scenes, with compact controls and optional explanations. */
#wardrobeModal .wd-grid:has(.wd-race-grid){display:block;position:relative}
#wardrobeModal .wd-content-col:has(.wd-race-grid) .wd-atelier-tip{display:none}
#wardrobeModal .wd-body-switcher{display:flex;justify-content:flex-start;gap:7px;padding:6px 42px 6px 8px;margin-bottom:10px;min-height:40px}
#wardrobeModal .wd-body-btn{flex:0 0 auto;padding:6px 10px;min-height:32px;font-size:11px}
#wardrobeModal .wd-race-info{position:relative;float:right;z-index:2;margin:6px 8px 0 0}
#wardrobeModal .wd-race-info summary{cursor:pointer;list-style:none;color:#78618f;font-size:20px;line-height:28px}
#wardrobeModal .wd-race-info summary::-webkit-details-marker{display:none}
#wardrobeModal .wd-race-info>div{position:absolute;right:0;top:32px;width:min(300px,65vw);padding:12px;background:var(--surface);color:var(--text);border:1px solid #d7bf9c;border-radius:12px;box-shadow:0 5px 20px #38233d33;font-size:12px;line-height:1.5}
#wardrobeModal .wd-race-grid{padding:5px 4px 12px;gap:10px;scroll-snap-type:x proximity}
#wardrobeModal .wd-race-card{flex:1 0 108px;padding:4px 4px 35px;border:1px solid #d9b995;border-radius:18px;scroll-snap-align:start;background:linear-gradient(#fffbf4,#faeedf);overflow:hidden}
#wardrobeModal .wd-race-portrait{height:clamp(175px,26vh,300px);border-radius:13px 13px 7px 7px;overflow:hidden}
#wardrobeModal .wd-race-portrait img{object-fit:cover;object-position:center 40%}
#wardrobeModal .wd-race-name{position:relative;margin:-18px 0 0;padding:7px 2px;border:1px solid #ddc29c;border-radius:8px;background:#fff3ddeb;color:#44314c;font:700 12px Cinzel,serif}
#wardrobeModal .wd-race-card.wd-active{border:2px solid #7772ff;background:#eeebff;box-shadow:0 0 0 3px #aaa5ff66}
#wardrobeModal .wd-race-card .wd-badge{bottom:8px;white-space:nowrap}
@media(max-width:640px){#wardrobeModal .wd-race-card{flex-basis:125px}#wardrobeModal .wd-race-portrait{height:210px}#wardrobeModal .wd-body-label{font-size:10px}#wardrobeModal .wd-body-btn{font-size:10px;padding:5px 7px}}
/* Fit race scenes to the available catalogue width, without a horizontal carousel. */
#wardrobeModal .wd-grid:has(.wd-race-grid){container-type:inline-size}
#wardrobeModal .wd-race-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible;scroll-snap-type:none;gap:8px}
#wardrobeModal .wd-race-card{width:100%;box-sizing:border-box}
#wardrobeModal .wd-race-name{width:100%;box-sizing:border-box;overflow-wrap:anywhere;font-size:11px}
#wardrobeModal .wd-body-switcher{flex-wrap:wrap}
@container(max-width:620px){#wardrobeModal .wd-race-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#wardrobeModal .wd-race-portrait{height:155px}}
@container(max-width:350px){#wardrobeModal .wd-race-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#wardrobeModal .wd-race-portrait{height:165px}}
/* Keep the optional explanation beside the body choices. */
#wardrobeModal .wd-body-switcher{padding-right:8px}
#wardrobeModal .wd-body-switcher .wd-race-info{float:none;flex:0 0 auto;margin:0 0 0 3px}
#wardrobeModal .wd-body-switcher .wd-race-info>div{right:auto;left:0;width:min(280px,65vw)}
@media(max-width:640px){#wardrobeModal .wd-body-switcher .wd-race-info>div{left:auto;right:0}}

/* Reserve a constant footer height so changing prices/names cannot resize the mirror room. */
#wardrobeModal .wd-footer{box-sizing:border-box;flex:0 0 110px;height:110px;min-height:110px;max-height:110px}
#wardrobeModal .wd-footer-choice,#wardrobeModal .wd-footer-costs{max-height:100%;overflow:auto}
#wardrobeModal .wd-card::before{display:none}
@media(max-width:640px){#wardrobeModal .wd-footer{flex-basis:90px;height:90px;min-height:90px;max-height:90px}}
/* Centre the copy in the clear parchment area above the floral border. */
@media(min-width:641px){#wardrobeModal .wd-atelier-header .modal-title,#wardrobeModal .wd-atelier-intro{transform:translateY(-22px)}}
#wardrobeModal .wd-atelier-intro{color:#65516b;font-weight:500;line-height:1.55;margin-top:6px}

/* Place the character's feet nearer the centre of the mirror-room rug. */
@media(min-width:641px){#wardrobeModal .wd-preview-wrap{bottom:24%}}
