*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 20% 0,#fff8ef,#efddd1);color:#684c42;font:15px system-ui,sans-serif}main{max-width:1050px;margin:auto;padding:18px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}h1{font:italic bold 38px Georgia;margin:0;color:#916273;letter-spacing:-1px}small{color:#967568}button,input{font:inherit;color:inherit}button{border:1px solid #dac2b2;border-radius:12px;background:#fffaf2;padding:10px;cursor:pointer;min-height:42px;box-shadow:0 2px 3px #7955430c}button{-webkit-tap-highlight-color:transparent}button:active,button.active{background:#ead1c6;border-color:#b77d89}button:disabled{opacity:.42;cursor:default}.layout{display:grid;grid-template-columns:minmax(0,1fr) 325px;gap:15px;align-items:start}.stage,.panel{background:#fffaf4;border:1px solid #e1cabb;border-radius:22px;padding:12px;min-width:0;box-shadow:0 8px 25px #7450450b}.stage canvas{display:block;width:100%;height:auto;aspect-ratio:6/7;border-radius:13px;touch-action:none}.stage{max-width:590px;width:100%;justify-self:center}.name{display:flex;align-items:center;gap:8px;margin-top:10px}.name label{white-space:nowrap}.name input{width:100%;min-width:0;border:1px solid #e5d4c7;background:#fffdf9;border-radius:10px;padding:9px}h2{font:600 19px Georgia;margin:10px 0 8px}.items{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.items button{height:76px;padding:4px;font-size:10px;display:grid;place-items:center;align-content:center;gap:4px}.items img{width:58px;height:43px;object-fit:contain}.tools{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.tools button{padding:7px;font-size:12px}.actions,.tabs{display:flex;gap:7px;margin-top:10px}.actions button,.tabs button{flex:1}.primary{background:#ad7687;color:white;border-color:#ad7687;font-weight:600}.hint{font-size:12px;line-height:1.5;color:#92786c;margin:10px 0}#status{min-height:18px;font-size:12px;color:#8b5866}footer{text-align:center;color:#a19185;font-size:11px;padding:12px}input[type=range]{width:100%;accent-color:#ad7687}dialog{max-width:min(92vw,540px);max-height:94dvh;border:1px solid #d5b6aa;border-radius:20px;background:#fffaf4;padding:12px;color:#684c42}dialog::backdrop{background:#513c39a8}dialog img{display:block;width:100%;max-height:73dvh;object-fit:contain;border-radius:9px}#flash{position:fixed;inset:0;background:white;pointer-events:none;opacity:0} [hidden]{display:none!important}@media(max-width:720px){main{padding:9px;max-width:480px}.layout{grid-template-columns:1fr;gap:8px}.stage{padding:7px;max-width:320px}.panel{padding:9px}.items button{height:59px}.items img{width:47px;height:33px}h1{font-size:30px}header{margin-bottom:7px}.hint{margin:6px 0}.actions{margin-top:7px}.tabs{margin-top:0}.tools button{min-height:35px}.name input{padding:5px}footer{padding:6px}}
.themes{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.themes button{font-size:12px;min-height:34px;padding:6px}
.themes button.active{box-shadow:inset 0 0 0 1px #b77d89;background:#f3e0d6}
@media(max-width:720px){
main{padding:7px 9px}
header{margin-bottom:5px} h1{font-size:27px}
.stage{max-width:min(100%, calc(clamp(165px, 35dvh, 380px) * 6 / 7 + 14px));padding:6px}
.stage canvas{width:100%;height:auto}
.name{margin-top:5px;font-size:12px}.name input{padding:4px}
.panel{padding:7px;border-radius:16px}.tabs button{min-height:32px;padding:5px;font-size:13px}
.themes{margin-top:5px}.themes button{min-height:29px;padding:4px}
h2{font-size:15px;margin:6px 0 5px}
.items{gap:4px}.items button{height:51px;min-height:0;padding:2px;gap:1px;font-size:10px}.items img{height:30px;width:43px}
.hint{margin:4px 0;font-size:10px}
.tools{margin-top:5px;gap:4px}.tools button{min-height:31px;padding:3px;font-size:11px}
.actions{margin-top:5px;gap:4px}.actions button{min-height:32px;padding:5px;font-size:12px}
#status{margin:4px 0 0;min-height:14px;font-size:10px}footer{font-size:9px;padding:4px}
}
.pets{display:flex;gap:6px;margin:0 0 8px}.pets button{flex:1;min-height:34px;padding:5px;font-size:13px}.pets button.active{background:#ead1c6;border-color:#b77d89}@media(max-width:720px){.pets{margin-bottom:4px}.pets button{min-height:28px;padding:3px;font-size:12px}.stage{max-width:min(100%, calc(clamp(155px, 31dvh, 380px) * 6 / 7 + 14px))}}
.homepage{max-width:980px;margin:0 auto;padding:16px 18px;min-height:100dvh;display:grid;align-content:center;gap:14px}.home-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;letter-spacing:.08em}.home-top button{letter-spacing:0}.hero{position:relative;overflow:hidden;isolation:isolate;min-height:440px;border:1px solid #e2c4ad;border-radius:26px;background-size:cover;background-position:center 55%;box-shadow:0 12px 40px #79554320}.hero::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#ffefe5e6 0%,#fff4e73b 35%,transparent 60%,#5b3c2e1a 100%);z-index:-1}.hero-title{position:relative;text-align:center;padding:24px 12px 0;z-index:2;text-shadow:0 1px 8px #fff5e9}.hero-title h1{font-size:clamp(42px,7vw,74px);line-height:1.05;color:#825363}.hero-title p{margin:6px 0;font-size:clamp(16px,2.4vw,23px);color:#795444}.models{position:absolute;inset:32% 5% 12%;display:flex;align-items:flex-end;justify-content:center}.model{width:33.33%;border:0;box-shadow:none;background:none!important;position:relative;padding:0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;border-radius:14px}.model img{width:100%;height:90%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 8px 5px #62483942);pointer-events:none}.model span{position:absolute;bottom:-18px;font-size:12px;font-weight:600;background:#fff8edeb;border:1px solid #d5b69f;padding:5px 13px;border-radius:20px;white-space:nowrap}.model:hover span,.model:focus-visible span{background:#b47d8c;color:white}.model:nth-child(2){z-index:1}.home-cta{display:grid;justify-items:center;gap:8px;text-align:center}.home-cta button{min-width:min(100%,300px);min-height:52px;font-size:18px}.home-cta p{margin:0;font-size:13px;color:#806456}.head-actions{display:flex;gap:6px}.head-actions button{min-width:42px}.home-foot{text-align:center;color:#91776a;font-size:11px}.home-help{max-width:430px}.home-help p{line-height:1.65}.home-help h2{font-size:24px}.home-help button{width:100%}.home-help ol{padding-left:24px;line-height:1.8}.home-help h2:focus{outline:none}@media(max-width:720px){.homepage{padding:10px;gap:10px;min-height:100dvh;align-content:center}.hero{min-height:clamp(270px,53dvh,475px);border-radius:20px}.hero-title{padding-top:20px}.models{inset:34% 1% 15%}.model span{font-size:11px;padding:4px 9px}.home-cta button{min-height:48px;font-size:16px}.home-top button{min-height:34px;padding:6px 10px}.home-foot{font-size:10px}.head-actions button{min-height:33px;padding:5px 8px}}

/* Sample 11: viewport-aware studio layout; keep native pointer coordinates. */
@media(min-width:721px){
#studio{padding:10px 18px}
#studio header{margin-bottom:8px}
#studio footer{padding:6px}
#studio .stage{max-width:min(590px, max(300px, calc((100dvh - 249px) * 6 / 7 + 26px)))}
#studio .layout{grid-template-columns:minmax(0,1fr) minmax(290px,325px);align-items:start;gap:12px}
}
@media(max-width:720px) and (max-height:720px){
#studio{padding:5px 8px}
#studio header{margin-bottom:4px}
#studio header h1{font-size:25px;line-height:1.1}
#studio header small{font-size:10px}
#studio .layout{gap:5px}
#studio .stage{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 93px;grid-template-rows:auto auto;column-gap:7px;align-content:center;align-items:center;padding:5px}
#studio .stage canvas{grid-column:1;grid-row:1/3;max-width:min(100%,calc(31dvh * 6 / 7));justify-self:center}
#studio .pets{grid-column:2;grid-row:1;flex-direction:column;margin:0;gap:4px;align-self:end}
#studio .pets button{min-height:34px;flex:auto}
#studio .name{grid-column:2;grid-row:2;display:grid;gap:3px;margin-top:4px;align-self:start}
#studio .name input{min-height:34px;padding:4px;width:100%}
#studio .panel{padding:6px}
#studio .tabs button,#studio .themes button{min-height:35px}
#studio h2{margin:4px 0;font-size:13px}
#studio .items{grid-template-columns:repeat(8, minmax(54px,1fr));overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:4px;scrollbar-width:thin}
#studio .items button{height:53px;scroll-snap-align:start;white-space:normal}
#studio .items img{width:43px;height:28px}
#studio .hint{margin:2px 0;font-size:10px}
#studio .tools{margin-top:3px;gap:4px}
#studio .tools button,#studio .actions button{min-height:34px}
#studio .actions{margin-top:4px}
#studio #status{margin:2px 0 0}
#studio footer{display:none}
#studio #wardrobe::after{content:" ↔";color:#92786c}
}

#items button[hidden]{display:none!important}

/* P43: equipped indicator, denser wardrobe without reducing stage or toolbar targets. */
#items button{position:relative;min-width:0;line-height:1.15}
#items button.equipped::after{content:'✓';position:absolute;right:3px;top:3px;border-radius:50%;background:#916273;color:white;font-size:10px;line-height:16px;width:16px;height:16px;text-align:center;pointer-events:none}
#items button.active{outline:2px solid #ad7687;outline-offset:-2px}
@media(max-width:720px) and (min-height:721px){#studio .items{grid-template-columns:repeat(5,minmax(0,1fr))}#studio .items button{height:52px;min-height:44px}#studio .items img{max-width:100%;height:29px}#studio footer{display:none}#studio .hint{line-height:1.25}}
@media(max-width:720px) and (max-height:720px){#studio .items{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(65px,1fr)}#studio .stage canvas{max-width:min(100%,calc(29dvh * 6 / 7))}#studio .hint{line-height:1.2}#studio #status{line-height:1.15}}

/* P45: in-studio help and optional shutter sound; retain P44 artwork and geometry. */
#studioHelp{font-weight:700;min-width:34px;padding:5px 9px}.sound-option{display:flex;align-items:center;gap:8px;padding:10px 0;min-height:44px;font-size:14px}.sound-option input{width:19px;height:19px;accent-color:#ad7687}.home-help ol{line-height:1.55;font-size:14px}.home-help li{margin-bottom:7px} @media(max-width:380px){#studio header .head-actions{gap:4px}#studio header .head-actions button{min-width:32px;padding:4px 6px;font-size:12px}}

/* P46: controls only for free-style accessories. */
.tools button[hidden]{display:none!important}

/* P48: compact optional ambience and camera caption; short landscape layout. */
#musicToggle{min-width:33px;padding:4px 8px;font-weight:700;font-size:17px}.photo-option{display:flex;align-items:center;gap:8px;font-size:13px;min-height:34px;margin-top:5px}.photo-option input{accent-color:#ad7687;width:18px;height:18px}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){
 #studio{max-width:1050px;padding:5px 10px}#studio header{margin-bottom:4px}#studio header h1{font-size:24px;line-height:1.05}#studio header small{font-size:10px}#studio .layout{grid-template-columns:minmax(0,1fr) minmax(265px,1fr);gap:8px;align-items:start}#studio .stage{max-width:min(100%,calc((100dvh - 141px)*6/7 + 14px));padding:5px;display:block}#studio .stage canvas{max-width:100%}#studio .pets{flex-direction:row;gap:3px;margin-bottom:4px}#studio .pets button{min-height:28px;font-size:11px;padding:2px}#studio .name{display:flex;font-size:11px;margin-top:4px}#studio .name input{min-height:28px;padding:3px}#studio .panel{padding:6px;max-height:calc(100dvh - 48px);overflow:auto;border-radius:12px}#studio .tabs,#studio .themes,#studio .actions{margin-top:4px}#studio .tabs button,#studio .themes button,#studio .actions button{min-height:30px;padding:4px;font-size:11px}#studio h2{font-size:13px;margin:4px 0}#studio .items{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:64px;overflow-x:auto;gap:4px;padding-bottom:3px}#studio .items button{height:48px;min-height:0}#studio .items img{width:42px;height:26px}#studio .hint{font-size:10px;margin:3px 0}#studio .tools{margin-top:3px;gap:3px}#studio .tools button{font-size:10px;min-height:29px;padding:3px}#studio #status{min-height:12px;margin:3px 0;font-size:10px}#studio footer{display:none}
 .homepage{min-height:100dvh;grid-template-columns:1.25fr 1fr;align-content:center;align-items:center;gap:8px;padding:8px 12px}.home-top{grid-column:1/-1}.hero{min-height:0;height:calc(100dvh - 80px);border-radius:15px}.hero-title{padding-top:10px}.hero-title h1{font-size:35px}.hero-title p{font-size:14px}.models{inset:30% 2% 16%}.model span{bottom:-14px;font-size:10px}.home-foot{grid-column:1/-1}.home-cta button{min-height:43px;font-size:16px}
}
/* P49: portrait game art direction. The existing portrait canvas is unchanged. */
body{background:radial-gradient(ellipse at 50% 18%,#b28e76 0%,#765044 45%,#49312f 100%);color:#624334;min-height:100dvh}
#studio{max-width:1210px;min-height:100dvh;padding:12px 25px;display:flex;flex-direction:column;justify-content:center}
#studio header{color:#f8e7c9;margin-bottom:13px}#studio header h1{font:bold italic 40px Georgia;color:#ffe5b6;text-shadow:0 2px 0 #61382d,0 4px 12px #36211e88}#studio header h1::before{content:'✧';font-size:.48em;vertical-align:middle;margin-right:6px;color:#e7b979}#studio header small{color:#efd2aa;letter-spacing:.1em}
.head-actions button{border-radius:50%;border:1px solid #ebcfa3;background:linear-gradient(#fff0d6,#d6b185);color:#674331;box-shadow:0 3px 0 #6a4534,0 5px 8px #301d1a66;font-weight:700;min-height:40px;min-width:40px}#goHome,#homeHelp{border-radius:22px}#musicToggle[aria-pressed=true]{background:#b86d7c;color:#fff}
#studio .layout{grid-template-columns:minmax(0,1.4fr) minmax(325px,1fr);gap:30px;align-items:center}
#studio .stage{display:flex;flex-direction:column;gap:8px;padding:8px 8px 4px;max-width:min(100%,calc((100dvh - 175px)*6/7 + 16px));border:0;background:transparent;box-shadow:none;border-radius:0}
/* External frame avoids changing touch coordinates. */
#studio .stage canvas{width:100%;max-width:100%;height:auto;border:0;border-radius:9px;box-shadow:0 0 0 3px #f5d6a1,0 0 0 6px #b28655,0 0 0 8px #e3bc83,0 12px 26px #2b181b99}
#studio .pets{display:flex;flex-direction:row;gap:8px;margin:0 0 5px;width:100%;justify-content:center}#studio .pets button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:39px;padding:3px 9px 3px 4px;flex:1;max-width:140px;border-radius:24px;border:1px solid #b68b62;background:#604037;color:#ffe8c4;box-shadow:0 3px 5px #301e1a55;font-weight:600;font-size:12px}#studio .pets button::before{content:'';width:31px;height:31px;flex:none;border-radius:50%;background-color:#e4c39a;background-size:155%;background-position:50% 10%;background-repeat:no-repeat;box-shadow:0 0 0 1px #bd9666}#catPet::before{background-image:url('assets/cat.webp')}#dogPet::before{background-image:url('assets/dog.webp')}#pigPet::before{background-image:url('assets/pig.webp')}#studio .pets button.active{background:linear-gradient(#b16a78,#8e4b5b);border-color:#ffe0a7;box-shadow:0 0 0 2px #cfa777,0 3px 4px #281b18aa}
#studio .name{display:flex;justify-content:center;align-items:center;gap:8px;margin:8px 0 0;color:#fce5c3;font-size:12px;width:100%}#studio .name input{width:min(200px,60%);min-height:30px;border:1px solid #b58a60;background:#f7e6c7;border-radius:6px;padding:4px 9px;color:#654331;text-align:center;font:600 14px Georgia;box-shadow:inset 0 1px 3px #9c765044}
#studio .panel{background:linear-gradient(100deg,#cda57b,#ecd5b5 12%,#f1dfc4 50%,#dbb991 92%,#b58963);border:3px solid #8b6043;border-radius:17px;padding:14px;box-shadow:inset 0 0 0 2px #f2d3a6,0 7px 0 #4c302b,0 14px 25px #2b1a1877}
#studio .tabs{margin:0 0 10px;gap:6px;padding:4px;background:#664239;border:1px solid #b98e62;border-radius:12px;box-shadow:inset 0 3px 7px #2b181b66}#studio .tabs button{border:0;border-radius:8px;min-height:40px;color:#f2d5b4;background:transparent;font-weight:700;box-shadow:none}#studio .tabs button.active{color:#68422f;background:linear-gradient(#ffedd1,#dbb58a);box-shadow:0 2px 3px #301d1a66}#studio #dress::before{content:'✿ ';font-size:16px}#studio #camera::before{content:'◉ ';font-size:16px}
#studio .themes{margin:0 0 8px;gap:7px}#studio .themes button{background-size:cover;background-position:center 55%;border:2px solid #ae8258;min-height:65px;padding:32px 3px 4px;border-radius:8px;color:#fff8e9;text-shadow:0 1px 3px #261612,0 1px 4px #261612;font-weight:700;box-shadow:inset 0 -23px 16px #291b18a0}#studio #rose{background-image:linear-gradient(transparent,#48272066),url('assets/rose.webp')}#studio #vintage{background-image:linear-gradient(transparent,#48272066),url('assets/vintage.webp')}#studio .themes button.active{outline:2px solid #a76070;border-color:#ffedb5}
#studio h2{font-family:Georgia,serif;color:#724a35;font-size:17px}#studio #wardrobe{text-align:center;letter-spacing:.025em}#studio #wardrobe::before{content:'✦ ';color:#9c684a}#studio #wardrobe::after{content:' ✦';color:#9c684a}
#studio .items{grid-template-columns:repeat(5,minmax(0,1fr));padding:7px;gap:6px;border:2px solid #9c714f;border-radius:9px;background:repeating-linear-gradient(0deg,#76503c 0px,#805942 2px,#79513d 4px,#79513d 9px);box-shadow:inset 0 4px 7px #38221d88}#studio .items button{background:radial-gradient(ellipse at 50% 25%,#fff8e9,#dfc49f);border:1px solid #c6a078;border-radius:7px;height:73px;min-height:0;box-shadow:0 3px 0 #493025;padding:3px 2px;gap:2px;line-height:1.12;font-size:11px}#studio .items img{width:100%;max-width:60px;height:43px;filter:drop-shadow(0 2px 2px #63452c33)}#studio .items button.active{outline:2px solid #ffe1a0;outline-offset:1px;background:radial-gradient(#fff6df,#e8bcb4)}#studio .items button.equipped::after{background:#9f596a;border:1px solid #f1d3a6}
#studio .hint{color:#765139;text-align:center;font-size:11px;margin:8px 0 6px;line-height:1.2}#studio .tools{margin-top:6px;gap:5px}#studio .tools button,#studio .actions button:not(.primary){background:linear-gradient(#fff3dc,#dfbf95);border:1px solid #be9168;box-shadow:0 2px 0 #a87b55;border-radius:8px;min-height:37px;font-weight:600;padding:4px 3px}#studio #undo,#studio #reset{background:transparent;box-shadow:none;font-weight:500}#undo::before{content:'↶ ';font-weight:bold}#reset::before{content:'⟳ ';font-weight:bold}
.primary{background:linear-gradient(#c37d89,#9b5567);color:#fff6e3;border:1px solid #efcf9c;border-radius:12px;box-shadow:0 4px 0 #743d49,0 6px 9px #4a2c2755;font-weight:700}#studio #save{min-height:52px;font:bold 17px Georgia,serif}#studio #save::before{content:'';display:inline-block;width:29px;height:29px;vertical-align:middle;margin-right:8px;border-radius:50%;border:3px solid #fce7bd;box-shadow:0 0 0 1px #7a414e,inset 0 0 0 3px #8c4a5a;background:radial-gradient(circle,#fff2db 0 35%,#bd7b87 37% 60%,#713b48 62%)}#studio #status{color:#76523c;font-size:11px;text-align:center}#studio footer{color:#ddbc99}#studio #cameraTools{padding:8px;background:#f7e4c780;border:1px solid #bd946d;border-radius:9px}
.homepage{color:#f7e5c8;max-width:1000px;gap:14px}.home-top{color:#f4d8b3}.hero{border:0;border-radius:15px;box-shadow:0 0 0 3px #f1d1a0,0 0 0 6px #a97b4d,0 0 0 8px #d4a971,0 14px 28px #2b191b99}.hero::after{background:linear-gradient(180deg,#5a382e99 0%,#fff2d726 35%,transparent 60%,#4c2b2160 100%)}.hero-title h1{color:#ffe5b6;text-shadow:0 3px 0 #794738,0 5px 14px #321e1b99}.hero-title p{color:#fff2db;text-shadow:0 1px 5px #39211d;font-family:Georgia,serif;letter-spacing:.06em}.model span{background:linear-gradient(#fff3db,#dcb98e);border:1px solid #efcfa2;box-shadow:0 3px 0 #7c5037;color:#64402e}.home-cta .primary{font:bold 22px Georgia;min-height:53px;min-width:220px}.home-cta p,.home-foot{color:#ebcba5}dialog{background:#f6e4c5;border:3px solid #cfa677;box-shadow:0 12px 40px #2c171b88}dialog::backdrop{background:#281b19bb}
@media(min-width:721px) and (max-height:800px){#studio{padding:7px 18px}#studio .stage{max-width:calc((100dvh - 158px)*6/7 + 16px)}#studio .panel{padding:11px}#studio .themes button{min-height:53px;padding-top:23px}#studio .items button{height:60px}#studio .items img{height:35px}}
@media(max-width:720px){#studio{max-width:480px;padding:6px 12px;justify-content:flex-start}#studio header{margin-bottom:6px}#studio header h1{font-size:28px}#studio header small{font-size:9px;letter-spacing:.05em}.head-actions{gap:5px}.head-actions button{min-width:32px;min-height:33px;padding:3px 7px;font-size:11px}#studio .layout{grid-template-columns:1fr;gap:7px}#studio .stage{max-width:calc(clamp(185px,34dvh,330px)*6/7 + 14px);padding:3px 7px;gap:5px}#studio .stage canvas{box-shadow:0 0 0 2px #f5d6a1,0 0 0 4px #b28655,0 0 0 5px #e3bc83,0 6px 10px #2b181b88}#studio .pets{margin:0 0 3px;gap:5px}#studio .pets button{min-height:30px;padding:2px 4px;gap:3px;font-size:10px}#studio .pets button::before{width:23px;height:23px}#studio .name{margin:3px 0 0;font-size:10px}#studio .name input{min-height:24px;font-size:12px;padding:2px 5px}#studio .panel{padding:7px;border-width:2px;border-radius:11px;box-shadow:inset 0 0 0 1px #efd0a5,0 4px 0 #4c302b,0 7px 12px #2b1a1855}#studio .tabs{margin-bottom:5px;padding:3px}#studio .tabs button{min-height:30px;font-size:12px}#studio .themes{margin-bottom:4px;gap:5px}#studio .themes button{min-height:34px;padding:9px 3px 3px;font-size:11px}#studio h2{font-size:14px;margin:4px 0}#studio .items{gap:4px;padding:5px}#studio .items button{height:51px;font-size:10px;gap:1px}#studio .items img{height:29px;max-width:45px}#studio .hint{font-size:10px;margin:4px 0}#studio .tools{margin-top:4px;gap:4px}#studio .tools button,#studio .actions button:not(.primary){min-height:30px;font-size:11px;padding:2px}#studio .actions{margin-top:5px}#studio #save{min-height:41px;font-size:15px}#studio #save::before{width:24px;height:24px;border-width:2px}#studio #status{font-size:10px;margin:4px 0 0}#studio footer{display:none}.homepage{padding:10px 15px;gap:14px}.hero-title h1{font-size:56px}.home-cta .primary{font-size:20px;min-height:48px}}
@media(max-width:720px) and (max-height:720px) and (orientation:portrait){#studio .stage{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 94px;grid-template-rows:auto auto;gap:4px 9px}#studio .stage canvas{grid-column:1;grid-row:1/3;max-width:calc(34dvh*6/7);justify-self:center}#studio .pets{grid-column:2;grid-row:1;flex-direction:column;align-self:end}#studio .pets button{justify-content:flex-start;min-height:32px;max-width:none;width:100%}#studio .name{grid-column:2;grid-row:2;display:grid;justify-items:stretch;align-self:start;gap:2px}#studio .name input{width:100%;min-height:28px}#studio .items{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:61px;overflow-x:auto}#studio .items button{height:53px}#studio #wardrobe::after{content:' ↔'}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio{padding:4px 12px;justify-content:flex-start}#studio header{margin-bottom:4px}#studio header h1{font-size:25px}#studio header small{font-size:9px}#studio .layout{grid-template-columns:1fr 1.2fr;gap:12px}#studio .stage{max-width:calc((100dvh - 131px)*6/7 + 14px);padding:4px 7px;gap:4px}#studio .pets{gap:3px}#studio .pets button{font-size:9px;min-height:28px;padding:2px 3px;gap:2px}#studio .pets button::before{width:21px;height:21px}#studio .name input{min-height:24px}#studio .panel{padding:6px;border-width:2px;border-radius:10px;max-height:calc(100dvh - 45px);overflow:auto}#studio .tabs{margin-bottom:4px;padding:3px}#studio .tabs button{min-height:27px;font-size:11px}#studio .themes{margin-bottom:3px}#studio .themes button{min-height:32px;padding:6px 2px 2px;font-size:10px}#studio h2{font-size:13px;margin:3px 0}#studio .items{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:58px;overflow-x:auto;padding:4px;gap:4px}#studio .items button{height:46px;font-size:9px}#studio .items img{height:26px}#studio .hint{font-size:10px;margin:3px 0}#studio .tools{margin-top:3px;gap:3px}#studio .tools button,#studio .actions button:not(.primary){min-height:27px;font-size:10px;padding:2px}#studio .actions{margin-top:4px}#studio #save{min-height:35px;font-size:14px}#studio #save::before{width:22px;height:22px;border-width:2px}#studio #status{font-size:10px;margin:3px 0 0}#studio footer{display:none}.hero-title h1{font-size:38px}.home-cta .primary{min-width:0;width:100%;font-size:18px;min-height:42px}}
/* A camera dock belongs to the portrait, not to the wardrobe. */
#studio .stage-dock{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px;min-width:0}#studio .stage-dock .name{flex:1;min-width:0;margin:0;justify-content:flex-start}#studio .stage-dock .name input{width:100%;min-width:0}#studio .stage-dock .shutter-row{flex:0 0 48%;margin:0}#studio .stage-dock #save{width:100%;min-height:45px;padding:5px 6px;white-space:nowrap}#studio .stage-dock #save::before{width:24px;height:24px;margin-right:5px;border-width:2px}
@media(min-width:721px){#studio .stage{max-width:min(100%,calc((100dvh - 252px)*6/7 + 16px));padding-bottom:6px}#studio footer{padding:7px 0 0}#studio header{margin-bottom:8px}}
@media(max-width:720px){#studio .stage{max-width:min(100%,calc(clamp(185px,37dvh,350px)*6/7 + 14px))}#studio .stage-dock{gap:6px;margin-top:5px}#studio .stage-dock .name{gap:4px}#studio .stage-dock .shutter-row{flex-basis:53%}#studio .stage-dock #save{min-height:37px;font-size:13px}#studio .stage-dock #save::before{width:19px;height:19px;margin-right:4px}#studio .stage-dock .name input{min-height:28px}}
@media(max-width:720px) and (max-height:720px) and (orientation:portrait){#studio .stage{max-width:none;grid-template-columns:minmax(0,1fr) 94px;grid-template-rows:auto auto;gap:6px 9px}#studio .stage canvas{grid-column:1;grid-row:1;max-width:calc(34dvh*6/7)}#studio .pets{grid-column:2;grid-row:1;align-self:center}#studio .stage-dock{grid-column:1/-1;grid-row:2;max-width:100%;margin-top:4px}#studio .stage-dock .name{display:flex;align-items:center}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio .stage{max-width:calc((100dvh - 147px)*6/7 + 14px)}#studio .stage-dock{margin-top:5px;gap:5px}#studio .stage-dock .name{font-size:9px;gap:3px}#studio .stage-dock .name input{font-size:11px;min-height:25px}#studio .stage-dock #save{min-height:31px;font-size:11px}#studio .stage-dock #save::before{width:18px;height:18px;margin-right:3px}#studio .stage-dock .shutter-row{flex-basis:51%}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio .stage{max-width:calc((100dvh - 162px)*6/7 + 14px);padding-bottom:3px}}
/* Tablet portrait is its own game layout; do not shrink desktop columns. */
@media(min-width:721px) and (max-width:1050px) and (orientation:portrait){#studio{max-width:760px;padding:14px 20px;justify-content:flex-start}#studio header{margin-bottom:13px}#studio .layout{grid-template-columns:1fr;gap:13px;align-items:start}#studio .stage{max-width:min(100%,calc(min(49dvh,600px)*6/7 + 16px))}#studio .panel{width:100%;padding:12px;max-width:690px;justify-self:center}#studio .themes button{min-height:44px;padding:13px 4px 3px}#studio .items{grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;padding:7px}#studio .items button{height:68px;font-size:10px}#studio .items img{height:39px;max-width:100%}#studio .tools button,#studio .actions button:not(.primary){min-height:35px}#studio .tabs button{min-height:35px}#studio .hint{margin:5px 0}#studio h2{margin:4px 0}#studio #status{margin:4px 0 0}#studio footer{display:none}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio{max-width:1100px;width:100%;padding-left:12px;padding-right:12px}}
@media(min-width:721px) and (max-width:1050px) and (orientation:portrait){#studio .stage{max-width:min(100%,calc(clamp(320px,calc(100dvh - 665px),550px)*6/7 + 16px))}}
@media(min-width:721px) and (max-width:1050px) and (orientation:portrait){#studio .stage{max-width:min(100%,calc(clamp(300px,calc(100dvh - 690px),530px)*6/7 + 16px))}}
button{touch-action:manipulation}
/* P50: real illustrated UI artwork. Layout and interaction stay native. */
body{background:#654335 url('assets/ui-room.webp') center center/cover fixed no-repeat;}
#studio .portrait-frame{position:relative;width:100%;aspect-ratio:.864;flex:none;background:url('assets/ui-frame.webp') center/100% 100% no-repeat;isolation:isolate;}
#studio .portrait-frame canvas{position:absolute;top:17.1%;left:14%;width:72.1%;max-width:none;height:73%;aspect-ratio:6/7;border-radius:0;box-shadow:none;z-index:-1;}
#studio .stage{background:none;box-shadow:none;}
#studio .panel{border:0;background:transparent url('assets/ui-cabinet.webp') center/100% 100% no-repeat;box-shadow:none;border-radius:0;padding:clamp(18px,3.4vw,43px) clamp(15px,2.5vw,30px) clamp(17px,2.5vw,30px);}
#studio .tabs{background:transparent;border:0;box-shadow:none;padding:0;gap:5px;}
#studio .items{background:transparent;box-shadow:none;border:0;padding:4px;}
#studio .items button,#studio .tools button,#studio .actions button:not(.primary),#studio .tabs button,.head-actions button,.model span{border:0;background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;box-shadow:none;color:#503323;border-radius:0;}
#studio .items button{padding:4px 5px;}
#studio .items button.active,#studio .tabs button.active,#studio .pets button.active{outline:2px solid #b86175;outline-offset:-3px;filter:saturate(1.15);}
#studio .pets button{border:0;background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;box-shadow:none;color:#503323;border-radius:0;}
#studio .pets button.active{background-image:url('assets/ui-button.webp');color:#783c4b;}
#studio .stage-dock #save{background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;color:#603528;border:0;box-shadow:none;border-radius:0;}
#studio .stage-dock #save::before{background:transparent url('assets/ui-shutter.webp') center/contain no-repeat;border:0;box-shadow:none;border-radius:0;}
#studio header h1{display:flex;align-items:center;justify-content:center;background:url('assets/ui-sign.webp') center/100% 100% no-repeat;width:192px;min-height:58px;padding:8px 26px;font:bold italic 27px Georgia;color:#72452d;text-shadow:0 1px #fff4d7;letter-spacing:-.5px;}
#studio header h1::before{content:none;}#studio header small{display:block;text-align:center;letter-spacing:.07em;text-shadow:0 1px 3px #2f1e14;}
#studio #musicToggle[aria-pressed=true]{background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;color:#a34960;outline:2px solid #b86175;outline-offset:-3px;}
.hero-title h1{display:flex;align-items:center;justify-content:center;background:url('assets/ui-sign.webp') center/100% 100% no-repeat;max-width:410px;width:85%;height:clamp(90px,13vw,150px);margin:0 auto;padding:15px 40px;font:bold italic clamp(33px,5.5vw,66px) Georgia;color:#75452c;text-shadow:0 2px #ffe5ae;}
.hero-title p{margin:3px 0;}.home-cta .primary,#download,#helpClose{background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;color:#62392c;border:0;box-shadow:none;}
#studio .stage-dock .name input{background:#f5e6cf;border:1px solid #bb9669;}
#studio .themes button{border:1px solid #a77951;}#studio .panel #cameraTools{border:0;box-shadow:none;background:transparent;}
dialog{background:#f4e1c1 url('assets/ui-cabinet.webp') center/100% 100% no-repeat;border:0;padding:22px 20px 20px;box-shadow:0 12px 40px #2c171b88;}
@media(min-width:721px){#studio .stage{max-width:min(100%,calc((100dvh - 250px)*.864 + 16px));}#studio .layout{gap:18px;} }
@media(max-width:720px){#studio header h1{width:118px;min-height:43px;font-size:20px;padding:6px 17px;}#studio .panel{padding:19px 16px 16px;}#studio .stage{max-width:min(100%,calc(clamp(190px,39dvh,360px)*.864 + 14px));}#studio .items button{padding:3px 5px;}#studio .stage-dock #save::before{width:24px;height:24px;} .hero-title h1{height:92px;font-size:39px;max-width:300px;} }
@media(max-width:720px) and (max-height:720px) and (orientation:portrait){#studio .stage{max-width:none;}#studio .portrait-frame{grid-column:1;grid-row:1;width:min(100%,calc(34dvh*.864));justify-self:center;}#studio .panel{padding:14px 12px 12px;} }
@media(min-width:721px) and (max-width:1050px) and (orientation:portrait){#studio .stage{max-width:min(100%,calc(clamp(280px,calc(100dvh - 710px),510px)*.864 + 16px));}#studio .panel{padding:22px 27px 18px;} }
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio header h1{min-height:36px;width:110px;font-size:18px;padding:4px 15px;}#studio .stage{max-width:calc((100dvh - 158px)*.864 + 14px);}#studio .panel{padding:14px 16px 12px;max-height:calc(100dvh - 62px);}#studio .stage-dock #save::before{width:20px;height:20px;} .hero-title h1{max-width:220px;height:70px;font-size:32px;}}
/* P50 corrections: keep the same illustrated button in every state. */
#studio .items button.active,#studio .items button:active,#studio .tabs button.active,#studio .tabs button:active,#studio .pets button.active,#studio .pets button:active{background:transparent url('assets/ui-button-active.webp') center/100% 100% no-repeat;border:0;outline:0;box-shadow:none;color:#60352b;filter:none;}
#studio .tabs button.active{font-weight:800;}
#studio .pets button.active{font-weight:800;}
#studio .items button.active{filter:drop-shadow(0 0 2px #b76a78);}
#studio .stage-dock #save:active,.home-cta .primary:active{background:transparent url('assets/ui-button-active.webp') center/100% 100% no-repeat;}
#studio .stage-dock #save{font-weight:800;}
@media(min-width:721px) and (orientation:landscape){#studio .stage{max-width:min(100%,calc((100dvh - 265px)*.864 + 16px));}}
@media(max-width:720px){#studio .panel{padding-top:17px;padding-bottom:13px;}#studio .stage{max-width:min(100%,calc(clamp(185px,38dvh,350px)*.864 + 14px));}}
@media(max-width:720px) and (max-height:720px) and (orientation:portrait){#studio .stage{max-width:none;}#studio .panel{padding-top:14px;padding-bottom:12px;}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio .stage{max-width:calc((100dvh - 162px)*.864 + 14px);}}
/* Keep the entire mobile wardrobe visible even while free-style tools are expanded. */
@media(max-width:720px) and (orientation:portrait){
#studio .panel{padding-top:14px;padding-bottom:10px;}
#studio .tabs{margin-bottom:3px;}#studio .themes{margin-bottom:2px;}#studio .themes button{min-height:31px;padding-top:6px;}
#studio .items{gap:3px;padding:3px;}#studio .items button{height:47px;}
#studio .hint{margin:2px 0;}#studio #status{margin-top:2px;}
#studio .tools,#studio .actions:not(.shutter-row){margin-top:3px;}
}
@media(max-width:720px) and (max-height:720px) and (orientation:portrait){#studio .panel{padding-top:11px;padding-bottom:8px;}#studio .portrait-frame{width:min(100%,calc(33dvh*.864));}}
/* P51: light rose/ivory art direction. The actual generated art is color-graded offline. */
body{background:#f3ddd1 url('assets/ui-room.webp') center/cover fixed no-repeat;color:#67433f;}
#studio header small,.home-top,.home-foot,#studio footer{color:#704e48;text-shadow:0 1px #fff5e7;}
#studio header,.homepage,.home-cta p{color:#704e48;}
#studio .portrait-frame{aspect-ratio:6/7;}
#studio .portrait-frame canvas{top:14%;left:11%;width:78%;height:78%;aspect-ratio:6/7;}
#studio .name{color:#704e48;font-weight:600;text-shadow:0 1px #fff4e7;}
#studio .stage-dock .name input{background:#fff5e9;color:#704e48;border-color:#d8b99c;}
#studio .panel{color:#704e48;}
#studio h2,#studio .hint,#studio #status{color:#74534c;}
#studio .items button,.head-actions button:not(#goHome):not(#homeHelp):not(#lang):not(#homeLang){background:transparent url('assets/ui-tile.webp') center/100% 100% no-repeat;color:#6d4640;}
#studio .items button.active,#studio .items button:active{background-image:url('assets/ui-tile-active.webp');filter:none;color:#643941;}
#studio .tabs button,#studio .tools button,#studio .actions button:not(.primary),#studio .pets button{color:#6d4640;font-weight:650;}
#studio .tabs button.active,#studio .pets button.active{color:#743344;}
#studio .tabs button{font-weight:750;}
#studio .control-dock{background:#f5e5d1 url('assets/ui-linen.webp') center/cover;border:1px solid #d5b69c;border-radius:10px;padding:3px 5px 4px;}
#studio .control-dock .tools{margin-top:0;}
#studio .control-dock .actions{margin-top:3px;}
#studio .control-dock #undo,#studio .control-dock #reset,#studio .panel #cameraTools .actions button{background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;color:#6d4640;font-weight:650;}
#studio .control-dock button:active,#studio .panel #cameraTools .actions button:active{background-image:url('assets/ui-button-active.webp');}
#studio .stage-dock #save,.home-cta .primary,#download,#helpClose{background:transparent url('assets/ui-button-active.webp') center/100% 100% no-repeat;color:#702d44;font-weight:800;}
#studio .stage-dock #save::before{width:29px;height:29px;}
#studio #musicToggle[aria-pressed=true]{background-image:url('assets/ui-tile-active.webp');outline:none;color:#702d44;}
#items button.equipped::after{background:#bc6280;}
#studio .themes button{border-color:#d6b396;}
#studio .themes button.active{outline:2px solid #e38b9f;outline-offset:-2px;}
#studio button:focus-visible,.homepage button:focus-visible,dialog button:focus-visible{outline:2px solid #a84669;outline-offset:2px;}
@media(max-width:720px){#studio .control-dock{padding:2px 3px 3px;}#studio .stage-dock #save::before{width:24px;height:24px;}#studio .panel{padding-bottom:8px;}#studio .items button{height:46px;}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio .control-dock{padding:2px 3px;}#studio .stage-dock #save::before{width:20px;height:20px;}}
/* Keep the status on the linen inset, not the illustrated bottom frame. */
#studio #status{font-weight:500;line-height:1.2;}
@media(max-width:720px) and (orientation:portrait){#studio .panel{padding-bottom:20px;}#studio .stage{max-width:min(100%,calc(clamp(185px,36.4dvh,340px)*.864 + 14px));}#studio .control-dock{padding:1px 3px 2px;}#studio .control-dock .actions{margin-top:2px;}}
@media(max-width:720px) and (max-height:720px) and (orientation:portrait){#studio .stage{max-width:none;}#studio .portrait-frame{width:min(100%,calc(31.5dvh*.864));}#studio .panel{padding-bottom:18px;}}

/* P52: generated rose enamel developing tray, existing bright backdrop preserved. */
#studio .panel{background:transparent url('assets/ui-cabinet.webp') center/100% 100% no-repeat;box-shadow:none;border:0;}
#studio .control-dock{background:transparent url('assets/ui-linen.webp') center/cover;border-color:#e6b9a7;}
#studio .items button.active,#studio .items button:active{color:#74223e;}
#studio .themes button.active{outline-color:#ef759b;}
#items button.equipped::after{background:#c54473;}
#studio .tabs button.active,#studio .pets button.active,#studio .stage-dock #save{color:#74223e;}

/* P52.1: ivory enamel tray and brighter unselected buttons; preserve pink accents. */
#studio .control-dock{border-color:#ddd1b9;}

/* P53: generated horizontal wordmark, real accessible heading retained. */
#studio header h1.brand-logo,.hero-title h1.brand-logo{background:transparent url('assets/ui-logo.webp') center/contain no-repeat;color:transparent;text-shadow:none;padding:0;letter-spacing:0;line-height:1;overflow:hidden;}
#studio header h1.brand-logo{width:192px;height:62px;min-height:0;}
.hero-title h1.brand-logo{width:min(94%,450px);max-width:450px;height:clamp(95px,13vw,150px);}
#studio .stage-dock .name input{background:transparent url('assets/ui-button.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;padding:4px 12px;color:#754351;}
#studio .stage-dock .name input:focus{outline:2px solid #b65c82;outline-offset:1px;}
@media(max-width:720px){#studio header h1.brand-logo{width:118px;height:40px;}.hero-title h1.brand-logo{width:94%;max-width:340px;height:98px;}}
@media(orientation:landscape) and (max-height:600px) and (min-width:560px){#studio header h1.brand-logo{width:110px;height:35px;}.hero-title h1.brand-logo{max-width:220px;height:70px;}}
