@font-face{font-family:EmberfallSerif;src:url('./assets/fonts/emberfall-serif.woff') format('woff');font-weight:400;font-display:swap}
:root{--ink:#30261f;--muted:#60513f;--gold:#745022;--paper:#f3e7ca;--line:#987c5366;--game-font:EmberfallSerif,'Noto Serif TC','Songti TC',serif}
html,body,#game,#game *{font-family:var(--game-font)!important}#game input,#game select,#game textarea{font-size:16px}
#game .panel-content p{font-size:16px;line-height:1.65}#game .panel-content small,#game .panel-content label,#game .tip{font-size:14px!important;line-height:1.55}
#game button{transition:filter .12s,translate .12s,scale .12s;touch-action:manipulation}#game button:active,#game button.button-pressed{translate:0 2px;scale:.97;filter:brightness(1.18)}#game button:focus-visible{outline:3px solid #c88035;outline-offset:3px}
#game button.raster-button{background:var(--raster-button) center/100% 100% no-repeat!important;color:transparent!important;text-shadow:none!important;border:0!important;box-shadow:none!important;min-height:42px;opacity:1!important}
#game button.raster-button *{color:transparent!important;text-shadow:none!important}#game button.raster-button:disabled{filter:saturate(.25);cursor:not-allowed}
#game button.illustrated-control:not(.talent-node){background-image:var(--control-plate)!important;background-size:100% 100%!important;background-color:#142631!important;color:#fff0cf!important}
#game button.illustrated-control:not(.talent-node) b,#game button.illustrated-control:not(.talent-node) strong,#game button.illustrated-control:not(.talent-node) small,#game button.illustrated-control:not(.talent-node) span{color:#fff0cf!important}
#game .attribute-icon{display:inline-block;flex:none;width:32px;height:32px;vertical-align:middle;margin-right:6px;background-image:url('./assets/ui30-attribute-atlas.webp');background-size:300% 200%;border-radius:50%;box-shadow:0 0 0 1px #b69656}
.attribute-icon-0{background-position:0 0}.attribute-icon-1{background-position:50% 0}.attribute-icon-2{background-position:100% 0}.attribute-icon-3{background-position:0 100%}.attribute-icon-4{background-position:50% 100%}.attribute-icon-5{background-position:100% 100%}
#game .point-row b{display:flex;align-items:center}#game .point-row small{font-size:13px!important}
/* Light surfaces use ink, dark surfaces use ivory. Rarity keeps hue at readable luminance. */
#game .panel-content,#game .action-card,#game .item-card,#game .fx-card{color:#30261f}
#game :is(.panel-content,.action-card,.item-card,.fx-card) :is(p,small,span,dt,dd,label,li,td,summary){color:#51412f}
#game :is(.panel-content,.action-card,.item-card,.fx-card) :is(h3,h4,b,strong,th){color:#36291e}
#game :is(.panel-content,.item-card) .common{color:#484a42!important}#game :is(.panel-content,.item-card) .crafted,#game .positive{color:#17604a!important}#game :is(.panel-content,.item-card) .set{color:#434e9b!important}#game :is(.panel-content,.item-card) .boss{color:#7b4716!important}#game :is(.panel-content,.item-card) .unique{color:#7b357d!important}#game .negative{color:#922f29!important}
#game .tip,#game .muted,#game .version-note{color:#60513f!important}
#game .npc-speech,#game .npc-speech p{background-color:#15212e;color:#fff0d0!important}#game .npc-speaker strong{color:#fff1ce!important;text-shadow:0 2px 4px #10151e}
#game :is(.welcome,.toast,.banner,.lesson-hud,.battle-track,.hero-hud,.boss-hud,.event-feed,.navigation) :is(p,small,b,strong,span){color:#fff0d2}
#game .world-card,#game .skill-card,#game .advance-card,#game .forge-option,#game .detail,#game .empty-state{background:#eee0bf;color:#382b21;border-color:#a58c62}
#game .world-card .eyebrow,#game .world-meta,#game .detail .description{color:#5d4933}
#game :is(select,input,textarea){background:#fff1d4;color:#33271e;border:1px solid #93784e}#game option{color:#33271e;background:#fff1d4}
#game #panel.skills-panel{width:min(1080px,97vw);height:min(820px,calc(100dvh - 96px));max-height:calc(100dvh - 96px);overflow:hidden}
#game #panel.skills-panel>.panel-content{padding:12px;overflow:hidden;flex:1;min-height:0}
#game .skill-workbench{display:grid;grid-template-columns:170px minmax(0,1fr);gap:16px;height:100%;min-height:0}
#game .skill-side-nav{display:flex;flex-direction:column;gap:8px;border-right:1px solid #a78b61;padding-right:12px;overflow:auto;overscroll-behavior:contain}
#game .skill-nav-heading{display:flex;align-items:center;gap:3px;padding:4px 0 12px;font-size:16px}#game .skill-nav-heading .attribute-icon{width:27px;height:27px}
#game .skill-side-nav .skill-nav-child{margin-left:14px;width:calc(100% - 14px);min-height:48px;padding:10px 6px;font-size:15px}
#game .skill-side-nav .skill-nav-advance{margin-top:16px;min-height:48px;padding:10px 6px}#game .skill-side-nav button[aria-current=page]{outline:2px solid #bc8d40;outline-offset:1px}
#game .skill-workspace{display:flex;flex-direction:column;overflow:hidden;min-width:0;min-height:0}#game .skill-workspace-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;margin-bottom:6px}#game .skill-workspace-head h3{margin:0;font-size:20px}
#game .skill-workspace>.tree-scroll{flex:1;min-height:0;max-height:none;padding:12px 4px;overflow:auto}#game .skill-workspace>.skill-stage-empty{padding:30px 12px;overflow:auto}
#game .skill-workspace>.advance-cards{overflow:auto;grid-template-columns:1fr;gap:10px}#game .skill-workspace:has(.advance-cards){overflow:auto}
#game .skill-workspace-foot{flex:none;padding:7px 0 0;border-top:1px solid #a58b62;margin-top:8px}#game .skill-workspace-foot>span{display:block;font-size:13px;line-height:1.4;margin-bottom:5px}#game .skill-workspace-foot>div{display:flex;align-items:center;justify-content:flex-end;gap:8px}#game .skill-workspace-foot button{padding:8px 12px;font-size:14px}
#game .tree-scroll .talent-tree{min-width:0!important;width:100%!important}#game .talent-node b,#game .talent-node small{color:#fff0cf!important;font-size:13px!important}#game .talent-node .node-ring{width:54px;height:54px}#game .talent-node .painted-icon{width:40px;height:40px}
#game .skill-popup-veil{z-index:35;inset:0}#game .skill-popup{width:min(680px,96vw);display:flex;flex-direction:column;overflow:hidden;padding:18px;max-height:calc(100dvh - 64px)}
#game .skill-popup>header{flex:none;padding-right:34px}#game .skill-popup h3{margin:2px 0 10px;font-size:20px}#game .skill-popup .skill-popup-close{right:8px;top:8px}
#game .skill-detail-tabs{display:flex;gap:8px;flex:none;margin-bottom:12px}#game .skill-detail-tabs button{flex:1;padding:8px 10px;min-height:44px}#game .skill-detail-tabs button[aria-pressed=true]{outline:2px solid #a7773c}
#game .skill-detail-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding-right:4px;flex:1}#game .skill-effect-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}#game .skill-effect-table th,#game .skill-effect-table td{border-bottom:1px solid #a18a5f55;padding:9px 6px;text-align:left;vertical-align:top;overflow-wrap:anywhere}#game .skill-effect-table thead{background:#e0cda4}#game .skill-effect-table th:first-child{width:34%}#game .skill-rules p{font-size:14px;margin:9px 0}#game .skill-popup .manual-confirm{position:static;flex:none;margin-top:10px;gap:8px;padding:9px 0 0;align-items:center}#game .skill-popup .manual-confirm button{font-size:14px;padding:8px 12px}
#game .audio-option{display:grid;grid-template-columns:100px minmax(90px,1fr) 45px;align-items:center;gap:12px;margin:14px 0;text-align:left}#game .audio-option input{width:100%;accent-color:#85602d}
@media(max-width:600px){#game .skill-workbench{grid-template-columns:100px minmax(0,1fr);gap:8px}#game .skill-side-nav{padding-right:7px;gap:6px}#game .skill-nav-heading{display:block;font-size:14px}#game .skill-nav-heading .attribute-icon{display:none}#game .skill-side-nav .skill-nav-child{margin-left:7px;width:calc(100% - 7px);font-size:14px;min-height:46px}#game .skill-workspace-head{display:block;min-height:54px}#game .skill-workspace-head h3{font-size:17px}#game .skill-workspace-head span{font-size:14px}#game .skill-workspace-foot>span{display:none}#game .skill-workspace-foot>div{flex-wrap:wrap}#game .skill-workspace-foot button{padding:8px 6px;flex:1}#game .talent-node{width:76px!important}#game .talent-node b{font-size:12px!important;max-width:72px}#game .talent-node .node-ring{width:40px;height:40px}#game .talent-node .painted-icon{width:29px;height:29px}#game .skill-popup{padding:12px}#game .skill-popup .manual-confirm span{font-size:13px}#game .skill-detail-tabs button{padding:8px 4px;font-size:14px}}
@media(orientation:landscape) and (max-height:600px){#game #panel.skills-panel{height:calc(100dvh - 60px);max-height:calc(100dvh - 60px)}#game #panel.skills-panel>header{padding:9px 16px;min-height:48px}#game #panel.skills-panel>header .eyebrow{display:none}#game #panel.skills-panel>header h2{font-size:20px}#game .skill-workbench{grid-template-columns:130px 1fr}#game .skill-side-nav .skill-nav-child{min-height:36px;padding:6px}#game .skill-side-nav .skill-nav-advance{min-height:36px;margin-top:8px}#game .skill-nav-heading{padding-bottom:3px}#game .skill-popup{max-height:calc(100dvh - 28px)}#game .skill-popup h3{font-size:18px;margin-bottom:5px}#game .skill-detail-tabs{margin-bottom:6px}#game .skill-workspace-foot>span{display:none}}
@media(prefers-reduced-motion:reduce){#game button{transition:none}#game button:active,#game button.button-pressed{translate:none;scale:1}}
#game #panel.skills-panel>.panel-content{display:flex;flex-direction:column;gap:8px}#game .skill-workbench{flex:1;height:auto;min-height:0}#game .skills-panel .live-battle-notice{flex:none;margin:0;font-size:13px;padding:5px 8px}#game .skills-panel .live-battle-notice button{min-height:32px;padding:5px 10px}
#game #skillModalHost .skill-popup-veil{position:fixed;z-index:32;padding:16px}#game #upgradeFx{z-index:60}#game #actionDialog{z-index:65}
#game .skill-detail-body p,#game .skill-popup p{font-size:15px;line-height:1.6}#game .skill-popup .tip{color:#60513f!important}
#game .welcome .tip,#game .welcome small,#game .toast small,#game .battle-track small,#game #sceneLoading p,#game #sceneLoading small{color:#f1dfb7!important}
#game .skill-side-nav button.raster-button,#game .skill-workspace-foot button.raster-button{padding-block:8px}
#game .actions button{white-space:normal;overflow-wrap:anywhere;min-width:0;line-height:1.4}
#game button .bitmap-label{color:transparent!important;text-shadow:none!important;background:var(--label-raster) center/100% 100% no-repeat!important}
