:root{color-scheme:dark;--ink:#f4edff;--muted:#b8b0d7;--gold:#d8c7ff;--line:#9691d0;--panel:#292453}
body{background:#10142a;color:#f1edff;font-family:'Microsoft JhengHei','PMingLiU',serif}
.topbar{background:linear-gradient(#595389,#252343);border-bottom:2px solid #b5a7e4;box-shadow:0 2px 0 #17142c}
.brand{color:#fff3c6}.brand-mark{color:#e5d5ff}.brand small,.top-caption,.chapter-note{color:#c1bbdf}.alpha{color:#e7d5ff;border-color:#9481c4}
.chapter .eyebrow{color:#aca8de}.chapter h1{color:#e7d7ff;font-family:'PMingLiU','Microsoft JhengHei',serif;letter-spacing:2px}.live-dot{background:#b9a0f5}
button,select,input{font-family:'Microsoft JhengHei',sans-serif}button{color:#f8f2ff;background:linear-gradient(#7d70ad,#514576);border:1px solid #b3a5df;border-radius:3px;box-shadow:inset 1px 1px #e2d7ff55,inset -1px -1px #241c4f}
button:hover{background:linear-gradient(#9b8bc7,#68518f);border-color:#e0ceff}button:focus-visible{outline:2px solid #efd789;outline-offset:2px}button:disabled{opacity:.48;cursor:default}
select,input{background:#28213f;color:#fff2d6;border:1px solid #9a8ac8;border-radius:2px}
.game-shell{border:3px double #b0a0df;background:#1b1934;border-radius:5px;box-shadow:0 0 0 2px #373263,0 8px 30px #07091888}
.game-stage{background:#1b1934}.player-panel,.hud-right>span,.run-timer,.route,.bossbar,#interaction-hint{background:linear-gradient(120deg,#40366beF,#211f40eF);border:1px solid #b5a1e0;color:#f8efff;box-shadow:inset 1px 1px #e4d8ff33,0 2px 5px #100d2b77;border-radius:4px}
.player-panel{padding:8px 12px;min-height:96px}.player-panel .portrait{background:url('assets/ui/0189-0008.png') left top no-repeat;background-size:145px 98px;border:0;border-radius:0;width:98px;height:96px;overflow:hidden;flex-shrink:0}.player-panel .portrait canvas{width:82px;height:82px;margin-left:1px;margin-top:5px}
.hp-track{background:#1b123b;border:1px solid #a77daf}.hp-track #hpbar{background:linear-gradient(#ee9bb0,#ac355f)}.xp-track{background:#17132f}.xp-track #xpbar{background:linear-gradient(#d7bff3,#9980c0)}.player-vitals h3,.player-vitals strong{color:#fff2c6}.player-vitals>div>span{color:#dcc8ef}
.run-timer{padding:8px 20px}.run-timer>span{color:#d9caf0}#timer{color:#fff1c6;text-shadow:2px 2px #302647}#timer-hint{color:#e3d3ff}.route,.bossbar{color:#f1dcff}
.action-bar{background:linear-gradient(#454075,#27213f);border-top:2px solid #a493d0;color:#f2e9ff}.dpad button{background:linear-gradient(#716397,#393257);border-color:#a994cd}.auto-attack{color:#e3ca87}.auto-attack small{color:#c4b6dc}.combat>button,.mode{background:linear-gradient(#5f5287,#362a55);border-color:#bca9de;color:#f5eaff}.mode[aria-pressed=true]{background:linear-gradient(#8a6eaa,#59436e);color:#fff0b4}.below{color:#b1a9cc}
#learned-bar{background:linear-gradient(#3c3468,#27213f);border-top:1px solid #b4a1dc;border-bottom:1px solid #6c6093}.skill-bar-heading{color:#ded0fa}.learned-skill{background:linear-gradient(#5b4e87,#292140);border:2px solid #a598d0;border-radius:1px;box-shadow:inset 0 0 0 1px #21183f;color:#f5efff}.learned-skill b{color:#f1cf85}.skills-empty{color:#cbc1df}
.village-strip{background:linear-gradient(#3c3468,#25203d);border-top:1px solid #a394cd}.village-strip>span{color:#d0b9ef}.village-strip button{font-size:12px}
dialog{background:linear-gradient(#3d3562,#25203f);color:#f7efff;border:3px double #b4a1df;border-radius:5px;box-shadow:0 0 0 2px #4c3e72,0 10px 60px #080613cc}dialog::backdrop{background:#0d102aaa;backdrop-filter:blur(2px)}.dialog-head{border-bottom:2px solid #9a89bd;padding-bottom:10px}.dialog-head h2,dialog h2{color:#e8daff;font-family:'PMingLiU','Microsoft JhengHei',serif;letter-spacing:2px}.dialog-note{color:#c5bbd9}
.service-row{border-bottom:1px solid #756092}.service-row strong{color:#f3dca8}.service-row small{color:#c5b8dd}.service-balance{background:#302748;border:1px solid #9380b9;color:#f5e8b9}.service-row button{border-color:#b5a0d9;color:#fff0c8;background:linear-gradient(#71618f,#423351)}
#service-content p{line-height:1.8}#service-content details{background:#28203f;padding:8px;border:1px solid #817096}.wing-rates-table th{color:#e4cba0}.wing-rates-table td{color:#eadff8}
.veil{background:#17142de8}.veil h2{color:#ead4ff}.veil .eyebrow{color:#d2b8ec}.veil .primary,#start{color:#fff5d1;background:linear-gradient(#8c70b3,#5b3d87);border:2px outset #d2b7ec}.start-card,.result-card,.pause-card{background:linear-gradient(#514177ee,#272040ee);border:2px solid #ae97d4;border-radius:5px}
#choices>button{background:linear-gradient(#5d4c83,#30213fee);border:2px outset #bba0d7;color:#fff0cd}#choices>button:hover{background:linear-gradient(#806697,#49305a)}#choices>button small{color:#e0cde8}#choices>button>kbd{background:#e0d1f4;border:1px solid #fff3ff;color:#403052}
.journal>article,.feature-card,.journal{background:#27223f;border-color:#7d6b9c;color:#d3c7e4}.journal h3{color:#e4c9ff}footer{background:#19172e;border-top:1px solid #675581;color:#aaa0c4}#toast{background:#4d3c6aef;color:#fff4d0;border:1px solid #d0b2e4}
#creation,#characters,#inventory,#bestiary{border-color:#c4aae9;background:#211b3e}#bestiary-list .bestiary-entry[aria-pressed=true]{background:#806098}.bestiary-note,.tw-note{color:#c4b4d9}.tw-details{background:#36264f;border-color:#8d70a8}
@media(max-width:600px){.topbar{padding:8px 10px}.top-actions{gap:4px}.top-actions button{padding:7px;font-size:11px}.brand{font-size:14px}.player-panel{padding:5px 7px;min-height:76px}.player-panel .portrait{width:68px;height:72px;background-size:108px 73px}.player-panel .portrait canvas{width:62px;height:62px;margin-top:3px}.run-timer{padding:4px 8px}.action-bar{gap:6px}.service-row{gap:8px;align-items:stretch}.service-row button{max-width:180px;white-space:normal;font-size:11px;padding:8px}.learned-skill{min-width:74px}.village-strip button{font-size:11px}.dialog-head h2,dialog h2{font-size:22px}}

.forge-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.forge-tabs button{font-size:13px;padding:8px}.forge-tabs button[aria-pressed="true"]{border-color:#ffe19a;color:#ffe19a}.service-row small{overflow-wrap:anywhere}

/* Compact status shares the SEED/backpack row. */
body[data-mode="village"] .hud #toast{grid-area:notice;min-height:0;margin:0;text-align:left;padding:5px 8px;}
body[data-mode="village"] .hud{grid-template-areas:"player player" "notice actions";grid-template-columns:minmax(0,1fr) auto;}
body[data-mode="village"] .hud .player-panel{grid-area:player;}

.wave-hud{overflow:hidden}.wave-hud .loot-marquee{display:inline-block;white-space:nowrap;animation:loot-scroll 4.5s linear;color:#ffe0a8}@keyframes loot-scroll{0%{transform:translateX(80vw)}100%{transform:translateX(-100%)}}@media(prefers-reduced-motion:reduce){.wave-hud .loot-marquee{animation:none}}
