:root{--bg:#292938;--ink:#f6e7cc;--world-ink:#f6e7cc;--world-panel:#383345;--world-button:#51475e;--world-track:#645366;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color-scheme:dark}
html,body{background:#292938}.pixel-game{background:#292938;min-height:560px;max-width:720px;margin:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:15px 22px max(16px,env(safe-area-inset-bottom));gap:18px;height:100dvh;overflow:hidden}
.pixel-header{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.pixel-header .name-button{font-family:inherit;font-size:1.25rem;font-weight:bold;color:#ffe5ac}.pixel-mark{color:#d6b1c3}.pixel-mark .icon{width:28px;height:28px}.header-tools{gap:12px}.pixel-header .round-button{width:34px;height:34px}.dew-balance{color:#f6e7cc}.pixel-status{width:100%;flex-shrink:0}.needs{gap:20px}.need{gap:7px;flex-direction:row}.need>.icon{color:#dec4c0;width:18px;height:18px}.need-track{width:48px;height:7px;border-radius:0;background:#534659}.need-track i{border-radius:0;background:#e8bd7d!important}.need:nth-child(2) .need-track i{background:#db92ae!important}.need:nth-child(3) .need-track i{background:#8dc8c9!important}.need:nth-child(4) .need-track i{background:#b4b0e1!important}
.pixel-room{position:relative;width:min(100%,540px,calc((100dvh - 235px)*1.09));aspect-ratio:240/220;flex-shrink:1;min-height:0;border:4px solid #655065;box-shadow:0 6px 0 #1f1f2e;overflow:hidden;background:#9dc8b5}.pixel-room canvas{width:100%;height:100%;display:block;image-rendering:pixelated;image-rendering:crisp-edges}.pixel-hit{position:absolute;background:none;border:0;padding:0;outline-offset:-4px;cursor:pointer}.pixel-hit:hover{background:#ffedce0a}.pet-hit{left:28%;top:37%;width:42%;height:43%}.bed-hit{left:72%;top:46%;width:24%;height:17%}.ball-hit{left:3%;top:69%;width:13%;height:13%}.pixel-hit:disabled{pointer-events:none}
.pixel-care{display:flex;justify-content:center;gap:12px;flex-shrink:0}.pixel-game .round-button{border:2px solid #786279;border-radius:8px;background:#514359;color:#ffe5ba;box-shadow:0 4px 0 #1c1c2b;transition:background .15s,transform .15s}.pixel-game .round-button:hover{background:#6c566e}.pixel-game .round-button:active{transform:translateY(3px);box-shadow:0 1px 0 #1c1c2b}.pixel-action{width:56px;height:50px}.pixel-action:nth-child(2){color:#efacc1}.pixel-action:nth-child(3){color:#9ad4d5}.pixel-action:nth-child(4){color:#c8bde8}.pixel-action.urgent{background:#a15f65;color:#fff0cb;border-color:#f4b88b;animation:attention 1.8s ease-in-out infinite}.pixel-nav{display:flex;justify-content:center;gap:18px;flex-shrink:0;margin-top:3px}.pixel-nav .round-button{width:38px;height:36px;background:transparent;border:0;box-shadow:none;color:#c5b1c3}.pixel-nav .round-button:hover{background:#514359}.pixel-nav .icon{width:21px;height:21px}.pixel-portrait{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.ancestor-pet,.friend-portrait{overflow:hidden}.enemy-3d-preview{display:flex;justify-content:center;align-items:center;height:220px}.enemy-3d-preview img{width:220px;height:210px;image-rendering:pixelated}.world-overlay,dialog{background:#383345;border:2px solid #756079;border-radius:12px;color:#f6e7cc}.overlay-shade{background:#151522aa}.world-overlay .round-button,dialog .round-button{background:#51475e;color:#f6dfbb;border-radius:8px}.world-overlay .sheet-name,.sheet-name,.sheet-subname,.rank-family,.ancestor-name,.friend-name,.input{color:#f0dfc4}.rank-row.mine,.rank-row:hover,.enemy-mini.selected{background:#55485f}.world-overlay .empty-symbol{color:#9c86a5}dialog::backdrop{background:#181522bb;backdrop-filter:none}.input::placeholder{color:#a68a9c}.icon-field{border-color:#7e657f}.auth-symbol{color:#e8c495}.overlay-top{color:#eed8bd}#toast{background:#6f9b89;color:#fff2d8;bottom:24px}#toast.pixel-error{border-radius:8px;width:max-content;max-width:calc(100vw - 32px);height:auto;min-height:45px;display:flex;gap:10px;padding:12px 16px;background:#865565;color:#fff0dd;font-size:.86rem}#toast.dew-feedback{background:#476c75;color:#e0f7ec;border-radius:8px}body[data-motion] .pixel-care .round-button{opacity:.5;pointer-events:none}.away .pixel-room{opacity:.35}.away .pixel-care,.away .pixel-nav,.away .pixel-status{pointer-events:none}
@keyframes attention{50%{border-color:#ffe4ab;box-shadow:0 4px 0 #1c1c2b,0 0 0 3px #f4b88b22}}
@media(max-width:420px){.pixel-game{padding-left:14px;padding-right:14px;gap:16px}.need-track{width:32px}.needs{gap:12px}.pixel-action{width:49px;height:48px}.pixel-care{gap:8px}.pixel-header .name-button{font-size:1.1rem}.header-tools{gap:7px}.dew-balance{font-size:.8rem}}
@media(max-height:620px){.pixel-game{gap:10px;min-height:450px}.pixel-room{width:min(100%,calc((100dvh - 210px)*1.09))}.pixel-action{height:42px;width:48px}}

/* Monochrome handheld shell, including sheets and native form controls. */
:root{color-scheme:light;--bg:#fff;--ink:#000;--world-ink:#000;--world-panel:#fff;--world-button:#fff;--world-track:#ddd}
html,body,.pixel-game{background:#fff;color:#000}body{filter:grayscale(1)}
.pixel-header .name-button,.pixel-mark,.dew-balance,.need>.icon,.pixel-game .round-button,.pixel-nav .round-button{color:#000}
.pixel-room{background:#fff;border:3px solid #000;box-shadow:4px 4px 0 #000}
.pixel-game .round-button{background:#fff;border-color:#000;box-shadow:0 3px 0 #000;color:#000;border-radius:3px}
.pixel-game .round-button:hover,.pixel-game .round-button:active{background:#000;color:#fff}
.pixel-nav .round-button{border:0;box-shadow:none;background:transparent}
.need-track{background:#fff;border:1px solid #000;height:8px}.need-track i,.need:nth-child(n) .need-track i{background:#000!important}
.pixel-action.urgent{background:#000;color:#fff;border-color:#000;animation:mono-attention 1.2s steps(2,end) infinite}
.world-overlay,dialog{background:#fff;border:2px solid #000;box-shadow:5px 5px 0 #000;color:#000;border-radius:3px}
.world-overlay *,dialog *{color:#000!important}.world-overlay .round-button,dialog .round-button{background:#fff;border:1px solid #000;border-radius:3px}
.rank-row.mine,.rank-row:hover,.enemy-mini.selected{background:#eee;border-color:#000}
.input{color:#000}.input::placeholder{color:#555}.icon-field{border-color:#000}
.overlay-shade,dialog::backdrop{background:#ffffffcc;backdrop-filter:none}
#toast,#toast.pixel-error,#toast.dew-feedback{background:#fff;color:#000;border:2px solid #000;border-radius:3px;box-shadow:3px 3px 0 #000}
@keyframes mono-attention{50%{background:#fff;color:#000}}
