/* Scheme A: original mobile texture slices, served only by the local resource endpoint. */
:root{--ink:#55331f;--shell:#ffe0a0;--rim:#96501d;--cream:#fff0c5;--purple:#82435b;--olive:#95511b;--wood-dark:#713514;--wood-light:#e8a941;--window-slice:11;color:var(--ink);background:#30271f}
body{padding:max(8px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom));background:radial-gradient(ellipse at 50% 0,#54412d 0,#30271f 65%);color:var(--ink)}
button,input,a{-webkit-tap-highlight-color:transparent}
button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #b93f43;outline-offset:2px}
button{touch-action:manipulation}
.console{width:min(100%,510px);padding:0;background:#ffdfa1;border:10px solid #96501d;border-image:url('/research-ui/window.png') var(--window-slice) stretch;border-radius:0;box-shadow:0 8px 24px #120d0877;image-rendering:pixelated}
.device-header{height:48px;padding:2px 5px 5px;gap:9px;color:#492712;letter-spacing:0;border-bottom:2px solid #bd7729;font-size:13px}
.console[data-mode=world] .device-header{height:36px;padding:2px 5px;gap:6px}
.console[data-mode=world] .menu-toggle{width:28px;height:28px;flex-basis:28px;border-width:4px;font-size:17px}
.header-content{display:flex;align-items:baseline;gap:6px;flex:1;min-width:0;line-height:1.25}
#world-tip{flex:1;min-width:0;margin:0;padding-inline-start:6px;border-inline-start:1px solid #bb864e;overflow:hidden;white-space:nowrap;font-size:11px;font-weight:500;color:#4f6137}
#world-tip-text{display:inline-block}
#world-tip[data-overflow] #world-tip-text{animation:header-tip-scroll var(--hint-duration) linear infinite}
@keyframes header-tip-scroll{0%,15%{transform:translateX(0)}85%,100%{transform:translateX(var(--hint-travel))}}
@media(prefers-reduced-motion:reduce){
  #world-tip[data-overflow]{overflow-x:auto;scrollbar-width:none}
  #world-tip[data-overflow] #world-tip-text{animation:none}
}
#mode-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.menu-toggle{margin-left:auto;flex:0 0 42px;width:42px;height:42px;padding:0;border:6px solid #a46020;border-image:url('/research-ui/button.png') 3 fill stretch;background:#d78b24;color:#633513;font-size:25px;line-height:1;box-shadow:none;image-rendering:pixelated}
.menu-toggle span{display:block;transform:translateY(-1px)}
.console[data-mode=world]>.asset-toolbar,.console[data-mode=world]>#game-settings,.console[data-mode=world]>.mission{display:none}
.asset-toolbar{padding:8px 5px 5px;gap:6px;color:#81562d;font-size:11px}
.asset-switch{background:#dfb473;border-color:#bc7e31;border-radius:0}
.asset-switch button{color:#694524;font-size:11px;min-height:30px;padding:4px 7px}
.asset-switch button.selected{color:#53331d;background:#fff0bf;box-shadow:1px 1px #a26c29}
.local-tag{font-size:10px;color:#8c653b}
.game-settings{margin:4px 5px 8px;border-color:#c48e43;background:#ffedbf;color:#694524;padding:4px 7px;gap:3px 12px}
.game-settings input{accent-color:#975026}
.game-settings>span{color:#967042;font-size:10px}
.screen-frame{padding:3px;margin:0;background:#743a15;border-radius:0;box-shadow:inset 0 0 0 1px #db942d}
.screen{aspect-ratio:1/1;width:100%;height:auto;border:1px solid #3c2a14;background:#b5cc83;isolation:isolate}
.screen canvas{width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none}
.toast,.fishing-result,.fishing-notice,.fishing-minigame{border:6px solid #a76325;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background:#ffedbd;color:#623b1e;box-shadow:2px 3px #54351544}
.screen[data-mode=world] .toast{bottom:40px;z-index:12;font-size:12px}
.fishing-notice{top:44px;z-index:12;padding:5px 10px;color:#8f3f16;background:#fff3a6}
.fishing-minigame{right:7px;bottom:12px;width:auto;height:80%;max-height:314px;aspect-ratio:104/314;z-index:11;padding:0;border:0;background:none;box-shadow:none;pointer-events:auto;touch-action:none;user-select:none}
.fishing-minigame canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.fishing-minigame #fishing-perfect{position:absolute;top:-18px;left:-10px;right:0;color:#fff494;font-size:18px;white-space:nowrap;text-shadow:2px 2px #753517;animation:perfect-glint .4s alternate infinite}
@keyframes perfect-glint{to{color:#aaff9c;transform:translateY(-2px)}}
.fishing-minigame>span,.fishing-result div>span{color:#83582e}
.reel-track{border-color:#a87539}.reel-progress{border-color:#b67b34;background:#b28b52}
.reel-progress>div{background:#79ad38}
.fishing-result{z-index:13;max-width:94%}
.fishing-catch-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}
.screen #catch-bubbles{position:absolute;inset:0;z-index:3;pointer-events:none}
.debug-fishing-parameters summary{cursor:pointer}
.debug-fishing-parameters label{display:grid;gap:4px;margin-top:6px;font-size:12px}
.debug-fishing-parameters input{box-sizing:border-box;width:100%;min-height:34px;padding:4px 6px;background:#fff0c5;color:#62391e;border:2px solid #bd8138;font:inherit;font-size:16px}
.tool-belt{margin:0;padding:8px 6px 5px;gap:3px;background:linear-gradient(#ffeab6,#ffdfa0);border-bottom:3px solid #ac6423}
.tool-choices{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.tool-choices button{position:relative;aspect-ratio:1/1;min-height:44px;width:100%;min-width:0;padding:6px 2px 4px;gap:3px;border:5px solid #a76725;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background-color:#ffe8af;background-image:url('/research-ui/slot.png');background-size:100% 100%;background-repeat:no-repeat;box-shadow:1px 2px #b57b3855;color:#63381b;image-rendering:pixelated}
.tool-choices button.selected{border-color:#b93425;background-color:#fff0bd;box-shadow:0 0 0 1px #b33024;font-weight:700}
.tool-choices button.selected::after{content:'';position:absolute;inset:-5px;z-index:1;background:url('/research-ui/slot-selected.png') 0 0/100% 100%;pointer-events:none;image-rendering:pixelated}
.tool-choices button:disabled{opacity:.78;filter:saturate(.85)}
.tool-choices .tool-name{display:none;font-size:10px;line-height:1.1;white-space:nowrap;color:#673d22}
.tool-choices .hoe-icon,.tool-choices .seed-icon,.tool-choices .watering-icon,.tool-choices .rod-icon{width:24px;height:24px;flex-basis:24px;background-size:504px 576px}
.tool-choices .hoe-icon{background-position:-120px -48px}
.tool-choices .watering-icon{background-position:-48px -336px}
.console[data-mode=world] .tool-choices .scythe-icon{display:block;width:32px;height:32px;flex:0 0 32px;background:url('/research-assets/scythe.png') center/contain no-repeat;image-rendering:pixelated}
.tool-choices .rod-icon{background-position:-408px 0}
.tool-choices .seed-icon{background-size:576px 936px;background-position:-384px -456px}
.hand-symbol,.backpack-icon{display:block;width:24px;height:24px;flex:0 0 24px;image-rendering:pixelated;background-repeat:no-repeat;background-position:center;background-size:contain}
.hand-symbol{position:relative;background-image:none}
/* The original 16px cursor has visible pixels only in its top-left 10px square. */
.hand-symbol::before{content:'';position:absolute;left:50%;top:50%;width:20px;height:20px;transform:translate(-50%,-50%);background:url('/research-ui/hand.png') 0 0/32px 32px no-repeat;image-rendering:pixelated;pointer-events:none}
.backpack-icon{background-image:url('/research-ui/backpack.png')}
.tool-choices .backpack-toggle{min-height:44px}
.tool-choices .tool-quantity{position:absolute;top:0;right:1px;max-width:calc(100% - 2px);overflow:hidden;text-overflow:ellipsis;margin:0;z-index:2;background:#fff0c9df;border-radius:1px;padding:1px 2px;font-size:9px;line-height:1.1;color:#6b3f21;font-weight:700}
.tool-status{display:flex;justify-content:center;align-items:center;gap:7px;min-height:23px;width:100%;font-size:11px;color:#774d28;text-align:center}
#tool-caption{font-weight:700;min-width:70px}
#auto-tool-note{padding:2px 6px;background:#fff1c8;border:1px solid #c9964e;color:#926032;font-size:10px}
.controller{position:relative;grid-template-columns:45% 15% 40%;height:176px;padding:8px 7px 4px;background:linear-gradient(100deg,#ffdfa0,#ffe9b6 45%,#ffdfa0)}
.controller,.controller *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.console[data-mode=world] .controller{grid-template-columns:49% 2% 49%}
.console[data-mode=world] .middle-buttons{visibility:hidden;pointer-events:none}
.console[data-mode=world] .controller::before{content:'';position:absolute;top:23px;bottom:20px;left:50%;border-left:1px solid #dba75e}
.dpad{width:clamp(132px,36vw,158px);height:auto;aspect-ratio:1;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);transform:none!important;justify-self:center;filter:drop-shadow(1px 3px 0 #9d582840)}
.dpad-key{position:static;width:100%;height:100%;border:6px solid #a76525;border-image:url('/research-ui/button.png') 3 fill stretch;background:#cb7c1d;box-shadow:none;display:grid;place-items:center;font-size:23px;color:#fff0b4;line-height:1;touch-action:none}
.dpad-key.up{grid-area:1/2}.dpad-key.left{grid-area:2/1}.dpad-key.right{grid-area:2/3}.dpad-key.down{grid-area:3/2}
.dpad-key::before{content:'';width:.65em;height:.55em;background:currentColor;clip-path:polygon(50% 0,100% 100%,0 100%)}
.dpad-key.left::before{transform:rotate(-90deg)}
.dpad-key.right::before{transform:rotate(90deg)}
.dpad-key.down::before{transform:rotate(180deg)}
.dpad-key:active,.dpad-key.pressed{border-image-source:url('/research-ui/button-active.png');box-shadow:none;background:#f2bb56;filter:brightness(.95)}
.dpad-center{position:static;grid-area:2/2;width:100%;height:100%;background:linear-gradient(#e4a441,#e4a441) center/11px 2px no-repeat,linear-gradient(#e4a441,#e4a441) center/2px 11px no-repeat #ad611c;z-index:0;box-shadow:inset 0 0 0 2px #d58d2e}
.middle-buttons{padding-top:4px;gap:5px}
.rotate-button{width:38px;height:38px;padding:6px;border:5px solid #a96525;border-image:url('/research-ui/button.png') 3 fill stretch;background:#eab45c;box-shadow:none}
.rotate-button svg{stroke:#6a3e20}
.middle-buttons>span{font-size:10px;color:#926236}
.export-button{margin-top:42px;color:#835327;border-color:#ba894b;font-size:10px}
.action-buttons{height:155px;width:min(100%,180px);justify-self:center}
.round-button{border:0;border-radius:0;background-color:transparent!important;background-image:url('/research-ui/control.png')!important;background-size:100% 100%!important;background-repeat:no-repeat!important;box-shadow:none!important;width:64px;height:64px;font-family:Georgia,"Times New Roman",serif;font-size:35px;color:#ffe1a0!important;image-rendering:pixelated;filter:drop-shadow(1px 3px 0 #81492744);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.round-button.a{top:6px;right:5px;border:0;box-shadow:none}
.round-button.b{top:72px;left:9px;width:58px;height:58px;font-size:32px;border:0;box-shadow:none}
.round-button:active,.round-button.held{transform:translate(1px,2px);filter:brightness(.9)}
.action-label{width:64px;color:#6b4021;font-size:12px;font-weight:700}
.a-label{top:74px;right:5px}.b-label{top:134px;left:6px}
.device-footer{height:auto;min-height:27px;padding:1px 6px 5px;margin:0;color:#956635;gap:7px;font-size:10px;text-align:center;background:#ffe0a0}
.device-footer button{flex:0 0 22px;width:22px;height:22px;border:1px solid #bb8a4b;color:#80552c;font-size:11px;background:#ffedbf;border-radius:0}
.mission{margin:5px 4px 0;padding:5px 6px;gap:6px;min-height:43px;border:5px solid #a96525;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background:#ffedbf;box-shadow:none}
.mission p{font-size:12px}.mission-icon{flex-basis:24px;width:24px;height:24px;background:transparent;color:#ad762b;border:0;font-size:23px}
.paper-button{background:#ffdfa0;border:5px solid #ad6c28;border-image:url('/research-ui/window.png') var(--window-slice) stretch;color:#62391e;box-shadow:1px 2px #b57b3833;padding:5px 7px;font-size:12px;min-height:36px;text-decoration:none;text-align:center;image-rendering:pixelated}
.paper-button:active{box-shadow:none}
.editor-heading{padding:0 4px;gap:6px}
.editor-heading h1{letter-spacing:.05em;text-shadow:1px 2px #5d421d}
.paper-tag{color:#73491f;background:#ffedbf;border-color:#b78a45;box-shadow:1px 2px #81531a44;font-size:11px}
.identity label{color:#5c3e24;text-shadow:0 1px #fff4c599}
.identity input{border-color:#a57535;background:#fff3cc;box-shadow:inset 0 2px #efd49c;border-radius:0;color:#55351f}
.pose-switch button{background:#ffdf9f;border-color:#af772f;color:#6f4924}
.pose-switch .selected{background:#bf822f;color:#fff4d1;box-shadow:inset 0 0 0 1px #e3b25e}
.identity p{color:#5e3d22;font-size:12px}
.preview-mark>span:first-child{color:#64421f;border-color:#c19857;background:#fff0c4df;border-radius:0}
.customizer{border:5px solid #a26527;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background:var(--cream);box-shadow:none}
.tabs{background:#f4ca7f;border-color:#c39851;padding:3px 3px 0;gap:3px}
.tabs button{background:#f7d68e;border-color:#c39851;color:#9a672f;font-size:13px;padding:6px 3px}
.tabs button[aria-selected=true]{background:var(--cream);color:#62421d;box-shadow:0 2px var(--cream)}
.tab-content{padding:3px 6px;scrollbar-color:#cea160 #ffedbd}
.option-row,.color-row{border-color:#e3c899}
.option-label,.color-row>label{color:#8e6537}
.stepper .step{border-color:#c2954e;background:#ffe5ad;box-shadow:inset 0 0 0 1px #fff3ca;color:#815021}
.stepper .quick-select{background:#fff0c3;border-color:#dec18e;box-shadow:none}
.stepper .quick-select:hover{background:#ffe3a0;border-color:#bd8d44}
.quick-select::after,.option-count,.color-note{color:#a07948}
.body-switch button{background:#ffe3aa;border-color:#c79d59;color:#765025}
.body-switch button.selected{background:#f0c777;border-color:#a56b24;box-shadow:inset 0 0 0 1px #fff3cb}
.color-swatches button{box-shadow:0 0 0 1px #c4a372;border-color:#fff6d8}
.color-swatches button.selected{box-shadow:0 0 0 2px #a25d23}
.color-picker{background:#ffdfa0;border-color:#c39851;color:#81521e}
.asset-loading{background:#ffebc4ee;color:#795326}
dialog{max-width:calc(100vw - 20px);border:10px solid #a26024;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background:#ffedbf;color:var(--ink);box-shadow:4px 7px 0 #39200d55;padding:16px;image-rendering:pixelated}
dialog::backdrop{background:#2f1d1277}
.popup-heading h2{color:#633a1f;font-size:18px}.popup-heading p{color:#9b7040}
.popup-close,.backpack-dialog .popup-close{width:40px;height:40px;flex:0 0 40px;background:url('/research-ui/close.png') center/30px 30px no-repeat;border:0;color:transparent;font-size:0;image-rendering:pixelated}
.choice-dialog,.backpack-dialog{width:min(calc(100vw - 20px),440px);padding:10px;gap:10px}
.choice-search-row input{background:#fff5d6;border-color:#c69958;color:#69472b;min-height:36px}
.choice-search-row>span,.choice-dialog .popup-note,.choice-number{color:#9a7547}
.choice-list{scrollbar-color:#c2995c #ffe2a8}
.choice-item{background:#ffe2aa;border-color:#cda364;color:#6f4729}
.choice-item.selected{background:#ffedbb;border-color:#b94030;box-shadow:inset 0 0 0 1px #fff6d7}
.choice-item canvas{max-width:100%;object-fit:contain}
.color-dialog{padding:10px;width:min(calc(100% - 20px),370px);max-width:calc(100% - 20px)}
.color-heading{background:#ffedbf}.color-heading h2{font-size:17px}
.color-dialog .color-actions .paper-button{height:38px;min-width:54px;padding:3px 5px;border-width:4px;font-size:13px}
.color-dialog .color-confirm{background:#ffe3a4}.color-dialog .color-cancel{background:#ffedbf}
.color-plane{border-color:#bf9451}
.rgb-fields label{color:#95703f}.rgb-fields input{background:#fff4d4;border-color:#c79d59;color:#633d24}
.color-sample{border-color:#9b7437}.hue-input::-webkit-slider-thumb{box-shadow:0 0 0 1px #a87939}
.backpack-list{gap:6px}
.backpack-slot{user-select:none;-webkit-touch-callout:none}
.backpack-slot{background:#ffe3aa;border:4px solid transparent;border-image:url('/research-ui/inventory-slot.png') 4 / 4px / 0 stretch;box-shadow:none;padding:2px 1px;height:87px}
/* Both 64px sources have 4px edges: preserve their corners and stretch only each edge. */
.backpack-slot[aria-pressed=true]{background:#ffedbd;border:4px solid transparent;border-image:url('/research-ui/inventory-selected.png') 4 / 4px / 0 stretch;box-shadow:none}
.backpack-slot-name{font-size:11px;color:#754c27}
.backpack-quantity{background:#ffedbedf;color:#754c27;font-size:11px;top:5px;right:5px}
.empty-slot{background-color:#efcc8c}
.backpack-detail{background:#ffe3ab;border-color:#d3a361;color:#754c27;margin:0;min-height:64px;padding:7px}
.backpack-detail-copy{flex:1;min-width:0}
.backpack-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:4px}
.backpack-detail-heading h3{margin:0;overflow-wrap:anywhere}
.backpack-actions{display:flex;gap:4px;flex:none}
.backpack-actions .paper-button{min-height:36px;min-width:44px;padding:2px 4px}
.backpack-footer,.backpack-empty{color:#9a7443}
.help-note{color:#987344}
.game-menu{width:min(calc(100vw - 24px),390px);max-height:88svh;overflow-y:auto;padding:12px;overscroll-behavior:contain}
.game-menu[open]{display:flex;flex-direction:column;gap:12px}
.menu-primary-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.menu-primary-actions .paper-button{margin:0;min-height:44px;display:grid;place-items:center;font-size:13px}
#menu-resume{grid-column:1/-1;background:#ffda91;font-weight:700}
.game-menu .menu-footnote{margin:0;font-size:10px;line-height:1.5;text-align:center;color:#a07a47}
@media(min-width:360px){.tool-choices button{padding:3px 1px}.tool-choices .hoe-icon,.tool-choices .seed-icon,.tool-choices .watering-icon,.tool-choices .rod-icon,.hand-symbol,.backpack-icon{width:32px;height:32px;flex-basis:32px}.tool-choices .hoe-icon,.tool-choices .watering-icon,.tool-choices .rod-icon{background-size:672px 768px}.tool-choices .hoe-icon{background-position:-160px -64px}.tool-choices .watering-icon{background-position:-64px -448px}.tool-choices .rod-icon{background-position:-544px 0}.tool-choices .seed-icon{background-size:768px 1248px;background-position:-512px -608px}}
@media(min-width:480px){.device-header{height:55px;padding:3px 8px 6px;font-size:15px}.menu-toggle{width:44px;height:44px;flex-basis:44px}.tool-belt{padding:10px 10px 5px}.tool-choices{gap:8px}.tool-choices button{padding:9px 3px 6px}.tool-choices .hoe-icon,.tool-choices .seed-icon,.tool-choices .watering-icon,.tool-choices .rod-icon,.hand-symbol,.backpack-icon{width:32px;height:32px;flex-basis:32px}.tool-choices .hoe-icon,.tool-choices .watering-icon,.tool-choices .rod-icon{background-size:672px 768px}.tool-choices .hoe-icon{background-position:-160px -64px}.tool-choices .watering-icon{background-position:-64px -448px}.tool-choices .rod-icon{background-position:-544px 0}.tool-choices .seed-icon{background-size:768px 1248px;background-position:-512px -608px}.tool-choices .tool-name{font-size:11px}.tool-status{min-height:27px;font-size:12px}.controller{height:195px;padding-top:10px}.dpad{width:176px}.action-buttons{height:171px;width:186px}.round-button.a{width:74px;height:74px;font-size:41px;right:5px;top:7px}.round-button.b{width:65px;height:65px;font-size:36px;top:84px;left:3px}.action-label{width:74px;font-size:13px}.a-label{top:85px;right:5px}.b-label{top:152px;left:-1px}.device-footer{font-size:11px;min-height:31px}.tabs button{font-size:15px;padding:8px 3px}.editor .identity p{font-size:13px}.world-tip{font-size:11px}}
@media(max-width:359px){body{padding:5px 4px 10px}.console{border-width:8px}.device-header{height:43px;gap:6px;font-size:11px;padding:1px 3px 4px}.menu-toggle{flex-basis:37px;width:37px;height:37px;font-size:22px;border-width:5px}.tool-belt{padding:6px 4px 3px}.tool-choices{gap:3px}.tool-choices button{border-width:4px;padding:4px 0 3px;gap:2px}.tool-choices button.selected::after{inset:-4px}.tool-choices .tool-name{font-size:9px}.tool-choices .hoe-icon,.tool-choices .seed-icon,.tool-choices .watering-icon,.tool-choices .rod-icon,.hand-symbol,.backpack-icon{width:20px;height:20px;flex-basis:20px}.tool-choices .hoe-icon,.tool-choices .watering-icon,.tool-choices .rod-icon{background-size:420px 480px}.tool-choices .hoe-icon{background-position:-100px -40px}.tool-choices .watering-icon{background-position:-40px -280px}.tool-choices .rod-icon{background-position:-340px 0}.tool-choices .seed-icon{background-size:480px 780px;background-position:-320px -380px}.tool-status{min-height:22px;font-size:10px}.controller{height:148px;padding:5px 2px 2px}.dpad{width:132px}.dpad-key{border-width:5px;font-size:21px}.action-buttons{height:138px}.round-button.a{width:56px;height:56px;font-size:31px;right:3px;top:5px}.round-button.b{width:51px;height:51px;font-size:28px;left:5px;top:67px}.action-label{width:56px;font-size:11px}.a-label{right:3px;top:64px}.b-label{left:3px;top:121px}.device-footer{font-size:9px;gap:5px;min-height:25px;padding:0 3px 3px}.asset-toolbar{gap:4px;padding:6px 3px 3px}.asset-toolbar>span:first-child{font-size:10px}.asset-switch button{font-size:10px;padding:4px 5px}.local-tag{font-size:9px}.game-settings{font-size:11px;margin:4px 3px 6px;padding:3px 5px;gap:2px 9px}.game-settings>span{font-size:9px}.mission p{font-size:11px}.mission .paper-button{font-size:11px;padding:4px}.paper-tag{font-size:10px;padding:2px 4px}.customizer{border-width:4px}.tabs button{font-size:12px;padding:4px}.tab-content{padding:2px 4px}.color-dialog .color-actions .paper-button{min-width:47px;font-size:12px}.color-heading h2{font-size:15px}.backpack-slot{height:78px}.backpack-slot-name{font-size:10px}}
/* Short phones keep the full square and every 44px D-pad target in view. */
@media(max-height:650px){
  body{padding-top:max(2px,env(safe-area-inset-top));padding-bottom:max(2px,env(safe-area-inset-bottom))}
  .console{width:min(100%,max(304px,calc(100svh - 252px)));border-width:8px}
  .console .device-header{height:40px;padding:1px 3px;gap:6px;font-size:11px}
  .console .menu-toggle{width:37px;height:37px;flex-basis:37px;font-size:22px;border-width:5px}
  .console .tool-belt{padding:3px 3px 2px;gap:0;border-bottom-width:2px}
  .console .tool-choices{gap:3px}
  .console .tool-choices button{padding:1px 0;border-width:4px;min-height:44px}
  .console .tool-choices button.selected::after{inset:-4px}
  .console .tool-choices .hoe-icon,.console .tool-choices .seed-icon,.console .tool-choices .watering-icon,.console .tool-choices .rod-icon,.console .hand-symbol,.console .backpack-icon{width:32px;height:32px;flex-basis:32px}
  .console .tool-choices .hoe-icon,.console .tool-choices .watering-icon,.console .tool-choices .rod-icon{background-size:672px 768px}
  .console .tool-choices .hoe-icon{background-position:-160px -64px}
  .console .tool-choices .watering-icon{background-position:-64px -448px}
  .console .tool-choices .rod-icon{background-position:-544px 0}
  .console .tool-choices .seed-icon{background-size:768px 1248px;background-position:-512px -608px}
  .console .tool-status{min-height:14px;height:14px;font-size:10px;line-height:14px;gap:4px}
  .console #auto-tool-note{font-size:9px;line-height:12px;padding:0 3px}
  .console .controller{height:134px;padding:1px 2px}
  .console .dpad{width:132px}
  .console .dpad-key{border-width:5px;font-size:21px}
  .console .action-buttons{height:132px}
  .console .round-button.a{width:56px;height:56px;font-size:31px;right:3px;top:0}
  .console .round-button.b{width:51px;height:51px;font-size:28px;left:5px;top:66px}
  .console .action-label{width:56px;font-size:11px;line-height:12px}
  .console .a-label{right:3px;top:59px}
  .console .b-label{left:3px;top:119px}
  .console .device-footer{display:none}
}

.screen[data-birthday-show=true] :is(.toast,.debug-dock,.world-chat){visibility:hidden}
.debug-dock{position:absolute;left:8px;bottom:8px;z-index:8;display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-width:calc(100% - 16px);max-height:calc(100% - 16px)}
.world-dock-buttons{display:flex;flex:0 0 auto;gap:6px}
.world-chat{position:absolute;right:8px;bottom:8px;z-index:8}
.debug-toggle{min-width:64px;min-height:44px;padding:4px 9px;font-size:12px;font-weight:700;flex:0 0 auto}
.debug-toggle[aria-expanded=true],.world-icon-button[aria-expanded=true]{background:#e8bd72}
.world-icon-button{display:grid;place-items:center;width:44px;height:44px;padding:0;flex:none}
.world-icon{display:block;width:32px;height:32px;background-repeat:no-repeat;image-rendering:pixelated}
/* Farm warp totem (object 688) and the ellipsis from the original emote atlas. */
.warp-icon{background-image:url('/research-assets/objects.png');background-size:768px 1248px;background-position:-512px -896px}
.chat-icon{background-image:url('/research-assets/emote-bubbles.png');background-size:128px 512px;background-position:-96px -320px}
.world-chat-bubbles{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4}
.world-chat-bubble{position:absolute;width:max-content;max-width:min(70%,15em);padding:4px 7px;border:2px solid #725239;background:#fff4d7;box-shadow:inset 0 0 0 1px #fffdf0,1px 1px #42251277;color:#52301d;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.world-chat-bubble::after{content:'';position:absolute;top:100%;left:clamp(3px,var(--bubble-tail),calc(100% - 9px));width:6px;height:5px;background:#fff4d7;border:solid #725239;border-width:0 2px 2px;box-shadow:1px 1px #42251277}
.debug-options{display:grid;gap:5px;width:164px;padding:7px;border:5px solid #a76725;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background:#ffedbf;box-shadow:2px 3px #56311666}
.debug-options .paper-button{min-height:44px;padding:5px 8px;font-size:13px;text-align:left}
.debug-page{display:grid;gap:5px}
.debug-destinations{grid-template-columns:repeat(2,minmax(0,1fr))}
.debug-dock[data-mode=teleport] .debug-destinations{grid-template-columns:1fr}
.debug-dock[data-mode=teleport] [data-debug-only]{display:none}
.debug-destinations .paper-button{margin:0;padding-inline:3px;font-size:12px;text-align:center}
.chat-dialog{width:min(400px,calc(100vw - 20px));max-height:calc(100dvh - 24px);padding:8px 10px 12px}
.chat-dialog .popup-heading{display:flex;align-items:center;justify-content:space-between}
#chat-messages{max-height:min(42dvh,240px);overflow:auto;margin:0 0 8px;padding:0;list-style:none}
#chat-messages:empty{display:none}
#chat-messages li{padding:5px 2px;border-bottom:1px solid #e2c68f;overflow-wrap:anywhere}
#chat-messages strong{margin-inline-end:8px;color:#855021}
#chat-form{display:flex;gap:6px}
#chat-input{flex:1;min-width:0;min-height:38px;padding:5px 8px;border:1px solid #b77d40;background:#fff6d7;color:var(--ink);font-size:16px}
#chat-empty,#chat-error{margin:4px 0 8px;font-size:13px}
#chat-error{color:#9c3827}

/* Axe menu sprite 215: tools.png (80,160,16,16). */
.tool-choices .axe-icon{display:block;width:24px;height:24px;flex:0 0 24px;background:url('/research-assets/tools.png') -456px -240px/504px 576px no-repeat;image-rendering:pixelated}
.backpack-control{position:absolute;top:14px;left:4px;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:5px solid #a76725;border-image:url('/research-ui/window.png') var(--window-slice) stretch;background:#ffe6ac;box-shadow:1px 2px #a8652944;image-rendering:pixelated;touch-action:manipulation}
.backpack-control .backpack-icon{width:32px;height:32px;flex-basis:32px}
.backpack-control .backpack-label{position:absolute;left:50%;top:39px;width:54px;transform:translateX(-50%);color:#6b4021;font-size:10px;font-weight:700;line-height:12px;text-align:center;white-space:nowrap;pointer-events:none}
.backpack-control .tool-quantity{position:absolute;top:-4px;right:-4px;max-width:32px;margin:0;padding:1px 2px;overflow:hidden;text-overflow:ellipsis;background:#fff0c9eb;border-radius:1px;color:#6b3f21;font-size:9px;line-height:11px;font-weight:700;pointer-events:none}
.console[data-mode=editor] .backpack-control{display:none}
.console[data-mode=world] .round-button.b{left:32px}
.console[data-mode=world] .b-label{left:29px}
@media(min-width:360px){.tool-choices .axe-icon{width:32px;height:32px;flex-basis:32px;background-size:672px 768px;background-position:-608px -320px}}
@media(min-width:480px){.console[data-mode=world] .round-button.b{left:40px}.console[data-mode=world] .b-label{left:36px}}
@media(max-width:359px){.tool-choices .axe-icon{width:20px;height:20px;flex-basis:20px;background-size:420px 480px;background-position:-380px -200px}.backpack-control{top:4px}.console[data-mode=world] .round-button.b{left:28px}.console[data-mode=world] .b-label{left:26px}}
@media(max-height:650px){.console[data-mode=world] .tool-choices .axe-icon{width:32px;height:32px;flex-basis:32px;background-size:672px 768px;background-position:-608px -320px}.console[data-mode=world] .backpack-control{top:4px}.console[data-mode=world] .round-button.b{left:28px}.console[data-mode=world] .b-label{left:26px}}

/* 六格一页，横向手势只翻页，不触发工具选择。 */
.tool-choices{display:grid;grid-auto-flow:column;grid-auto-columns:100%;grid-template-columns:none;gap:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-y;user-select:none;-webkit-user-select:none;overscroll-behavior-x:contain}
.tool-choices::-webkit-scrollbar{display:none}
.tool-page{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;min-width:0;padding:2px;scroll-snap-align:start;scroll-snap-stop:always}
.tool-choices button{touch-action:pan-y}
.tool-status{justify-content:space-between;gap:3px}
.tool-status>div{display:flex;justify-content:center;align-items:center;gap:6px;min-width:0;flex:1}
.tool-status>button{width:30px;height:24px;padding:0;border:1px solid #bd8135;background:#ffeab7;font-size:23px;line-height:20px;flex:0 0 30px}
.tool-status>button:disabled{opacity:.3}
.tool-choices .pickaxe-icon{display:block;width:24px;height:24px;flex:0 0 24px;background:url('/research-assets/tools.png') -120px -144px/504px 576px no-repeat;image-rendering:pixelated}
@media(min-width:360px){.tool-choices .pickaxe-icon{width:32px;height:32px;flex-basis:32px;background-size:672px 768px;background-position:-160px -192px}}
@media(max-width:359px){.tool-page{gap:3px}.tool-choices .pickaxe-icon{width:20px;height:20px;flex-basis:20px;background-size:420px 480px;background-position:-100px -120px}}
@media(max-height:650px){.tool-page{gap:3px}.tool-choices .pickaxe-icon{width:32px;height:32px;flex-basis:32px;background-size:672px 768px;background-position:-160px -192px}}


/* 头像木板与对话外框齐边；姓名按原图名牌区域居中。 */
.npc-dialogue{position:absolute;z-index:25;left:50%;right:auto;transform:translateX(-50%);bottom:8px;display:grid;grid-template-columns:minmax(0,1fr) calc(var(--portrait-panel-width,110px) - 8px);gap:0;align-items:stretch;width:var(--dialogue-width,96%);height:var(--dialogue-height,34%);min-height:0;max-height:none;padding:0;border:8px solid #aa6427;border-image:url('/research-assets/dialogue-frame.png') 13 12 12 14 fill stretch;background:#f9cf86;color:#62351d;image-rendering:pixelated;box-shadow:1px 3px #4d281b88;touch-action:manipulation}
.npc-dialogue-text{margin:0;align-self:stretch;height:100%;min-height:0;padding:0 7px 10px;font-size:clamp(13px,3.7vw,18px);line-height:1.6;overflow-y:auto;max-height:none;overflow-wrap:anywhere;scrollbar-width:thin}
.npc-dialogue-speaker{position:absolute;top:-8px;right:-8px;width:var(--portrait-panel-width,110px);height:calc(100% + 16px);background:url('/research-assets/dialogue-portrait-frame.png') center/100% 100% no-repeat}
.npc-dialogue-portrait{position:absolute;left:21.74%;top:8.25%;width:55.65%;height:65.98%;object-fit:contain;image-rendering:pixelated}
.npc-dialogue-name{position:absolute;top:81.44%;height:14.43%;left:5.22%;right:5.22%;display:grid;place-items:center;margin:0;padding:0;text-align:center;font-size:clamp(10px,2.7vw,14px);font-weight:700;line-height:1;white-space:nowrap}
.npc-dialogue-close{position:absolute;right:-8px;top:-36px;width:24px;height:24px;border:0;background:url('/research-ui/close.png') center/100% 100% no-repeat;image-rendering:pixelated}
.npc-dialogue-next{position:absolute;bottom:-1px;left:calc((100% - var(--portrait-panel-width,110px))/2 - 10px);width:24px;height:20px;padding:0;border:0;background:transparent;color:#8d4725;font-size:20px;line-height:18px}
.cake-question{position:absolute;z-index:26;inset:auto 2% 8px;display:grid;padding:1px 4px 3px;border:8px solid #aa6427;border-image:url('/research-assets/dialogue-frame.png') 13 12 12 14 fill stretch;color:#62351d;image-rendering:pixelated;box-shadow:1px 3px #4d281b88}
.cake-question p{margin:0 2px 5px;font-size:clamp(13px,3.8vw,18px);font-weight:700;line-height:1.4}
.cake-question button{min-height:36px;padding:4px 2px;border:1px solid transparent;border-radius:0;background:none;color:inherit;font:inherit;font-size:clamp(13px,3.6vw,17px);text-align:left;touch-action:manipulation}
.cake-question button.selected,.cake-question button:hover,.cake-question button:focus-visible{border-color:#a53619;outline:none}
.screen[data-dialogue-open=true] .debug-dock{z-index:40;top:8px;bottom:auto;flex-direction:column-reverse;max-height:calc(100% - 16px)}
.debug-options{min-height:0;flex-shrink:1;max-height:calc(100svh - 100px);overflow-y:auto}
.dialogue-layout-controls{padding:8px 10px;background:#ffedbf;border-bottom:3px solid #ac6423;display:grid;gap:5px;font-size:12px}
.dialogue-layout-controls label{display:grid;grid-template-columns:32px minmax(0,1fr) 36px;align-items:center;gap:7px;min-height:30px}
.dialogue-layout-controls input{width:100%;min-width:0;accent-color:#a35a23;touch-action:pan-x}
.dialogue-layout-controls output{text-align:right;font-variant-numeric:tabular-nums}
.dialogue-layout-controls>div{display:flex;justify-content:flex-end;gap:7px}
.dialogue-layout-controls .paper-button{padding:4px 8px;min-height:30px;font-size:12px}
.identity-badge{font-size:11px;white-space:nowrap;color:#80552b}
.identity-dialog,.mailbox-dialog{width:min(94vw,450px);max-height:88svh;padding:14px;border:10px solid #96501d;border-image:url('/research-ui/window.png') 11 fill stretch;background:#ffe7ad;color:#62351d;image-rendering:pixelated}
.identity-dialog .popup-heading,.mailbox-dialog .popup-heading{align-items:center;margin-bottom:12px;gap:8px}
.identity-dialog h2,.mailbox-dialog h2{font-size:20px;margin:0}
.identity-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.identity-choices button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:12px;border:6px solid #a96c2b;border-image:url('/research-ui/slot.png') 3 fill stretch;background:#f6d291;color:#62351d}
.identity-choices button[aria-pressed=true]{border-image-source:url('/research-ui/slot-selected.png')}
.identity-choices canvas{width:64px;height:88px;image-rendering:pixelated;background:transparent}
.identity-choices span{font-size:13px}
.mailbox-dialog[open]{display:flex;flex-direction:column;gap:10px}
.mailbox-dialog .popup-heading{margin:0}
.mailbox-list{display:flex;gap:6px;flex-shrink:0;overflow-x:auto;overscroll-behavior:contain}
.mailbox-list button{flex:0 0 auto;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 10px;font-size:13px;min-height:38px}
.mailbox-list button[aria-pressed=true]{border-image-source:url('/research-ui/button-active.png');font-weight:700}
.birthday-letter{min-height:150px;max-height:48svh;overflow-y:auto;overscroll-behavior:contain;padding:16px 15px;border:7px solid #bd8d48;border-image:url('/research-assets/letter-paper.png') 8 fill stretch;background:#fff4d2;line-height:1.85;font-size:15px;scrollbar-width:thin}
.birthday-letter h3{font-size:17px;margin:0 0 12px}
.birthday-letter p{white-space:pre-wrap;margin:0}
#mailbox-take{align-self:flex-end;min-height:40px;padding:6px 14px}
#mailbox-take:disabled{opacity:.65}
#mailbox-compose:not([hidden]){display:flex;flex-direction:column;gap:10px;min-height:0}
#mailbox-message{box-sizing:border-box;width:100%;min-height:120px;height:32svh;max-height:300px;resize:vertical;padding:14px;border:7px solid #bd8d48;border-image:url('/research-assets/letter-paper.png') 8 fill stretch;background:#fff4d2;color:#62351d;font:inherit;font-size:16px;line-height:1.85;user-select:text;-webkit-user-select:text;touch-action:auto}
.mailbox-signature{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px}
#mailbox-count{font-size:12px;color:#8c653d;white-space:nowrap}
#mailbox-send{align-self:flex-end;min-height:42px}
#mailbox-error{margin:0;color:#943724;font-size:14px}
@media(max-width:359px){.device-header{gap:5px}.identity-badge{font-size:10px}.mailbox-dialog,.identity-dialog{padding:10px}.birthday-letter{font-size:14px;padding:12px 10px}.identity-dialog h2,.mailbox-dialog h2{font-size:18px}}

/* 两种模式使用同样的屏幕、操作栏与手柄尺寸。 */
.console{--control-strip-height:clamp(88px,calc(16.667vw + 40px),128px)}
.console>.mission,.console>.device-footer{display:none}
.editor-heading #randomize{pointer-events:auto;flex:0 0 auto;min-height:28px;padding:3px 6px;margin-left:3px;border-width:4px;font-size:11px;text-shadow:none}
.character-toolbar,.tool-belt{height:var(--control-strip-height);min-height:0;margin:0;border-bottom:3px solid #ac6423;background:linear-gradient(#ffeab6,#ffdfa0)}
.character-toolbar{display:flex;align-items:center;justify-content:center;padding:8px 12px}
.console[data-mode=world] #character-toolbar{display:none}
.character-toolbar .middle-buttons{position:static;align-self:center;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:12px;padding:0;width:100%}
.character-toolbar #rotate{width:44px;height:44px;flex:0 0 44px}
.character-toolbar #rotate-label{display:none}
.character-toolbar #export{margin:0;padding:6px 12px;border:5px solid #ad6c28;border-image:url('/research-ui/window.png') var(--window-slice) stretch;font-size:12px;min-height:40px;color:#62391e}
.tool-belt{display:grid;grid-template-rows:minmax(48px,1fr) 24px;align-items:center;align-content:stretch;gap:2px}
.tool-choices{min-height:0;height:100%}
.tool-page{align-items:center;min-height:0;height:100%}
.tool-choices button{max-height:100%;aspect-ratio:auto;height:100%;min-height:40px}
.tool-status{height:24px;min-height:24px;line-height:1.2}
.controller,.console[data-mode=world] .controller{grid-template-columns:49% 2% 49%}
.controller>.dpad{grid-column:1}
.controller>.action-buttons{grid-column:3}
#game-menu .game-settings{margin:0;padding:7px 8px;gap:12px}
@media(max-height:650px){
  .console{--control-strip-height:82px}
  .console .tool-belt{grid-template-rows:minmax(44px,1fr) 24px;gap:2px}
  .console .tool-status{height:24px;min-height:24px;line-height:1.2}
}

.debug-music{display:grid;gap:6px;padding-top:6px;border-top:1px solid #c69856;font-size:12px;color:#71451f}
.debug-music select{width:100%;min-width:0;min-height:38px;padding:5px;border:2px solid #bd8138;background:#fff0c5;color:#62391e;font:inherit}
.audio-settings{display:grid;gap:8px;padding:10px 8px;margin-bottom:8px;border-bottom:2px solid #d29b58;color:#71451f}
.audio-settings label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:0 8px;font-size:14px}
.audio-settings output{min-width:4ch;text-align:right;font-variant-numeric:tabular-nums}
.audio-settings input{grid-column:1/-1;width:100%;min-width:0;height:32px;margin:0;accent-color:#a75b26;touch-action:pan-x}
.party-icon{display:block;width:24px;height:24px;flex:0 0 24px;background:url('/research-assets/objects.png') no-repeat;background-size:576px 936px;image-rendering:pixelated}
.candle-icon{background-position:-504px -72px}.firework-icon{background-position:-120px -888px}
.cake-icon{background-position:-120px -216px}
.firework-star-icon{background-position:-144px -888px}.firework-junimo-icon{background-position:-168px -888px}
.debug-check{display:flex;align-items:center;gap:7px;padding:7px 3px;color:#6f391b;font-size:13px;line-height:1.4;cursor:pointer}.debug-check input{width:18px;height:18px;margin:0;accent-color:#a75b26;flex-shrink:0}
#action-a{touch-action:manipulation}
.birthday-blow{position:absolute;z-index:7;bottom:10%;left:6%;width:88%;padding:16px 12px 10px;background:#ffedbf;border:6px solid #ae6728;border-image:url('/research-ui/window.png') 12 fill stretch;color:#71451f;text-align:center;box-shadow:3px 4px #57372255}
.birthday-blow .popup-close{position:absolute;right:5px;top:5px;width:28px;height:28px;min-height:0;padding:0}.birthday-blow>.party-icon{margin:0 auto 10px}.birthday-blow h2{margin:6px 0 15px;font-size:clamp(14px,3.8vw,19px);line-height:1.55;font-weight:600}.birthday-blow progress{width:85%;height:12px;accent-color:#8dba62}.birthday-blow p{margin:8px 0 0;font-size:12px;min-height:0;line-height:1.5}.birthday-blow p:empty{display:none}.birthday-blow a{display:inline-block;margin-top:9px;font-size:12px}.birthday-blow a[hidden]{display:none}
.party-quantity{position:absolute;right:2px;top:0;font-size:10px;color:#6f391b;text-shadow:1px 1px #fff1c0}
.world-nameplates{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.world-nameplate{position:absolute;display:block;padding:2px 5px;border:1px solid #eddfb45c;border-radius:2px;background:#35452eeb;color:#fff7dc;font-family:'Microsoft YaHei','PingFang SC',sans-serif;font-size:clamp(12px,3.4vw,15px);font-weight:600;line-height:1.2;white-space:nowrap}

.fishing-settings-dialog{width:min(370px,94vw);padding:18px;border:10px solid #a76725;border-image:url("/research-ui/window.png") var(--window-slice) stretch;background:#ffedbf;color:#71451f}
.fishing-settings-dialog .fishing-gifts-only{display:flex;gap:10px;min-height:44px;cursor:pointer}.fishing-gifts-only input{width:22px;height:22px;margin:0;accent-color:#b86722}
.multiplayer-dialog{width:min(410px,94vw)}
.multiplayer-dialog .popup-heading h2{margin:0}
#multiplayer-entry,#multiplayer-room{display:grid;gap:12px}
.multiplayer-row{display:flex;align-items:center;gap:8px;margin:0;font-size:13px}
.multiplayer-row :is(input,select){flex:1;min-width:0;min-height:42px;padding:6px 8px;border:2px solid #bd8138;background:#fff5d5;color:inherit;font:inherit}
.multiplayer-row input{text-transform:uppercase}
.multiplayer-row .paper-button{min-height:42px;white-space:nowrap;margin-left:auto}
.multiplayer-members{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.multiplayer-members li{padding:5px 8px;background:#f5d79c}
.multiplayer-status{margin:0 0 12px;color:#835520}
.fishing-settings-dialog form{display:grid;gap:18px}.fishing-settings-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.fishing-settings-dialog h2{margin:0;font-size:22px}.fishing-settings-dialog header button{width:36px;height:36px;border:0;background:url("/research-ui/close.png") center/contain no-repeat;font-size:0;image-rendering:pixelated}.fishing-settings-dialog label{display:grid;grid-template-columns:80px 1fr;align-items:center;gap:12px}.fishing-settings-dialog select{width:100%;min-height:42px;border:2px solid #bd8138;background:#fff5d5;color:inherit;font:inherit;padding:5px}.fishing-level{display:flex;align-items:center;gap:12px}.fishing-level input{min-width:0;width:100%;accent-color:#b86722}.fishing-level output{min-width:2ch;text-align:right}.fishing-settings-dialog .paper-button{min-height:44px}
.emote-wheel{position:absolute;width:0;height:0;z-index:9;pointer-events:none}
.emote-wheel button{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:39px;height:39px;padding:0;border:0;background:none;pointer-events:auto;touch-action:manipulation;cursor:pointer}
.emote-wheel button:is(:hover,:focus-visible) .emote-icon{transform:scale(1.15)}
.emote-icon{width:28px;height:28px;display:block;flex:none;background-image:url('/research-assets/emote-menu.png');background-size:252px 168px;background-repeat:no-repeat;image-rendering:pixelated}
.emote-label{position:absolute;left:0;top:74px;transform:translateX(-50%);white-space:nowrap;padding:2px 10px;background:#ffe4ac;border:3px solid #a66c39;color:#643816;font-size:12px}
.emote-editor form{display:grid;gap:9px;min-height:0}
.emote-slots{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px}
.emote-slots button,.emote-catalog button{display:flex;align-items:center;justify-content:center;min-width:0;min-height:38px;padding:2px;color:#613816;background:#ffdc9b;border:1px solid #bd863f;font:inherit;cursor:pointer}
.emote-slots button[aria-pressed=true],.emote-catalog button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #b64a27;background:#fff0c6}
.emote-catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;max-height:50svh;overflow:auto}
.emote-catalog button{justify-content:flex-start;gap:4px;font-size:12px;text-align:left}
.emote-action-badge{flex:none;order:1;margin-inline-start:auto;padding:1px 2px;border:1px solid #914725;background:#914725;color:#fff4d4;font-size:10px;line-height:1}
.emote-slots button{position:relative}
.emote-slots .emote-action-badge{position:absolute;right:0;top:0}
.emote-editor footer{display:flex;justify-content:flex-end}
