@import url('/woodland.css') layer(legacy);
@import url('/city-map.css') layer(legacy);
@import url('/world-map.css') layer(legacy);
@import url('/woodland-carved.css') layer(legacy);
@import url('/equipment.css') layer(legacy);
/* Approved 2026-10-26: broad wood facets, charcoal contours, quiet leaf accents.
   All new geometry lives here; legacy selectors cannot resize an individual view. */
:root{--base:#10282c;--panel:#0a2025;--text:#eee4cf;--muted:#aebdb2;--gold:#e6bd76;--cyan:#b5d9ce;--line:#64786d50;--edge:#a87a44;--carved-panel:url('/assets/ui-dark-fairytale-v1/painted-panel.png');--carved-tool:url('/assets/ui-dark-fairytale-v1/painted-tool.png');--carved-chat:var(--carved-panel);--wood-ink:#0a2025;--wood-brass:#c18b4d;--visible-height:100dvh}
html,body{background:#071317;color:var(--text)}
body{font-family:"PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif}
#game{--rail-width:clamp(360px,29vw,480px);--rail-reserve:0px;--play-width:calc(100% - var(--rail-reserve));--chat-width:clamp(280px,25vw,410px);width:100%;height:var(--visible-height);position:relative;overflow:hidden;background:#08191c}
#game.rail-open{--rail-reserve:calc(var(--rail-width) + 16px)}
.viewport{position:absolute;inset:0 var(--rail-reserve) 0 0;width:auto;height:100%}
#world{width:100%;height:100%;display:block}
.icon-art{image-rendering:auto}
.fairytale-glyph{overflow:visible;filter:drop-shadow(0 1px 1px #0004)}
button,input:not([type=checkbox]):not([type=range]),select{border:1px solid #897048;border-image:none;border-radius:6px;background:#0c252a;box-shadow:inset 0 1px 0 #afc0a60c;color:var(--text);min-height:44px;padding:6px 12px;font:inherit}
button{display:inline-flex;align-items:center;justify-content:center;gap:6px;touch-action:manipulation}
button:disabled{opacity:.42}
button:hover:not(:disabled){background-color:#1a3938;border-color:#d1a866}
button:is([aria-selected=true],[aria-pressed=true]),button.primary,a.primary{border-color:#e0b66e;background:#28564a;color:#fff0c6;outline:none;box-shadow:inset 0 0 0 1px #ecc78445}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #f5d79b;outline-offset:3px}
input:not([type=checkbox]):not([type=range]),select{background:#0c252a;font-size:16px}
input[type=range]{accent-color:#8fbeb1;width:100%;min-height:38px}
input[role=switch]{appearance:none;position:relative;flex:none;width:46px;height:26px;min-width:46px;border:1px solid #b8c0b1;border-radius:20px;background:#53615d;cursor:pointer}
input[role=switch]:before{content:'';position:absolute;width:20px;height:20px;left:2px;top:2px;border-radius:50%;background:#eee9d7;box-shadow:0 1px 3px #0007;transition:transform .12s}
input[role=switch]:checked{background:#659c77}input[role=switch]:checked:before{transform:translateX(20px)}
h2,h3{color:#eddbb0;font-family:"Songti TC","Noto Serif TC",serif;letter-spacing:.02em}h3{font-size:17px;margin:20px 0 10px;border-color:#89927642}
/* Constant full-height desktop rail; native top-layer modal on every phone view. */
#sheet-layer{position:absolute;inset:0;z-index:20;pointer-events:none;background:none}
#sheet-backdrop{display:none}
#sheet,#rail-underlay,.login-card,.death-card,#confirm-dialog,#atlas-dialog{border:18px solid transparent;border-image:var(--carved-panel) 115 / 20px stretch;background:#0a2025f7;background-clip:padding-box;border-radius:0;box-shadow:0 8px 28px #0007;box-sizing:border-box}
#sheet,#rail-underlay{position:absolute;left:auto;right:12px;top:max(12px,env(safe-area-inset-top));bottom:max(12px,env(safe-area-inset-bottom));width:var(--rail-width);height:auto;max-height:none;max-width:none;min-height:0;transform:none;animation:none;display:flex;flex-direction:column;padding:4px 0 2px;pointer-events:auto;overflow:visible;isolation:isolate}
#rail-underlay{z-index:20;pointer-events:none}
.woodland-crest{display:block;left:-30px;right:auto;top:-25px;width:55px;height:65px;background:url('/assets/ui-dark-fairytale-v1/painted-leaf.png') center/contain no-repeat;filter:drop-shadow(1px 2px 1px #0005);z-index:2;pointer-events:none}
#sheet:after,#rail-underlay:after,#desktop-chat:after{content:'';display:block;position:absolute;right:-25px;bottom:-20px;width:42px;height:48px;background:url('/assets/ui-dark-fairytale-v1/painted-leaf.png') center/contain no-repeat;transform:rotate(180deg);pointer-events:none;z-index:2}
#sheet .sheet-heading,#rail-underlay .sheet-heading{display:grid;position:relative;inset:auto;grid-template-columns:64px minmax(0,1fr) 64px;align-items:center;flex:none;min-height:54px;height:auto;padding:0 4px 8px;margin:0 0 8px;gap:0}
.sheet-heading h2,#sheet .sheet-heading h2{display:block;position:static;grid-area:1/2;margin:0;clip-path:none;width:auto;height:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-size:23px;line-height:1.4;justify-self:stretch}
#sheet .sheet-heading #sheet-close{position:static;grid-area:1/3;justify-self:end;width:44px;height:44px;min-width:44px;min-height:44px;padding:8px;border:0;border-image:none;border-radius:0;background:var(--carved-tool) center/100% 100% no-repeat;box-shadow:none;margin:0;z-index:2}
#sheet-close .icon,#confirm-close .icon{width:28px;height:28px}
#detail-back{grid-area:1/1;justify-self:start;max-width:64px;min-height:44px;border:0;background:transparent;padding:2px;font-size:11px;gap:3px}#detail-back .icon{width:17px;height:17px}
#menu-navigation{order:0;flex:none;min-height:53px;margin:0;padding:0 0 8px;gap:3px;background:transparent;border-bottom:1px solid #bd8d4d80}
#menu-tabs{display:flex;gap:3px;min-height:44px;padding:0;flex:1;min-width:0}
#menu-tabs button{flex:1 0 52px;width:auto;min-width:52px;min-height:44px;padding:4px 3px;border:1px solid #a27340;border-image:none;border-radius:5px;font-size:14px;white-space:nowrap;background:#0b2127}
#menu-tabs button[aria-selected=true]{background:#28594d;border-color:#e5b86c;box-shadow:inset 0 0 0 1px #e9c27e55}
#menu-navigation>button{min-width:36px;width:36px;padding:0;border:0;background:transparent}
.sheet-scroll{flex:1;min-height:0;overflow:auto;padding:12px 4px 6px;scrollbar-width:thin;scrollbar-color:#b68c55 #0b2529;overscroll-behavior:contain;touch-action:pan-y}
#sheet-scroll-cue{position:absolute;pointer-events:none;bottom:3px;left:25%;right:25%;height:8px;background:linear-gradient(transparent,#ceae6c55);border:0}
#panel-modal{border:0;padding:0;background:transparent;color:inherit;overflow:visible;width:min(820px,calc(100vw - 48px));height:min(760px,calc(var(--visible-height) - 48px));max-width:none;max-height:none;margin:auto;outline:0}
#panel-modal::backdrop,#confirm-dialog::backdrop,#atlas-dialog::backdrop{background:#020c12b8}
#panel-modal #sheet{position:relative;inset:auto;width:100%;height:100%;max-height:none;padding:4px 4px 2px}
#panel-modal:has([data-view=detail]),#panel-modal:has([data-view=settings]){width:min(570px,calc(100vw - 48px));height:min(720px,calc(var(--visible-height) - 48px))}
#panel-modal:has([data-view=town][data-service=dialogue]){height:min(630px,calc(var(--visible-height) - 48px))}
#game.overlay-open .hud-bottom{visibility:visible}
#confirm-dialog{width:min(440px,calc(100vw - 32px));max-width:none;padding:12px 12px 8px;overflow:visible;background:#0b2227;background-clip:padding-box}
#confirm-dialog h2{padding-right:48px;margin:8px 0 12px;font-size:22px}#confirm-dialog p{font-size:15px;line-height:1.8}
#confirm-close{position:absolute;right:0;top:0;width:44px;height:44px;min-width:44px;padding:7px;border:0;border-image:none;background:var(--carved-tool) center/100% 100% no-repeat}
/* HUD anchors to the live gameplay region, never underneath the rail. */
.hud-top{position:absolute;left:20px;right:calc(var(--rail-reserve) + 20px);top:calc(env(safe-area-inset-top) + 24px);height:auto;bottom:auto;gap:20px;align-items:flex-start;pointer-events:none;z-index:10}
.hud-top>*{pointer-events:auto}
.player-hud{position:relative;display:flex;flex:none;width:400px;max-width:calc(100% - 215px);height:102px;border:12px solid transparent;border-image:var(--carved-panel) 115 / 14px stretch;border-radius:0;background:#0a2025;background-clip:padding-box;padding:3px 8px 3px 107px;isolation:isolate}
.player-hud:after{display:none}
.hud-top .portrait{position:absolute;top:-19px;left:-16px;width:121px;height:121px;padding:12px;background:url('/assets/ui-dark-fairytale-v1/painted-ring.png') center/100% 100% no-repeat;border:0;border-radius:50%;box-shadow:none;overflow:hidden;isolation:isolate}
.hud-top .portrait:after{content:'';display:block;position:absolute;inset:9%;background:#0b2429;border-radius:50%;z-index:-1;border:0;width:auto;height:auto}
.hud-top .portrait .rabbit-portrait{width:100%;height:100%}.rabbit-portrait .icon-art{object-fit:contain;width:100%;height:100%}
.vitals{width:100%;min-width:0;align-self:center;padding:0}.vitals>strong{font-family:inherit;font-size:17px;line-height:1.2;margin-bottom:5px;color:#eee4cf}
.resource{gap:7px;margin:3px 0}.resource>span{font-size:15px;min-width:25px;font-weight:600}
.meter{height:20px;border:1px solid #4f6870;border-radius:4px;outline:none;background:#06151c;box-shadow:inset 0 1px 3px #0008}.meter i{background:linear-gradient(#df6d7c,#c74259)}.mp .meter i{background:linear-gradient(#70c6de,#3593b2)}.meter small{font-size:12px;line-height:18px;letter-spacing:.02em;color:#fff2db}
.map-hud{position:relative;flex:none;margin-left:auto;width:205px;height:205px;padding:9px;border:10px solid transparent;border-image:var(--carved-panel) 115 / 12px stretch;box-sizing:border-box;background:#0b2028;background-clip:padding-box;isolation:isolate;box-shadow:0 4px 10px #0005}
.map-hud:after{inset:-22px auto auto -23px;width:46px;height:50px;background:url('/assets/ui-dark-fairytale-v1/painted-leaf.png') center/contain no-repeat;z-index:2;transform:rotate(13deg)}
.map-hud:before{top:-8px;left:calc(50% - 6px);font-size:13px;color:#fff0ca;z-index:3}
#minimap{background:#07191e;border-radius:3px}
.minimap-actions{top:calc(100% + 16px);left:-10px;right:-10px;grid-template-columns:54px minmax(0,1fr);gap:12px}
.minimap-actions #map-open{position:static;width:54px;height:48px;min-height:44px;min-width:44px;justify-self:stretch;display:flex;padding:9px;background:var(--carved-tool) center/100% 100% no-repeat;border:0;border-image:none;border-radius:0;box-shadow:none}
.minimap-actions #map-open .icon{width:100%;height:100%}
.minimap-actions #map-options>summary{display:grid;grid-template-columns:minmax(0,1fr) 18px;gap:12px;min-height:48px;border:7px solid transparent;border-image:var(--carved-tool) 250 / 8px stretch;border-radius:0;background:#0b2227;background-clip:padding-box;padding:0 6px;font-size:16px}
.channel-chevron{width:8px;height:8px;border-width:0 2px 2px 0}
.map-options-panel{width:235px;border:14px solid transparent;border-image:var(--carved-panel) 115 / 16px stretch;background:#0b2429;background-clip:padding-box;padding:10px}
.hud-bottom{left:calc(var(--play-width) / 2);right:auto;bottom:50px;transform:translateX(-50%);width:clamp(300px,26vw,430px);padding:0;background:transparent;visibility:visible;z-index:10;transition:none}
.hud-tools-wrap{position:relative;display:flex;align-items:center;gap:8px;margin-bottom:14px;overflow:visible}
.hud-tools{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:8px;flex:1;min-width:0;margin:0}
.hud-tools button{position:relative;width:100%;height:auto;aspect-ratio:1;min-height:44px;min-width:44px;border:0;border-image:none;padding:11px;background:var(--carved-tool) center/100% 100% no-repeat;box-shadow:none;border-radius:0;isolation:isolate}
.hud-tools button:before{inset:11%;background:#0a2128;clip-path:polygon(10% 0,90% 0,100% 10%,100% 90%,90% 100%,10% 100%,0 90%,0 10%)}
.hud-tools button .icon{width:100%;height:100%}.tool-caption{display:none}
.hud-tools .hud-count{right:-3px;bottom:-4px;border:1px solid #aa8a55;background:#092128;font-size:10px;min-height:17px;border-radius:4px;padding:1px 3px}
#interact-button{position:relative;inset:auto;flex:none;width:52px;height:58px;min-width:44px;min-height:44px;padding:2px;border:0;background:transparent;border-radius:0;box-shadow:none;transform:rotate(5deg)}
#interact-button:before{display:none}#interact-button .icon{width:100%;height:100%}#interact-button:disabled{visibility:hidden;pointer-events:none}
#interact-button kbd{right:-2px;bottom:-4px;width:23px;min-width:23px;height:23px;border:1px solid #d4aa60;border-radius:4px;background:#0a2029;color:#f5e9c8;font:14px sans-serif}
.combat-row{width:100%;padding:0;margin:0;display:block}
.skill-bar{display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:10px;overflow:visible;width:100%}
.skill-bar button,.skill-bar button:first-child{position:relative;display:grid;place-items:center;border:0;border-image:none;background:#0a2028 url('/assets/ui-dark-fairytale-v1/painted-ring.png') center/100% 100% no-repeat;border-radius:50%;aspect-ratio:1;width:100%;height:auto;min-width:44px;min-height:44px;padding:10%;box-shadow:0 2px 5px #0005;overflow:visible}
.skill-bar button:before,.skill-bar button:after{display:none}.skill-bar button .skill-icon{width:100%;height:100%}
.skill-bar .skill-label{top:calc(100% + 22px);font-size:14px;left:-6px;right:-6px;text-align:center;line-height:20px;color:#f2e7d3;text-shadow:0 2px 3px #000}
.skill-bar kbd{position:absolute;bottom:-16px;left:50%;right:auto;transform:translateX(-50%);min-width:21px;height:22px;box-sizing:border-box;font:12px/18px sans-serif;border:1px solid #c79c57;border-radius:4px;background:#0a2028;padding:1px 4px;color:#f1e5c4}
.skill-bar .cooldown{border-radius:50%;inset:8%;font-size:17px;background:#030c12a8}
.empty-skill{opacity:.25;font-size:28px;color:#b7c1ae}
#desktop-chat{position:absolute;z-index:15;left:20px;bottom:22px;width:var(--chat-width);height:254px;border:15px solid transparent;border-image:var(--carved-panel) 115 / 17px stretch;background:#0a2025ed;background-clip:padding-box;padding:3px 1px 2px;box-shadow:0 4px 20px #0005;box-sizing:border-box}
#desktop-chat-content,#desktop-chat .chat-panel{height:100%;min-height:0}
#desktop-chat .chat-tabs{order:-2;gap:3px;padding:0 36px 8px 0;margin:0;min-height:44px;flex:none}
#desktop-chat .chat-tabs button{font-size:12px;min-height:36px;border:1px solid #9d7546;border-radius:5px;padding:3px 2px;background:#0b2227}
#desktop-chat-collapse{top:0;right:-2px;width:32px;min-width:32px;height:36px;min-height:36px;padding:0;border:0;background:none;font-size:25px}
#desktop-chat #chat-log{flex:1;min-height:0;overflow:auto;padding:3px;font-size:13px;border:0;background:transparent}
#desktop-chat #chat-log p{font-size:13px;line-height:1.6;padding:3px 0;margin:0;display:block}
#desktop-chat #chat-log .message-text{display:inline;margin-left:6px}#desktop-chat #chat-log time{font-size:10px}
#desktop-chat .chat-party-link{order:2;min-height:20px;height:20px;font-size:10px;border:0;padding:0}
#desktop-chat .chat-party-link button{min-height:20px;border:0;padding:0;background:none;font-size:10px}
#desktop-chat .chat-form{flex:none;padding:5px 0 0;margin:0;border-top:1px solid #82957833}
#desktop-chat #chat-text{height:38px;min-height:38px;font-size:13px;border:1px solid #9e7948;padding:4px 8px;border-radius:5px}
#desktop-chat .chat-compose button{width:42px;min-width:42px;height:38px;min-height:38px;padding:4px;font-size:12px;border:1px solid #b79156}
#chat-preview{left:20px;bottom:22px;width:var(--chat-width);height:48px;min-height:44px;border:10px solid transparent;border-image:var(--carved-panel) 115 / 12px stretch;background:#0a2025e8;background-clip:padding-box;padding:0 4px;font-size:12px}
#quest-tracker{right:calc(var(--rail-reserve) + 22px);top:calc(env(safe-area-inset-top) + 302px);width:242px;z-index:10;background:linear-gradient(90deg,transparent,#071b20a0);padding-left:10px;border:0;box-shadow:none}
#quest-tracker-body{max-height:min(220px,calc(var(--visible-height) - 550px))}
#quest-tracker .icon{width:22px;height:22px}#quest-tracker>summary{font-size:15px}
#navigation-status{left:calc(var(--play-width) / 2);bottom:255px;max-width:calc(var(--play-width) - 40px);width:auto;border-radius:6px;background:#0b2529ef;border:1px solid #b5975f;z-index:10}
#self-effects{left:24px;top:140px;z-index:10;max-width:calc(var(--play-width) - 255px)}
/* Content matches the live catalog. Cards keep quiet so the frame owns the style. */
.bag-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:0 0 12px;margin:0 0 8px;border-bottom:1px solid #89927635;min-height:38px;color:#e0d4b9;font-size:14px}
.inventory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.item-cell,.empty-slot{position:relative;min-width:0;width:100%;min-height:80px;aspect-ratio:1;border:1px solid #75857970;border-image:none;border-radius:7px;background:#0a2227;padding:7px 3px 16px;box-shadow:inset 0 1px 3px #0004;display:flex;align-items:center;justify-content:center}
.item-cell:before,.item-cell:after,.empty-slot:after{display:none}
.item-cell .item-art,.item-cell .item-icon .icon{width:54px;height:54px;max-width:100%}.item-cell>.item-icon{margin:0}
.item-cell small{display:none}.item-cell .count{right:4px;bottom:3px;top:auto;font-size:12px;color:#f0ead4;text-shadow:0 1px 2px #000;background:#071b21bd;border-radius:3px;padding:1px 3px;line-height:16px}
.item-cell .equipped{font-size:9px;left:3px;top:3px;color:#d8c189;background:#0b2229bd;padding:0 2px}
.item-cell[aria-pressed=true]{background:#21473f;border-color:#edbf6c;box-shadow:0 0 0 1px #e0b16680}
.empty-slot{opacity:.4;min-height:0}.empty-slot:before{content:'＋';font-size:22px;color:#73918855}
.detail-hero{gap:18px;padding:5px 0 15px;align-items:center;border-bottom:1px solid #7a8a6a55}
.detail-hero>.item-icon{flex:none;width:96px;height:96px;border:1px solid #8a835c;border-radius:7px;background:#0c282d}
.detail-hero .icon{width:78px;height:78px}.detail-hero h3{font-size:24px;margin:0 0 7px;border:0;padding:0}
.detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:14px 0}
.detail-stats>div{border:1px solid #71837350;border-radius:5px;flex-direction:row;justify-content:space-between;align-items:center;padding:9px;gap:5px;font-size:14px}
.detail-stats dd{font-size:15px;margin:0}.detail-actions{position:sticky;bottom:-6px;background:#0b2227;padding:12px 0 2px;margin-top:14px;border-top:1px solid #71837350}.detail-actions button{font-size:16px;min-height:46px}
.character-hero{gap:16px;margin:0 0 14px;align-items:center}.character-hero>.rabbit-portrait{width:100px;height:100px;border:0;padding:6px;background:url('/assets/ui-dark-fairytale-v1/painted-ring.png') center/100% 100% no-repeat}
.character-hero h3{font-size:21px;margin:0 0 3px;padding:0;border:0}.experience-meter{height:8px;border:1px solid #788573;background:#05171e;border-radius:4px;overflow:hidden;margin-top:7px}.experience-meter i{background:#d2b66b}
.character-paperdoll{position:relative;height:276px;margin:0 0 6px}.paperdoll-avatar{position:absolute;left:23%;right:23%;top:32px;bottom:25px;display:grid;place-items:center}.paperdoll-avatar img{width:100%;height:100%;object-fit:contain}.equipment-paperdoll{position:absolute;inset:0;display:block}.equipment-paperdoll button{position:absolute;width:25%;height:82px;min-height:82px;padding:3px 1px;gap:2px;background:#0b2428}.equipment-paperdoll button .icon{width:42px;height:42px}.equipment-paperdoll button>span{display:none}.equipment-paperdoll button>small{font-size:11px;color:#e3d6b9}.equipment-paperdoll [data-equipment-slot=main]{left:0;top:0}.equipment-paperdoll [data-equipment-slot=off]{left:0;top:94px}.equipment-paperdoll [data-equipment-slot=head]{left:0;top:188px}.equipment-paperdoll [data-equipment-slot=body]{right:0;top:0}.equipment-paperdoll [data-equipment-slot=feet]{right:0;top:94px}.equipment-paperdoll [data-equipment-slot=accessory]{right:0;top:188px}.equipment-paperdoll [data-equipment-slot=lantern]{left:37.5%;top:188px}.character-hero{justify-content:center;text-align:center}.character-hero>div{width:100%}
.character-derived{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;border:0;padding:0;margin:0 0 18px;background:none}.derived-stat{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:3px 5px;padding:7px 4px;border:1px solid #6c82664a;border-radius:5px;background:#122d2e}.derived-stat .icon{width:24px;height:24px;grid-row:1/3}.derived-stat span{font-size:10px}.derived-stat strong{font-size:13px}
.equipment-row{display:flex;gap:10px;min-height:48px;border-bottom:1px solid #7484693d;padding:3px 0}.stat-label{font-size:14px;gap:9px}.stat-label .icon{width:28px;height:28px}.equipment-row>strong{font-size:18px}.equipment-row>button{width:44px;height:44px;min-height:44px;font-size:23px;padding:0}
.equipment-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.equipment-grid button{border:1px solid #73856d77;border-radius:5px;min-height:94px;padding:5px 2px;gap:3px;background:#0a2227;display:flex;flex-direction:column}.equipment-grid button .icon{width:46px;height:46px}.equipment-grid button span,.equipment-grid small{font-size:11px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.equipment-grid button:disabled{opacity:.5}
.passive-card{background:#132e2d;border:1px solid #7e8c6944;border-radius:5px;padding:10px;gap:12px}.passive-card>.icon{width:44px;height:44px}.passive-card p,.passive-guide{font-size:12px;line-height:1.65}
.skill-subnav{display:flex;justify-content:flex-end;gap:6px;margin:10px 0}.skill-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:12px 0}.skill-tabs button{padding:4px 1px;min-width:0;font-size:12px}
.skill-level-list li{display:flex;gap:12px;padding:16px 0;border-bottom:1px solid #7e8b693a;align-items:flex-start}.skill-level-list>li>.skill-icon{flex:none;width:64px;height:64px;padding:7px;background:url('/assets/ui-dark-fairytale-v1/painted-ring.png') center/100% 100% no-repeat;border-radius:50%;box-sizing:border-box}.skill-level-list li>div{flex:1;min-width:0}.skill-level-list strong{font-size:16px}.skill-level-list p{font-size:13px;line-height:1.6;margin:7px 0}.skill-level-list small{font-size:11px;line-height:1.6}.skill-level-list li>button{min-width:56px;font-size:13px;padding:6px 8px}.skill-config{border:1px solid #7e8c6944;border-radius:5px;background:#102b2e;padding:12px;margin:12px 0}.skill-config label{font-size:12px;gap:5px}.skill-config select{min-width:0;width:100%}
#quests-body .item-list li,#npc-quests .item-list li{display:flex;gap:12px;align-items:flex-start;margin:0 0 10px;padding:14px 12px;border:1px solid #73886c55;border-radius:6px;background:#102b2d}.item-list strong{font-size:16px}.item-list small{font-size:12px;line-height:1.7}.quest-buttons{align-self:flex-end;gap:6px}.quest-buttons button{min-height:44px}
.auto-toggle{padding:12px;border:1px solid #75866b66;border-radius:6px;background:#122c2d}.auto-toggle small{font-size:12px}.auto-stock-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:8px 0}.auto-stock-grid>span{display:flex;align-items:center;gap:3px;border:1px solid #73866d55;border-radius:5px;padding:6px;font-size:13px}.auto-stock-grid .icon{width:38px;height:38px}
.priority-row{display:flex;gap:9px;min-height:48px;border:1px solid #687d6555;border-radius:5px;padding:4px 6px;margin:6px 0;background:#10292c}.priority-row .icon{width:32px;height:32px}.priority-row>strong{font-size:14px}.priority-row>button{width:36px;min-width:36px;height:36px;min-height:36px;padding:2px;font-size:17px}.supply-options>label{padding:12px 3px;min-height:62px;gap:14px;border-color:#81916d38;font-size:14px}.supply-options small{font-size:11px;line-height:1.6;margin-top:3px}
#sheet[data-view=auto] .help{font-size:12px;line-height:1.6;margin:8px 0}#sheet[data-view=auto] .priority-row{padding:4px 6px;min-height:48px}#sheet[data-view=auto] .priority-row button{min-height:36px;height:36px}#sheet[data-view=auto] .supply-options>label{min-height:60px;padding:10px 3px}#sheet[data-view=auto] h3{margin-top:18px}
#town-chrome{padding:4px 4px 9px;background:none;border-bottom:1px solid #81916d55;flex:none}#npc-navigation{min-height:44px;padding-bottom:6px}.service-tabs button{font-size:14px;background:#0b2227;border:1px solid #9b794a;border-radius:5px;min-height:44px;padding:4px 8px}.service-tabs .icon{width:22px;height:22px}
.npc-dialogue-hero{display:grid;grid-template-columns:170px 1fr;gap:24px;align-items:center;margin:8px 0 22px;padding:12px 0 18px;border-bottom:1px solid #7b8b6644}.npc-illustration{position:relative;overflow:hidden;width:170px;height:170px;background:#163234;border-radius:7px;border:1px solid #8a835c66}.npc-illustration img{position:absolute;top:0;left:0;height:170px;width:680px;max-width:none;image-rendering:auto;object-fit:fill}.npc-speech{background:#e4d0a7;color:#3c3228;padding:20px;border-radius:10px 7px 7px 2px;font-size:17px;line-height:1.8;box-shadow:0 2px 3px #0005}.npc-speech h3{color:#51402b;font-size:21px;margin:0 0 12px;border:0;padding:0}.npc-speech p{margin:0}.npc-actions button{flex:1;min-height:54px;font-size:16px}
#sheet[data-view=town][data-service=shop][data-npc-ready=true] .sheet-scroll{overflow:hidden;padding:10px 4px 3px}
.shop-layout{gap:12px}.shop-column,.two-columns>div{background:#10282b;border:1px solid #6e866650;border-radius:5px;padding:8px}.shop-column-heading{padding-bottom:8px;min-height:34px}.shop-product-grid{gap:7px}.shop-product{min-height:110px;font-size:13px;padding:7px 3px;gap:4px;border:1px solid #71837066;background:#0b2227}.shop-product .item-icon,.shop-product .item-icon .icon{width:48px;height:48px}.shop-product strong{font-size:12px}.shop-product small{font-size:11px}.shop-bag-grid .item-cell{min-height:80px}.shop-bag-grid .item-cell .item-art{width:48px;height:48px}
.shop-selected{padding:16px 4px;gap:9px}.shop-selected>.item-icon .icon{width:66px;height:66px}.shop-quantity{gap:5px;justify-content:center}.shop-quantity button,.shop-remove{min-width:44px;width:44px;min-height:44px;height:44px;border-radius:5px;padding:6px}.shop-quantity input{min-width:44px;width:55px;min-height:44px;height:44px;padding:2px;font-size:16px}.shop-footer{padding:12px 4px 2px;gap:12px;background:#0b2227;border-top:1px solid #81916d55;min-height:66px;flex:none}.shop-money{font-size:12px;gap:4px 12px}.shop-footer>button{min-width:100px;min-height:46px}.shop-line{gap:8px;padding:12px 0}.shop-line-main strong{font-size:13px}.shop-line-main small{font-size:11px}.shop-line>.item-icon{width:44px;height:44px}.shop-line>.item-icon .icon{width:38px;height:38px}
.warehouse-columns{gap:16px}.warehouse-columns .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:10px}.warehouse-columns .item-cell{min-height:72px;aspect-ratio:1}.warehouse-columns .item-art{width:42px;height:42px}.sticky-footer{background:#0b2227;border-top:1px solid #81916d55;z-index:2}.repair-list button{min-height:74px;background:#102a2e;border:1px solid #71856b66;gap:12px;padding:8px}.repair-list .icon{width:40px;height:40px}.repair-preview{background:#102a2e;border:1px solid #71856b66;border-radius:5px;padding:16px;font-size:16px}.repair-preview>.item-icon .icon{width:82px;height:82px}
.offer-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.offer-grid>section{border:1px solid #7e8e6b70;background:#102a2e;border-radius:6px;padding:12px;box-shadow:none}.trade-slot{background:#0b2227;border:1px solid #71856b66;border-radius:5px;aspect-ratio:1;min-height:0}.trade-slot .icon{width:44px;height:44px}.trade-slot small{font-size:10px}.trade-slot.empty-slot{min-height:0}.trade-active .trade-grid{gap:6px}.offer-gold{border:1px solid #7e8e6b70;border-radius:5px;padding:10px;font-size:16px}.offer-state{border-radius:4px;background:#23463d}.trade-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}.trade-compare>div{background:#16332e;border:1px solid #7c8b6955;border-radius:5px;padding:10px}.trade-compare strong,.trade-compare span{display:block}#trade-actions{background:#0b2227;border-top:1px solid #81916d55;padding:12px 0 0;gap:10px}
.trade-steps{display:flex;gap:28px;justify-content:center;list-style:none;counter-reset:trade;margin:0 0 16px;padding:0}.trade-steps li{counter-increment:trade;display:grid;gap:5px;justify-items:center;color:#87958b;font-size:12px}.trade-steps li:before{content:counter(trade);display:grid;place-items:center;border:2px solid #718473;border-radius:50%;width:32px;height:32px;font-size:20px;background:#183333}.trade-steps li.active{color:#edcb8c}.trade-steps li.active:before{border-color:#e7b76a;background:#79552d;color:#fff0c7}
#party-body ul{list-style:none;margin:10px 0;padding:0}#party-body li{padding:15px;border:1px solid #81916d44;border-radius:5px;margin:7px 0;background:#102b2d;line-height:1.7;font-size:14px}
.settings-portrait{width:118px;height:118px;margin:0 auto 20px;background:url('/assets/ui-dark-fairytale-v1/painted-ring.png') center/100% 100% no-repeat;border:0;padding:10px}.settings-portrait .icon{width:100%;height:100%}.inline-form{gap:10px}.inline-form label{min-width:0;font-size:14px}.inline-form button{min-height:46px}.settings-diagnostics{margin:22px 0;padding:10px 0;border-top:1px solid #81916d44}.settings-diagnostics summary{min-height:44px;cursor:pointer}.settings-diagnostics button{margin:12px 0}#logout{width:100%;min-height:46px;background:#733d38;border-color:#b87666;margin-top:22px}
.chat-panel{display:flex;flex-direction:column;min-height:0;height:100%}.chat-tabs{flex:none;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:0 0 12px;min-height:44px}.chat-tabs button{font-size:14px;min-height:44px;padding:4px}.chat-party-link{flex:none;min-height:44px;border-color:#81916d44;font-size:12px}#chat-log{flex:1;min-height:0;overflow:auto;padding:4px 6px;border:0;font-size:14px;line-height:1.7}#chat-log p{padding:9px 0;border:0;margin:0}#chat-log p:nth-child(even){background:#112d2d88;border-radius:5px}#chat-log time{font-size:11px;color:#9eadab}#chat-log strong{color:#d5bd83}#chat-log .message-text{display:block;margin:3px 0 0}.chat-form{padding:12px 0 2px;background:#0b2227;border-color:#81916d44;flex:none}.chat-compose{gap:8px}.chat-compose input{min-width:0;min-height:48px;font-size:16px}.chat-compose button{min-height:48px;min-width:60px;padding:6px 12px}
#atlas-dialog{width:min(1180px,calc(100vw - 48px));height:min(810px,calc(var(--visible-height) - 36px));padding:8px;max-width:none;max-height:none;background:#0b2227;background-clip:padding-box}.atlas-heading{padding:2px 4px 8px;border-bottom:1px solid #81916d55}.atlas-heading h2{font-size:26px}.atlas-heading p{font-size:12px}.atlas-heading button{border:0;background:var(--carved-tool) center/100% 100% no-repeat;width:44px;height:44px;padding:0;font-size:30px;color:#eee0b8}.atlas-content{grid-template-columns:minmax(0,1fr) 270px;gap:18px}.atlas-directory{gap:9px}.atlas-filters button{font-size:14px}.atlas-map-tools button{font-size:12px}#atlas-viewport{border:1px solid #78886a;border-radius:5px}#atlas-list>button{border:1px solid #71856b66;border-radius:5px;background:#102b2d;min-height:62px}#atlas-list strong{font-size:14px}
#notice.notice{position:absolute;z-index:95;top:calc(env(safe-area-inset-top) + 148px);left:24px;right:auto;width:min(340px,calc(var(--play-width) - 48px));max-height:210px;background:none;border:0;padding:0;margin:0;pointer-events:none;box-shadow:none;overflow:hidden}.notice-item{padding:10px 12px;background:#102b2ef2;border:1px solid #a88e58;border-left:3px solid #ceac67;border-radius:6px;box-shadow:0 4px 12px #0005;display:flex;gap:9px;color:#eae3d0;font-size:13px;line-height:1.6;margin:0 0 7px}.notice-symbol{font-size:19px;color:#e2be73}.notice-item[data-kind=success] .notice-symbol{color:#a1bf8a}.notice-item[data-kind=error]{border-left-color:#cb7f78}.notice-item[data-kind=warning]{border-left-color:#e0b663}
#system-notice{position:absolute;z-index:100;left:50%;top:14px;transform:translateX(-50%);width:min(560px,calc(100% - 32px));padding:12px;border:1px solid #ce8c78;background:#432d2cef;border-radius:6px;color:#ffe5cf;font-size:14px}
.death-card{position:absolute;z-index:40;width:min(460px,calc(100% - 40px));left:calc(var(--play-width) / 2);right:auto;top:50%;transform:translate(-50%,-50%);padding:24px 14px;background:#0b2227;background-clip:padding-box}.death-card h2{font-size:22px}.death-card p{line-height:1.8;font-size:14px}
.login-card{left:50%;right:auto;width:min(440px,calc(100% - 32px));padding:24px 20px;background:#0b2227f5;background-clip:padding-box}.login-card h1{font-family:"Songti TC","Noto Serif TC",serif;font-size:34px}.login-card .login-emblem{color:#c5ac73}.connection-line{z-index:99}
#rotate-hint{display:none}
@media(min-width:1000px) and (max-width:1199px) and (min-height:650px){
 #game{--rail-width:360px;--chat-width:270px}
 .hud-top{left:16px;right:calc(var(--rail-reserve) + 16px);gap:12px}
 .player-hud{width:325px;max-width:calc(100% - 177px);height:88px;padding-left:86px;border-width:10px}
 .hud-top .portrait{width:103px;height:103px;top:-17px;left:-14px;padding:10px}.vitals>strong{font-size:15px}.resource>span{font-size:12px;min-width:21px}.meter{height:18px}.meter small{font-size:11px;line-height:16px}
 .map-hud{width:165px;height:165px;padding:6px;border-width:9px}.minimap-actions{gap:7px;grid-template-columns:48px 1fr}.minimap-actions #map-open{width:48px}.minimap-actions #map-options>summary{font-size:13px;gap:8px;padding:0 3px}
 .hud-bottom{width:296px;bottom:48px}.hud-tools-wrap{gap:5px}.hud-tools{gap:5px}.hud-tools button{padding:8px}.hud-tools button .icon{width:100%;height:100%}#interact-button{width:44px;height:48px;min-width:44px}
 .combat-row{width:100%}.skill-bar{gap:7px}.skill-bar .skill-label{font-size:12px}.skill-bar kbd{font-size:11px}
 #desktop-chat{left:16px;bottom:22px;height:230px}.map-hud:before{top:-7px}.player-hud .resource{gap:4px}#quest-tracker{width:210px;top:270px;right:calc(var(--rail-reserve) + 18px)}
}
@media(max-width:999px),(max-height:649px){
 #game{--rail-reserve:0px;--rail-width:0px;--chat-width:0px}
 .hud-top{left:16px;right:16px;top:calc(env(safe-area-inset-top) + 18px);gap:14px}.player-hud{width:360px;max-width:calc(100% - 174px);height:88px;padding-left:88px;border-width:10px}.hud-top .portrait{width:103px;height:103px;left:-14px;top:-16px;padding:10px}.map-hud{width:160px;height:160px;padding:7px;border-width:9px}.minimap-actions{gap:8px;grid-template-columns:48px 1fr}.minimap-actions #map-open{width:48px}.minimap-actions #map-options>summary{font-size:13px;gap:8px;padding:0 4px}
 #panel-modal,#panel-modal:has([data-view]),#panel-modal:has([data-view=town][data-service=dialogue]){width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));height:calc(var(--visible-height) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-width:760px;max-height:none;margin:auto;top:var(--visible-top,0px)}
 #panel-modal #sheet{width:100%;height:100%;left:auto;right:auto;top:auto;bottom:auto;max-height:none;border-width:16px;border-image-width:18px;padding:3px 2px}
 #desktop-chat{display:none}#chat-preview{left:16px;bottom:202px;width:min(350px,calc(100% - 32px));font-size:12px;max-width:none}
 .hud-bottom{left:50%;bottom:36px;width:min(390px,calc(100% - 32px));visibility:visible}.hud-tools-wrap{gap:9px;margin-bottom:14px}.hud-tools{gap:8px}.hud-tools button{min-height:44px;padding:10px}.combat-row{width:100%}.skill-bar{gap:10px}.skill-bar kbd{display:none}.skill-bar .skill-label{top:calc(100% + 4px);font-size:13px}#interact-button{width:48px;height:54px;min-width:48px}#interact-button kbd{display:none}
 #quest-tracker{right:18px;top:252px;width:220px}#quest-tracker-body{max-height:180px}#self-effects{top:125px;max-width:calc(100% - 180px)}#notice.notice{top:calc(env(safe-area-inset-top) + 125px);left:16px;width:min(340px,calc(100% - 32px))}#navigation-status{left:16px;right:16px;transform:none;bottom:258px;width:auto;max-width:none;font-size:12px}#navigation-cancel{min-height:44px;padding:4px 7px;font-size:12px}.death-card{left:50%;width:min(440px,calc(100% - 32px))}
 .shop-quantity button,.shop-remove{min-width:44px;min-height:44px}
 .sheet-heading h2,#sheet .sheet-heading h2{font-size:22px}#sheet .sheet-heading{min-height:52px;margin-bottom:8px}
 #sheet[data-view=chat] .sheet-scroll{padding:8px 3px 4px;overflow:hidden}#sheet[data-view=chat] [data-panel-body=chat]{height:100%;min-height:0}
}
@media(max-width:599px){
 .hud-top{left:12px;right:12px;top:calc(env(safe-area-inset-top) + 16px);gap:10px}.player-hud{width:auto;flex:1;min-width:0;max-width:none;height:70px;padding:3px 3px 3px 59px;border-width:8px;border-image-width:11px}.hud-top .portrait{width:79px;height:79px;left:-13px;top:-13px;padding:8px}.vitals>strong{font-size:12px;margin-bottom:4px}.resource{gap:3px;margin:3px 0}.resource>span{font-size:10px;min-width:17px}.meter{height:13px;border-radius:3px}.meter small{font-size:9px;line-height:11px}.map-hud{width:104px;height:104px;padding:4px;border-width:7px;border-image-width:10px}.map-hud:before{font-size:10px;top:-6px;left:calc(50% - 4px)}.map-hud:after{top:-16px;left:-18px;width:32px;height:38px}.minimap-actions{left:-7px;right:-7px;top:calc(100% + 13px);gap:5px;grid-template-columns:44px 1fr}.minimap-actions #map-open{width:44px;height:44px;padding:7px}.minimap-actions #map-open .icon{width:100%;height:100%}.minimap-actions #map-options>summary{grid-template-columns:1fr 8px;min-height:44px;border-width:4px;border-image-width:6px;font-size:11px;padding:0 1px;gap:5px}.channel-chevron{width:5px;height:5px;border-width:0 1.5px 1.5px 0}.map-options-panel{width:220px}
 #panel-modal,#panel-modal:has([data-view]),#panel-modal:has([data-view=town][data-service=dialogue]){width:calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right));height:calc(var(--visible-height) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-width:none}
 #panel-modal #sheet{border-width:13px;border-image-width:17px;padding:2px 0}.woodland-crest{left:-21px;top:-18px;width:39px;height:45px}#sheet:after{width:34px;height:40px;right:-20px;bottom:-17px}
 #sheet .sheet-heading{grid-template-columns:52px minmax(0,1fr) 52px;min-height:52px;padding:0 0 8px;margin-bottom:8px}.sheet-heading h2,#sheet .sheet-heading h2{font-size:22px}#sheet .sheet-heading #sheet-close{width:44px;height:44px}
 #menu-navigation{min-height:52px;padding-bottom:8px}#menu-tabs{gap:3px}#menu-tabs button{font-size:12px;min-width:49px;flex-basis:49px;min-height:44px;padding:3px 2px}#menu-navigation>button{min-width:30px;width:30px}
 .sheet-scroll{padding:10px 3px 4px}.inventory-grid{gap:6px}.item-cell{min-height:68px;padding:5px 2px 14px}.item-cell .item-art,.item-cell .item-icon .icon{width:45px;height:45px}.item-cell .count{font-size:11px;line-height:14px;right:3px;bottom:2px}.bag-summary{font-size:12px;gap:6px}
 .hud-bottom{width:calc(100% - 30px);max-width:380px;left:50%;bottom:32px}.hud-tools-wrap{gap:7px;margin-bottom:13px}.hud-tools{gap:6px}.hud-tools button{padding:9px}.hud-tools button .icon{width:100%;height:100%}#interact-button{width:44px;height:48px;min-width:44px}.skill-bar{gap:8px}.skill-bar button,.skill-bar button:first-child{padding:10%;min-height:44px}.skill-bar button .skill-icon{width:100%;height:100%}.skill-bar .skill-label{font-size:11px;top:calc(100% + 4px)}#chat-preview{bottom:196px;left:12px;width:calc(100% - 24px);height:44px;border-width:8px;border-image-width:10px;font-size:11px}
 #quest-tracker{right:12px;top:195px;width:190px;background:linear-gradient(90deg,transparent,#071b2090)}#quest-tracker>summary{font-size:13px;gap:5px}#quest-tracker-body{max-height:min(160px,calc(var(--visible-height) - 430px))}.quest-tracker-description{font-size:11px}#quest-tracker .quest-tracker-title{font-size:12px}#quest-tracker .quest-tracker-objective{font-size:11px}#notice.notice{top:calc(env(safe-area-inset-top) + 105px);width:calc(100% - 140px);left:12px}.notice-item{font-size:11px;padding:7px 9px;gap:6px}#self-effects{top:100px;left:12px;max-width:calc(100% - 140px)}
 .skill-level-list li{gap:8px;padding:14px 0}.skill-level-list>li>.skill-icon{width:48px;height:48px;padding:5px}.skill-level-list li>button{min-width:48px;padding:4px;font-size:12px}.skill-level-list strong{font-size:15px}.skill-level-list p{font-size:12px}.skill-level-list small{font-size:10px}.skill-tabs{gap:3px}.skill-tabs button{font-size:11px}.character-hero>.rabbit-portrait{width:80px;height:80px}.character-hero h3{font-size:19px}.character-derived{gap:5px}.derived-stat{padding:6px 3px;grid-template-columns:20px 1fr}.derived-stat .icon{width:20px;height:20px}.derived-stat span{font-size:9px}.derived-stat strong{font-size:11px}
 .npc-dialogue-hero{display:flex;flex-direction:column;gap:13px;margin:4px 0 16px;padding:4px 0 14px}.npc-illustration{width:170px;height:170px}.npc-speech{width:100%;box-sizing:border-box;padding:17px;font-size:15px}.npc-speech h3{font-size:19px;margin-bottom:7px}.npc-actions{display:flex;flex-direction:column;gap:9px}.npc-actions button{width:100%;flex:none;min-height:50px}
 .shop-layout{gap:7px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.shop-column{padding:5px}.shop-product-grid{grid-template-columns:1fr;gap:7px}.shop-product{min-height:74px;display:grid;grid-template-columns:44px 1fr;padding:7px 5px;text-align:left;gap:3px}.shop-product>.item-icon{grid-row:1/3;width:40px;height:40px}.shop-product .item-icon .icon{width:40px;height:40px}.shop-product strong{font-size:11px;white-space:normal}.shop-product small{font-size:10px}.shop-selected>.item-icon .icon{width:54px;height:54px}.shop-footer{gap:5px;padding:9px 2px 2px}.shop-footer>button{min-width:68px;min-height:44px}.shop-money{font-size:11px;line-height:1.6}.shop-quantity{gap:3px;flex-wrap:wrap}.shop-quantity button{min-width:44px;width:44px}.shop-quantity input{min-width:38px;width:40px}.shop-line{flex-wrap:wrap}.shop-remove{margin-left:auto}.shop-line-main{flex:1;min-width:85px}.shop-bag-grid{grid-template-columns:1fr}.shop-bag-grid .item-cell{min-height:72px;aspect-ratio:1.3}
 .warehouse-columns{gap:7px}.warehouse-columns>div{padding:6px}.warehouse-columns .inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.warehouse-columns .item-cell{min-height:59px;padding:4px 0 12px}.warehouse-columns .item-art{width:36px;height:36px}.warehouse-columns h3{font-size:13px}.warehouse-columns small{font-size:10px}
 .offer-grid{gap:7px}.offer-grid>section{padding:6px}.trade-active .trade-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.trade-active .trade-slot{height:auto;min-height:58px;aspect-ratio:1}.trade-active .trade-slot .icon{width:36px;height:36px}.trade-compare{gap:7px}.trade-compare>div{padding:7px;font-size:11px}.trade-compare strong{font-size:13px}.trade-active #trade-status>.transaction-preview{font-size:10px}.trade-items{grid-template-columns:1fr}.offer-state,.offer-gold{font-size:11px}
 #atlas-dialog{width:calc(100vw - 16px);height:calc(var(--visible-height) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-width:13px;border-image-width:17px;padding:4px;top:var(--visible-top,0px)}.atlas-content{display:flex;flex-direction:column;gap:10px}.atlas-canvas-area{flex:0 0 43%;min-height:0}.atlas-directory{flex:1;min-height:0;gap:6px}.atlas-heading h2{font-size:21px}.atlas-heading{padding:0 2px 5px}.atlas-heading p{font-size:10px}.atlas-map-tools{flex-wrap:wrap}.atlas-map-tools button{min-height:44px;padding:4px 6px}.atlas-map-tools>div button{width:44px}.atlas-directory>label{display:none}#atlas-list strong{font-size:13px}#atlas-search{font-size:16px}#atlas-help{font-size:10px;line-height:1.5}
}
@media(max-height:560px){#panel-modal,#panel-modal:has([data-view]){height:calc(var(--visible-height) - 16px);top:var(--visible-top,0px)}#sheet .sheet-heading{min-height:50px}.sheet-scroll{padding-top:7px}.chat-party-link{display:none}.chat-form{padding-top:7px}.hud-top{top:10px}.hud-bottom{bottom:25px}.player-hud{height:68px}.map-hud{width:104px;height:104px}#atlas-dialog{height:calc(var(--visible-height) - 16px)}.atlas-content{display:grid;grid-template-columns:1fr 230px}.atlas-directory>label,#atlas-help{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}input[role=switch]:before{transition:none}}

#auto-stock{display:block}.auto-stock-title{display:block;font-size:14px;color:#e7cc94;margin-top:14px}.auto-stock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}.auto-stock-grid>span{display:flex;align-items:center;justify-content:center;gap:4px;padding:6px 3px;border:1px solid #74856b55;border-radius:5px;background:#0b2227}.auto-stock-grid .icon{width:36px;height:36px}.auto-stock-grid b{font-size:13px;color:#eee4cf}

/* Artwork is raster; these rules only position the delivered PNGs. */
.painted-glyph{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;overflow:hidden;flex:none;filter:drop-shadow(0 1px 1px #0004)}
.painted-glyph>img{display:block;width:100%;height:100%;object-fit:contain;max-width:100%}.painted-glyph>image{pointer-events:none}
.utility-glyph{display:grid;place-items:center;font-family:Arial,sans-serif;font-size:32px;line-height:1;color:#f0dfb8}.art-empty{opacity:.25;color:#b6c0a2;font-size:26px}
#sheet:after,#rail-underlay:after,#desktop-chat:after{border:0;border-image:none;box-shadow:none;left:auto;top:auto;outline:0;transform:rotate(180deg)}
#sheet .woodland-crest{display:block}
#menu-navigation{display:block}#menu-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;width:100%}#menu-tabs button{min-width:0;width:100%;font-size:14px}#menu-navigation>button{display:none}
.skill-bar button .skill-icon{width:100%;height:100%}.skill-bar button,.skill-bar button:first-child{padding:10%;background-color:#071b22}
.item-cell>.item-icon{width:88%;height:88%;max-height:88%;display:flex;align-items:center;justify-content:center}.item-cell .item-icon .icon,.item-cell .item-art{width:100%;height:100%;max-width:100%}
#sheet[data-view=inventory] .sheet-scroll{display:flex;flex-direction:column;overflow:hidden}[data-panel-body=inventory]{flex:1;min-height:0;height:100%}#inventory-body{display:flex;flex-direction:column;height:100%;min-height:0}.inventory-items{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 2px 8px}.inventory-grid{align-content:start}.inventory-grid>.item-cell{height:auto}
.inventory-preview{flex:none;display:grid;grid-template-columns:70px minmax(0,1fr);gap:8px 12px;margin-top:12px;padding:13px 10px 4px;border-top:1px solid #a68d5955;background:#112d2e}.inventory-preview>.item-icon{grid-row:1/3;width:70px;height:70px;background:#0a2229;border:1px solid #9c926455;border-radius:7px;padding:5px;box-sizing:border-box}.inventory-preview>.item-icon .icon{width:100%;height:100%}.inventory-preview h3{font-size:18px;margin:0 0 5px;padding:0;border:0;color:#e6c784}.inventory-preview p{font-size:12px;line-height:1.6;margin:0;color:#bfc7b2}.inventory-preview>button{grid-column:1/-1;width:100%;margin-top:3px;min-height:44px;font-size:15px}
@media(max-width:599px){#menu-tabs button{font-size:14px}#menu-navigation{min-height:54px}.item-cell{padding:5px 3px 15px}.inventory-preview{grid-template-columns:65px minmax(0,1fr);gap:7px 11px;padding:12px 8px 3px}.inventory-preview>.item-icon{width:65px;height:65px}.inventory-preview h3{font-size:17px}.inventory-preview p{font-size:11px}.inventory-preview>button{font-size:15px}}
/* Match the approved substantial carved band, not the rejected hairline frame. */
#sheet,#rail-underlay{border-width:22px;border-image-width:30px}
#panel-modal #sheet{border-width:22px;border-image-width:30px}
#sheet:after,#rail-underlay:after{right:-32px;bottom:-30px;width:55px;height:59px}
#sheet .woodland-crest{left:-35px;top:-31px;width:65px;height:70px}
.equipment-paperdoll button>.item-icon{display:flex;width:100%;height:46px;align-items:center;justify-content:center}
.equipment-paperdoll button>.item-icon .icon{width:46px;height:46px}
.equipment-paperdoll button>span:not(.item-icon){display:none}
#sheet .sheet-heading #sheet-close .utility-glyph,#confirm-close .utility-glyph{font-size:36px;width:100%;height:100%;line-height:1}
@media(max-width:599px){#panel-modal #sheet{border-width:19px;border-image-width:28px}#sheet .woodland-crest{left:-30px;top:-26px;width:51px;height:57px}#sheet:after{right:-28px;bottom:-26px;width:44px;height:49px}.equipment-paperdoll button>.item-icon{height:42px}.equipment-paperdoll button>.item-icon .icon{width:42px;height:42px}}
#notice.notice[popover]{position:fixed;inset:auto;top:calc(env(safe-area-inset-top) + 148px);left:24px;margin:0}
#system-notice[popover]{position:fixed;inset:auto;left:50%;top:14px;margin:0}
@media(max-width:999px),(max-height:649px){#notice.notice[popover]{top:calc(env(safe-area-inset-top) + 125px);left:16px}}
@media(max-width:599px){#notice.notice[popover]{top:calc(env(safe-area-inset-top) + 105px);left:12px}}
/* Counter typography sits on its own painted plaque, with a shared baseline. */
.item-cell .count{display:grid;place-items:center;right:2px;bottom:1px;top:auto;min-width:30px;width:30px;height:22px;box-sizing:border-box;padding:1px 3px 2px;border:0;border-radius:0;background:transparent url('/assets/ui-dark-fairytale-v1/painted-counter.png') center/112% 145% no-repeat;color:#f7e4b9;font-family:"Songti TC",Georgia,serif;font-size:13px;font-weight:700;line-height:1;letter-spacing:-.03em;text-align:center;text-shadow:0 1px 1px #211c17;box-shadow:none}
.item-cell .count-long{width:40px;min-width:40px;font-size:12px}
.item-cell .equipped{left:3px;top:3px;border:0;border-radius:3px;color:#e6d19c;font-size:10px;padding:1px 3px;background:#0a202bb8}
.inventory-preview>button.primary,.character-footer>button.primary,.gear-detail .detail-actions>button.primary{min-height:54px;border:0;border-image:none;background:transparent url('/assets/ui-dark-fairytale-v1/painted-primary.png') center/100% 160% no-repeat;border-radius:0;box-shadow:none;color:#392c1c;font-family:"Songti TC","Noto Serif TC",serif;font-size:18px;font-weight:700;text-shadow:0 1px 0 #fff0c855;padding:9px 16px}
.inventory-preview>button.primary:hover,.character-footer>button.primary:hover,.gear-detail .detail-actions>button.primary:hover{filter:brightness(1.06);background-color:transparent}
#sheet .sheet-heading h2>.icon{display:none}
@media(max-width:599px){
 #sheet:not([data-view=detail]) .sheet-heading h2{display:flex;align-items:center;gap:9px;grid-column:1/3;justify-self:start;max-width:100%;min-width:128px;width:max-content;box-sizing:border-box;text-align:left;padding:10px 18px 10px 14px;background:transparent url('/assets/ui-dark-fairytale-v1/painted-title.png') center/100% 125% no-repeat;color:#332d25;font-size:22px;line-height:1.4}
 #sheet .sheet-heading h2>.icon{display:inline-flex;width:29px;height:29px;flex:none}
 #sheet[data-view=detail] .sheet-heading h2{font-size:20px;text-align:center}
 .inventory-preview>button.primary,.character-footer>button.primary,.gear-detail .detail-actions>button.primary{font-size:17px;min-height:51px}
 .item-cell .count{width:29px;min-width:29px;height:21px;font-size:12px}.item-cell .count-long{width:38px;min-width:38px;font-size:11px}
}
/* Remove the retired portrait's optical offset before centering the new cutout. */
.hud-top .portrait>[data-icon]{position:static;inset:auto;display:flex;align-items:center;justify-content:center;width:100%;height:100%;transform:none}
#panel-modal,#panel-modal::backdrop{pointer-events:auto}
/* Match the compact illustrated priority rows in the approved hanging panel. */
.priority-number{display:grid;place-items:center;flex:none;width:25px;height:29px;box-sizing:border-box;background:transparent url('/assets/ui-dark-fairytale-v1/painted-counter.png') center/120% 170% no-repeat;font:600 14px/1 Georgia,"Songti TC",serif;color:#f0dcaf}
#sheet[data-view=auto] .priority-row>.skill-icon{width:31px;height:31px;flex:none}
@media(min-width:1000px) and (min-height:650px){
 #sheet[data-view=auto] .sheet-scroll{padding:8px 4px 4px}
 #sheet[data-view=auto] .auto-toggle{padding:7px 10px;min-height:51px;font-size:14px;line-height:20px}
 #sheet[data-view=auto] .auto-toggle small{font-size:11px;line-height:16px}
 #sheet[data-view=auto] h3{font-size:16px;line-height:20px;margin:9px 0 5px;padding:0;border:0}
 #sheet[data-view=auto] .auto-stock-title{font-size:13px;line-height:18px;margin-top:0}
 #sheet[data-view=auto] .auto-stock-grid{margin:5px 0;gap:6px}
 #sheet[data-view=auto] .auto-stock-grid>span{padding:5px 3px;height:47px;box-sizing:border-box}
 #sheet[data-view=auto] .range-label{font-size:13px;line-height:22px}
 #sheet[data-view=auto] #auto-radius{min-height:30px;height:30px;margin:0}
 #sheet[data-view=auto] .help{font-size:11px;line-height:16px;margin:4px 0}
 #sheet[data-view=auto] .priority-row{min-height:39px;height:39px;box-sizing:border-box;padding:2px 5px;margin:4px 0;gap:8px}
 #sheet[data-view=auto] .priority-row button{min-height:32px;height:32px;min-width:32px;width:32px;font-size:15px}
 #sheet[data-view=auto] .priority-row strong{font-size:13px}
 #sheet[data-view=auto] .supply-options>label{min-height:44px;padding:4px 3px;font-size:13px;line-height:18px;box-sizing:border-box}
 #sheet[data-view=auto] .supply-options small{font-size:10px;line-height:14px;margin-top:1px}
}
@media(pointer:coarse){#sheet[data-view=auto] .priority-row{height:auto;min-height:48px}#sheet[data-view=auto] .priority-row button{min-width:44px;width:44px;min-height:44px;height:44px}}
#game[data-layout=wide] #interact-button:not(:disabled){visibility:visible}

/* One five-column anchor for both rows; proximity must not shift the hotbar. */
.hud-tools-wrap{display:block}
.hud-tools,.skill-bar{gap:10px}
#interact-button{position:absolute;left:calc(100% + 12px);right:auto;top:50%;transform:translateY(-50%) rotate(5deg)}
.minimap-actions{align-items:stretch}
.minimap-actions #map-open{position:relative;isolation:isolate}
.minimap-actions #map-open:before{content:'';position:absolute;inset:12%;background:#0b252a;clip-path:polygon(12% 0,88% 0,100% 12%,100% 88%,88% 100%,12% 100%,0 88%,0 12%);z-index:-1;pointer-events:none}
.minimap-actions #map-open>[data-icon]{display:flex;width:100%;height:100%}
.minimap-actions #map-open .icon{width:100%;height:100%}
.minimap-actions #map-options>summary{box-sizing:border-box;height:48px;line-height:1;align-content:center;align-items:center}
.channel-chevron{margin-top:0}
#map-options[open] .channel-chevron{margin-top:0}
.map-options-panel{width:206px;padding:5px;border-width:12px;border-image-width:18px;display:grid;gap:3px}
#channel-select>[data-channel]{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;padding:5px 10px;width:100%;border:0;border-radius:4px;background:transparent;box-shadow:none;font-size:15px}
#channel-select>[data-channel] small{font-size:12px;color:#c5c8b5;white-space:nowrap}
#channel-select>[aria-checked=true]{background:#28564a;color:#f4d99d;box-shadow:inset 2px 0 #e1bd7b}
/* Unavailable actions use the same alpha as the torch, including their art. */
.hud-tools button:disabled,.skill-bar button:disabled{opacity:.42;filter:none}
.skill-bar button:disabled .icon{opacity:1}
/* The tracker body is text, not another stack of framed action cards. */
#quest-tracker{background:none}
#quest-tracker .tracked-quest{border:0;background:none;box-shadow:none;margin:0 0 12px;padding:0}
#quest-tracker-body button{border:0;border-image:none;background:none;box-shadow:none;border-radius:0;text-align:left;justify-content:flex-start;align-items:center;color:inherit;text-shadow:inherit;padding:3px 0;min-width:44px;width:100%;gap:6px;line-height:1.5}
#quest-tracker-body .quest-tracker-title{min-height:28px;color:#f0d69b;font-size:14px;font-weight:600}
#quest-tracker-body .quest-tracker-title small{font-size:11px;color:#c4d1c7;font-weight:400}
#quest-tracker-body .quest-tracker-objective{min-height:32px;font-size:13px;font-weight:400}
#quest-tracker-body .quest-tracker-objective>span{flex:1;min-width:0}
#quest-tracker-body .quest-tracker-objective small{display:block;font-size:11px;color:#c4d1c7}
#quest-tracker-body .quest-tracker-objective>b{font-size:12px;white-space:nowrap;color:#e8d39e}
#quest-tracker-body button:hover:not(:disabled){background:none;border:0;color:#fff0c2;box-shadow:none;text-decoration:underline;text-underline-offset:4px}
@media(min-width:1000px) and (min-height:650px){
 #desktop-chat,#chat-preview{width:min(var(--chat-width),calc((var(--play-width) - clamp(300px,26vw,430px)) / 2 - 36px))}
}
@media(min-width:1000px) and (max-width:1199px) and (min-height:650px){
 .hud-tools,.skill-bar{gap:7px}
}
@media(min-width:1000px) and (max-width:1099px) and (min-height:650px){
 #game.rail-open #desktop-chat{width:250px;bottom:250px;height:210px}
 #game.rail-open #chat-preview{width:230px;bottom:240px}
}
@media(max-width:999px),(max-height:649px){
 .hud-tools-wrap{padding-right:0}
 #interact-button{left:auto;right:0;top:-62px;transform:rotate(5deg)}
 .hud-tools,.skill-bar{gap:10px}
 #quest-tracker-body .quest-tracker-title,#quest-tracker-body .quest-tracker-objective{min-height:44px}
}
@media(max-width:599px){
 .hud-tools,.skill-bar{gap:8px}
 .minimap-actions #map-options>summary{height:44px}
 #interact-button{top:-55px}
 #quest-tracker-body .quest-tracker-title,#quest-tracker-body .quest-tracker-objective{min-height:44px}
 #quest-tracker-body .quest-tracker-title{font-size:12px}
 #quest-tracker-body .quest-tracker-objective{font-size:11px}
}
@media(hover:hover) and (pointer:fine){
 button:not(:disabled):hover{opacity:.88;filter:drop-shadow(0 0 2px #edd7a83d)}
 .hud-tools button:not(:disabled),.skill-bar button:not(:disabled),.minimap-actions #map-open,.minimap-actions summary,#interact-button:not(:disabled){transition:opacity .12s ease,filter .12s ease}
 .hud-tools button:not(:disabled):hover,.skill-bar button:not(:disabled):hover,.minimap-actions #map-open:hover,.minimap-actions summary:hover,#interact-button:not(:disabled):hover{opacity:.84;filter:drop-shadow(0 0 3px #edd7a85c);background-color:transparent;box-shadow:none}
 .minimap-actions summary:hover{background-color:#0b2227}
}
@media(prefers-reduced-motion:reduce){.hud-tools button,.skill-bar button,.minimap-actions #map-open,.minimap-actions summary,#interact-button{transition:none}}
