/* Moonstone & starlight: supplied art, native HTML controls, no extra render loop. */
#game{--fantasy-ink:#161326;--fantasy-panel:#25203e;--fantasy-raised:#383052;--fantasy-line:#a28aba66;--fantasy-gold:#f4d39b;--fantasy-mist:#c4badb;--fantasy-paper:#fff4de}
#game button:focus-visible,#game input:focus-visible,#game select:focus-visible,#game summary:focus-visible{outline:3px solid #ffe4a9;outline-offset:3px}
/* Native mobile has one renderer. Its supplied menu portraits must stay visible. */
#game.webgl.previewless .hero-art,#game.webgl.previewless .mini,#game.webgl.previewless .pet-art,#game.webgl.previewless .cosmetic-hero,#game.webgl.previewless .cosmetic-hat,#game.webgl.previewless .result-hero{opacity:1!important}
#game.webgl.previewless .unit.locked .mini{opacity:.5!important}
#game .crew-page{background:linear-gradient(180deg,#201a37b8,#171329f5 38%,#141326),var(--scene) center top/100% auto no-repeat!important;padding-top:16px!important}
#game .crew-top{margin-bottom:16px;gap:10px}
#game .crew-top>span{font-size:12px;letter-spacing:1.8px;color:var(--fantasy-paper)}
#game .crew-top small{font-size:10px;line-height:1.4;color:#c4bada}
#game .crew-top .iconbtn,#game .crew-map{min-width:48px;min-height:48px;background:linear-gradient(145deg,#453958,#28223d);border-color:#d5bca555;box-shadow:inset 0 1px #fff2,0 3px #100e20;color:#f5e5c8}
#game .crew-mission{position:relative;overflow:hidden;min-height:140px!important;border:1px solid #dec19d88!important;border-left:3px solid var(--crew-accent)!important;border-radius:22px 8px 22px 8px!important;padding:20px!important;background:linear-gradient(100deg,#241c39e8,#211d38a3),var(--scene) center 45%/cover!important;box-shadow:inset 0 0 0 4px #f7ddb309,0 8px 22px #09091f55}
#game .crew-mission:after{width:92px;height:92px;right:-30px;bottom:-25px;border-color:#f9deae55;box-shadow:0 0 0 14px #e9cfa90b,0 0 0 29px #e9cfa909}
#game .crew-mission small{font-size:9px;letter-spacing:2px;color:#f1d8b0}
#game .crew-mission h2{font:700 29px/1.1 Georgia,serif;letter-spacing:-.5px;color:#fff4de;margin:10px 0!important;text-shadow:0 2px 8px #100d22}
#game .crew-mission span{font-size:11px;color:#e0d5e8;line-height:1.4}
#game .crew-heading{margin:20px 0 10px;align-items:baseline;gap:8px}
#game .crew-heading h3{font:700 20px/1.2 Georgia,serif;color:#f6e5c8;letter-spacing:0}
#game .crew-heading small{font-size:9px;line-height:1.4;color:#c0b5d3;text-align:right}
#game .crew-slots{gap:10px}
#game .crew-slot{min-height:94px;background:linear-gradient(145deg,#40334f,#28223e);border-color:#b8a1c755;border-radius:18px;box-shadow:inset 0 1px #fbefdf14,0 4px 12px #0b091c55;padding:10px 8px}
#game .crew-slot.editing{background:linear-gradient(140deg,#4b3c55,#293944);border-color:#f1cf95;box-shadow:inset 0 0 0 2px #f2d8a411,0 4px 12px #0b091c55}
#game .crew-slot small{color:#ccbed9;font-size:8px;letter-spacing:1px}
#game .crew-slot b{font-size:16px;color:#fff0d8;margin:5px 0}
#game .crew-slot em{font-size:9px;color:#ddd0e4}
#game .crew-slot i{color:#ffe0a3;top:7px;right:9px;font-size:7px}
#game .crew-preview{width:48px;height:60px;border-radius:50%;background:radial-gradient(ellipse,#8b77c12a,transparent 72%)}
#game .crew-preview .mini{width:48px!important;height:60px!important}
#game .crew-fighters{gap:8px;margin-top:12px}
#game .crew-fighter{padding:10px 5px;min-height:119px;border-radius:18px;background:radial-gradient(ellipse at 50% 25%,color-mix(in srgb,var(--fighter-color) 19%,#39304e),#251f37 85%);border-color:#9c86b344;box-shadow:inset 0 1px #efdeff12,0 3px 9px #0b081b44}
#game .crew-fighter.chosen{background:radial-gradient(ellipse at 50% 20%,#58615c,#2c343f 90%);border-color:#f2d39d;box-shadow:inset 0 0 0 2px #ffe6b311,0 3px 9px #0b081b44}
#game .crew-fighter .mini{width:56px!important;height:58px!important;margin-bottom:5px!important}
#game .crew-fighter b{font-size:13px;color:#fff0dc}
#game .crew-fighter small{font-size:9px;color:#d2c4df;line-height:1.3}
#game .crew-check{color:#ffe2a7;background:#504937;border-radius:50%;width:17px;height:17px;line-height:17px;font-size:10px}
#game .crew-fighter.locked{opacity:.48;background:#241e36}
#game .crew-pets{gap:6px}
#game .crew-pet{min-height:96px;padding:8px 2px;border-radius:17px;background:linear-gradient(145deg,#423454,#261e39);border-color:#b098be44;box-shadow:inset 0 1px #fff1}
#game .crew-pet .pet-art{width:44px!important;height:49px!important;margin-bottom:7px!important}
#game .crew-pet span{font-size:9px;color:#e5d6ef}
#game .crew-pet.chosen{border-color:#efd09d;background:radial-gradient(ellipse at top,#6c596d,#302d46);box-shadow:inset 0 0 0 2px #f1dca111,0 3px 10px #05071a55}
#game .crew-ability{margin-top:12px;min-height:90px;border:1px solid #cbb39366;border-radius:18px;background:linear-gradient(115deg,#42394f,#26263f);box-shadow:inset 0 1px #fff1,0 4px 16px #08071c44}
#game .crew-ability .cofighter-portrait{width:62px;height:62px;filter:none}
#game .crew-ability b{color:#ffe3b0;font:700 20px Georgia,serif}
#game .crew-ability small{font-size:11px;line-height:1.5;color:#e0d1e8}
#game .crew-notes{color:#d2c0dc;font-size:11px;border-top:1px solid #9e83ba33;padding-top:5px}
#game .crew-notes summary{min-height:48px}
#game .crew-launch{background:linear-gradient(180deg,#201c34f5,#171426);border-top:1px solid #d9b89877;padding-top:14px;padding-bottom:max(18px,env(safe-area-inset-bottom));box-shadow:0 -10px 26px #0c0a1d88}
#game .crew-launch>span{font-size:12px;color:#fff0d9}
#game .crew-launch small{font-size:8px;letter-spacing:1px;color:#c9bad9}
#game .crew-launch .btn,#game .pause-actions [data-action=resume],#game .pause-actions [data-action=home]{min-height:52px;background:linear-gradient(145deg,#ffe6b2,#e2b579);border:1px solid #ffe8c1;border-bottom:3px solid #997146;color:#3c293b;box-shadow:inset 0 1px #fff8df,0 4px 14px #dfb87b22;border-radius:15px;text-shadow:none;font-weight:900;letter-spacing:.9px}
#game.battle-paused #overlay{background:#100d26ba;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#game .release-pause{background:linear-gradient(150deg,#352841,#211b35 65%,#19172e);border:1px solid #cfb49b99;border-radius:26px 10px 26px 10px;box-shadow:inset 0 0 0 4px #f1d39e08,0 20px 60px #050819aa;color:#f4e8f4}
#game .pause-hero{background:linear-gradient(0deg,#31253eee,#241b3699),var(--pause-scene) center 40%/cover;border-bottom:1px solid #e0c7a855;padding-top:25px;padding-bottom:19px;position:relative;overflow:hidden}
#game .pause-hero .eyebrow{font-size:9px;color:#f5d59d;letter-spacing:2.5px}
#game .pause-hero h2{font:700 33px/1.1 Georgia,serif;color:#fff0d7;letter-spacing:-.6px;margin:12px 0 8px}
#game .pause-hero p{color:#dcccdf;font-size:12px;line-height:1.5}
#game .pause-snapshot{margin-top:20px;padding-top:14px;border-top:1px solid #e6caa933}
#game .pause-snapshot b{color:#ffe9bc;font-size:24px}
#game .pause-snapshot span{color:#d5c4de;letter-spacing:1.6px}
#game .pause-audio h3{font:700 20px Georgia,serif;color:#f9e6ca;margin:0 0 17px}
#game .release-slider>span{font-size:12px;color:#e4d6eb}
#game .release-slider output{color:#f5d39d;font-weight:900}
#game .release-slider input{accent-color:#dfc49d;height:34px}
#game .pause-options{border-color:#bb9fc455;background:#16152d77;border-radius:14px}
#game .pause-options summary{font-size:12px;color:#daccdf;min-height:48px}
#game .pause-options .setting{color:#daccdf;font-size:12px}
#game .pause-options .setting select{background:#342b49;border-color:#ad93bb66}
#game .pause-options p{color:#c1b1cf;font-size:10px;line-height:1.5}
#game .pause-actions{gap:9px;margin-top:17px}
#game .pause-actions .secondary{min-height:48px;background:#332b47;border-color:#b59ac355;color:#e2d4ec;font-size:10px}
#game .pause-actions [data-action=quit]{color:#d9aeb7;border-color:transparent;background:transparent}
#game .release-local-note{font-size:9px;color:#b4a5c5;line-height:1.6}
#game .leave-confirm h2{font:700 30px Georgia,serif;color:#ffe8c1}
#game .leave-confirm p{color:#d9c8e1}
/* Keep the combat route unobscured; ornate details live inside existing HUD panels. */
#game[data-page=battle] .wave,#game[data-page=battle] .counter-pill,#game[data-page=battle] .hpbox{background:linear-gradient(145deg,#352b47f5,#211d35f5);border-color:#bd9fc36b;box-shadow:inset 0 1px #f8e6cc14,0 4px 12px #100b2433}
#game[data-page=battle] .wave{border-top-color:#e5c59f99;border-radius:17px 7px 17px 7px}
#game[data-page=battle] .battle-sector{color:#e8d0a8;letter-spacing:1.2px}
#game[data-page=battle] .battle-sector b{color:#bcaacb}
#game[data-page=battle] .wave small{color:#fff0db}
#game[data-page=battle] .wave>.bar{background:#100e23}
#game[data-page=battle] .wave>.bar i{background:linear-gradient(90deg,#b58deb,var(--world-accent,#a6eed7));box-shadow:none}
#game[data-page=battle] .counter-pill{border-left-color:#93e9ff}
#game[data-page=battle] .counter-pill.enemy{border-left-color:#ffa1ae;background:linear-gradient(135deg,#492c43f5,#261e36f5)}
#game[data-page=battle] .counter-pill small{color:#dbd1e8}
#game[data-page=battle] .counter-pill b{color:#b5f0ff}
#game[data-page=battle] .counter-pill.enemy b{color:#ffb1bb}
#game[data-page=battle] .hpbox{border-left-color:#bde7b7}
#game[data-page=battle] .hpbox .row{color:#e8dbeb}
#game[data-page=battle] .base-danger .hpbox{background:#4d253af5;border-color:#ff91a5}
#game[data-page=battle] .hud .top>.iconbtn,#game[data-page=battle] .camera-control,#game[data-page=battle] .camera-reset{background:linear-gradient(145deg,#483b57f5,#2b233ff5);border-color:#c3a8bd77;box-shadow:inset 0 1px #fce3c722,0 3px #130e25;color:#f4e2c8}
#game[data-page=battle] .hud .top>.iconbtn{width:48px;height:48px;border-radius:16px}
#game[data-page=battle] .camera-control,#game[data-page=battle] .camera-reset{min-height:48px}
#game[data-page=battle] .battle-control-base{height:168px;border-radius:28px 28px 0 0;background:linear-gradient(0deg,#151126 4%,#261d3afc 64%,#261d3ab3 85%,#261d3a00)}
#game[data-page=battle] .field-orders button,#game[data-page=battle] #arsenal-toggle,#game[data-page=battle] #fusion-button{height:48px;min-height:48px;background:linear-gradient(145deg,#493853,#2a223e);border-color:#bb9cc077;color:#f1dfef;box-shadow:inset 0 1px #f8e3c91a,0 3px #110c23}
#game[data-page=battle] .field-orders{height:48px}
#game[data-page=battle] .field-orders b{color:#f0dff1}
#game[data-page=battle] .field-orders .ui-icon{width:18px;height:18px}
#game[data-page=battle] #fusion-button:not(:disabled){background:linear-gradient(135deg,#65516f,#38314e);border-color:#ecd1ff;color:#f1deff}
#game[data-page=battle] .move-button{background:linear-gradient(145deg,#3b5771,#2d304f);border-color:#b6d9e699;border-bottom-color:#1b1835;box-shadow:inset 0 1px #e9f7ff22,0 4px 10px #0d092344;color:#d2f3ff;border-radius:19px}
#game[data-page=battle] .move-pad:before{color:#d1badb;letter-spacing:1.5px}
#game[data-page=battle] .move-button.move-pressed{background:linear-gradient(135deg,#538b97,#3c506f);border-color:#c3fbff}
#game[data-page=battle] #weapon-fire{background:linear-gradient(140deg,#fff0c7,#e9c38f 65%,#d5a775);border-color:#ffecc9;border-bottom-color:#8e674a;color:#412b3d;box-shadow:inset 0 1px #fffbea,0 4px 14px #e7be8226;border-radius:20px 9px 20px 9px}
#game[data-page=battle] #weapon-fire small{color:#665064}
#game[data-page=battle] #weapon-fire:disabled{background:linear-gradient(145deg,#493b55,#30283f);border-color:#ab8db666;border-bottom-color:#20182e;color:#d5c4dd;box-shadow:inset 0 1px #f7e5ff11}
#game[data-page=battle] #weapon-fire:disabled small{color:#c2aecf}
#game[data-page=battle] .special{background:radial-gradient(circle at 35% 25%,#695675,#30233f);box-shadow:0 0 0 3px #1a1329,0 0 0 4px #c3a0a388,0 4px 12px #08051b77;border-color:#f2d4a3}
#game[data-page=battle] .special.ability-ready{box-shadow:0 0 0 3px #1b142b,0 0 0 4px #ffe6b2,0 4px 15px #ecc58033}
#game[data-page=battle] #arsenal-panel,#game[data-page=battle] #upgrade-dock{background:linear-gradient(145deg,#3d2f4dfc,#211b35fc);border-color:#d0b493aa;border-top-color:#f3d5aa;border-radius:21px 10px 21px 10px;box-shadow:0 -6px 22px #0d081e88}
#game[data-page=battle] #arsenal-panel>[data-weapon]{background:linear-gradient(150deg,#4c3e5b,#2e2541);border-color:#af8fbe55;border-radius:14px}
#game[data-page=battle] #arsenal-panel>[data-weapon].equipped{background:linear-gradient(140deg,#5c5368,#334650);border-color:#f1d4a7}
#game[data-page=battle] .arsenal-heading{color:#ffedcc}
#game[data-page=battle] .upgrade-prompt{background:linear-gradient(145deg,#5c4663,#30263e);border-color:#e3c3a5;color:#ffe6ad;min-height:48px}
#game[data-page=battle] #upgrade-prompt{height:48px;min-height:48px;max-height:48px}
#game[data-page=battle] .battle-hint,#game[data-page=battle] #siege-notice,#game[data-page=battle] #tactics-callout{color:#fff3de}
#game[data-page=battle] .combo-meter{background:#2b1e3b;color:#ffe1a4;border:1px solid #dfbb7a88}
/* One start screen, styled consistently with the expedition menus. */
#game .adventure-home{background:linear-gradient(180deg,#20152f22,#231b3b33 52%,#171227ee)!important}
#game .home-tagline{color:#fff0cb;letter-spacing:2.5px}
#game .next-mission{border-color:#d8ba93aa;background:#2b233bf2;box-shadow:inset 0 1px #ffe7bd22,0 6px 20px #0d091c77;border-radius:22px 9px 22px 9px}
#game .mission-copy small{color:#f2d09e}
#game .mission-copy b{color:#fff1d7;font-family:Georgia,serif;font-size:23px}
#game .mission-copy em{color:#dbcae4}
#game .adventure-play{border-radius:23px 10px 23px 10px;border-color:#fff0c5;background:linear-gradient(140deg,#fff0c2,#e7bc83);color:#432b3b;box-shadow:inset 0 1px #fff5dc,0 5px 0 #775041,0 10px 25px #0b071e77;text-shadow:none}
#game .adventure-play small{color:#72526a}
#game .scene-sheet,#game .modal{border-color:#cfb39b88;background:linear-gradient(145deg,#3c2e4a,#201a32);color:#f2e4ed}
#game .scene-sheet h2,#game .modal h2{font-family:Georgia,serif;color:#fff0d1}
@media(max-width:350px){#game .crew-mission{padding:16px!important;min-height:128px!important}#game .crew-mission h2{font-size:27px}#game .crew-heading h3{font-size:18px}#game .crew-slot{gap:5px;padding:9px 6px}#game .crew-slot b{font-size:14px}#game .crew-preview,#game .crew-preview .mini{width:40px!important}#game .crew-slot small{font-size:7px}#game .crew-heading small{font-size:8px}#game .crew-pets{gap:4px}#game .crew-launch .btn{padding:12px 15px}#game .pause-hero h2{font-size:29px}}
@media(prefers-reduced-motion:reduce){#game .crew-fighter,#game .crew-slot,#game .hpbox .bar i{transition:none!important}}
