/* 乌有岛：统一奶油纸、暖木边框与鼠尾草游戏控件，所有内容仍在横屏画框内。 */
:root{--green:#809263;--ink:#566344;--white:#fff7e7;--line:#decfae}
.game-frame[data-ready=false] :is(.game-hud,.game-toolbar,.move-pad,.scene-interactions,.back-town,.context-panel,.cafe-chat-shortcut,.edit-home-button){visibility:hidden}
.brand{height:54px;padding:4px 16px 4px 4px;border:3px solid #ead2a4;border-radius:20px;background:#785c40;color:#fff5d9;box-shadow:0 4px 0 #53452d33,0 0 0 2px #a6865c;font-size:24px;letter-spacing:2px;text-shadow:0 2px #513e29}
.brand-mark{width:58px;height:58px;margin:-8px 1px -8px -8px;object-fit:contain}
.scene-header,.game-frame[data-scene=cafe] .scene-header{display:block;margin-right:auto;align-self:center;padding:8px 15px;border:2px solid #ead9b5;background:#fff8e8;border-radius:0 25px 25px 0;margin-left:-14px;min-width:120px;color:#735f42}
.scene-header strong{font-size:17px}.scene-header>span{display:none}
.game-frame[data-scene=party] .scene-header{display:none}
.game-hud{top:18px;gap:12px;align-items:center}
.header-right{gap:8px;align-items:center}
.wallet{height:44px;border:2px solid #ecddba;border-radius:24px;background:#fff7e6;padding:6px 15px;box-shadow:0 4px 0 #8d765c24;color:#5f6749;font-size:24px}
.wallet .ui-icon{width:25px;height:25px;opacity:.85}
.game-hud .profile-button,.game-hud .hud-icon{width:46px;height:46px;padding:11px;border:2px solid #fff5d9;border-radius:50%;background:#eee6cd;box-shadow:0 4px 0 #8d765c30}
.game-hud .ui-icon{opacity:1}
.game-toolbar{right:14px;top:180px;bottom:auto;gap:9px;flex-direction:column;align-items:center}
.game-toolbar button,.game-toolbar button.camera-launch{width:54px;height:55px;padding:4px;gap:3px;background:#fff4dbeF;color:#665b40;border:2px solid #fff7e4;border-radius:17px;box-shadow:0 4px 0 #92764d45,0 5px 10px #705e3226}
.game-toolbar button>.ui-icon,.game-toolbar button.camera-launch>.ui-icon{width:27px;height:27px;opacity:1;filter:none}
.game-toolbar button>span{font-size:10px;color:#665b40;font-weight:650;line-height:1.2}
.game-toolbar button.camera-launch>.ui-icon{height:24px;width:24px}
#camera-button{display:flex;flex-direction:column}
.game-toolbar button[data-label]::after{display:none}
.game-toolbar button:nth-child(2){background:#e5edda}.game-toolbar button:nth-child(3){background:#f7e2be}.game-toolbar button:nth-child(4){background:#f1e7d3}
.game-toolbar button{position:relative}.game-toolbar button::before{content:"";position:absolute;inset:-4px;}
.resident-character{font-size:16px;color:#957550;font-weight:600;padding:2px 0 8px}
.game-toolbar button:hover{filter:brightness(1.04)}
.back-town{top:88px;left:18px;width:48px;height:48px;padding:12px;background:#fff1d8;border:2px solid #fff8e2;box-shadow:0 4px 0 #96795328}
.back-town>.ui-icon{width:23px;height:23px}
.cafe-chat-shortcut{position:absolute;right:20px;top:88px;width:48px;height:48px;border-radius:50%;background:#dce7d0;border:2px solid #fff5d9;padding:12px;z-index:6;box-shadow:0 3px 0 #88795924}
.cafe-chat-shortcut .ui-icon{width:23px;height:23px}
.cafe-chat-shortcut[hidden],.edit-home-button[hidden],.home-editor[hidden],.conversation[hidden]{display:none}
.context-panel{right:90px;border:3px solid #d9c59f;border-radius:24px;background:#fff5dff5;box-shadow:0 5px 0 #79684433,0 9px 30px #55452625;backdrop-filter:none;bottom:25px}
.context-heading{background:#e9dbc0;border-bottom:2px solid #d5c19e;height:50px}
.context-footer{background:#f6ead1;border-top:2px solid #d9c7a5}
.scene-modes{background:#fff4df;border:2px solid #dac6a1;box-shadow:0 3px 0 #967b582b;border-radius:18px;top:89px}
.scene-modes button{font-size:16px;font-weight:600;border-radius:12px;min-height:40px}.scene-modes button.active{background:#899964}
.move-pad{left:25px;bottom:27px;width:115px;height:115px;border:3px solid #e9d6b1b0;box-shadow:0 4px 0 #816b4745;background:#f3e0b754;backdrop-filter:none}
.joystick-cap{left:34px;top:34px;width:41px;height:41px;background:#ffefc8;border:2px solid #fff5d8;box-shadow:0 4px 0 #9b835745}
.primary-button{background:#879765;border:2px solid #6f8352;box-shadow:0 4px 0 #5e72432f;color:#fffbe9}
.tool-button,.quiet-button{background:#f2e6cb;border:2px solid #dac59d;box-shadow:0 3px 0 #9a835323;color:#6b6645}
.primary-button,.tool-button,.text-button{font-weight:600;border-radius:16px;font-size:17px}
.modal-content .primary-button,.modal-content .tool-button{min-height:58px}
#modal-body{background:#fff6e4;border:4px solid #dbc7a0;border-radius:25px;box-shadow:0 7px 0 #8870433d,0 12px 32px #52472944}
.modal-header{background:#edddbf;border-bottom:2px solid #dac49c;padding:8px 19px;min-height:68px}
.modal-header h2{font-weight:700;color:#77603e;font-size:25px}
.modal-header .close-button{width:49px;height:49px;min-width:49px;background:#fff3d8;border:2px solid #d3bd96;box-shadow:0 3px 0 #a48b5c2b}
.modal-header .close-button>.ui-icon{width:22px;height:22px}
.modal-content{scrollbar-color:#bba884 #f2e6cf}.modal-content input,.modal-content textarea{border:2px solid #d9c7a5;background:#fffaf0;border-radius:15px}
dialog[data-view=welcome] #modal-body{background:url('/assets/toy-town-v2/town.png') center/cover;border:3px solid #fff2d3}
.welcome-brand{background:#fff6dfec;border:3px solid #e6d4a9;border-radius:30px;text-shadow:none;color:#765c3d;padding:20px 16px;align-self:center}
.welcome-brand>img{width:155px;height:120px;object-fit:contain}.welcome-brand h1{font-size:47px;margin:0 0 8px;letter-spacing:6px}.welcome-brand p{color:#876f4d;font-size:16px}
.welcome-form{background:#fff6e4;border:3px solid #e1c99d;box-shadow:0 5px 0 #7d664b33}.welcome-form>small{display:none}
.theme-banner{background:url('/assets/toy-town-v2/town.png') 65% 44%/cover;border:3px solid #e7d7b3}
.theme-banner>div{background:#fff6dfea;border-radius:17px;padding:10px 15px}.theme-banner h3{font-size:26px}.theme-banner p{margin:0}
.phase-tag{background:#fff3d9;border:2px solid #ead2a3;color:#7b6948}
.post-card,.photo-card{border:2px solid #e6d4b0;background:#fff9ec;border-radius:20px;box-shadow:0 3px 0 #a48b5c16}
.friend-cards{padding:6px 8px 2px}.resident-invite{background:#8c9e6d;border-color:#738651;font-size:17px}
.toast{border:2px solid #fff2ce;background:#746342;color:#fffbe8;border-radius:19px;bottom:100px;font-size:17px;box-shadow:0 4px 0 #51402d30}
/* 对话进入独立交互状态；全套视觉重设计选定前，只修复空间和输入链路。 */
.conversation{position:absolute;right:24px;left:auto;top:144px;bottom:24px;width:300px;z-index:7;pointer-events:auto;display:flex;flex-direction:column;gap:12px;padding:14px;background:#fff3db;border:3px solid #dec8a3;box-shadow:0 5px 0 #8d725742;border-radius:23px}
.game-frame[data-conversation-side=left] .conversation{left:24px;right:auto}
.conversation-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;font-size:19px;color:#705d3d}
.conversation-line{min-height:100px;flex:1;overflow:auto;padding:12px;background:#fffaf0;border:2px solid #e4d1af;border-radius:15px;scrollbar-width:thin;word-break:break-word}
.conversation-line>strong{font-size:13px;color:#86734e}.conversation-line>p{font-size:17px;line-height:1.6;margin:6px 0 0;color:#48563e}
.conversation-openers{display:flex;gap:8px;align-items:center}
.conversation-openers>.tool-button{flex:1;min-height:44px;min-width:0;white-space:nowrap;font-size:13px;padding:6px;background:#fff7e8;border:2px solid #e4d1af;box-shadow:0 3px 0 #b29a7533}
.conversation-goodbye{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;background:#ebdfc6;border:2px solid #dcc39b;border-radius:50%;padding:8px}.conversation-goodbye .ui-icon{width:17px;height:17px}
.resident-chat-form{display:flex;gap:8px;align-items:center}.resident-chat-form>input{min-width:0;flex:1;width:100%;height:46px;font-size:16px;border:2px solid #d9c7a5;background:#fffaf0;border-radius:13px;padding:9px}
.resident-chat-form>.primary-button{height:46px;min-height:46px;min-width:62px;font-size:15px;padding:7px 10px}
.game-frame[data-conversing=true] :is(.game-toolbar,.cafe-chat-shortcut,.context-panel,.invite-button,.move-pad,#panel-button){display:none}
.game-frame[data-conversing=true] .back-town{top:88px}
.camera-mode .conversation,.camera-mode .cafe-chat-shortcut,.camera-mode .edit-home-button{display:none}
/* 独立换装界面：左镜子，右侧自己的衣服。 */
dialog[data-view=wardrobe] #modal-body{left:100px;top:34px;width:760px;height:472px}
.dressing-room{display:grid;grid-template-columns:254px 1fr;gap:22px;height:100%;min-height:0}
.dressing-mirror{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#e3ebd4;border:4px solid #d0ba92;border-radius:80px 80px 25px 25px;padding:8px;min-height:0;box-shadow:inset 0 0 0 4px #f8ecd3}
.dressing-mirror>img{height:270px;width:215px;object-fit:contain}.dressing-mirror strong{font-size:19px;margin-top:4px}.dressing-mirror>span{font-size:13px;margin-top:7px;color:#8f947a}
.dressing-closet{display:flex;flex-direction:column;min-height:0}.closet-heading{display:flex;justify-content:space-between;align-items:center;padding:0 2px 10px}.closet-heading h3{margin:0!important;font-size:20px}.closet-heading>span{font-size:14px;color:#9c8b68}
.owned-outfit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;overflow:auto;min-height:0;flex:1;align-content:start;padding:3px}
.owned-outfit{display:flex;align-items:center;flex-direction:column;border:2px solid #e3d2af;border-radius:17px;background:#fffaf0;padding:7px;gap:4px;min-height:137px}.owned-outfit>img{width:62px;height:85px;object-fit:contain}.owned-outfit strong{font-size:12px;white-space:nowrap}.owned-outfit small{font-size:11px;color:#8b9b6d}.owned-outfit.selected{border:3px solid #8f9e6d;background:#edf1df;box-shadow:0 3px 0 #899c5340}
.dressing-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.dressing-actions>.primary-button{flex:1}.dressing-actions>.text-button{font-size:13px;width:100%;min-height:28px;padding:3px}
/* 家居布置沿用游戏房间；不是另一个网页。 */
.edit-home-button{position:absolute;left:77px;top:88px;z-index:6;height:48px;min-height:48px;padding:8px 14px;gap:7px}.edit-home-button .ui-icon{width:22px;height:22px}
.home-editor{position:absolute;inset:0;z-index:7;pointer-events:none}.home-editor button{pointer-events:auto}
.home-inventory{position:absolute;left:18px;top:151px;bottom:27px;width:215px;border:3px solid #d8c49b;border-radius:23px;background:#fff5e0;box-shadow:0 5px 0 #92764d30;padding:12px;display:flex;flex-direction:column;pointer-events:auto}
.home-inventory h2{margin:0 0 10px;font-size:20px;color:#806844;display:flex;justify-content:space-between}.home-inventory h2 small{font-size:14px;color:#9d906d}.home-owned-list{overflow:auto;display:grid;gap:9px;align-content:start;flex:1}
.home-owned{display:flex;align-items:center;gap:7px;background:#fffbee;border:2px solid #e1d1ad;border-radius:15px;text-align:left;min-height:78px;padding:7px}.home-owned>img{width:74px;height:59px;object-fit:contain}.home-owned>span{font-size:13px;font-weight:600;flex:1}.home-owned small{display:block;font-weight:400;font-size:11px;color:#a29270;margin-top:4px}.home-owned.selected{border:3px solid #8a9a66;background:#edf1de}
.home-owned-list>p{font-size:16px;line-height:1.6;color:#948261;margin:5px}.home-placement-tools{position:absolute;left:263px;right:190px;bottom:26px;padding:10px 15px;border:3px solid #e0cba5;border-radius:20px;background:#fff5e6;box-shadow:0 4px 0 #8c725633;text-align:center;pointer-events:auto}.home-placement-tools>span{font-size:15px;display:block;color:#8b7651}.home-placement-tools>strong{font-size:18px;display:block;margin:5px}.home-placement-tools .button-row{justify-content:center;gap:10px}.home-placement-tools :is(.primary-button,.tool-button){flex:0 0 auto;min-width:130px;min-height:48px;white-space:nowrap}
.home-editor-actions{position:absolute;right:22px;bottom:26px;display:grid;gap:9px;width:146px}.home-editor-actions button{min-height:57px}
.game-frame[data-home-editing=true] :is(.move-pad,.game-toolbar,.edit-home-button,.scene-interactions){display:none}
.game-frame[data-home-editing=true] .game-hud,.game-frame[data-home-editing=true] .back-town{z-index:8}
.game-frame[data-home-editing=true] .context-panel{display:none}
/* 真正的手机竖屏阻挡；不把横屏游戏缩小塞入竖屏页面。 */
.rotate-hint{background:#fff3d9;color:#726140;border:16px solid #ecd6af;gap:12px}
.rotate-hint>img{width:94px;height:94px}.rotate-hint strong{font-size:23px}.rotate-hint p{font-size:16px;line-height:1.7;color:#948261;margin:0}
.rotate-hint button{min-height:54px;padding:13px 30px;border-radius:19px;background:#88966b;color:#fff8e6;border:2px solid #6e8052;font-size:17px;box-shadow:0 4px 0 #5b704437}
html[data-portrait=true] .rotate-hint{display:flex}html[data-portrait=true] :is(.game-viewport,.toast-host){visibility:hidden}html[data-portrait=true] dialog[open]{visibility:hidden}
@media(orientation:portrait) and (pointer:coarse){.rotate-hint{display:flex}}
