*{box-sizing:border-box}body{margin:0;background:#171b2b;color:#f7f4ff;font:15px system-ui,-apple-system,sans-serif}main{max-width:1100px;margin:18px auto;padding:0 12px}header,footer{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#272b43;border-radius:14px;padding:12px 16px;margin-bottom:10px}header strong{display:block;font-size:20px}small,.help,.note{color:#b9bfd7}.stats{display:flex;gap:12px;flex-wrap:wrap}#status{color:#f7ce80}#game{border:3px solid #505a85;border-radius:16px;overflow:hidden;background:#b2dca8}#game canvas{display:block;width:100%;height:auto}footer{margin-top:10px;justify-content:flex-start;flex-wrap:wrap}input{background:#171b2b;border:1px solid #67729b;border-radius:8px;padding:8px;color:white;width:140px}button{background:#6975dc;border:0;border-radius:9px;padding:9px 13px;color:white;font-weight:700;cursor:pointer;touch-action:none}.help{margin-left:auto}.note{font-size:12px;text-align:center}#touch{display:none;text-align:center}#touch button{width:55px;height:45px;margin:2px}@media(pointer:coarse),(max-width:700px){#touch{display:block}.help{display:none}header{align-items:flex-start}header strong{font-size:17px}}

#friends-panel{background:#272b43;border-radius:14px;padding:16px;margin:10px 0}#friends-panel[hidden]{display:none}#friends-panel h3{margin-top:0}.friend-add,.friend-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.friend-card{border:1px solid #657098;border-radius:10px;padding:12px;margin:8px 0}.friend-card summary{cursor:pointer;font-weight:700}.friend-card button{margin:8px 8px 8px 0}.friend-card select{display:block;width:100%;max-width:370px;background:#171b2b;color:white;border:1px solid #67729b;padding:8px;border-radius:8px}.permission-label{display:inline-flex;align-items:center;margin:8px 12px 8px 0}.permission-label input{width:auto;margin-right:5px}.danger{background:#a44c61}#friend-notice{color:#b7eec8}

#land-panel{background:#272b43;border:2px solid #7d9b8c;border-radius:14px;padding:16px;margin:10px 0}#land-panel[hidden]{display:none}#land-content{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}.land-option{min-width:145px;max-width:250px;text-align:left;background:#384968;border:1px solid #7e9db7}.land-option strong{display:block}.land-option small{display:block;color:#e2e4f6;margin-top:5px}.land-back{background:#555d75}#wallet{color:#ffe29c;font-weight:800}#land-notice{color:#b7eec8}

#facility-screen{position:fixed;z-index:100;inset:4vh 5vw;background:linear-gradient(145deg,#e9f3d5,#c7e8c9);color:#355c43;border:8px solid #fff8e8;border-radius:26px;box-shadow:0 0 0 100vmax #0009,0 16px 60px #0006;text-align:center;padding:20px;overflow:auto}#facility-screen[hidden]{display:none}#facility-screen h2{font-size:clamp(22px,4vw,38px)}.facility-room{margin:24px auto;max-width:800px;height:clamp(190px,42vh,430px);border:12px solid #ac936e;border-radius:24px;display:grid;place-items:center;font-size:clamp(30px,6vw,70px);background:repeating-linear-gradient(90deg,#e8d6ac 0 42px,#e1cca1 42px 46px)}.facility-room.farm{background:repeating-linear-gradient(0deg,#946b4d 0 40px,#b58d63 40px 50px)}.facility-room.fish{background:repeating-radial-gradient(circle,#82d9e5 0 20px,#56b9d1 22px 45px)}#facility-screen>button{background:#577c60;font-size:17px;padding:13px 24px}

#farm-panel{background:#263e33;border:2px solid #83b67e;border-radius:14px;padding:15px;margin:10px 0}#farm-panel[hidden]{display:none}#farm-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:540px;margin:10px 0}#farm-tiles button{min-height:70px;background:#73583d;border:2px solid #a88c60}#farm-tiles button.selected{border:3px solid #f7e795;background:#977049}#farm-actions{display:flex;gap:8px;flex-wrap:wrap}#farm-actions button:disabled{opacity:.45;cursor:not-allowed}#farm-notice{color:#b7eec8}

#inventory-grid{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:5px;margin:12px 0}.inventory-slot{aspect-ratio:1;background:#b8b5a6;border:3px inset #e7e3d3;position:relative;display:flex;align-items:center;justify-content:center;font-size:25px;min-width:0}.inventory-slot span{position:absolute;right:2px;bottom:0;font:bold 12px sans-serif;color:white;text-shadow:1px 1px #333}#farm-actions{display:flex;gap:6px;flex-wrap:wrap}#farm-actions button.selected{background:#91caa2;border:2px solid #407b52}#inventory-panel{background:#eee9dc;padding:16px;border-radius:12px;margin:8px 0}

/* Zoom buttons float over the game, not over the inventory UI. */
#camera-zoom-controls{position:absolute;right:12px;top:12px;z-index:20;display:flex;gap:5px;align-items:center;background:#222a3bdc;padding:5px;border-radius:12px;color:white;box-shadow:0 3px 12px #0004;user-select:none}
#camera-zoom-controls button{width:34px;height:34px;padding:0;border:1px solid #ffffff55;border-radius:8px;background:#3d526b;color:white;font-size:21px;cursor:pointer}
#camera-zoom-value{min-width:46px;text-align:center;font-size:12px;font-weight:bold}
#game canvas{touch-action:none}

/* 区役所の転職フォーム: 狭い画面でも選択肢を読める大きさにする */
#office-panel{min-width:0;max-width:100%;overflow:visible}
.office-job-card{display:flex;flex-direction:column;align-items:stretch;gap:12px;max-width:440px;padding:16px;margin:12px 0;background:#292f49;border:1px solid #66739d;border-radius:12px}
.office-job-card label{display:flex;flex-direction:column;gap:6px;font-weight:700}
.office-job-card select{display:block;width:100%;min-width:220px;max-width:100%;height:48px;padding:10px 36px 10px 12px;border:2px solid #8796c7;border-radius:9px;background:#f9f8f2;color:#20283c;font-size:17px;font-weight:700;cursor:pointer;appearance:auto}
.office-job-card select option{background:#fff;color:#20283c;font-size:17px}
.office-job-card button{min-height:46px;font-size:15px}
.office-job-card [hidden]{display:none!important}
@media(max-width:400px){.office-job-card select{min-width:0}}

/* アイテム名と操作結果を常に見えるように */
.inventory-slot{flex-direction:column;overflow:hidden;padding-bottom:19px}
.inventory-slot img{max-height:72%!important}
.inventory-item-name{position:absolute;bottom:1px;left:0;right:0;font-size:10px;line-height:14px;text-align:center;color:#292b32;background:#f7f4e6dd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inventory-slot span{bottom:16px!important;z-index:2}
#action-toast{position:fixed;z-index:9999;top:14%;left:50%;transform:translateX(-50%);max-width:min(90vw,480px);padding:16px 24px;border:3px solid #e7c36a;border-radius:12px;background:#293a3a;color:white;box-shadow:0 6px 30px #0008;font-size:17px;font-weight:bold;text-align:center;pointer-events:none}
#action-toast[hidden]{display:none}

/* Shop: floating inventory overlay, no bottom bar while shopping */
body.inside-shop footer{display:none!important}
body.inside-shop #shop-panel{position:fixed;z-index:250;left:50%;top:50%;transform:translate(-50%,-50%);width:min(900px,94vw);max-height:87vh;overflow-y:auto;padding:22px;background:linear-gradient(145deg,#fff9eb,#f5e2c3);color:#4b3826;border:5px solid #d5a974;border-radius:24px;box-shadow:0 0 0 100vmax #0008,0 16px 65px #0008}
body.inside-shop #shop-panel[hidden]{display:none!important}
#shop-panel h3{font-size:clamp(22px,3vw,32px);margin:0 0 8px}
#shop-summary{font-weight:700;color:#765431}
.shop-tabs,.shop-categories{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
#shop-panel .shop-tab,#shop-panel .shop-category{background:#ead5b4;color:#513e2c;border:2px solid #c5a47c;flex:1;min-width:110px;font-size:16px}
#shop-panel .active{background:#9a6c48;color:#fff;border-color:#805536}
.shop-goods{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:10px;margin:14px 0}
#shop-panel .shop-product{background:#fffdf8;color:#4c3c2e;border:2px solid #e2c9a6;text-align:left;min-height:64px;white-space:normal}
#shop-panel .shop-product.active{background:#f1d9a7;border-color:#9a6c48}
.shop-detail{padding:16px;background:#fffdf6;border:2px solid #d9b68b;border-radius:14px}
.shop-quantity{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:10px}
#shop-panel input{background:white;color:#30251d;border:1px solid #b18d66;width:125px;font-size:17px}
#shop-panel .shop-choice{background:#a26e47}
.shop-hint{color:#80664b}
#shop-close{background:#7d5b4b;margin-top:12px}


/* Chibi Town house: floating translucent control surfaces */
#house3d{position:fixed!important;inset:0!important;overflow:hidden!important;display:block!important}
#house3d-view{position:absolute!important;inset:0!important;width:100%;height:100%;overflow:hidden}
#house3d-toolbar{position:absolute!important;z-index:1002;top:calc(10px + env(safe-area-inset-top,0px));left:12px;right:auto;width:fit-content;max-width:calc(100vw - 167px);max-height:132px;overflow-y:auto;display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:6px!important;padding:9px 12px!important;background:rgba(30,38,48,.66)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.25);border-radius:15px;box-shadow:0 5px 22px #0003;color:#fff!important}
#house3d-toolbar .house3d-toolbar-heading{font-weight:800;font-size:13px;color:white!important;margin-right:4px}
#house3d-toolbar button,#house3d-toolbar select,#house3d-toolbar summary{min-height:36px!important;padding:7px 10px!important;border-radius:9px!important;border:1px solid #ffffff55!important;background:rgba(255,255,255,.86)!important;color:#283541!important;font-size:12px!important;font-weight:700;cursor:pointer;touch-action:manipulation}
#house3d-toolbar label,#house3d-toolbar span,#house3d-toolbar details{color:#fff!important;font-size:12px!important}
#house3d-toolbar #house3d-status{font-size:11px!important;opacity:.8}
#house3d-toolbar #house3d-help{max-width:100%;position:relative}
#house3d-toolbar #house3d-help[open]{flex-basis:100%;max-height:110px;overflow:auto}
#house3d-toolbar .house3d-toolbar-exit{display:none!important}
#house3d-exit-floating{z-index:1006!important;min-height:40px!important}
#house3d-editor.house3d-furniture-panel{position:absolute!important;z-index:1003;left:calc(12px + env(safe-area-inset-left,0px));bottom:calc(14px + env(safe-area-inset-bottom,0px));width:min(365px,calc(100vw - 24px));max-height:min(62vh,490px);overflow:auto;box-sizing:border-box;padding:12px!important;background:rgba(29,37,47,.70)!important;backdrop-filter:blur(13px);-webkit-backdrop-filter:blur(13px);border:1px solid rgba(255,255,255,.30);border-radius:16px;color:#fff!important;box-shadow:0 7px 24px #0005}
#house3d-editor>summary{cursor:pointer;font-weight:800;font-size:15px;list-style:none;touch-action:manipulation}
#house3d-editor>summary::before{content:'🪑  ';}
#house3d-editor>summary::-webkit-details-marker{display:none}
#house3d-editor .house3d-furniture-hint{font-size:11px;line-height:1.4;opacity:.9;margin:7px 0}
#house3d-editor>div{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px!important;padding:8px 0 0!important;align-items:stretch!important}
#house3d-editor select{grid-column:span 3;min-width:0;max-width:100%;font-size:12px!important}
#house3d-editor #house3d-furniture-list{grid-column:span 4}
#house3d-editor button,#house3d-editor select{min-height:43px!important;padding:7px 5px!important;border:1px solid #fff8!important;border-radius:10px!important;background:rgba(255,255,255,.90)!important;color:#253340!important;font-weight:750!important;touch-action:manipulation;cursor:pointer}
#house3d-editor button:active{transform:scale(.96);background:#c9ebff!important}
#house3d-editor #house3d-move-left{grid-column:1}
#house3d-editor #house3d-move-up{grid-column:2}
#house3d-editor #house3d-move-down{grid-column:3}
#house3d-editor #house3d-move-right{grid-column:4}
#house3d-editor #house3d-rotate,#house3d-editor #house3d-remove{grid-column:span 2}
#house3d-editor #house3d-edit-status{grid-column:span 4;color:#fff!important;font-size:11px}
#house3d-editor #house3d-add{grid-column:span 1;background:#c7f3e5!important}
@media(max-width:650px){#house3d-toolbar{right:115px;left:6px;width:auto;max-width:none;top:calc(6px + env(safe-area-inset-top,0px));padding:6px!important;gap:4px!important;max-height:120px}#house3d-toolbar button,#house3d-toolbar select{min-height:32px!important;padding:5px!important;font-size:11px!important}#house3d-toolbar .house3d-toolbar-heading{display:none}#house3d-editor.house3d-furniture-panel{left:6px;bottom:calc(6px + env(safe-area-inset-bottom,0px));width:min(330px,calc(100vw - 12px));max-height:48vh;padding:9px!important}#house3d-editor button,#house3d-editor select{min-height:39px!important}#house3d-exit-floating{right:6px!important;top:6px!important;font-size:11px!important;padding:6px!important}}

/* World HUD: the former bottom menu now lives inside the world viewport. */
#world-stage{position:relative;isolation:isolate;min-width:0}
#world-stage>#game{position:relative;z-index:0}
#world-stage>footer{position:absolute;z-index:80;top:calc(10px + env(safe-area-inset-top,0px));left:10px;right:10px;margin:0;padding:9px 11px;display:flex;justify-content:flex-start;align-items:center;gap:7px;flex-wrap:wrap;max-height:100px;overflow-y:auto;background:rgba(30,38,53,.77);border:1px solid #ffffff45;border-radius:14px;box-shadow:0 6px 22px #0005;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
#world-stage>footer button,#world-stage>footer select{min-height:36px;padding:7px 10px;font-size:12px;white-space:nowrap;touch-action:manipulation}
#world-stage>footer label{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:12px}
#world-stage>footer input{width:90px;padding:7px}
#world-stage>footer .help{display:none}
#world-stage>section:not([hidden]){position:absolute;z-index:90;top:calc(118px + env(safe-area-inset-top,0px));left:10px;right:auto;width:min(640px,calc(100% - 20px));max-height:calc(100% - 130px);overflow:auto;margin:0;padding:16px;border-radius:15px;box-shadow:0 12px 35px #0009;background:rgba(33,40,58,.93);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);color:#fff}
#world-stage>section[hidden]{display:none!important}
#world-stage>#inventory-panel{background:rgba(244,238,219,.96);color:#303037}
#world-stage>#inventory-panel p{color:#41404a}
#world-stage>#land-panel{background:rgba(39,43,67,.95)}
#world-stage>#farm-panel{background:rgba(38,62,51,.95)}
#world-stage>#friends-panel{background:rgba(39,43,67,.96)}
body.inside-shop #world-stage>footer,body.inside-shop #world-stage>section{display:none!important}
@media(max-width:700px){#world-stage>footer{top:5px;left:5px;right:5px;padding:5px;gap:4px;max-height:110px}#world-stage>footer button,#world-stage>footer select{font-size:11px;padding:5px;min-height:32px}#world-stage>footer input{width:68px}#world-stage>section:not([hidden]){top:120px;left:5px;width:calc(100% - 10px);max-height:calc(100% - 125px);padding:10px}}

/* Integrated open-world HUD */
body{background:#172c2d}main{max-width:none;margin:0;padding:0}main>header{position:fixed;z-index:1100;top:0;left:0;right:0;margin:0;border-radius:0;min-height:58px;padding:8px 14px}#world-stage,#touch,main>.note{display:none!important}#house3d{top:58px!important;z-index:1000}#house3d-toolbar{padding:5px 10px;gap:8px;max-height:78px;overflow:auto}#house3d-editor{right:12px!important;top:75px!important;left:auto!important;max-width:min(340px,calc(100vw - 24px));z-index:65!important}#friends-panel,#inventory-panel{position:fixed;z-index:1080;left:50%;top:calc(65px + env(safe-area-inset-top,0px));transform:translateX(-50%);width:min(94vw,650px);max-height:calc(100dvh - 90px);overflow:auto;box-shadow:0 0 0 100vmax #0007,0 12px 30px #0008;color:#243044}#friends-panel{background:#edf0f8;color:#273047}#inventory-panel{background:#eee9dc}#friends-panel[hidden],#inventory-panel[hidden],#office-panel[hidden]{display:none!important}#house3d-door-adjust,#house3d-door-tuning{display:none!important}@media(max-width:600px){main>header{font-size:12px;min-height:54px}#house3d{top:54px!important}#house3d-editor{top:65px!important}}

/* Phone launch control, bottom-right on desktop and touch devices */
#house3d-view button[aria-label="スマートフォンメニュー"]{right:6px!important;left:auto!important;bottom:150px!important;width:224px!important;height:284px!important;touch-action:manipulation}

#office-panel:not([hidden]){position:fixed;z-index:1090;left:50%;top:calc(70px + env(safe-area-inset-top,0px));transform:translateX(-50%);width:min(94vw,560px);max-height:calc(100dvh - 100px);overflow:auto;background:#eee9dc;color:#243044;padding:14px;border-radius:14px;box-shadow:0 12px 30px #0008}#office-menu-reopen{z-index:1090!important}

#office-panel:not([hidden]){background:linear-gradient(#fff8e8,#ffeef3)!important;border:3px solid #ffc4d6;border-radius:22px!important;color:#6b4a3a!important;box-shadow:0 14px 34px #0008}
#office-panel h3{margin:0 0 6px;text-align:center;font-size:20px;color:#e0719a}
.office-hello{text-align:center;font-weight:700;margin:4px 0 12px}
.office-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin-bottom:10px}
.office-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 8px;border:3px solid #fff;border-radius:20px;background:#ffd9e6;color:#6b4a3a;cursor:pointer;box-shadow:0 4px 0 #f2a9c3}
.office-card:nth-child(2){background:#d4ecff;box-shadow:0 4px 0 #9fcdf0}.office-card:nth-child(3){background:#fff0b8;box-shadow:0 4px 0 #ecd16f}
.office-card:active{transform:translateY(3px);box-shadow:none}
.office-card-icon{font-size:34px}.office-card strong{font-size:16px}.office-card small{color:#8a6a58}
.office-residents{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
.office-resident{display:flex;flex-direction:column;align-items:center;gap:3px;padding:10px 6px;border-radius:18px;background:#fff;border:2px dashed #ffb6cf}
.office-resident.done{background:#f1ecec;opacity:.8}.office-resident img{width:64px;height:76px;object-fit:contain}
.office-register{border:0;border-radius:14px;padding:6px 14px;background:#ff8fb3;color:#fff;font-weight:800;cursor:pointer}.office-register:disabled{background:#c9bfc3}
#office-panel .land-option{background:#fff;color:#6b4a3a;border:2px solid #ffc4d6;border-radius:14px}
#office-panel .office-job-card{background:#fff;border-radius:16px;padding:10px;margin:8px 0;border:2px solid #ffd9e6}
#office-close{display:block;margin:8px auto 0;border:0;border-radius:14px;padding:6px 22px;background:#ffb6cf;color:#fff;font-weight:800;cursor:pointer}

/* ===== Cute theme + layout (v7) ===== */
main>header{right:auto!important;width:max-content!important;max-width:100vw;gap:14px;border-radius:0 0 18px 0!important;background:linear-gradient(#fff0f5,#ffe3ee)!important;color:#6b4a3a!important;border-bottom:3px solid #ffc4d6;box-shadow:0 4px 14px #0004}
main>header strong{color:#e0719a!important}main>header small{color:#8a6a58!important;background:none!important}
main>header .stats{gap:8px}main>header .stats span{background:#fff!important;color:#6b4a3a!important;border:2px solid #ffd0df;border-radius:999px;padding:3px 10px}
#house3d-toolbar{top:calc(26px + env(safe-area-inset-top,0px))!important;background:rgba(255,244,248,.88)!important;color:#6b4a3a!important;border:3px solid #ffc4d6!important;border-radius:20px!important;box-shadow:0 6px 18px #0004}
#house3d-toolbar button,#house3d-toolbar select{background:#fff!important;color:#6b4a3a!important;border:2px solid #ffc4d6!important;border-radius:14px!important;font-weight:700}
#house3d-toolbar button:active{background:#ffe3ee!important}
#house3d-toolbar span,#house3d-toolbar summary,#house3d-status{color:#8a6a58!important}
#house3d-exit-floating{top:calc(26px + env(safe-area-inset-top,0px))!important;background:#fff0f5!important;color:#6b4a3a!important;border:3px solid #ffc4d6!important;border-radius:16px!important}
#house3d-editor{top:130px!important;background:linear-gradient(#fff8e8,#ffeef3)!important;color:#6b4a3a!important;border:3px solid #ffc4d6!important;border-radius:20px!important;box-shadow:0 8px 22px #0005}
#house3d-editor summary{color:#e0719a!important;font-weight:800}
#house3d-editor button,#house3d-editor select{background:#fff!important;color:#6b4a3a!important;border:2px solid #ffc4d6!important;border-radius:12px!important;font-weight:700}
#house3d-editor small,#house3d-editor p{color:#8a6a58!important}
#office-panel:not([hidden]){top:calc(120px + env(safe-area-inset-top,0px))!important;max-height:calc(100dvh - 140px)!important}
#friends-panel,#inventory-panel{top:calc(120px + env(safe-area-inset-top,0px))!important;max-height:calc(100dvh - 140px)!important;background:linear-gradient(#fff8e8,#ffeef3)!important;color:#6b4a3a!important;border:3px solid #ffc4d6;border-radius:22px!important;padding:16px;box-shadow:0 14px 34px #0008!important}
#friends-panel h3,#inventory-panel h3,#land-panel h3,#shop-panel h3,#farm-panel h3,#farm-storage-panel h3,#fishing-rod-panel h3,#facility-screen h3{color:#e0719a;text-align:center}
#friends-panel h4{color:#e0719a}#friends-panel p,#inventory-panel p{color:#8a6a58!important}
#friends-panel button,#inventory-panel button,#land-panel button,#shop-panel button,#farm-panel button,#farm-storage-panel button,#fishing-rod-panel button,#facility-screen button{background:#ffd9e6;color:#6b4a3a;border:2px solid #fff;border-radius:14px;font-weight:800;box-shadow:0 3px 0 #f2a9c3;cursor:pointer}
#friends-panel input{border:2px solid #ffc4d6;border-radius:12px;padding:6px 10px;background:#fff;color:#6b4a3a}
#land-panel .land-option,#shop-panel .land-option{background:#fff!important;color:#6b4a3a!important;border:2px solid #ffc4d6!important;border-radius:16px}
#land-panel small,#land-panel p{color:#8a6a58!important}#land-notice{color:#d2547f!important}
#shop-panel,#farm-panel,#farm-storage-panel,#fishing-rod-panel{background:linear-gradient(#fff8e8,#ffeef3)!important;color:#6b4a3a!important;border:3px solid #ffc4d6!important;border-radius:22px!important}
#house3d-view button[aria-label="スマートフォンメニュー"]{bottom:80px!important}
#house3d-view button[aria-label="スマートフォンメニュー"]+div{right:240px!important;left:auto!important;bottom:110px!important;background:linear-gradient(#fff8e8,#ffeef3)!important;color:#6b4a3a!important;border:3px solid #ffc4d6!important;border-radius:20px!important}
#house3d-view button[aria-label="スマートフォンメニュー"]+div button{background:#ffd9e6!important;color:#6b4a3a!important;border:2px solid #fff!important;border-radius:14px!important;box-shadow:0 3px 0 #f2a9c3}

#house3d-editor.office-fixed-hide{display:none!important}

/* logo header + phone stats (v9) */
main>header{background:none!important;border:0!important;box-shadow:none!important;padding:6px 10px!important;min-height:0!important}#game-logo{height:64px;width:auto;display:block;filter:drop-shadow(0 2px 4px #0006)}main>header .stats.phone-stats{display:flex;flex-direction:column;gap:5px;margin:0 0 10px}main>header .stats.phone-stats span,.phone-stats span{background:#fff!important;color:#6b4a3a!important;border:2px solid #ffd0df;border-radius:999px;padding:3px 10px;font-size:13px}
@media(max-width:600px){#game-logo{height:48px}}

/* v10 */
#friends-panel,#inventory-panel{top:50%!important;transform:translate(-50%,-50%)!important;max-height:80vh}#inventory-panel{zoom:1.5;max-height:52vh}.phone-stats{margin-bottom:18px!important}

/* v11 */
main>header .stats.phone-stats{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 14px}.phone-stats #phone-name{grid-column:1/-1;font-weight:800;font-size:15px;text-align:center}.phone-stats #status{grid-column:1/-1;text-align:center}.phone-stats span{text-align:center;white-space:nowrap}

.stats.phone-stats{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 14px}.stats.phone-stats span{background:#fff!important;color:#6b4a3a!important;border:2px solid #ffd0df;border-radius:999px;padding:4px 10px;font-size:13px;text-align:center}

/* お便りパネル・通知 */
#mail-panel{position:fixed;z-index:1080;left:50%;top:50%;transform:translate(-50%,-50%);width:min(94vw,560px);max-height:80vh;overflow:auto;background:linear-gradient(#fff8e8,#ffeef3);color:#6b4a3a;border:3px solid #ffc4d6;border-radius:22px;padding:16px;box-shadow:0 0 0 100vmax #0007,0 14px 34px #0008}
#mail-panel[hidden]{display:none!important}
#mail-panel h3{color:#e0719a;text-align:center;margin-top:0}
#mail-panel button{background:#ffd9e6;color:#6b4a3a;border:2px solid #fff;border-radius:14px;font-weight:800;box-shadow:0 3px 0 #f2a9c3;cursor:pointer;padding:8px 12px}
#mail-panel .mail-row{display:block;width:100%;text-align:left;margin:8px 0}
#mail-panel .mail-row small{display:block;font-weight:400;color:#8a6a58}
#mail-panel .mail-row.unread{background:#fff;border-color:#ff6b6b}
#mail-panel .mail-text{white-space:pre-wrap;word-break:break-word;background:#fff;border-radius:12px;padding:12px;margin-top:8px;line-height:1.7}
#mail-panel h4{color:#e0719a;margin:12px 0 2px}
@keyframes chibiNotifyPulse{0%,100%{box-shadow:0 0 0 3px #ff3b3b,0 0 6px #ff3b3b}50%{box-shadow:0 0 0 3px #ff3b3b,0 0 18px 4px #ff6b6b}}
@keyframes chibiPhonePulse{0%,100%{filter:drop-shadow(0 0 4px #ff3b3b)}50%{filter:drop-shadow(0 0 16px #ff3b3b)}}
.chibi-notify{outline:3px solid #ff3b3b;animation:chibiNotifyPulse 1.2s infinite}
.chibi-phone-notify{animation:chibiPhonePulse 1.2s infinite}
#album-panel,#profile-panel{position:fixed;z-index:1080;left:50%;top:50%;transform:translate(-50%,-50%);width:min(94vw,640px);max-height:80vh;overflow:auto;background:linear-gradient(#fff8e8,#ffeef3);color:#6b4a3a;border:3px solid #ffc4d6;border-radius:22px;padding:16px;box-shadow:0 0 0 100vmax #0007,0 14px 34px #0008}
#album-panel[hidden],#profile-panel[hidden]{display:none!important}
.album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:10px}
.album-cell{display:flex;flex-direction:column;gap:3px}
.album-cell img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:10px;border:2px solid #fff;cursor:pointer;background:#ddd}
.album-viewer{position:fixed;inset:0;z-index:1200;background:#000c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.album-viewer img{max-width:94vw;max-height:78vh;border-radius:10px}
.album-btn{padding:8px 14px;border:0;border-radius:9px;background:#d9e9f2;color:#172637;font-weight:bold;cursor:pointer;text-decoration:none;margin:0 4px;font-size:14px}
/* toolbar next to logo */
#house3d-toolbar .house3d-toolbar-heading,#house3d-toolbar #house3d-status{display:none!important}#house3d{top:0!important}#house3d-editor{top:133px!important}#house3d-toolbar{top:10px!important;left:190px!important;max-width:calc(100vw - 340px)!important}main>header{pointer-events:none}main>header .stats,main>header .stats *{pointer-events:auto}@media(max-width:650px){#house3d-editor{top:120px!important}#house3d-toolbar{top:8px!important;left:136px!important;right:115px!important;width:auto!important;max-width:none!important}}

/* shop/bank menu above 3D interior */
#shop-panel:not([hidden]){position:fixed;z-index:1090;left:50%;top:50%;transform:translate(-50%,-50%);width:min(900px,94vw);max-height:87vh;overflow-y:auto;padding:22px;box-shadow:0 0 0 100vmax #0008,0 16px 65px #0008;color:#6b4a3a}#shop-panel[hidden]{display:none!important}

#house3d-editor.house3d-furniture-panel{top:10px!important}@media(max-width:650px){#house3d-editor.house3d-furniture-panel{top:8px!important}}

/* 友達のワールド訪問中だけ表示する「自分のワールドへ戻る」ボタン */
#home-fab { position: fixed; z-index: 1200; left: 50%; transform: translateX(-50%); top: 64px; background: #ff8fb4 !important; color: #fff !important; border: 3px solid #fff !important; border-radius: 999px !important; padding: 8px 18px !important; font-weight: 800; font-size: 14px; box-shadow: 0 4px 12px #0006; cursor: pointer; touch-action: manipulation !important; }
#home-fab[hidden] { display: none !important; }
#friends-panel { max-height: calc(100dvh - 20px) !important; overflow: auto !important; }
#friends-close { position: sticky; top: 0; z-index: 5; }
@media (pointer:coarse) and (orientation:landscape) { #home-fab { top: 6px; left: 150px; transform: none; font-size: 12px; padding: 5px 12px !important; min-height: 0 !important; } #friends-panel { top: 6px !important; transform: translateX(-50%) !important; } }
/* PC: 上部の音量ゲージは外し、同じ位置に戻るボタンを表示（音量はスマホメニュー内） */
#house3d-bgm-wrap{display:none!important}
@media (pointer:fine){#home-fab{top:10px!important;left:200px!important;transform:none!important}}

/* 中身が空のツールバーの枠を消す(PC/スマホ共通)。出口ボタンは残す */
html body #house3d-toolbar{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;pointer-events:none!important;padding:0!important}
html body #house3d-toolbar>*{pointer-events:auto}
