*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#b8cc79;font:16px 'Microsoft YaHei',Arial,sans-serif;color:#694936}#world{width:100vw;height:100vh;display:block}button,input,select{font:inherit;color:inherit}button{background:#ffe4ba;border:2px solid #a77958;border-radius:18px;padding:12px 20px;cursor:pointer;font-weight:bold}button:hover,button.active{background:#f3b477}button.primary{background:#e99165;color:white}button:disabled{opacity:.5;cursor:default}#hud{position:absolute;inset:16px;pointer-events:none}#hud button,#right{pointer-events:auto}#profile{text-align:left;background:#fff2d8;box-shadow:0 3px #98745c}small{display:block;font-size:13px;margin-top:5px}#right{position:absolute;right:0;top:0;display:grid;justify-items:center;gap:10px}#mini{border:7px solid #78513d;border-radius:50%;background:#c5d982}#overlay{position:absolute;inset:0;background:#34231855;display:grid;place-items:center}#overlay[hidden],#hud[hidden]{display:none}#panel{background:#fff3da;border:5px solid #80573f;border-radius:28px;box-shadow:0 8px #54392755;width:min(900px,94vw);max-height:94vh;overflow:auto;padding:18px}header{background:#eba474;color:white;border-radius:17px;padding:12px 18px;font-size:24px;font-weight:bold;display:flex;justify-content:space-between;align-items:center}header button{padding:4px 13px;color:#79533c}.layout{display:grid;grid-template-columns:130px 230px 1fr;gap:20px;padding:20px 0}.tabs{display:grid;align-content:start;gap:10px}.preview{background:#ffe6bd;border:2px solid #b98661;border-radius:20px;text-align:center;padding:12px}.preview canvas{width:100%;height:auto}.items{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px;align-content:start}.items button{min-height:100px;padding:8px;font-size:13px}.items img{width:65px;height:65px;object-fit:contain;display:block;margin:auto}.selected{outline:3px solid #dc7964}.home{text-align:center;padding:25px}.home h1{font-size:46px;margin:10px}.home canvas{width:160px;height:160px}.home p{margin:18px}.profileLayout{display:grid;grid-template-columns:230px 1fr;gap:20px;padding:20px}.profileLayout input,.profileLayout select{width:100%;padding:12px;border:2px solid #b98661;border-radius:12px;background:#ffe8c6;margin:8px 0 18px}#toast{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);background:#fff3da;border-radius:12px;padding:10px 20px;display:none}@media(max-width:650px){.layout{grid-template-columns:1fr 1fr}.tabs{grid-column:1/-1;display:flex;flex-wrap:wrap}.profileLayout{grid-template-columns:1fr}.home h1{font-size:32px}}

#profile{min-width:300px;min-height:100px;border:4px solid #80573f;box-shadow:inset 0 0 0 3px #fff9e8,0 4px #98745c;padding:10px 14px}#avatar{float:left;width:76px;height:76px;border:3px solid #a77958;border-radius:50%;background:#f5c180;margin-right:12px}#name{font-size:23px}progress{accent-color:#e99c61;height:12px;width:55%}.mapframe{position:relative;isolation:isolate}.mapframe:before,.mapframe:after{content:'';position:absolute;top:-9px;width:43px;height:43px;background:#f4bd8c;border:6px solid #78513d;transform:rotate(45deg);z-index:-1;border-radius:7px}.mapframe:before{left:12px}.mapframe:after{right:12px}#mini{display:block;border:8px solid #78513d;outline:3px solid #ffe7bb}.maplabel{background:#80573f;color:#fff3da;border:2px solid #ffe7bb;border-radius:18px;padding:4px 25px;margin-top:-18px;z-index:2}#right{padding:12px}#bag{border:4px solid #80573f;box-shadow:inset 0 0 0 3px #fff3da;min-height:80px;min-width:100px}.rotate{display:flex;justify-content:center;gap:12px}.rotate button{padding:4px 18px}.items button{position:relative}.home canvas{background:#f5c180;border:4px solid #80573f;border-radius:50%}#right[hidden]{display:none}

/* v5 preview: warm illustrated interface */
:root{--ink:#785642;--cream:#fff8e8;--peach:#e6a18b}
button{border:1.5px solid #b68c6d;border-radius:15px;background:linear-gradient(#fff8e9,#f4d9b4);box-shadow:0 3px 0 #b68c6d55;transition:background .15s,transform .15s}
button:hover,button.active{background:#f7c9b4;transform:translateY(-1px)}
#hud{inset:18px}#profile{min-width:0;min-height:0;width:clamp(210px,26vw,285px);border:2px solid #a67b5d;border-radius:24px;padding:9px 12px;background:linear-gradient(135deg,#fffdf1,#f9e3c4);box-shadow:0 4px 0 #79523b44,inset 0 0 0 3px #fff9ed}
#avatar{width:60px;height:60px;border:2px solid #c59b77;margin-right:10px}#name{font-size:19px}small{font-size:11px}progress{height:8px}
#right{padding:7px;gap:8px}.mapframe:before,.mapframe:after{width:32px;height:32px;border:4px solid #a67b5d;border-radius:14px;background:linear-gradient(135deg,#e9a994,#ffe0bc);top:-5px}#mini{width:clamp(100px,15vw,150px);height:auto;border:5px solid #a67b5d;outline:3px solid #fff1d5}.maplabel{background:#fff3dc;color:#785642;border:1.5px solid #b68c6d;font-size:12px;padding:3px 18px;margin-top:-14px}#bag{min-height:0;min-width:0;padding:9px 19px;border:2px solid #a67b5d;border-radius:17px;font-size:14px}
#panel{border:3px solid #ad8164;border-radius:30px;background:linear-gradient(145deg,#fffdf3,#fae9d1);box-shadow:0 12px 40px #50352644,inset 0 0 0 4px #fff8e8;padding:20px}header{background:linear-gradient(110deg,#e6a18b,#efbd91);border:1px solid #cf9277;border-radius:18px;font-size:21px}header button{background:#fff6e5;border-radius:50%;width:34px;height:34px;padding:0}.preview{background:radial-gradient(ellipse at 50% 35%,#fff9e9,#f3dfc3);border:1.5px solid #d2af8e;border-radius:23px}.items button{background:#fff9eb;border:1.5px solid #dfc2a4;border-radius:16px}.items button.selected{outline:2px solid #d88877;background:#fce1d2}.tabs button{font-size:14px;padding:10px}.primary,button.primary{background:linear-gradient(#e6a18b,#d98b77);border-color:#c78370;color:white}.home h1{color:#9d6852;letter-spacing:3px;text-shadow:0 2px #fff}.home canvas{border:2px solid #c39a77;background:#f9e3c3}
@media(max-width:650px){#hud{inset:9px}#profile{width:200px}#avatar{width:48px;height:48px}#panel{padding:12px}.layout{gap:9px}.items{grid-template-columns:repeat(auto-fit,minmax(76px,1fr))}.items img{width:48px;height:48px}}

/* Wardrobe layout polish */
#overlay{backdrop-filter:blur(3px);background:#50352655}#panel{width:min(940px,94vw)}.layout{grid-template-columns:124px minmax(190px,230px) minmax(0,1fr);gap:18px}.layout h3{margin:4px 0 14px}.tabs button{min-height:44px}.items{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:12px}.items button{min-height:110px;overflow-wrap:anywhere}.preview #wear{width:100%;min-height:42px}.preview #status{min-height:24px;margin:12px 0}.rotate button{min-width:44px;min-height:34px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #bc7863;outline-offset:3px}button:active:not(:disabled){transform:translateY(2px);box-shadow:none}button:disabled{transform:none}#toast{z-index:5;box-shadow:0 4px 18px #50352633;border:1px solid #c39a77;pointer-events:none}@media(max-width:650px){.layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.tabs{grid-column:1/-1}.items{grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:7px}.items button{min-height:88px}.preview{padding:8px}}

/* Storybook interface: consistent framing and breathing room */
#panel{position:relative;isolation:isolate;border:3px solid #b18b70;box-shadow:0 18px 55px #49352255,inset 0 0 0 5px #fffaf0}header{color:#754c3e;background:linear-gradient(110deg,#f4c6b2,#f7dfb8);text-shadow:0 1px #fff8e7}header button{box-shadow:0 2px #b68c6d55}.tabs button.active{background:#f3c4ad;border-color:#ba816a;box-shadow:inset 3px 0 #c78370}.preview{position:relative;overflow:hidden}.preview canvas{display:block;margin:auto;max-width:230px}.items button img{filter:drop-shadow(0 3px 2px #79543e22)}.items button:hover:not(:disabled){border-color:#c78370;background:#fff0dc}.home{padding:40px 20px;background:radial-gradient(ellipse at 50% 32%,#fffdf2 0%,#f8e7ce 58%,#e5d9b5 100%);border-radius:22px;border:1px solid #d6b897}.home h1{font-family:Georgia,serif;letter-spacing:5px;font-size:clamp(30px,6vw,58px)}.home h2{font-weight:normal;color:#99745c}.home .primary{padding:14px 32px;border-radius:24px}.home canvas{box-shadow:0 0 0 6px #fff6e4,0 8px 20px #a9806340}#profile{overflow:hidden}#name{overflow-wrap:anywhere}.maplabel{box-shadow:0 2px 5px #79543e33}
