:root{font-family:"Microsoft JhengHei","微軟正黑體",Arial,sans-serif;color:#d3e1e7;background:#03080c;--line:#2c4b59;--line2:#416272;--panel:#091820;--panel2:#0d222c;--panel3:#12313d;--text:#d3e1e7;--muted:#829da9;--cyan:#76b6cc;--cyan2:#a7d7e5;--gold:#c9aa69;--green:#82c99a;--red:#d27c76;--ui-bg:#06141c;--ui-surface:#091a23;--ui-surface-2:#0d2530;--ui-surface-3:#12323e;--ui-border:#315461;--ui-border-soft:#223f4b;--ui-text:#d3e1e7;--ui-muted:#829da9;--ui-accent:#76b6cc;--ui-accent-strong:#a7d7e5;--ui-gold:#c9aa69;--ui-success:#82c99a;--ui-danger:#d27c76;--ui-pad:14px;--ui-pad-lg:16px;--ui-gap:12px;--ui-gap-sm:8px;--ui-radius:6px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#052b3a url('/assets/scene_bg_global_ocean.png') center top/cover fixed;color:var(--text)}body{min-height:100vh}body.in-game{height:100vh;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}
#toast{position:fixed;right:22px;bottom:22px;z-index:999;background:#173243;border:1px solid #52798b;color:#e7f6fc;padding:11px 16px;border-radius:3px;box-shadow:0 10px 30px #000a;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;max-width:min(480px,calc(100vw - 28px))}#toast.show{opacity:1;transform:none}

/* login */
.auth-shell{min-height:100vh;display:grid;place-items:center;position:relative;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 25%,#153a4d99 0,#07111899 38%,#020608 75%)}.auth-card{position:relative;z-index:2;width:min(430px,92vw);background:linear-gradient(#0e202b,#071118);border:1px solid #41606e;border-radius:4px;padding:24px 28px 28px;box-shadow:0 28px 90px #000c,inset 0 1px #ffffff12}.auth-logo{width:100%;height:76px;object-fit:contain}.auth-subtitle{text-align:center;color:#7393a1;margin:-5px 0 20px;font-size:24px;letter-spacing:1px}.tabs{display:flex;border-bottom:1px solid #38515d;margin-bottom:17px}.tab{flex:1;border:0;border-right:1px solid #38515d;background:#102631;color:#86a2af;padding:9px}.tab:last-child{border-right:0}.tab.active{background:#20485b;color:white;box-shadow:inset 0 2px #70adc5}.auth-form{display:grid;gap:13px}.auth-form label,.auth-field>label{display:grid;gap:5px;color:#a7bac4;font-size:24px}.auth-field{display:grid;gap:5px}.auth-form input{height:38px;border:1px solid #31505f;background:#040b10;color:white;padding:0 10px;outline:none}.auth-form input:focus{border-color:#6598ad;box-shadow:0 0 0 2px #4e91ad20}.password-input-wrap{position:relative;display:block}.password-input-wrap input{width:100%;padding-right:48px}.password-toggle{position:absolute;right:1px;top:1px;width:44px;height:36px;display:grid;place-items:center;border:0;border-left:1px solid #294754;background:#0a1921;color:#8eb2c0;padding:0}.password-toggle:hover,.password-toggle:focus-visible{background:#15313e;color:#d7edf5;outline:none}.password-toggle .password-eye-icon{width:24px;height:24px;object-fit:contain;pointer-events:none}.primary{border:1px solid #55869a;background:linear-gradient(#275a70,#173a4b);color:white;padding:10px;box-shadow:inset 0 1px #8fc7d733}.note{font-size:24px;color:#748d99}@media(max-width:620px){.auth-card{width:min(430px,calc(100vw - 20px));padding:20px 18px 22px}.auth-form input{height:48px}.password-input-wrap input{padding-right:56px}.password-toggle{width:52px;height:46px}}

/* fixed desktop shell: only the center and side columns scroll */
.page-frame{width:min(1480px,100%);height:100vh;margin:0 auto;background:#061017ee;border-left:1px solid #192d37;border-right:1px solid #192d37;box-shadow:0 0 70px #000;display:grid;grid-template-rows:94px minmax(0,1fr);overflow:hidden}.topbar{height:94px;display:grid;grid-template-columns:285px minmax(0,1fr) 255px;background:linear-gradient(#0b1b25,#071118);border-bottom:1px solid #324c58;box-shadow:inset 0 -1px #000;z-index:20;min-width:0}.brand-area{display:flex;align-items:center;padding:6px 10px;min-width:0}.game-logo{width:260px;max-width:100%;max-height:72px;object-fit:contain}.resource-bar{display:flex;justify-content:center;align-items:center;gap:5px;min-width:0;overflow:hidden}.resource-cell{min-width:0;flex:0 1 126px;height:68px;display:flex;align-items:center;gap:6px;padding:5px 8px;background:linear-gradient(#102630,#09171f);border:1px solid #27424f;box-shadow:inset 0 1px #ffffff0c}.resource-cell img{width:40px;height:40px;flex:0 0 40px;filter:drop-shadow(0 2px 3px #000)}.resource-cell span{display:block;color:#7795a3;font-size:24px}.resource-cell b{display:block;color:#d8e7ed;font-size:24px;white-space:nowrap;overflow:hidden;text-overflow:clip;max-width:92px}.account-area{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;padding:0 14px;color:#7893a0;font-size:24px;gap:9px;min-width:0}.account-area #playerName{color:#c8dae2;margin-right:8px}.server-line{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.server-line>span:first-child{overflow:hidden;text-overflow:clip;white-space:nowrap}.speed-badge{background:#183848;border:1px solid #416778;color:#b9dbe7;padding:2px 7px;border-radius:10px;font-weight:700;flex:0 0 auto}.mini-btn{background:#102630;border:1px solid #385767;color:#a9c0ca;padding:4px 9px;border-radius:2px}.mini-btn:hover{background:#1b3a4a;color:white}
.game-grid{display:grid;grid-template-columns:184px minmax(0,1fr) 224px;min-height:0;height:100%;overflow:hidden}.sidebar,.rightbar,#content{min-height:0;scrollbar-color:#365666 #07131a;scrollbar-width:thin}.sidebar{border-right:1px solid #263d48;background:linear-gradient(90deg,#07131b,#091922);padding:9px 8px;overflow-y:auto;overscroll-behavior:contain}.menu-cap,.planet-list-title{height:28px;display:flex;align-items:center;padding:0 10px;background:linear-gradient(#182f3b,#0e202a);border:1px solid #2e4b59;color:#8eadba;font-size:24px;text-transform:uppercase;letter-spacing:.8px}.nav{width:100%;height:37px;border:0;border-bottom:1px solid #152b35;background:linear-gradient(#0e202a,#0a171f);color:#8aa5b2;text-align:left;padding:0 14px;position:relative}.nav:before{content:"";position:absolute;left:5px;top:14px;width:3px;height:8px;background:#3e6576}.nav:hover,.nav.active{color:#e2edf1;background:linear-gradient(90deg,#1a3c4c,#0b1b24);box-shadow:inset 3px 0 #6ca5b9}.nav.active:before{background:#9cdef4}.admin-nav{color:#e0c079;background:linear-gradient(#302819,#17160e);border-top:1px solid #665638}.admin-nav:before{background:#d5af5d}.menu-sep{height:9px;border-bottom:1px solid #1d3039}.sidebar-status{margin-top:16px;border:1px solid #294552;background:#08151d;padding:9px 10px;display:flex;justify-content:space-between;font-size:24px;color:#6e8b99}.sidebar-status b{color:#d0e3e9}
#content{padding:14px 16px 28px;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scroll-behavior:smooth}.rightbar{border-left:1px solid #263d48;background:linear-gradient(270deg,#07131b,#091922);padding:9px 8px;overflow-y:auto;overscroll-behavior:contain}.planet-card{background:#09171f;border:1px solid #2c4855;text-align:center;padding-bottom:8px;margin-bottom:8px}.planet-title{height:28px;display:flex;align-items:center;justify-content:center;background:linear-gradient(#17303c,#0e202a);border-bottom:1px solid #2d4b58;color:#86a9b7;font-size:24px}.planet-thumb{width:100%;aspect-ratio:260/170;object-fit:cover;display:block;margin:0 auto 5px}.planet-card strong{display:block;color:#c8dae2}.planet-card .coords{display:block;font-size:24px;color:#6f8c99}.planet-meta{display:block;font-size:24px;color:#758f9b;margin-top:3px}.planet-list{display:grid;gap:4px;margin:6px 0 13px}.planet-choice{width:100%;display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:7px;background:#091820;border:1px solid #213b48;padding:4px;text-align:left;color:#9db3bd}.planet-choice:hover,.planet-choice.selected{background:#143140;border-color:#497487;color:white}.planet-choice img{width:58px;height:42px;object-fit:cover}.planet-choice b,.planet-choice span,.planet-choice small{display:block;overflow:hidden;text-overflow:clip;white-space:nowrap}.planet-choice b{font-size:24px}.planet-choice span{font-size:24px;color:#708d9a}.planet-choice small{font-size:24px;color:#536f7b;margin-top:2px}

/* common island strategy panels */
.panel{margin-bottom:12px;background:linear-gradient(#0b1a23,#08131a);border:1px solid #29424f;box-shadow:inset 0 1px #ffffff08}.panel>h2,.panel>h3{margin:0;padding:9px 13px;background:linear-gradient(#183541,#10242e);border-bottom:1px solid #31515f;color:#b8d0da;font-size:24px;font-weight:600;text-shadow:0 1px #000}.panel>h3{font-size:24px}.panel-body{padding:12px}.panel-subline{padding:7px 12px;border-bottom:1px solid #1e3641;color:#77929f;font-size:24px}.empty-state,.loading-line{padding:12px;color:#6f8894}.overview-columns,.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.overview-columns>.panel,.two-col>.panel{min-width:0}
.overview-hero{display:grid;grid-template-columns:250px minmax(0,1fr);background:#09161e;border:1px solid #294653;margin-bottom:12px;min-height:170px}.planet-visual-wrap{position:relative;min-width:0}.overview-planet{width:250px;height:100%;min-height:170px;object-fit:cover;border-right:1px solid #294653;display:block}.planet-kind{position:absolute;left:8px;bottom:8px;background:#061017d9;border:1px solid #3a5d6b;padding:3px 7px;color:#a9cbd8;font-size:24px}.overview-info{padding:14px;min-width:0}.overview-title-line{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.overview-info h2{margin:0 0 4px;color:#d2e1e7;font-size:24px}.coords{font-family:Consolas,monospace;color:#7c9aa7}.soft-btn{border:1px solid #3d6070;background:#102630;color:#9fbac6;padding:5px 9px}.overview-stats{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:4px 18px;margin-top:13px}.stat-line{display:flex;justify-content:space-between;gap:8px;border-bottom:1px dotted #29414d;padding:5px 0;color:#7894a1;font-size:24px}.stat-line b{color:#bdcfd6;font-weight:500;text-align:right}.field-meter{height:5px;background:#050d12;border:1px solid #203945;margin-top:10px}.field-meter>span{display:block;height:100%;background:linear-gradient(90deg,#34677b,#68a7bb)}
.resource-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.summary-box{display:flex;align-items:center;gap:8px;border:1px solid #294653;background:#0a1a23;padding:8px;min-width:0}.summary-box img{width:44px;height:44px;flex:0 0 44px}.summary-box div{min-width:0}.summary-box span,.summary-box b,.summary-box em{display:block;overflow:hidden;text-overflow:clip;white-space:nowrap}.summary-box span{font-size:24px;color:#728e9a}.summary-box b{color:#d0e1e7;font-size:24px}.summary-box em{font-style:normal;color:#78ba8a;font-size:24px}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:9px;padding:12px}.card{background:#0a1821;border:1px solid #263f4b;min-height:126px;position:relative;overflow:hidden}.card:hover{border-color:#466e7f;background:#0d202b}.item-card{display:grid;grid-template-columns:128px minmax(0,1fr)}.item-image{width:128px;height:126px;object-fit:cover;border-right:1px solid #2a4653;background:#051018}.item-info{padding:9px 10px;min-width:0}.item-info h3{padding:0;margin:0 0 4px;background:none;border:0;color:#b9d3dd;font-size:24px}.item-level{font-size:24px;color:#8aa4b0;margin-bottom:7px}.unit-meta{font-size:24px;color:#617e8b;margin-top:6px;white-space:normal}.cost-row{display:flex;flex-wrap:wrap;gap:7px;font-size:24px;color:#7894a1}.cost-row span{white-space:nowrap}.cost-row .enough{color:#83b98c}.cost-row .short{color:#c77973}.item-actions{display:flex;align-items:center;gap:6px;margin-top:9px}.item-actions input{width:74px}.item-actions button,.row button,.card button,.galaxy-tools button,.fleet-cargo button,.admin-form button{border:1px solid #477184;background:linear-gradient(#245267,#163746);color:#dbeaf0;padding:5px 10px;border-radius:2px}.item-actions button:hover,.row button:hover,.card button:hover,.galaxy-tools button:hover,.fleet-cargo button:hover,.admin-form button:hover{background:linear-gradient(#316b83,#1e4658)}
.muted{color:#6f8894}.good{color:#78bc8a!important}.warn{color:#d0aa64!important}.bad{color:#d47772!important}.value{font-size:24px;font-weight:600;color:#d4e2e8}.queue{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#08151d;border-bottom:1px solid #1d3440;padding:8px 12px;font-size:24px;min-width:0}.queue:last-child{border-bottom:0}.queue>span{min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap}.queue b{color:#b9d4de;flex:0 0 auto}.queue-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#73b58a;margin-right:7px}.queue-dot.fleet{background:#6ea4c0}
.row,.fleet-target,.fleet-cargo,.galaxy-tools{display:flex;gap:9px;align-items:end;flex-wrap:wrap;padding:9px 12px}.row label,.fleet-target label,.fleet-cargo label,.galaxy-tools label{display:grid;gap:4px;font-size:24px;color:#819daa}.row input,.row select,.item-actions input,.admin-form input,.admin-form select,.fleet-target input,.fleet-target select,.fleet-cargo input,.galaxy-tools input{background:#040c11;color:#d8e8ef;border:1px solid #345360;padding:6px 7px;border-radius:2px}.row input,.fleet-target input,.fleet-cargo input,.galaxy-tools input{width:95px}.row select,.fleet-target select{min-width:125px}.table-scroll{overflow:auto;max-width:100%;overscroll-behavior:contain}.table{width:100%;border-collapse:collapse;font-size:24px}.table th{height:31px;background:#112b37;color:#88a8b5;border:1px solid #2c4956;position:sticky;top:0;z-index:1}.table td{padding:7px 8px;border:1px solid #1e3641;background:#08151c;color:#9fb4be}.table tr:hover td{background:#0e222c}.table td img{vertical-align:middle}.galaxy-table-wrap{max-height:calc(100vh - 220px)}.galaxy-table{min-width:720px}.galaxy-object{display:inline-flex;align-items:center;gap:6px}.galaxy-planet-icon{width:52px;height:36px;object-fit:cover}.pos-cell{text-align:center;font-weight:700;color:#abc7d3}.empty-slot{color:#526d79}.badge{display:inline-block;padding:2px 6px;background:#173544;border:1px solid #355767;font-size:24px;color:#a9c6d1}.message-card{background:#07141c;border:1px solid #213944;margin:10px}.message-head{display:flex;gap:8px;align-items:center;padding:8px 9px;border-bottom:1px solid #213944;flex-wrap:wrap}.message-head time{margin-left:auto;color:#607c88;font-size:24px}.message{white-space:pre-wrap;padding:9px;color:#9db1ba}.fleet-slots{display:flex;gap:8px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid #1f3742}.fleet-slots span{background:#08161e;border:1px solid #274550;padding:5px 8px;font-size:24px}.fleet-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(275px,1fr));gap:7px;padding:9px 12px}.fleet-pick{display:grid;grid-template-columns:76px minmax(0,1fr) 74px;align-items:center;background:#08171f;border:1px solid #203a46;min-width:0}.fleet-pick img{width:76px;height:56px;object-fit:cover}.fleet-pick div{padding:5px 7px;font-size:24px;min-width:0}.fleet-pick b,.fleet-pick span,.fleet-pick small{display:block}.fleet-pick b{color:#b9d1db;font-size:24px}.fleet-pick small{color:#5f7d88;font-size:24px;margin-top:2px}.fleet-pick input{width:64px;background:#030a0f;color:white;border:1px solid #31515e;padding:5px}.fleet-hint{padding:0 12px 11px;color:#688592;font-size:24px;line-height:1.5}.big-action{padding:8px 18px!important}.storage-list{padding:12px}.storage-row{display:flex;gap:8px;align-items:center;margin-bottom:10px}.storage-row img{width:38px;height:38px}.storage-main{flex:1;min-width:0}.storage-main>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:24px}.storage-main span{color:#77929f}.storage-meter{height:7px;background:#040b10;border:1px solid #203c48;margin-top:5px}.storage-meter span{display:block;height:100%;background:linear-gradient(90deg,#315e72,#6f9fb0)}.storage-meter.danger span{background:linear-gradient(90deg,#805b3b,#c07a58)}
.admin-box{border:1px solid #685b3e;background:linear-gradient(#211d13,#0e1110);padding:15px;margin:12px}.admin-box h3{color:#dfc47b;margin:0 0 8px}.admin-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.admin-form label{display:grid;gap:5px;color:#bcae83;font-size:24px}.admin-form input,.admin-form select{width:160px}.admin-note{color:#8f876d;font-size:24px;line-height:1.7;margin-top:10px}.admin-speed-big{font-size:26px;color:#e1c274;font-weight:700}

/* compact laptop */
@media(max-width:1180px){.page-frame{grid-template-rows:84px minmax(0,1fr)}.topbar{height:84px;grid-template-columns:210px minmax(0,1fr) 188px}.game-logo{width:195px}.resource-cell{flex-basis:104px;padding:4px 5px}.resource-cell img{width:32px;height:32px;flex-basis:32px}.resource-cell b{font-size:24px}.game-grid{grid-template-columns:158px minmax(0,1fr) 186px}.cards{grid-template-columns:1fr 1fr}.item-card{grid-template-columns:110px minmax(0,1fr)}.item-image{width:110px}.overview-hero{grid-template-columns:210px minmax(0,1fr)}.overview-planet{width:210px}.resource-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* tablet: navigation and planet strip stay visible while only content scrolls */
@media(max-width:900px){body.in-game{overflow:hidden}.page-frame{width:100%;grid-template-rows:122px minmax(0,1fr)}.topbar{height:122px;grid-template-columns:170px minmax(0,1fr);grid-template-rows:62px 60px}.brand-area{grid-row:1;grid-column:1}.game-logo{width:155px}.account-area{grid-row:1;grid-column:2;flex-direction:row;justify-content:flex-end;align-items:center;padding:5px 10px}.resource-bar{grid-row:2;grid-column:1/3;justify-content:flex-start;overflow-x:auto;padding:4px 8px;scroll-snap-type:x proximity}.resource-cell{min-width:118px;height:50px;scroll-snap-align:start}.game-grid{grid-template-columns:1fr;grid-template-rows:45px 78px minmax(0,1fr);grid-template-areas:"nav" "planets" "main"}.sidebar{grid-area:nav;display:flex;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid #263d48;padding:4px;white-space:nowrap}.menu-cap,.sidebar-status,.menu-sep{display:none}.nav{min-width:86px;width:auto;height:36px;border:1px solid #1d3540}.rightbar{grid-area:planets;border-left:0;border-bottom:1px solid #263d48;padding:4px;display:flex;gap:5px;overflow-x:auto;overflow-y:hidden}.planet-card,.planet-list-title,.event-mini{display:none}.planet-list{display:flex;gap:5px;margin:0}.planet-choice{min-width:165px;height:68px;grid-template-columns:62px minmax(0,1fr)}.planet-choice img{width:62px;height:48px}#content{grid-area:main;padding:10px 12px 22px}.overview-hero{grid-template-columns:190px minmax(0,1fr)}.overview-planet{width:190px}.overview-stats{grid-template-columns:repeat(2,minmax(150px,1fr))}.overview-columns,.two-col{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.fleet-grid{grid-template-columns:1fr}.galaxy-table-wrap{max-height:calc(100vh - 300px)}}

/* phone */
@media(max-width:620px){.page-frame{grid-template-rows:132px minmax(0,1fr)}.topbar{height:132px;grid-template-columns:1fr 1fr;grid-template-rows:54px 78px}.brand-area{padding:3px 7px}.game-logo{width:135px}.account-area{font-size:24px;padding:3px 7px;gap:5px;flex-direction:column;align-items:flex-end}.server-line>span:first-child{display:none}.resource-bar{padding:4px 6px}.resource-cell{min-width:105px;height:62px}.resource-cell img{width:30px;height:30px}.game-grid{grid-template-rows:44px 72px minmax(0,1fr)}.nav{min-width:78px;font-size:24px;padding:0 9px}.rightbar{height:72px}.planet-choice{min-width:150px;height:62px;grid-template-columns:55px minmax(0,1fr)}.planet-choice img{width:55px;height:42px}#content{padding:8px}.overview-hero{grid-template-columns:1fr}.planet-visual-wrap{height:150px}.overview-planet{width:100%;height:150px;min-height:0;border-right:0;border-bottom:1px solid #294653}.overview-info{padding:10px}.overview-title-line h2{font-size:24px}.overview-stats{grid-template-columns:1fr;gap:0}.resource-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-box{padding:6px}.summary-box img{width:34px;height:34px;flex-basis:34px}.summary-box b{font-size:24px}.cards{grid-template-columns:1fr;padding:8px}.item-card{grid-template-columns:96px minmax(0,1fr)}.item-image{width:96px;height:118px}.fleet-target,.fleet-cargo,.galaxy-tools{align-items:stretch}.fleet-target label,.fleet-cargo label,.galaxy-tools label{flex:1 1 90px}.fleet-target input,.fleet-target select,.fleet-cargo input,.galaxy-tools input{width:100%}.fleet-cargo .big-action{width:100%}.fleet-pick{grid-template-columns:68px minmax(0,1fr) 64px}.fleet-pick img{width:68px}.galaxy-tools button{flex:0 0 42px}.message-head time{margin-left:0;width:100%}.table{font-size:24px}}
.card.locked{opacity:.68}.card.locked:hover{border-color:#263f4b;background:#0a1821}.requirement-ok,.requirement-missing{font-size:24px;margin:3px 0 6px;line-height:1.35}.requirement-ok{color:#648e70}.requirement-missing{color:#c07b72}.item-actions button:disabled,.item-actions input:disabled{opacity:.42;cursor:not-allowed;filter:grayscale(.5)}
.gal-actions{display:flex;gap:3px;flex-wrap:wrap}.gal-act{border:1px solid #355766;background:#102733;color:#9fc3d0;padding:3px 6px;font-size:24px;border-radius:2px}.gal-act:hover{background:#1d4558;color:#fff}
/* scrolling stays inside the active game pane, with stable gutters and touch momentum */
.sidebar,.rightbar,#content,.resource-bar,.table-scroll{-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;touch-action:pan-x pan-y}#content{scroll-behavior:auto;contain:layout paint}.sidebar,.rightbar{contain:layout paint}.resource-bar,.rightbar,.sidebar{overscroll-behavior-x:contain}
.admin-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0}.admin-stat-grid>div{border:1px solid #4f4933;background:#12140f;padding:8px;display:flex;justify-content:space-between;gap:8px}.admin-stat-grid span{color:#948c70;font-size:24px}.admin-stat-grid b{color:#e1c274}@media(max-width:620px){.admin-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.premium-active{border-color:#6a8d5d!important;box-shadow:inset 0 0 0 1px #6a8d5d33}
@supports(height:100dvh){body.in-game,.page-frame{height:100dvh}.page-frame{min-height:100dvh}}
.production-settings{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:7px;padding:10px 12px;align-items:end}.production-settings label{display:grid;gap:4px;color:#7895a2;font-size:24px}.production-settings select{background:#040c11;color:#d8e8ef;border:1px solid #345360;padding:6px}.production-settings button{border:1px solid #477184;background:linear-gradient(#245267,#163746);color:#dbeaf0;padding:7px 10px}@media(max-width:1050px){.production-settings{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:620px){.production-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.production-settings button{grid-column:1/-1}}
.planet-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.danger-soft-btn{border:1px solid #6e4744;background:#2b1718;color:#c88d88;padding:5px 9px}.danger-soft-btn:hover{background:#472326;color:#fff}
.score-table{min-width:560px}.score-table .my-score td{background:#17303d;color:#d9edf5;font-weight:600}
.alliance-head-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center}
.alliance-create,.alliance-head{padding:12px}.alliance-create h3,.alliance-head h3{margin:0 0 8px;color:#b8d0da}.alliance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #1e3641}.alliance-head h3 span{color:#7ea4b5}.alliance-head p{margin:4px 0;color:#728d99}.subheading{margin:0;padding:8px 12px;color:#9fb7c1;font-size:24px;background:#0d222c;border-top:1px solid #213b47;border-bottom:1px solid #213b47}.alliance-table{min-width:520px}

/* island resource allocation / production factor */
.energy-cell small{display:block;font-size:24px;line-height:1.1;margin-top:2px;white-space:nowrap}.energy-cell b.good,.energy-cell small.good{color:#79c98d}.energy-cell b.bad,.energy-cell small.bad{color:#e47f73}
.compact-body{padding:9px 12px}.production-factor-box{border:1px solid #355665;background:linear-gradient(180deg,#0c202a,#09171e);padding:10px 12px;box-shadow:inset 0 1px #ffffff08}.production-factor-box.shortage{border-color:#77483f;background:linear-gradient(180deg,#251613,#15100f)}.factor-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-end}.factor-head>div:first-child span,.factor-energy span{display:block;color:#7896a4;font-size:24px}.factor-head>div:first-child b{display:block;color:#dbeaf0;font-size:24px;line-height:1.05;margin-top:2px}.production-factor-box.shortage .factor-head>div:first-child b{color:#ef9b8f}.factor-energy{text-align:right}.factor-energy b{display:block;color:#c8dce4;font-size:24px}.factor-energy em{display:block;font-style:normal;font-size:24px;margin-top:2px}.factor-meter{height:8px;margin-top:8px;background:#02090d;border:1px solid #253d48;overflow:hidden}.factor-meter span{display:block;height:100%;background:linear-gradient(90deg,#3d7d55,#79bd7f)}.production-factor-box.shortage .factor-meter span{background:linear-gradient(90deg,#8c4b3f,#d98469)}.production-factor-box p{margin:7px 0 0;color:#83a495;font-size:24px}.production-factor-box.shortage p{color:#d99a8b}.resource-rule-note{margin-top:8px;color:#6f8995;font-size:24px;line-height:1.55}
.resource-production-scroll{max-height:none}.resource-production-table{min-width:720px}.resource-production-table th:nth-child(1){width:34%}.resource-production-table th:nth-child(2){width:13%}.resource-production-table th:nth-child(3){width:16%}.resource-production-table th:nth-child(4){width:17%}.resource-production-table th:nth-child(5){width:20%}.resource-production-table td{vertical-align:middle}.resource-production-table .power-row{background:#07151c}.resource-facility{display:flex;align-items:center;gap:9px;min-width:0}.resource-facility img{width:52px;height:42px;object-fit:cover;border:1px solid #2e4b58;background:#02090d;flex:0 0 52px}.resource-facility span{min-width:0}.resource-facility b,.resource-facility small{display:block}.resource-facility b{color:#cbdde4}.resource-facility small{color:#6f8995;font-size:24px;margin-top:2px}.production-percent{min-width:76px;background:#030b10;color:#d9e8ee;border:1px solid #355563;padding:6px 8px}.production-percent:focus{outline:1px solid #5d899c}.production-apply-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid #263e49;padding:9px 12px;background:#07131a}.production-apply-bar span{margin-right:auto;color:#6f8995;font-size:24px}.production-apply-bar .big-action{min-width:180px}
@media(max-width:900px){.resource-production-scroll{overflow:auto}.resource-production-table{min-width:690px}.factor-head{align-items:center}.production-apply-bar{position:sticky;bottom:0;z-index:3;background:#07131af2;backdrop-filter:blur(4px)}}
@media(max-width:620px){.compact-body{padding:7px}.factor-head{gap:8px}.factor-head>div:first-child b{font-size:24px}.factor-energy b{font-size:24px}.resource-production-table{min-width:640px}.resource-facility img{width:44px;height:36px;flex-basis:44px}.production-apply-bar{display:grid;grid-template-columns:1fr;padding:7px}.production-apply-bar span{margin:0}.production-apply-bar .big-action{width:100%;min-width:0}.resource-rule-note{font-size:24px}}
/* 外海前哨與戰術控制 */
.moon-note{padding:12px 14px}.moon-resource-summary{padding:12px}.moon-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px}.moon-tool{border:1px solid #294754;background:#081821;padding:12px;min-width:0}.moon-tool h3{margin:0 0 8px;color:#b7d4df}.tool-stat{font-size:24px;color:#76939f;margin-bottom:9px}.moon-form{display:flex;gap:7px;flex-wrap:wrap;align-items:end}.moon-form label{display:grid;gap:3px;color:#7896a2;font-size:24px}.moon-form input,.moon-form select,.moon-tool select,.tactical-row select{background:#030b10;border:1px solid #355563;color:#d9e8ee;padding:6px 7px}.moon-form input{width:95px}.moon-form button,.moon-tool button{border:1px solid #477184;background:linear-gradient(#245267,#163746);color:#dbeaf0;padding:7px 10px}.moon-form button:disabled,.moon-tool button:disabled{opacity:.45;cursor:not-allowed}.moon-result{margin-top:10px;border-top:1px solid #1e3742;padding-top:9px;color:#6f8995;font-size:24px;max-height:250px;overflow:auto}.jump-ships{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:8px 0}.jump-ship{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid #24404b;background:#07151c;padding:5px 7px}.jump-ship span{font-size:24px;color:#b3cad3}.jump-ship small{display:block;color:#647f8b}.jump-ship input{width:76px;background:#02090d;color:#dbeaf0;border:1px solid #31515f;padding:5px}.tactical-row{display:flex;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid #1e3540;border-bottom:1px solid #1e3540;background:#07151c}.tactical-row>span{color:#91aab5;font-size:24px;font-weight:600}.tactical-row small{color:#667f8a}.check-label{display:flex!important;align-items:center!important;grid-template-columns:auto 1fr!important;gap:5px!important;padding-bottom:6px}.check-label input{width:auto!important}.danger-act{border-color:#704842!important;color:#dba29a!important;background:#2b1718!important}.moon-grid .queue{font-size:24px}
@media(max-width:900px){.moon-grid{grid-template-columns:1fr}.jump-ships{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.moon-grid{padding:7px}.jump-ships{grid-template-columns:1fr}.tactical-row{align-items:flex-start;flex-wrap:wrap}.tactical-row small{width:100%}.moon-form{display:grid;grid-template-columns:repeat(3,1fr)}.moon-form label,.moon-form input{width:100%}.moon-form button{grid-column:1/-1}}

/* Facility help dialog and stable action buttons */
.item-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.item-actions .info-btn{border:1px solid #536875;background:linear-gradient(#26343d,#17242b);color:#b9ccd4}.item-actions .info-btn:hover{background:#324a56;color:#fff}.help-modal{position:fixed;inset:0;z-index:1500;background:#000a;display:grid;place-items:center;padding:18px}.help-modal-card{width:min(680px,calc(100vw - 28px));max-height:min(78vh,720px);overflow:hidden;background:linear-gradient(#10232d,#071219);border:1px solid #4d6a78;box-shadow:0 30px 90px #000;display:grid;grid-template-rows:auto minmax(0,1fr)}.help-modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;background:linear-gradient(#1a3b49,#102630);border-bottom:1px solid #385563}.help-modal-head h2{margin:0;color:#d6e5eb;font-size:24px}.help-modal-head button{width:34px;height:30px;border:1px solid #54707c;background:#0c1c24;color:#d6e5eb;font-size:24px;line-height:1}.help-modal-body{padding:14px 16px;overflow:auto;line-height:1.6;color:#a9bec8}.help-summary{margin:0 0 10px;color:#d0e0e6;font-size:24px}.help-current{margin:9px 0;padding:8px 10px;background:#0b1b23;border:1px solid #2c4855;color:#8fc1d2}.help-modal-body ul{margin:10px 0 14px;padding-left:22px}.help-modal-body li{margin:5px 0}.help-cost{border-top:1px solid #263f4b;padding-top:10px}.help-cost>b{display:block;margin-bottom:6px;color:#c7dbe3}body.modal-open{overflow:hidden}
@media(max-width:620px){.help-modal{padding:8px}.help-modal-card{width:100%;max-height:86dvh}.help-modal-body{padding:12px}.help-modal-head{padding:8px 10px}.help-modal-head h2{font-size:24px}.item-actions{gap:5px}.item-actions button{min-height:34px}}

/* 2026-08-20: resource capacity hover, upgrade deltas, and independent queue lanes */
.resource-cell.storage-resource{cursor:help;outline:none}.resource-cell.storage-resource:focus{border-color:#557889;box-shadow:0 0 0 1px #557889 inset}.resource-cell b.resource-normal{color:#eef7fa!important}.resource-cell b.resource-near-full{color:#e3a04f!important;text-shadow:0 0 8px #9a5a2140}.resource-cell b.resource-full{color:#e3655f!important;text-shadow:0 0 8px #b9403948}.resource-hover-tooltip{position:fixed;z-index:3000;display:none;pointer-events:none;max-width:min(330px,calc(100vw - 16px));padding:7px 10px;background:#02090df2;border:1px solid #456575;box-shadow:0 8px 24px #000b;color:#dcebf1;font-size:24px;line-height:1.4;white-space:nowrap}.resource-hover-tooltip.show{display:block}
.upgrade-preview{margin-top:8px;padding:7px 8px;background:#07141b;border:1px solid #203b47;font-size:24px;line-height:1.35}.upgrade-preview-title{color:#8fb4c2;font-weight:700;margin-bottom:4px}.upgrade-effect-row{display:grid;grid-template-columns:minmax(82px,.9fr) minmax(126px,1.25fr) auto;gap:6px;align-items:center;padding:2px 0;border-top:1px dotted #18313b}.upgrade-effect-row:first-of-type{border-top:0}.upgrade-effect-row>span{color:#718e9a;min-width:0}.upgrade-effect-row>b{color:#c2d6de;font-weight:500;white-space:nowrap}.upgrade-effect-row>em{font-style:normal;font-weight:700;white-space:nowrap;text-align:right}.effect-good{color:#79b98a}.effect-bad{color:#d67a70}.queue-busy-note{margin:5px 0 6px;padding:5px 7px;background:#241e12;border:1px solid #5e4b28;color:#c8a665;font-size:24px;line-height:1.35}.queue-lanes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:7px 10px;border-bottom:1px solid #1d3540;background:#07131a}.queue-lane{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;padding:5px 7px;border:1px solid #25414d;background:#081821;font-size:24px}.queue-lane>span{color:#6e8a96;white-space:nowrap}.queue-lane>b{overflow:hidden;text-overflow:clip;white-space:nowrap;color:#bad0d9;font-weight:600}.queue-lane>small{white-space:nowrap;color:#8ca6b1}.queue-lane.free b{color:#78b98a}.queue-lane.busy{border-color:#4d472c;background:#17170f}.queue-lane.busy b{color:#d5bd72}
@media(max-width:900px){.queue-lanes{display:flex;overflow-x:auto;scroll-snap-type:x proximity}.queue-lane{min-width:220px;scroll-snap-align:start}.upgrade-effect-row{grid-template-columns:minmax(84px,1fr) minmax(120px,1.3fr) auto}}
@media(max-width:620px){.resource-hover-tooltip{white-space:normal}.upgrade-preview{padding:6px}.upgrade-effect-row{grid-template-columns:1fr auto;gap:3px 7px}.upgrade-effect-row>span{grid-column:1}.upgrade-effect-row>b{grid-column:2;text-align:right}.upgrade-effect-row>em{grid-column:1/3;text-align:right}.queue-lane{min-width:205px}}

/* Merchant / Commander queue / Alliance text management */
.queue-pending{opacity:.82;border-left:3px solid #b88b32}.pending-label{color:#d5a851!important;font-weight:700}.alliance-text-view{padding:12px 14px;border:1px solid #244a5c;background:#07131a;line-height:1.7;min-height:46px;overflow-wrap:anywhere}.alliance-text-editor{margin:16px 0;padding:14px;border:1px solid #294f61;background:#081820}.alliance-text-editor label{display:block;margin:10px 0;color:#9db8c7}.alliance-text-editor textarea{display:block;width:100%;min-height:95px;margin-top:6px;resize:vertical;box-sizing:border-box}.merchant-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.merchant-summary>div,.merchant-storage>div{border:1px solid #294b5b;background:#07171e;padding:10px 12px}.merchant-summary span,.merchant-storage span{display:block;color:#789aaa;font-size:24px}.merchant-summary b,.merchant-storage b{display:block;margin-top:4px}.merchant-call,.merchant-offer,.merchant-storage{border:1px solid #315669;background:#081820;padding:14px;margin:12px 0}.merchant-rate{display:flex;gap:10px;flex-wrap:wrap}.merchant-rate span{padding:8px 12px;border:1px solid #34596a;background:#061219}.merchant-trade{display:grid;grid-template-columns:minmax(140px,1fr) minmax(140px,1fr) minmax(180px,1.3fr) auto;gap:10px;align-items:end;margin-top:14px}.merchant-trade label,.merchant-call label{display:flex;flex-direction:column;gap:5px}.merchant-preview{padding:9px 10px;border:1px solid #315566;background:#07151c;min-height:38px;box-sizing:border-box}.merchant-storage{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.merchant-storage h3{grid-column:1/-1;margin:0 0 3px}.alliance-table .gal-act{white-space:nowrap}
@media(max-width:900px){.merchant-summary,.merchant-storage{grid-template-columns:1fr}.merchant-trade{grid-template-columns:1fr 1fr}.merchant-preview,.merchant-trade button{grid-column:1/-1}}
@media(max-width:620px){.merchant-trade{grid-template-columns:1fr}.merchant-preview,.merchant-trade button{grid-column:auto}.alliance-text-editor textarea{min-height:120px}}
.queue-end{display:flex;align-items:center;gap:8px}.queue-cancel-btn{padding:4px 8px;min-height:28px;font-size:24px;background:#281313;border-color:#6d3434;color:#e5b3b3}@media(max-width:620px){.queue-end{width:100%;justify-content:space-between}}

/* 2026-08-21 UI overflow and icon detail pass */
.cards{grid-template-columns:repeat(auto-fit,minmax(360px,1fr));}
.card{min-height:0}
.item-card{grid-template-columns:150px minmax(0,1fr);align-items:stretch}
.item-image{width:150px;height:160px;object-fit:cover}
.item-info{padding:10px 12px;display:flex;flex-direction:column;gap:5px}
.item-info h3{line-height:1.25;overflow-wrap:anywhere;word-break:break-word}
.item-level,.requirement-ok,.requirement-missing,.queue-busy-note,.unit-meta,.muted{overflow-wrap:anywhere;word-break:break-word}
.cost-row{gap:8px 12px;line-height:1.45}
.item-actions{margin-top:auto;flex-wrap:wrap}
.item-actions button{white-space:nowrap}
.upgrade-preview{font-size:24px;line-height:1.45}
.upgrade-effect-row{grid-template-columns:minmax(96px,1fr) minmax(0,1.15fr) auto;gap:4px 8px}
.upgrade-effect-row>span,.upgrade-effect-row>b,.upgrade-effect-row>em{min-width:0;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
.upgrade-effect-row>em{text-align:right}
.queue-lanes{align-items:stretch}
.queue-lane{font-size:24px;line-height:1.35}
.queue-lane>span,.queue-lane>b,.queue-lane>small{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
@media(max-width:1180px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.item-card{grid-template-columns:132px minmax(0,1fr)}.item-image{width:132px;height:148px}}
@media(max-width:620px){.cards{grid-template-columns:1fr}.item-card{grid-template-columns:108px minmax(0,1fr)}.item-image{width:108px;height:132px}.upgrade-effect-row{grid-template-columns:1fr}.upgrade-effect-row>em{text-align:left}}

/* 2026-08-21 Shipyard / defense value preview */
.unit-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:7px;padding:7px;background:#07141b;border:1px solid #203b47}
.unit-stat-grid>div{min-width:0;padding:4px 5px;background:#0a1a22;border:1px solid #172e38}
.unit-stat-grid span{display:block;color:#6f8d99;font-size:24px;line-height:1.25;overflow-wrap:anywhere}
.unit-stat-grid b{display:block;color:#c2dae4;font-size:24px;font-weight:600;line-height:1.35;margin-top:2px;overflow-wrap:anywhere}

.unit-order-preview{min-height:31px;margin-top:6px;padding:5px 7px;border-left:2px solid #416c7d;background:#08171e;color:#7f9ca8;font-size:24px;line-height:1.45;overflow-wrap:anywhere}
.help-modal-body .unit-stat-grid{margin:10px 0 12px;grid-template-columns:repeat(3,minmax(0,1fr))}
.help-modal-body .unit-stat-grid span{font-size:24px}.help-modal-body .unit-stat-grid b{font-size:24px}
.help-subtitle{margin:13px 0 5px!important;padding:0!important;background:none!important;border:0!important;color:#bcd4dd!important;font-size:24px!important}
@media(max-width:1180px){.unit-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.unit-stat-grid,.help-modal-body .unit-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.unit-order-preview{font-size:24px}}

/* 2026-08-21 dismantle / expedition UI */
.demolish-btn{border-color:#7b4e4e!important;background:linear-gradient(#4c2a2a,#2c1717)!important;color:#ffd7d7!important}
.demolish-btn:hover:not(:disabled){background:linear-gradient(#653434,#3b1e1e)!important}
.demolish-btn:disabled{opacity:.38;cursor:not-allowed}
.demolish-confirm{display:grid;gap:12px}.demolish-warning{font-size:24px;line-height:1.6;margin:0;color:#e7d7d7}.demolish-level{font-size:24px;font-weight:700;color:#ffc0c0;text-align:center;padding:10px;border:1px solid #5b3434;background:#1f1010}.demolish-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.demolish-meta span{padding:7px 8px;background:#091820;border:1px solid #29434f;color:#9fb6c0;font-size:24px}.demolish-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:6px}.danger-action{border:1px solid #915353;background:linear-gradient(#7b3232,#491b1b);color:#fff;padding:8px 16px;border-radius:2px}.danger-action:hover{background:linear-gradient(#944040,#5b2323)}
@media(max-width:620px){.demolish-meta{grid-template-columns:1fr}.demolish-actions{display:grid;grid-template-columns:1fr 1fr}.demolish-actions button{width:100%}}
.auth-brand,.game-brand{display:flex;align-items:center;gap:10px}.auth-brand{justify-content:center;margin-bottom:8px}.brand-emblem{width:48px;height:48px;object-fit:contain}.auth-brand b,.game-brand b{display:block;color:#d5eaf3;letter-spacing:.7px;font-size:24px}.auth-brand small,.game-brand small{display:block;color:#7096a8;letter-spacing:1.8px;font-size:24px;margin-top:3px}.game-brand .brand-emblem{width:42px;height:42px}.brand-area{display:flex;align-items:center;padding-left:12px}
@media(max-width:620px){.game-brand b{font-size:24px}.game-brand small{font-size:24px}.game-brand .brand-emblem{width:34px;height:34px}.brand-area{padding-left:6px}}

/* 2026-08-21 萬潮群島海戰報告 / round replay */
.message-actions{display:flex;gap:7px;padding:0 9px 9px;flex-wrap:wrap}.message-actions button{border:1px solid #477184;background:linear-gradient(#245267,#163746);color:#dbeaf0;padding:6px 11px;border-radius:2px}.message-actions button:hover{background:linear-gradient(#316b83,#1e4658)}
.battle-replay-modal{position:fixed;inset:0;z-index:1800;background:rgba(0,4,8,.93);display:grid;place-items:center;padding:12px;backdrop-filter:blur(3px)}
.battle-replay-card{width:min(1240px,calc(100vw - 18px));max-height:min(95dvh,980px);display:grid;grid-template-rows:auto minmax(0,1fr);background:linear-gradient(180deg,#0b1b24 0,#050c11 100%);border:1px solid #4c7181;box-shadow:0 30px 110px #000,0 0 45px rgba(63,154,192,.08);overflow:hidden}
.battle-replay-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px;background:linear-gradient(180deg,#173642,#0e222c);border-bottom:1px solid #34515e}
.battle-replay-head h2{margin:0;color:#d9e9ef;font-size:24px}.battle-replay-head>div>div{font-size:24px;color:#7896a3;margin-top:2px}.battle-replay-head button{width:36px;height:32px;border:1px solid #53717f;background:#0a1b23;color:#dcebf1;font-size:24px;cursor:pointer}.battle-replay-head button:hover{background:#173542}
.battle-replay-body{overflow:auto;padding:10px 12px 14px}.battle-replay-result{text-align:center;font-weight:700;color:#d7e8ef;padding:8px;border:1px solid #284754;background:linear-gradient(90deg,#08171f,#0d2631,#08171f);margin-bottom:8px;letter-spacing:.2px}

/* 戰鬥動畫主舞台：依戰鬥發生位置切換海域環境，艦船與射擊層維持同一套戰鬥座標。 */
.battle-cinematic{position:relative;height:356px;overflow:hidden;border:1px solid #315363;background:#082b3a;isolation:isolate;box-shadow:inset 0 0 70px rgba(0,0,0,.6)}
.battle-ocean-sky,.battle-ocean-horizon,.battle-ocean-fog,.battle-sea-depth-layer,.battle-sea-haze,.battle-fx-layer,.battle-visual-fleet{position:absolute;inset:0;pointer-events:none}
.battle-ocean-sky{z-index:0;bottom:46%;background:linear-gradient(180deg,#6db8cf 0%,#9bd5df 42%,#d7ebdf 82%,rgba(223,239,229,.72) 100%)}
.battle-ocean-horizon{z-index:1;top:42%;bottom:auto;height:58%;background:linear-gradient(180deg,#277f9c 0%,#176a86 18%,#0c506c 48%,#08384f 100%);box-shadow:inset 0 7px 14px rgba(255,255,255,.12)}
/* 遠景魚群：取代原本搶眼的半圓浪線。只作遠景氣氛，不參與戰鬥判定，也不搶主體。 */
.battle-distant-school{position:absolute;z-index:2;width:150px;height:48px;pointer-events:none;opacity:.12;filter:blur(.35px);will-change:transform;mix-blend-mode:multiply}
.battle-distant-school i{position:absolute;left:var(--fx);top:var(--fy);width:14px;height:5px;border-radius:58% 48% 48% 58%;background:rgba(17,24,27,.78);transform:translate(-50%,-50%) scaleX(var(--dir,1)) scale(var(--fs,1));transform-origin:center;box-shadow:0 0 2px rgba(0,0,0,.24)}
.battle-distant-school i:before{content:"";position:absolute;right:100%;top:50%;width:0;height:0;transform:translateY(-50%);border-top:3px solid transparent;border-bottom:3px solid transparent;border-left:5px solid rgba(17,24,27,.72)}
.battle-distant-school.school-a{left:7%;top:50%;animation:battleSchoolDriftA 24s ease-in-out infinite alternate}
.battle-distant-school.school-b{right:8%;top:53%;width:132px;height:42px;opacity:.105;animation:battleSchoolDriftB 28s ease-in-out infinite alternate}
.battle-distant-school.school-c{left:43%;top:47%;width:108px;height:36px;opacity:.075;filter:blur(.55px);animation:battleSchoolDriftC 31s ease-in-out infinite alternate}
.battle-ocean-fog{z-index:2;top:30%;bottom:auto;height:40%;opacity:.08;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.8) 22%,transparent 44%,rgba(255,255,255,.62) 71%,transparent 100%);filter:blur(16px);animation:battleSeaFog 18s ease-in-out infinite alternate}
.battle-sea-depth-layer,.battle-sea-haze{z-index:0;opacity:0;animation:none!important}
.battle-cinematic:before{content:"";position:absolute;z-index:2;inset:0;background:linear-gradient(90deg,rgba(13,95,128,.08),transparent 35%,transparent 65%,rgba(153,66,43,.08)),linear-gradient(180deg,rgba(255,255,255,.035),transparent 22%,transparent 78%,rgba(0,0,0,.24));pointer-events:none}

/* 玩家領地／玩家外海前哨戰：清楚、正常的開放海面。 */
.battle-scene-player-sea .battle-ocean-sky{background:linear-gradient(180deg,#64aec8 0%,#98d3dc 44%,#d9e9d8 82%,#eef0d3 100%)}
.battle-scene-player-sea .battle-ocean-horizon{background:linear-gradient(180deg,#2787a4 0%,#15738f 20%,#0c5874 54%,#073c55 100%)}
.battle-scene-player-sea .battle-ocean-fog{opacity:.06}

/* 遠洋探索遭遇未知艦群：低能見度、深色海面與移動霧層。 */
.battle-scene-unknown-sea{background:#03151d;box-shadow:inset 0 0 90px rgba(0,0,0,.84)}
.battle-scene-unknown-sea .battle-ocean-sky{background:linear-gradient(180deg,#071923 0%,#0b2d38 46%,#1b4d55 78%,#385a57 100%)}
.battle-scene-unknown-sea .battle-ocean-horizon{background:linear-gradient(180deg,#0b4858 0%,#083847 22%,#052b39 56%,#031b27 100%);box-shadow:inset 0 8px 18px rgba(114,205,207,.08)}
.battle-scene-unknown-sea .battle-ocean-fog{opacity:.34;background:linear-gradient(90deg,transparent 0%,rgba(126,184,178,.72) 18%,transparent 40%,rgba(156,191,179,.48) 68%,transparent 100%);filter:blur(18px);animation-duration:13s}
.battle-scene-unknown-sea .battle-distant-school{opacity:.15;filter:blur(.5px) brightness(.72)}
.battle-scene-unknown-sea:after{content:"";position:absolute;z-index:1;inset:0;background:radial-gradient(ellipse at 72% 24%,rgba(79,126,125,.16),transparent 28%),radial-gradient(ellipse at 27% 38%,rgba(13,68,76,.45),transparent 34%),linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.34));pointer-events:none}

/* 掠潮者海域：未知海面加上風暴雲與偏暖的遠方天光。 */
.battle-scene-raider-sea .battle-ocean-sky{background:linear-gradient(180deg,#0c1922 0%,#26333a 48%,#745241 82%,#a16f4b 100%)}
.battle-scene-raider-sea .battle-ocean-horizon{background:linear-gradient(180deg,#1a5b68 0%,#0c4556 24%,#073445 58%,#041f2d 100%)}
.battle-scene-raider-sea .battle-ocean-fog{opacity:.24;background:linear-gradient(90deg,transparent,rgba(166,180,166,.55),transparent 38%,rgba(139,157,151,.46),transparent)}

/* 潮汐事件航區：海面能量與浪光更明顯，但仍維持海戰可讀性。 */
.battle-scene-tide-sea .battle-ocean-sky{background:linear-gradient(180deg,#0b3646 0%,#176473 46%,#5aa6a3 78%,#b4d4bf 100%)}
.battle-scene-tide-sea .battle-ocean-horizon{background:linear-gradient(180deg,#2b9a9f 0%,#14767f 21%,#095965 53%,#043843 100%)}
.battle-scene-tide-sea .battle-distant-school{opacity:.10;filter:blur(.4px) brightness(.82)}
.battle-scene-tide-sea .battle-ocean-fog{opacity:.18}

/* 深海霸主航區：壓低天光與海面亮度，保留巨型未知陰影感。 */
.battle-scene-boss-sea{background:#02080d;box-shadow:inset 0 0 110px rgba(0,0,0,.92)}
.battle-scene-boss-sea .battle-ocean-sky{background:linear-gradient(180deg,#02070d 0%,#08151e 46%,#142b31 80%,#243838 100%)}
.battle-scene-boss-sea .battle-ocean-horizon{background:linear-gradient(180deg,#0a3540 0%,#072832 26%,#041d27 58%,#02131c 100%)}
.battle-scene-boss-sea .battle-ocean-fog{opacity:.32;background:linear-gradient(90deg,transparent,rgba(83,121,119,.5),transparent 42%,rgba(93,110,107,.42),transparent)}
.battle-scene-boss-sea:after{content:"";position:absolute;z-index:1;left:49%;top:24%;width:44%;height:34%;transform:translateX(-50%);background:radial-gradient(ellipse at 50% 100%,rgba(0,0,0,.72) 0 23%,rgba(0,0,0,.4) 35%,transparent 68%);filter:blur(12px);pointer-events:none}
.battle-cinematic-round{position:absolute;z-index:8;left:50%;top:12px;transform:translateX(-50%);padding:5px 12px;border:1px solid rgba(135,188,208,.38);background:rgba(5,18,25,.82);color:#d9eef6;font-size:24px;letter-spacing:.7px;box-shadow:0 7px 24px #0008;pointer-events:none}
.battle-cinematic-caption{position:absolute;z-index:8;bottom:10px;display:flex;align-items:center;gap:7px;padding:5px 8px;background:rgba(3,12,17,.8);border:1px solid rgba(91,132,149,.42);max-width:42%;pointer-events:none}.battle-cinematic-caption.attacker{left:10px}.battle-cinematic-caption.defender{right:10px;text-align:right}.battle-cinematic-caption b{color:#d5e9f1;font-size:24px;white-space:nowrap;overflow:hidden;text-overflow:clip}.battle-cinematic-caption span{font-size:24px;color:#6f919f}.battle-cinematic-caption.attacker span{color:#72cdea}.battle-cinematic-caption.defender span{color:#e4947e}
.battle-visual-fleet{z-index:3;width:46%;right:auto}.battle-visual-fleet.defender{left:auto;right:0}.battle-visual-sprite{position:absolute;left:var(--bx);top:var(--by);width:116px;height:62px;z-index:var(--depth);transform:translate(-50%,-50%) scale(var(--ship-scale));transform-origin:center;animation:battleShipFloat 2.8s ease-in-out var(--float-delay) infinite alternate;filter:drop-shadow(0 8px 8px rgba(0,0,0,.7));will-change:transform,opacity,filter}.battle-visual-fleet.defender .battle-visual-sprite{transform:translate(-50%,-50%) scaleX(-1) scale(var(--ship-scale));animation-name:battleShipFloatDefender}.battle-visual-sprite img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 7px rgba(122,221,255,.12));pointer-events:none}.battle-engine-halo{position:absolute;z-index:-1;left:0;top:50%;width:38%;height:34%;transform:translate(-20%,-50%);border-radius:50%;background:radial-gradient(ellipse,#8deaff99 0,#28a7df55 27%,transparent 70%);filter:blur(6px);animation:battleEnginePulse .65s ease-in-out infinite alternate}.battle-visual-fleet.defender .battle-engine-halo{left:0;right:auto;transform:translate(-20%,-50%);background:radial-gradient(ellipse,#ffc3a699 0,#e06b4a55 27%,transparent 70%);animation-name:battleEnginePulse}.battle-ship-shadow{position:absolute;left:18%;right:18%;bottom:2%;height:10px;background:#000;filter:blur(7px);opacity:.6;border-radius:50%}
.battle-visual-sprite.firing{animation:battleAttackLunge .48s ease-out,battleShipFloat 2.8s ease-in-out .48s infinite alternate}.battle-visual-fleet.defender .battle-visual-sprite.firing{animation:battleAttackLungeDefender .48s ease-out,battleShipFloatDefender 2.8s ease-in-out .48s infinite alternate}.battle-visual-sprite.hit{filter:drop-shadow(0 0 18px #fff) brightness(1.65)}.battle-visual-sprite.destroyed{animation:battleShipDestroyed .85s cubic-bezier(.2,.75,.3,1) forwards!important;filter:brightness(2) saturate(.4) drop-shadow(0 0 20px #ffb077);pointer-events:none}
.battle-fx-layer{z-index:6;overflow:hidden}.battle-projectile{position:absolute;height:2px;transform-origin:left center;border-radius:99px;opacity:0;box-shadow:0 0 7px currentColor,0 0 16px currentColor}.battle-projectile.attacker{color:#8cecff;background:linear-gradient(90deg,transparent,#75e7ff 15%,#fff 88%,#fff)}.battle-projectile.defender{color:#ff9b7e;background:linear-gradient(90deg,transparent,#ff8669 15%,#fff 88%,#fff)}.battle-bolt{position:absolute;width:10px;height:10px;border-radius:50%;opacity:0}.battle-bolt.attacker{background:#eaffff;box-shadow:0 0 10px #7deaff,0 0 22px #20a5df}.battle-bolt.defender{background:#fff3ed;box-shadow:0 0 10px #ff9a7a,0 0 22px #d94f2e}
.battle-impact{position:absolute;width:0;height:0;pointer-events:none}.battle-impact .core{position:absolute;left:-14px;top:-14px;width:28px;height:28px;border-radius:50%;background:#fff;box-shadow:0 0 15px #fff,0 0 35px #ffb464,0 0 60px #ff6c32;animation:battleImpactCore .62s ease-out forwards}.battle-impact .ring{position:absolute;left:0;top:0;border-radius:50%;border:2px solid #dffbff;transform:translate(-50%,-50%);opacity:.9}.battle-impact .r1{animation:battleShockRing .7s ease-out forwards}.battle-impact .r2{animation:battleShockRing .8s .08s ease-out forwards;border-color:#ffb77c}.battle-impact b{position:absolute;left:-2px;top:-2px;width:4px;height:18px;background:linear-gradient(#fff,#ff9a54,transparent);transform-origin:2px 2px;transform:rotate(var(--pa)) translateY(-8px);animation:battleSpark .75s ease-out forwards}.battle-impact.heavy .core{width:42px;height:42px;left:-21px;top:-21px;box-shadow:0 0 20px #fff,0 0 48px #ffcb75,0 0 85px #ff572c}.battle-impact.heavy b{height:27px}
.battle-debris-cloud{position:absolute;z-index:7}.battle-debris-cloud i{position:absolute;left:-3px;top:-2px;width:7px;height:4px;background:#9fb2ba;border:1px solid #e8f3f7;box-shadow:0 0 6px #ff9c5f;transform:rotate(var(--da));animation:battleDebris 1.2s cubic-bezier(.15,.6,.25,1) forwards}.battle-shake{animation:battleScreenShake .42s linear}

.battle-stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(285px,.88fr) minmax(0,1fr);gap:8px;margin-top:8px;min-height:390px}.battle-side,.battle-round-center{position:relative;z-index:2;border:1px solid #294653;background:#07151c;min-width:0}.battle-side header{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;background:#102833;border-bottom:1px solid #294653}.battle-side header b{color:#c8dce4}.battle-side header span{font-size:24px;color:#718f9b}.battle-tech{display:flex;gap:5px;flex-wrap:wrap;padding:7px 8px;border-bottom:1px solid #18323d}.battle-tech span{font-size:24px;padding:3px 5px;background:#0e222b;border:1px solid #284a58;color:#88a9b6}.battle-fleet-grid{display:grid;gap:5px;padding:8px}.battle-unit{display:grid;grid-template-columns:68px minmax(0,1fr);gap:7px;align-items:center;border:1px solid #1c3742;background:#081a22;min-width:0;transition:border-color .2s,background .2s}.battle-unit.took-loss{border-color:#71433c;background:linear-gradient(90deg,#1b1718,#081a22 58%)}.battle-unit img{width:68px;height:48px;object-fit:cover;background:#03090d}.battle-unit>div{min-width:0;padding:4px 6px 4px 0}.battle-unit b,.battle-unit span,.battle-unit em{display:block;white-space:nowrap;overflow:hidden;text-overflow:clip}.battle-unit b{color:#bad1da;font-size:24px}.battle-unit span{font-size:24px;color:#7e99a5}.battle-unit em{font-size:24px;color:#e38a7c;font-style:normal}.battle-unit em.survived{color:#72ae83}.battle-empty{padding:18px;text-align:center;color:#5d7985}.battle-round-center{padding:8px}.battle-round-center>strong{display:block;text-align:center;color:#dbeaf0;font-size:24px;margin:2px 0 8px}.battle-fire-block{border:1px solid #213d49;background:#081820;margin-bottom:7px}.battle-fire-block h4{margin:0;padding:6px 8px;background:#102832;color:#a9c4ce;font-size:24px}.battle-stat-grid{display:grid;grid-template-columns:1fr 1fr}.battle-stat-grid>div{padding:5px 7px;border-top:1px solid #17313c;min-width:0}.battle-stat-grid>div:nth-child(odd){border-right:1px solid #17313c}.battle-stat-grid span,.battle-stat-grid b{display:block}.battle-stat-grid span{font-size:24px;color:#647f8b}.battle-stat-grid b{font-size:24px;color:#c4d7df;overflow-wrap:anywhere}
.battle-replay-controls{display:flex;justify-content:center;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 4px 4px}.battle-replay-controls button{border:1px solid #477184;background:linear-gradient(#245267,#163746);color:#dbeaf0;padding:7px 13px;cursor:pointer}.battle-replay-controls button:hover{filter:brightness(1.12)}.battle-replay-controls span{color:#7895a1;font-size:24px;min-width:60px;text-align:center}.battle-summary{margin-top:6px;padding:8px 10px;border:1px solid #213c47;background:#07151c;color:#8ea8b3;font-size:24px;line-height:1.6}.battle-summary b{color:#bfd3db}.battle-summary .warn{color:#c9a56b}

@keyframes battleSchoolDriftA{0%{transform:translate3d(-7px,0,0)}100%{transform:translate3d(11px,3px,0)}}@keyframes battleSchoolDriftB{0%{transform:translate3d(8px,1px,0)}100%{transform:translate3d(-9px,-2px,0)}}@keyframes battleSchoolDriftC{0%{transform:translate3d(-4px,1px,0)}100%{transform:translate3d(6px,-1px,0)}}@keyframes battleSeaFog{0%{transform:translateX(-7%) scaleX(1)}100%{transform:translateX(7%) scaleX(1.08)}}@keyframes battleStarsFar{from{background-position:0 0,0 0,0 0}to{background-position:-460px 60px,-310px 30px,-170px 90px}}@keyframes battleStarsNear{from{background-position:0 0,0 0,0 0}to{background-position:-620px 100px,-440px 55px,-240px 125px}}@keyframes battleEnginePulse{from{opacity:.42;transform:translate(-20%,-50%) scale(.82)}to{opacity:.9;transform:translate(-20%,-50%) scale(1.15)}}@keyframes battleEnginePulseDefender{from{opacity:.42;transform:translate(-20%,-50%) scale(.82)}to{opacity:.9;transform:translate(-20%,-50%) scale(1.15)}}@keyframes battleShipFloat{0%{transform:translate(-50%,-50%) scale(var(--ship-scale)) translate3d(-4px,-3px,0) rotate(-1deg)}100%{transform:translate(-50%,-50%) scale(var(--ship-scale)) translate3d(8px,5px,0) rotate(1.2deg)}}@keyframes battleShipFloatDefender{0%{transform:translate(-50%,-50%) scaleX(-1) scale(var(--ship-scale)) translate3d(-4px,-3px,0) rotate(-1deg)}100%{transform:translate(-50%,-50%) scaleX(-1) scale(var(--ship-scale)) translate3d(8px,5px,0) rotate(1.2deg)}}@keyframes battleAttackLunge{0%{transform:translate(-50%,-50%) scale(var(--ship-scale)) translateX(0)}35%{transform:translate(-50%,-50%) scale(var(--ship-scale)) translateX(17px)}100%{transform:translate(-50%,-50%) scale(var(--ship-scale)) translateX(0)}}@keyframes battleAttackLungeDefender{0%{transform:translate(-50%,-50%) scaleX(-1) scale(var(--ship-scale)) translateX(0)}35%{transform:translate(-50%,-50%) scaleX(-1) scale(var(--ship-scale)) translateX(17px)}100%{transform:translate(-50%,-50%) scaleX(-1) scale(var(--ship-scale)) translateX(0)}}@keyframes battleShipDestroyed{0%{opacity:1;transform:translate(-50%,-50%) scale(var(--ship-scale));filter:brightness(1)}18%{filter:brightness(3)}45%{opacity:.9;transform:translate(-50%,-50%) scale(var(--ship-scale)) rotate(9deg)}100%{opacity:0;transform:translate(-50%,-50%) scale(.25) rotate(48deg) translate(60px,45px);filter:brightness(.3)}}@keyframes battleImpactCore{0%{opacity:0;transform:scale(.2)}18%{opacity:1;transform:scale(1.45)}100%{opacity:0;transform:scale(.1)}}@keyframes battleShockRing{0%{width:8px;height:8px;opacity:.95}100%{width:112px;height:112px;opacity:0}}@keyframes battleSpark{0%{opacity:1;transform:rotate(var(--pa)) translateY(-6px) scaleY(.4)}100%{opacity:0;transform:rotate(var(--pa)) translateY(calc(var(--pd)*-1)) scaleY(.1)}}@keyframes battleDebris{0%{opacity:1;transform:rotate(var(--da)) translate(0,0)}100%{opacity:0;transform:rotate(calc(var(--da) + var(--dr))) translate(var(--dd),calc(var(--dd)*.55))}}@keyframes battleScreenShake{0%,100%{transform:translate(0,0)}20%{transform:translate(-4px,2px)}40%{transform:translate(4px,-2px)}60%{transform:translate(-3px,-1px)}80%{transform:translate(3px,2px)}}

@media(max-width:900px){.battle-cinematic{height:300px}.battle-visual-sprite{width:94px;height:52px}.battle-stage{grid-template-columns:1fr;min-height:0}.battle-round-center{grid-row:2}.battle-side.defender{grid-row:3}.battle-replay-card{max-height:96dvh}.battle-fleet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.battle-replay-modal{padding:4px}.battle-replay-card{width:100%;max-height:97dvh}.battle-replay-body{padding:6px}.battle-cinematic{height:240px}.battle-visual-sprite{width:72px;height:42px}.battle-cinematic-caption{max-width:47%;bottom:6px}.battle-fleet-grid{grid-template-columns:1fr}.battle-stat-grid{grid-template-columns:1fr}.battle-stat-grid>div:nth-child(odd){border-right:0}.battle-replay-head h2{font-size:24px}.battle-unit{grid-template-columns:58px minmax(0,1fr)}.battle-unit img{width:58px;height:43px}}
@media(prefers-reduced-motion:reduce){.battle-sea-depth-layer,.battle-distant-school,.battle-ocean-fog,.battle-visual-sprite,.battle-engine-halo{animation:none!important}.battle-cinematic{scroll-behavior:auto}}

/* 航隊派遣：即時補給與載貨預估 */
.fleet-dispatch-summary{display:grid;grid-template-columns:repeat(3,minmax(190px,1fr));gap:7px;margin:0 12px 9px;padding:8px;background:#06131a;border:1px solid #294754}
.fleet-dispatch-summary>div{min-width:0;padding:7px 9px;background:#091a22;border:1px solid #1d3945}
.fleet-dispatch-summary span,.fleet-dispatch-summary b{display:block;min-width:0}
.fleet-dispatch-summary span{font-size:24px;color:#718e9a;margin-bottom:3px}
.fleet-dispatch-summary b{font-size:24px;color:#c5dce5;white-space:nowrap;overflow:hidden;text-overflow:clip}
.fleet-dispatch-summary .fleet-preview-primary{border-color:#426b7d;background:#0d222c}
.fleet-dispatch-summary .fleet-preview-primary span{color:#8fb0bd}
.fleet-dispatch-summary .fleet-preview-fuel{color:#8fd6ec}
.fleet-dispatch-summary .fleet-preview-bad{color:#e28a80!important}
.fleet-dispatch-summary.has-error{border-color:#6e4745}
@media(max-width:900px){.fleet-dispatch-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.fleet-dispatch-summary{grid-template-columns:1fr;margin:0 8px 8px;padding:6px}.fleet-dispatch-summary>div{display:flex;justify-content:space-between;align-items:center;gap:10px}.fleet-dispatch-summary span{margin:0}.fleet-dispatch-summary b{text-align:right}}
.build-version{font-size:24px;color:#6f92a0;border:1px solid #294754;background:#081922;padding:2px 5px;letter-spacing:.4px;white-space:nowrap}

/* v2026.08.21.3：海域第 16 格固定為無主外海探索區 */
.expedition-slot-row{background:linear-gradient(90deg,rgba(18,46,58,.72),rgba(7,25,34,.9));border-top:1px solid #31596a}
.expedition-slot-row td{border-top-color:#31596a}
.expedition-slot-label{display:flex;flex-direction:column;gap:2px}
.expedition-slot-label b{color:#9ddcf0;font-weight:700}
.expedition-slot-label small{color:#668895;font-size:24px}
.gal-act:disabled{opacity:.38;cursor:not-allowed;filter:saturate(.35)}

/* v2026.08.21.5 - Continuous suppression visibility */
.followup-strike-brief{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:start;margin-top:6px;padding:6px 7px;border:1px solid #3a4f39;background:linear-gradient(90deg,#0d1f1a,#08171b)}
.followup-strike-brief span{font-size:24px;color:#8fb899;white-space:nowrap}.followup-strike-brief b{font-size:24px;color:#c7dfcb;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.followup-strike-help{margin:10px 0 12px}.followup-strike-help h4{margin:9px 0 5px;color:#9fb8c2;font-size:24px;font-weight:600}.followup-strike-list{display:grid;gap:4px}.followup-strike-list>div{display:grid;grid-template-columns:minmax(0,1fr) 58px minmax(150px,.9fr);gap:8px;align-items:center;padding:6px 8px;background:#081820;border:1px solid #203b47}.followup-strike-list span{color:#b9d0d8;font-size:24px}.followup-strike-list b{color:#d9e9cb;font-size:24px;text-align:right}.followup-strike-list em{color:#708e99;font-size:24px;font-style:normal;text-align:right}.followup-strike-none{padding:6px 8px;background:#081820;border:1px solid #203b47;color:#708e99;font-size:24px}
@media(max-width:620px){.followup-strike-list>div{grid-template-columns:minmax(0,1fr) 48px}.followup-strike-list em{grid-column:1/-1;text-align:left}}


/* v2026.08.21.6 - 艦船／防禦／衛星拆解 */
.unit-scrap-btn,.table-manage-btn{border:1px solid #6a4a43;background:#241615;color:#d9a099;border-radius:3px;cursor:pointer}
.unit-scrap-btn:hover,.table-manage-btn:hover{background:#321c1a;border-color:#8a5a50;color:#f0b9ae}
.table-manage-btn{padding:5px 9px;font-size:24px;white-space:nowrap}
.unit-scrap-confirm{max-width:620px}.unit-scrap-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:10px 0}
.unit-scrap-entry input{width:100%;min-width:0}.unit-scrap-preview{margin:8px 0 14px;padding:10px 12px;border:1px solid #314954;background:#07171e;color:#9fb7c1;line-height:1.6}.unit-scrap-preview b{color:#d8e7ed}
@media(max-width:620px){.unit-scrap-entry{grid-template-columns:1fr}.unit-scrap-entry .soft-btn{width:100%}}

/* v2026.08.21.7 - 玩家封禁狀態與管理介面 */
.ban-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 25%,rgba(50,88,108,.28),transparent 38%),linear-gradient(180deg,#07131a,#02070b 70%)}
.ban-card{width:min(560px,calc(100vw - 28px));border:1px solid #5f4440;background:linear-gradient(180deg,#15232a,#0a1116);box-shadow:0 24px 80px #000;padding:24px}
.ban-card .auth-brand{margin-bottom:18px}.ban-status{display:inline-block;padding:5px 10px;border:1px solid #824b43;background:#2a1615;color:#ed9b8f;font-size:24px;font-weight:700;letter-spacing:.08em}.ban-card h1{margin:13px 0 18px;color:#e1edf1;font-size:25px}
.ban-reason-box{border:1px solid #553f3a;background:#171211;padding:14px 16px;display:grid;gap:7px}.ban-reason-box span{color:#9b7770;font-size:24px}.ban-reason-box strong{color:#f0c0b6;font-size:24px;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap}.ban-time{margin-top:10px;color:#7f969f;font-size:24px}.ban-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}.ban-actions button{min-width:116px}
.ban-badge,.active-badge,.banned-protected{display:inline-flex;align-items:center;justify-content:center;border-radius:2px;font-size:24px;font-weight:700;white-space:nowrap}.ban-badge{padding:2px 6px;border:1px solid #7b453f;background:#2a1715;color:#e79083}.active-badge{padding:2px 6px;border:1px solid #37604a;background:#102018;color:#7fc091}.banned-protected{padding:4px 7px;border:1px solid #624641;background:#201514;color:#c9867c}
.admin-player-table-wrap{margin-top:10px;max-height:430px}.admin-player-table{min-width:920px}.admin-player-table td{vertical-align:middle}.admin-player-table td:first-child b,.admin-player-table td:nth-child(4)>small{display:block}.admin-player-table td:first-child small,.admin-player-table td:nth-child(4)>small{margin-top:3px;color:#6f8791;font-size:24px}.admin-player-banned{background:rgba(90,43,38,.14)}.admin-ban-control{display:flex;gap:6px;align-items:center;min-width:300px}.admin-ban-control input{min-width:190px;flex:1}.admin-ban-btn{border-color:#74433d!important;background:linear-gradient(#522a27,#311817)!important;color:#efb0a6!important}.admin-unban-btn{border-color:#37624c!important;background:linear-gradient(#254d38,#173123)!important;color:#a7d7b7!important}.admin-self-note{color:#8ca1aa;font-size:24px}
@media(max-width:620px){.ban-card{padding:18px}.ban-actions{flex-direction:column}.ban-actions button{width:100%}}

/* v2026.08.21.8 - 聯合作戰 / 外海事件 / 情報 / 玩家市場 / 戰績 / 珍珠道具 */
.deep-space-row{background:linear-gradient(90deg,rgba(25,35,53,.86),rgba(6,20,30,.94));border-top:1px solid #374d66}.deep-event,.debris-cell{display:flex;flex-direction:column;gap:3px}.deep-event>b{color:#bddcf0}.deep-event small,.debris-cell small{color:#718e9d;font-size:24px}.debris-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:3px}.debris-actions .gal-act{font-size:24px;padding:3px 5px}
.fleet-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.fleet-row-actions>b{min-width:84px;text-align:right}.joint-attack-panel{margin:9px 12px 12px;border:1px solid #345361;background:#071720}.joint-attack-head{display:flex;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid #29444f}.joint-attack-head>b{color:#b5d7e4}.joint-attack-head>span{color:#7897a3;font-size:24px}.joint-attack-groups,.joint-attack-invites{display:grid;gap:5px;padding:7px 10px}.joint-attack-groups>div,.joint-attack-invites>div{display:flex;align-items:center;gap:7px;padding:6px 7px;background:#0b1e27;border:1px solid #203a45}.joint-attack-groups>div span,.joint-attack-invites>div span{flex:1;min-width:0}.joint-attack-groups small{color:#78919b}.joint-attack-create-form{display:grid;gap:8px}.joint-attack-create-form>label:first-child{display:grid;gap:5px}.joint-attack-member-check{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid #28414b;background:#081a22}
.intel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:9px}.intel-card{border:1px solid #31505d;background:#071820;padding:10px}.intel-stale{border-color:#625740;opacity:.86}.intel-head{display:flex;justify-content:space-between;gap:8px}.intel-head b{color:#c7e0e8}.intel-head span,.intel-age{font-size:24px;color:#728e99}.intel-age{margin:5px 0 8px}.intel-lines{display:grid;gap:5px}.intel-lines>div{display:grid;grid-template-columns:60px minmax(0,1fr);gap:7px;padding:5px 6px;background:#0a1d25}.intel-lines span{color:#6f8f9a}.intel-lines b{font-weight:500;color:#afc8d1;overflow-wrap:anywhere}
.market-create{border:1px solid #34515d;background:#071820;padding:10px;margin-bottom:10px}.market-form{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:7px;align-items:end}.market-form label,.moonshot-target label{display:grid;gap:4px}.market-ratio-hint{margin-top:8px;font-size:24px;color:#89a4ae}.market-table{min-width:760px}.stats-rank,.stats-grid{display:grid;gap:7px}.stats-rank{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:10px}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.stats-rank>div,.stats-grid>div{border:1px solid #294752;background:#081a22;padding:9px}.stats-rank span,.stats-grid span{display:block;color:#74909b;font-size:24px}.stats-rank b,.stats-grid b{display:block;margin-top:3px;color:#c4dce5;font-size:24px}.stats-recent{display:grid;gap:5px}.stats-recent>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:7px 8px;border:1px solid #29434f;background:#081922}.stats-recent small{color:#748d97}
.item-effect-bar{display:flex;gap:7px;align-items:center;flex-wrap:wrap;border:1px solid #355242;background:#0a1c18;padding:8px 10px;margin-bottom:10px}.item-effect-bar>b{color:#b8d7c0}.item-effect-bar span{padding:3px 6px;border:1px solid #325344;background:#0d251d;color:#8fc5a0;font-size:24px}.item-shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}.item-shop-card{border:1px solid #304b57;background:#081922;padding:9px;display:grid;gap:6px}.item-shop-card>div:first-child{display:flex;justify-content:space-between;gap:8px}.item-shop-card b{color:#c5dde6}.item-shop-card span,.item-shop-card small{color:#78949f;font-size:24px}.item-shop-actions{display:flex;gap:6px;flex-wrap:wrap}.moonshot-target{display:grid;grid-template-columns:repeat(3,minmax(100px,180px));gap:7px;margin:8px 0 10px}
@media(max-width:900px){.market-form{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-rank{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.joint-attack-head,.joint-attack-groups>div,.joint-attack-invites>div{align-items:flex-start;flex-direction:column}.fleet-row-actions{justify-content:flex-start}.market-form,.moonshot-target,.stats-rank{grid-template-columns:1fr}.stats-recent>div{grid-template-columns:1fr}.intel-grid{grid-template-columns:1fr}}


/* v2026.08.21.9 - 戰鬥直接使用目前單位圖卡；資料庫欄位驗證面板 */
.battle-visual-sprite .battle-card-art{width:100%;height:100%;object-fit:cover;border:1px solid rgba(116,174,199,.42);box-shadow:0 0 14px rgba(72,157,195,.22),inset 0 0 16px rgba(0,0,0,.55);background:#06131a;border-radius:3px}
.admin-schema-line{margin:9px 0;padding:9px 10px;border:1px solid #294754;background:#081922;color:#a9c4cf;line-height:1.6}
.admin-schema-result{display:grid;gap:4px;margin-top:9px;padding:9px 10px;border:1px solid #315363;background:#06131a;color:#9fb8c2;font-size:24px;line-height:1.55}
.admin-schema-result b{color:#d5e7ee}.admin-schema-result em{font-style:normal;color:#e39889}
.admin-expedition-test-result span{display:block;white-space:normal;overflow-wrap:anywhere}.admin-expedition-test-result b+span{margin-top:4px}
\n\n/* v2026.08.21.10：外海前哨完整資訊、島位加成、戰報收藏與分享 */\n.slot-bonus-note{margin-top:10px;padding:10px 12px;border:1px solid rgba(93,180,255,.24);background:rgba(30,78,112,.22);border-radius:8px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.slot-bonus-note b{color:#fff}.slot-bonus-note span{color:#c9dded}.moon-profile{display:grid;grid-template-columns:150px 1fr;gap:18px;align-items:center;margin-bottom:18px;padding:16px;border:1px solid rgba(115,188,255,.22);background:linear-gradient(135deg,rgba(16,31,50,.94),rgba(13,23,39,.85));border-radius:12px}.moon-profile>img{width:145px;height:105px;object-fit:cover;border-radius:10px}.moon-profile h3{margin:0 0 10px}.moon-profile p{margin:9px 0;color:#9fb5c7}.moon-profile-stats{display:flex;gap:10px;flex-wrap:wrap}.moon-profile-stats span{min-width:120px;padding:8px 10px;background:rgba(255,255,255,.045);border-radius:8px;color:#9fb5c7}.moon-profile-stats b{display:block;color:#fff;font-size:24px}.moon-destroy-samples{display:flex;gap:6px;flex-wrap:wrap}.moon-destroy-samples span{font-size:24px;padding:4px 7px;border-radius:6px;background:rgba(123,160,195,.10);color:#bdcddd}.galaxy-object>span{display:flex;flex-direction:column;gap:2px}.galaxy-object small{font-size:24px;color:#8ca6bb}.battle-library-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.battle-library-head>div{display:flex;gap:8px}.battle-library-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:12px}.battle-library-card{padding:14px;border:1px solid rgba(100,156,203,.22);background:rgba(12,23,38,.74);border-radius:10px}.battle-library-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.battle-library-title>div{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:6px}.battle-fav-btn{width:36px;min-width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;flex:0 0 36px;font-size:24px;line-height:1;border:0;background:transparent;color:#8094a7;padding:0;cursor:pointer;border-radius:8px}.battle-fav-btn>img{display:block;width:24px;height:24px;object-fit:contain}.battle-fav-btn.active{color:#ffd45b}.battle-library-meta{margin:10px 0;display:grid;gap:4px;color:#9fb3c5;font-size:24px}.battle-library-meta b{color:#e9f5ff}.battle-library-actions{display:flex;gap:7px;flex-wrap:wrap}.battle-library-actions button{font-size:24px}.deep-event small{display:block}.share-battle-body{background:#08111d;color:#e8f3ff;font-family:Arial,"Microsoft JhengHei",sans-serif;margin:0;min-height:100vh}.share-wrap{max-width:1120px;margin:0 auto;padding:26px}.share-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.share-head h1{font-size:24px;margin:0}.share-head a{color:#9bd5ff}.share-summary{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:center;padding:18px;border:1px solid #27445c;background:#0d1c2b;border-radius:12px}.share-side{text-align:center}.share-side b{display:block;font-size:24px}.share-vs{font-size:24px;font-weight:bold;color:#7dc7ff}.share-rounds{margin-top:14px;display:grid;gap:10px}.share-round{border:1px solid #243d52;background:#0b1825;border-radius:9px;padding:12px}.share-round h3{margin:0 0 8px}.share-fleet{display:grid;grid-template-columns:1fr 1fr;gap:12px}.share-unit-grid{display:flex;flex-wrap:wrap;gap:7px}.share-unit{display:flex;align-items:center;gap:7px;padding:6px 8px;background:#102436;border-radius:7px}.share-unit img{width:48px;height:34px;object-fit:contain}.share-unit small{display:block;color:#91a8ba}.share-controls{display:flex;gap:8px;margin:14px 0;align-items:center}.share-controls button{padding:8px 12px}.share-current{padding:14px;border:1px solid #355977;background:#102235;border-radius:10px}.share-current .share-fleet{margin-top:10px}@media(max-width:720px){.moon-profile{grid-template-columns:1fr}.moon-profile>img{width:100%;height:160px}.share-summary{grid-template-columns:1fr}.share-fleet{grid-template-columns:1fr}.battle-library-grid{grid-template-columns:1fr}}\n

/* v2026.08.21.11：世界 Boss 資源包批次開啟 */
.boss-pack-card{border-color:rgba(212,166,68,.38);background:linear-gradient(135deg,rgba(37,28,13,.92),rgba(8,25,34,.96))}.boss-pack-open{display:grid;grid-template-columns:minmax(88px,1fr) auto auto;gap:6px;align-items:center}.boss-pack-open input{min-width:0;width:100%}.boss-pack-open button{white-space:nowrap}.deep-event small+small{margin-top:2px}

/* v2026.08.21.12：好友、訊息分類與內部分享 */
.message-tabs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0 14px}.message-retention{margin-left:auto;opacity:.72;font-size:24px}.friend-search{display:flex;gap:8px;max-width:620px;margin-bottom:12px}.friend-search input{flex:1}.friend-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.friend-grid>div,.friend-search-results{border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:12px}.friend-row,.friend-request{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.07)}.friend-request{align-items:flex-start;flex-direction:column}.friend-request>div{display:flex;gap:8px}.share-target-box{display:grid;gap:8px}.share-target-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:8px 10px;border:1px solid rgba(255,255,255,.1);border-radius:8px}.share-target-row input{width:auto}.share-target-row small{opacity:.7}@media(max-width:900px){.friend-grid{grid-template-columns:1fr}.message-retention{width:100%;margin-left:0}}


/* v2026.08.21.13 - 港區休整、艦隊歷史、市場行情、反偵察資訊 */
.time-paused .nav:not([data-view="time-pause"]):not([data-view="game-help"]){opacity:.72;}
.pause-banner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 16px;margin-bottom:14px;border:1px solid rgba(255,193,7,.48);background:rgba(255,193,7,.08);border-radius:12px}
.pause-banner>b{font-size:24px}.pause-banner span{flex:1;min-width:260px}.pause-banner button{white-space:nowrap}
.pause-panel{max-width:980px}.pause-explain,.pause-active-card{padding:16px;border-radius:12px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08);line-height:1.75}
.pause-active-card>b{font-size:24px}.pause-min-wait{margin-top:12px;font-weight:700}.pause-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:9px;margin:14px 0}.pause-checks>div{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:8px;background:rgba(255,255,255,.035)}
.incoming-intel{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.06)}.incoming-intel span{min-width:0}.incoming-intel small{display:block;margin-top:4px;opacity:.8}
.intel-tech-summary{padding:10px 12px;margin-bottom:12px;border-radius:8px;background:rgba(255,255,255,.04);line-height:1.6}
.history-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:14px}.history-filter label{display:flex;flex-direction:column;gap:5px}.history-filter span{opacity:.72}.fleet-history-table td{vertical-align:top;min-width:115px}.fleet-history-table td:nth-child(3),.fleet-history-table td:nth-child(4){min-width:230px}.fleet-history-table small{display:block;margin-top:5px;opacity:.72;line-height:1.45}
.market-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:15px}.market-tabs button.active{box-shadow:inset 0 -3px 0 currentColor;font-weight:700}.market-trend-block{margin-bottom:18px}
@media(max-width:760px){.incoming-intel{align-items:flex-start;flex-direction:column}.pause-banner{align-items:flex-start}.fleet-history-table{min-width:920px}}

/* v2026.08.21.17：戰鬥圖卡數量、訊息中心整合、市場比例即時檢查 */
.battle-unit-count{position:absolute;z-index:8;top:-9px;left:50%;transform:translateX(-50%);min-width:44px;max-width:108px;padding:3px 8px;border-radius:999px;border:1px solid rgba(166,224,245,.68);background:rgba(3,15,22,.93);box-shadow:0 3px 12px rgba(0,0,0,.7),0 0 10px rgba(95,190,226,.24);color:#e7f7fc;font-size:24px;font-weight:800;text-align:center;white-space:nowrap;pointer-events:none}.battle-visual-fleet.defender .battle-unit-count{transform:translateX(-50%) scaleX(-1)}
.message-hub-nav{display:flex;gap:7px;flex-wrap:wrap;margin:-2px 0 14px;padding:7px;border:1px solid #294550;background:linear-gradient(180deg,#0b2029,#07161d);border-radius:4px}.message-hub-nav button{min-width:92px;height:34px;border:1px solid #315462;background:#0b1d26;color:#87aab8}.message-hub-nav button:hover{color:#e1f3fa;border-color:#557f90}.message-hub-nav button.active{background:linear-gradient(#225268,#143747);border-color:#70a9bd;color:#eefbff;box-shadow:inset 0 -2px rgba(129,205,232,.28)}
.market-ratio-hint{margin-top:10px}.market-check{display:grid;gap:8px;padding:11px 12px;border:1px solid;border-radius:5px;background:#07171e}.market-check.ok{border-color:#376f58;background:linear-gradient(180deg,rgba(23,74,54,.24),#07171e)}.market-check.bad{border-color:#7b4c45;background:linear-gradient(180deg,rgba(100,50,43,.24),#07171e)}.market-check-head{display:flex;justify-content:space-between;gap:14px;align-items:center}.market-check.ok .market-check-head>b{color:#8fd8ae}.market-check.bad .market-check-head>b{color:#f0a192}.market-check-head span{font-size:24px;color:#91aab4}.market-range{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.market-range>span{display:block;padding:7px 8px;border:1px solid #263f49;background:#081a22;color:#89a5b0;font-size:24px;line-height:1.45}.market-range b{color:#d8edf4}.market-quick{display:flex;gap:7px;flex-wrap:wrap}.market-quick button{min-width:120px}.market-form button:disabled{opacity:.42;cursor:not-allowed;filter:saturate(.35)}
@media(max-width:900px){.market-range{grid-template-columns:1fr}.message-hub-nav{position:sticky;top:0;z-index:20}.battle-unit-count{font-size:24px;min-width:36px;padding:2px 5px}}


/* v2026.08.21.18：戰鬥主體透明化，移除方形圖卡感 */
/* 戰鬥動畫使用與 unit_*.png 對應的透明戰鬥素材；港灣整備場／海防頁原圖卡完全不受影響。 */
.battle-visual-sprite{width:138px;height:82px;filter:drop-shadow(0 10px 9px rgba(0,0,0,.72));}
.battle-visual-sprite .battle-card-art{display:block;width:100%;height:100%;object-fit:contain!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:drop-shadow(0 0 5px rgba(140,226,255,.16)) drop-shadow(0 7px 6px rgba(0,0,0,.62));}
.battle-visual-fleet.defender .battle-card-art{filter:drop-shadow(0 0 5px rgba(255,164,139,.14)) drop-shadow(0 7px 6px rgba(0,0,0,.62));}
.battle-unit-count{top:-4px;min-width:0;max-width:130px;padding:0 3px;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#eefbff;font-size:24px;font-weight:900;text-shadow:0 2px 3px #000,0 0 5px #000,0 0 9px rgba(68,178,221,.62);}
.battle-visual-fleet.defender .battle-unit-count{color:#fff2ed;text-shadow:0 2px 3px #000,0 0 5px #000,0 0 9px rgba(226,104,74,.58);}
.battle-ship-shadow{left:22%;right:22%;bottom:8%;height:7px;opacity:.43;filter:blur(8px);}
@media(max-width:900px){.battle-visual-sprite{width:112px;height:68px}.battle-unit-count{font-size:24px;top:-2px}}
@media(max-width:620px){.battle-visual-sprite{width:86px;height:54px}.battle-unit-count{font-size:24px;max-width:92px}}

/* v2026.08.21.20：訊息可讀性、戰鬥固定編隊／損失數字／回合銜接 */
.message-head time{font-size:24px;color:#b4cad3;font-weight:650;letter-spacing:.15px;}
.battle-round-transition{position:absolute;z-index:12;left:50%;top:50%;transform:translate(-50%,-50%) scale(.88);padding:13px 28px;border:1px solid rgba(151,214,238,.66);background:linear-gradient(90deg,rgba(4,16,23,.12),rgba(8,31,42,.94) 18%,rgba(8,31,42,.94) 82%,rgba(4,16,23,.12));box-shadow:0 0 36px rgba(70,177,217,.22),0 10px 34px rgba(0,0,0,.72);color:#eefbff;font-size:25px;font-weight:900;letter-spacing:5px;text-shadow:0 0 10px rgba(117,222,255,.55),0 3px 6px #000;opacity:0;visibility:hidden;pointer-events:none;white-space:nowrap;}
.battle-round-transition.show{visibility:visible;animation:battleRoundTransition .65s ease-out forwards;}
.battle-loss-pop{position:absolute;z-index:10;transform:translate(-50%,-50%);color:#ffcab8;font-size:24px;font-weight:950;letter-spacing:.3px;white-space:nowrap;text-shadow:0 2px 4px #000,0 0 8px #000,0 0 14px #ff4e2d,0 0 22px rgba(255,104,63,.7);pointer-events:none;}
@keyframes battleRoundTransition{0%{opacity:0;transform:translate(-50%,-50%) scale(.82)}24%{opacity:1;transform:translate(-50%,-50%) scale(1.06)}70%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(.94)}}
@media(max-width:620px){.message-head time{font-size:24px}.battle-round-transition{font-size:24px;letter-spacing:3px;padding:10px 18px}.battle-loss-pop{font-size:24px}}


/* v2026.08.21.21：好友中心、偵查直達攻擊、資源加成拆解、研究說明 */
.spy-attack-btn{border-color:#7c4f42!important;background:linear-gradient(#44241e,#271512)!important;color:#ffd0c3!important;font-weight:800}.spy-attack-btn:hover{border-color:#c67b67!important;background:linear-gradient(#5b2c23,#351a15)!important;color:#fff!important}
.resource-production-table{min-width:1040px}.resource-bonus-cell{min-width:220px;vertical-align:top!important;background:rgba(25,67,78,.13)}.resource-bonus-total{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:5px;margin-bottom:4px;border-bottom:1px solid rgba(137,190,207,.15)}.resource-bonus-total>span{color:#7898a4;font-size:24px}.resource-bonus-total>b{font-size:24px;white-space:nowrap}.resource-bonus-source-list{display:grid;gap:3px}.resource-bonus-source{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px;align-items:center;padding:3px 0;font-size:24px}.resource-bonus-source i{font-style:normal;color:#a7c1cb;overflow:hidden;text-overflow:clip;white-space:nowrap}.resource-bonus-source b{font-size:24px;color:#82cc98;white-space:nowrap}.resource-bonus-source small{font-size:24px;color:#6f929f;white-space:nowrap}.resource-bonus-source em{grid-column:1/-1;font-style:normal;color:#6f8994;font-size:24px}.resource-bonus-source.negative b,.resource-bonus-source.negative small{color:#dc8b7e}
.research-help-facts{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.research-help-facts span{padding:5px 8px;border:1px solid #31505c;background:#081a22;color:#9fc7d5;font-size:24px}
.friends-panel{overflow:hidden}.friends-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:18px;padding:18px;background:radial-gradient(circle at 12% 20%,rgba(47,130,164,.17),transparent 36%),linear-gradient(135deg,#0b202a,#07151c);border-bottom:1px solid #2e4d59}.friends-kicker{font-size:24px;letter-spacing:2.4px;color:#6f9eae}.friends-hero h2{margin:5px 0 7px;font-size:25px;color:#dceef4}.friends-hero p{max-width:720px;margin:0;color:#89a5af;line-height:1.65}.friends-search-card{align-self:center;padding:12px;border:1px solid #315363;background:rgba(5,17,23,.72);box-shadow:0 10px 24px rgba(0,0,0,.2)}.friends-search-card>label{display:block;margin-bottom:6px;color:#bdd7df;font-weight:700}.friends-search-card>small{display:block;margin-top:6px;color:#6e8d98}.friend-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;max-width:none;margin:0}.friend-search input{height:38px;background:#07151c;border-color:#31515e;color:#f2fbff;caret-color:#f2fbff}.friend-search input::placeholder{color:#78939e;opacity:1}.friend-search button{min-width:92px}.friends-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:13px 13px 0}.friends-overview>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #284753;background:linear-gradient(180deg,#0b1e27,#081820)}.friends-overview span{color:#7899a6;font-size:24px}.friends-overview b{font-size:24px;color:#d8ebf2}.friends-overview .attention b{color:#f1ca79}.friend-grid.refined{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px 13px}.friend-section{min-width:0;border:1px solid #2b4a56;background:linear-gradient(180deg,#091b23,#061319);box-shadow:0 8px 20px rgba(0,0,0,.18)}.friend-section>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid #294550;background:#0b2029}.friend-section>header b,.friend-section>header small{display:block}.friend-section>header b{color:#c7dce4;font-size:24px}.friend-section>header small{margin-top:2px;color:#6f8d98;font-size:24px}.friend-count{display:inline;color:#a7c9d5;font-size:24px;font-weight:800;line-height:1;border:0;background:transparent;padding:0;margin:0}.friend-count.hot{color:#f0cf7d;border:0;background:transparent}.friend-list{max-height:455px;overflow:auto;padding:5px 9px 9px}.friend-person{display:grid;grid-template-columns:38px minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:9px 4px;border-bottom:1px solid rgba(120,166,183,.11)}.friend-person:last-child{border-bottom:0}.friend-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;border:1px solid #467084;background:radial-gradient(circle at 35% 28%,#28596c,#102c38 58%,#071820);color:#dff6ff;font-size:24px;font-weight:900;box-shadow:0 0 14px rgba(64,159,193,.15)}.friend-avatar.xl{width:58px;height:58px;font-size:24px;margin:0 auto 10px}.friend-person-main{min-width:0}.friend-person-main>b{display:block;overflow:hidden;text-overflow:clip;white-space:nowrap;color:#c6dce4}.friend-person-main>small{display:block;margin-top:3px;color:#6e8994;font-size:24px}.friend-person-main>p{margin:6px 0 0;padding:6px 8px;border-left:2px solid #315967;background:#071820;color:#9cb6c0;font-size:24px;line-height:1.45}.relationship-badge{padding:3px 6px;border:1px solid #354e59;background:#101d23;color:#8299a2;font-size:24px;white-space:nowrap}.relationship-badge.friend,.relationship-badge.accepted{border-color:#35634c;background:#0d271b;color:#82c99b}.relationship-badge.pending,.relationship-badge.received{border-color:#6b5b32;background:#2a2210;color:#e1c275}.relationship-badge.rejected{border-color:#6a403b;background:#271412;color:#d98e84}.friend-more,.friend-add-btn,.friend-request-actions button{white-space:nowrap}.friend-request-actions{display:flex;gap:5px}.friend-request-actions .accept-btn,.friend-add-btn{border-color:#39705a;background:linear-gradient(#174a36,#102e25);color:#9edbb7}.friend-empty{display:grid;gap:4px;place-items:center;text-align:center;padding:34px 12px;color:#6f8993}.friend-empty b{color:#91aab4}.friend-search-results.refined{margin:12px 13px 0;padding:7px 11px;border:1px solid #31525f;border-radius:0;background:#071820}.friend-search-title{display:flex;justify-content:space-between;align-items:center;padding:5px 3px 7px;border-bottom:1px solid #29434e}.friend-search-title b{color:#bcd4dd}.friend-search-title span{color:#6f8e99;font-size:24px}.friends-safety-note{display:flex;gap:9px;align-items:center;margin:0 13px 13px;padding:9px 11px;border:1px solid #574d2f;background:#1c190e;color:#9f9470;font-size:24px}.friends-safety-note b{color:#d8c580;white-space:nowrap}.friend-request-dialog{display:grid;gap:10px}.friend-request-dialog>p{margin:0;color:#8ea9b4;line-height:1.6}.friend-request-dialog label{display:grid;gap:5px;color:#b9d0d8}.friend-request-dialog label>span{font-size:24px;color:#708d98}.friend-request-dialog textarea{width:100%;resize:vertical;min-height:88px}.friend-dialog-actions{display:flex;justify-content:flex-end;gap:7px}
@media(max-width:1100px){.friends-hero{grid-template-columns:1fr}.friend-grid.refined{grid-template-columns:1fr 1fr}.friend-section.outgoing{grid-column:1/-1}.resource-bonus-cell{min-width:190px}}
@media(max-width:720px){.friends-overview,.friend-grid.refined{grid-template-columns:1fr}.friend-section.outgoing{grid-column:auto}.friends-hero{padding:13px}.friends-search-card{padding:10px}.friend-search{grid-template-columns:1fr}.friend-search button{width:100%}.friend-person{grid-template-columns:36px minmax(0,1fr) auto}.friend-person .friend-more,.friend-request-actions{grid-column:2/4;justify-self:start}.friends-safety-note{align-items:flex-start;flex-direction:column}.resource-production-table{min-width:930px}.resource-bonus-cell{min-width:170px}}
.intel-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px;padding-top:8px;border-top:1px solid rgba(115,164,181,.12)}


/* v2026.08.21.22：海洋單位整備／海防「目前最多可造」與全部填入 */
.unit-build-max{display:flex;align-items:center;gap:5px;width:max-content;max-width:100%;margin:3px 0 7px;padding:4px 7px;border:1px solid #315565;background:linear-gradient(90deg,#0d2631,#0a1b23);color:#8eabb7;font-size:24px;line-height:1.25}
.unit-build-max b{color:#d3edf5;font-size:24px}.unit-build-max.none{border-color:#62423e;background:#211515;color:#b98c84}.unit-build-max.none b{color:#e0a49a}
.unit-build-actions .unit-all-btn{border-color:#4e7180;background:linear-gradient(#294c5b,#17313c);color:#d5e7ed}.unit-build-actions .unit-all-btn:hover:not(:disabled){background:linear-gradient(#376477,#1d414f)}
.unit-order-preview.order-preview-warn{border-left-color:#a8655d;background:#211515;color:#d09a92}
@media(max-width:620px){.unit-build-max{font-size:24px}.unit-build-max b{font-size:24px}.unit-build-actions input{width:64px}}

/* v2026.08.21.23 alliance page */
.alliance-grid{margin-top:14px}
.alliance-profile-card,.alliance-list-wrap,.alliance-create-card{margin-bottom:14px}
.alliance-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:10px}
.alliance-form-grid label{display:flex;flex-direction:column;gap:6px;font-size:24px;color:#c8d9e2}
.alliance-form-grid input,.alliance-form-grid textarea{width:100%;background:#08131b;border:1px solid #2c4f61;color:#e8f4fb;border-radius:8px;padding:10px 12px;box-sizing:border-box}
.alliance-form-grid .span-2{grid-column:1 / -1}
.alliance-action-row{display:flex;gap:10px;align-items:center;margin-top:12px}
.alliance-profile-grid{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:16px;align-items:start}
.alliance-profile-main p{margin:0 0 10px 0;line-height:1.65}
.alliance-public-box{background:rgba(7,20,28,.74);border:1px solid rgba(74,118,141,.42);border-radius:12px;padding:12px;margin-top:10px}
.alliance-public-box b{display:block;margin-bottom:6px;color:#dff3ff}
.alliance-public-box p{margin:0;color:#c0d3dd}
.alliance-side-actions{display:flex;flex-direction:column;gap:10px}
.alliance-result{align-items:flex-start}
.alliance-note{color:#89aeca !important}
@media (max-width: 900px){.alliance-profile-grid{grid-template-columns:1fr}.alliance-side-actions{flex-direction:row;flex-wrap:wrap}}


/* v2026.08.21.25 - 所有介面文字最小 16px */
html,body,input,select,textarea,button{font-size:24px;}
small,.muted,.panel-subline,.fleet-hint,.tool-stat,.message-retention,.coords,.item-level,.item-info,.queue,.empty-state{font-size:24px!important;}

/* 功能選單：每個文字左側都有固定小圖示 */
.sidebar .nav{display:flex;align-items:center;gap:10px;min-height:42px;font-size:24px;}
.sidebar .nav .nav-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;min-width:22px;height:22px;font-size:24px;line-height:1;color:#84cbe8;border:1px solid rgba(91,155,182,.35);background:rgba(11,34,45,.72);border-radius:5px;}
.sidebar .nav.active .nav-icon{color:#dff7ff;border-color:#5ca7c6;background:rgba(22,70,88,.75);}

/* 海域玩家社交快捷功能 */
.galaxy-player-cell{display:flex;flex-direction:column;gap:8px;align-items:flex-start;}
.galaxy-player-social{display:flex;gap:6px;flex-wrap:wrap;}
.gal-social-btn{font-size:24px;padding:5px 9px;border:1px solid #31586a;background:#0a1d27;color:#b9d9e7;border-radius:5px;cursor:pointer;}
.gal-social-btn:hover{border-color:#5896b1;color:#ecfaff;background:#103242;}
.private-message-form label{display:flex;flex-direction:column;gap:8px;}
.private-message-form textarea{width:100%;min-height:150px;resize:vertical;box-sizing:border-box;}

.gal-social-state{display:inline-flex;align-items:center;min-height:30px;padding:4px 8px;border:1px solid #31586a;background:#0b202a;color:#a8cedf;border-radius:5px;font-size:24px;}
.gal-social-state.attention{border-color:#98753d;color:#f0c873;background:#2b2416;}

/* v2026.08.21.26：16px 文字後的版面重新配置，避免文字擠出／省略號過多 */
.page-frame{width:min(1600px,100%)}
.game-grid{grid-template-columns:194px minmax(0,1fr) 246px}
#content{padding:12px 12px 28px}
.sidebar{padding:9px 7px}.rightbar{padding:9px 7px}

/* 卡片：中等寬度不要硬塞兩欄，寧可完整顯示文字 */
.cards{grid-template-columns:repeat(auto-fit,minmax(520px,1fr));gap:11px;padding:12px}
.item-card{grid-template-columns:164px minmax(0,1fr)}
.item-image{width:164px;height:176px}
.item-info{min-width:0;overflow:visible}
.item-info h3,.item-level,.requirement-ok,.requirement-missing,.unit-meta,.muted,.cost-row,.upgrade-preview{max-width:100%}
.upgrade-effect-row{grid-template-columns:minmax(126px,.9fr) minmax(0,1.35fr) minmax(110px,.75fr);align-items:start}
.upgrade-effect-row>span,.upgrade-effect-row>b,.upgrade-effect-row>em{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;word-break:break-word}
.item-actions{gap:8px;row-gap:8px}

/* 資源表：縮減最低寬度並允許加成來源換行，不再把右側欄位硬推出畫面 */
.resource-production-table{min-width:880px;table-layout:fixed}
.resource-production-table th:nth-child(1){width:24%}
.resource-production-table th:nth-child(2){width:11%}
.resource-production-table th:nth-child(3){width:12%}
.resource-production-table th:nth-child(4){width:12%}
.resource-production-table th:nth-child(5){width:25%}
.resource-production-table th:nth-child(6){width:16%}
.resource-production-table td{overflow-wrap:anywhere;word-break:break-word}
.resource-facility{align-items:flex-start}
.resource-facility b,.resource-facility small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.resource-bonus-cell{min-width:0!important}
.resource-bonus-source{grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;align-items:start}
.resource-bonus-source i{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;word-break:break-word}
.resource-bonus-source b{grid-column:2;grid-row:1;white-space:nowrap}
.resource-bonus-source small{grid-column:1/-1;white-space:normal}
.resource-bonus-source em{grid-column:1/-1}
.resource-bonus-total{align-items:flex-start;flex-wrap:wrap}
.resource-bonus-total>b{white-space:normal}

/* 盡量完整顯示，不用 ... 隱藏重要資訊 */
.planet-choice{grid-template-columns:58px minmax(0,1fr);min-height:58px;height:auto;align-items:start}
.planet-choice b,.planet-choice span,.planet-choice small,
.summary-box span,.summary-box b,.summary-box em,
.queue>span,.queue-lane>b,.friend-person-main>b,
.battle-unit b,.battle-unit span,.battle-unit em,
.server-line>span:first-child{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;word-break:break-word}
.planet-choice>span,.planet-choice>div{min-width:0}
.summary-box{align-items:flex-start}.summary-box div{overflow:visible}
.queue{align-items:flex-start;flex-wrap:wrap}.queue>span{flex:1 1 280px}.queue b{margin-left:auto}
.friend-person-main>b{line-height:1.35}

/* 右側島嶼卡讓名稱、座標、格數完整換行 */
.planet-card strong,.planet-card .coords,.planet-meta{padding-left:6px;padding-right:6px;overflow-wrap:anywhere;word-break:break-word}
.planet-list{gap:7px}

/* 功能選單：改用真正的 SVG 小圖示，而非單一符號字元 */
.sidebar .nav{gap:9px;min-height:46px;height:auto;padding:6px 9px;line-height:1.25}
.sidebar .nav:before{display:none}
.sidebar .nav .nav-icon{display:block;width:30px;min-width:30px;height:30px;padding:3px;object-fit:contain;border:1px solid rgba(83,151,181,.45);background:radial-gradient(circle at 35% 30%,rgba(40,109,136,.4),rgba(5,22,30,.86));border-radius:7px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.sidebar .nav:hover .nav-icon,.sidebar .nav.active .nav-icon{border-color:#75b9d2;background:radial-gradient(circle at 35% 30%,rgba(62,153,188,.55),rgba(8,33,44,.95));filter:drop-shadow(0 0 5px rgba(64,181,223,.35))}
.sidebar .nav>span:last-child{min-width:0;white-space:normal;overflow-wrap:anywhere}

/* 表格與按鈕不允許文字越界 */
.table th,.table td{line-height:1.4;overflow-wrap:anywhere;word-break:break-word}
button{line-height:1.25;max-width:100%;white-space:normal}
select,input,textarea{max-width:100%}

/* 目前常見 1280~1500 CSS viewport：中央內容改採完整單欄卡片 */
@media(min-width:901px) and (max-width:1500px){
  .cards{grid-template-columns:1fr}
  .item-card{grid-template-columns:170px minmax(0,1fr)}
  .item-image{width:170px;height:180px}
}
@media(min-width:901px) and (max-width:1180px){
  .game-grid{grid-template-columns:174px minmax(0,1fr) 210px}
  .cards{grid-template-columns:1fr}
  .item-card{grid-template-columns:150px minmax(0,1fr)}
  .item-image{width:150px;height:166px}
  .resource-production-table{min-width:820px}
  .upgrade-effect-row{grid-template-columns:minmax(110px,.9fr) minmax(0,1.2fr);gap:4px 9px}
  .upgrade-effect-row>em{grid-column:1/-1;text-align:right}
}
@media(max-width:900px){
  .cards{grid-template-columns:1fr}
  .item-card{grid-template-columns:128px minmax(0,1fr)}
  .item-image{width:128px;height:150px}
  .resource-production-table{min-width:780px}
  .planet-choice b,.planet-choice span,.planet-choice small{white-space:normal!important}
}
@media(max-width:620px){
  .item-card{grid-template-columns:112px minmax(0,1fr)}
  .item-image{width:112px;height:138px}
  .upgrade-effect-row{grid-template-columns:1fr}
  .upgrade-effect-row>em{grid-column:auto;text-align:left}
  .resource-production-table{min-width:760px}
}

/* v26 mobile/tablet restore: bottom overrides must not break the original horizontal navigation layout */
@media(max-width:900px){
  .game-grid{grid-template-columns:1fr;grid-template-rows:48px 86px minmax(0,1fr);grid-template-areas:"nav" "planets" "main"}
  .sidebar{padding:4px;overflow-x:auto;overflow-y:hidden}
  .sidebar .nav{min-width:116px;width:auto;min-height:38px;height:38px;padding:3px 8px;white-space:nowrap;flex:0 0 auto}
  .sidebar .nav .nav-icon{width:27px;min-width:27px;height:27px;padding:2px}
  .sidebar .nav>span:last-child{white-space:nowrap}
  .rightbar{padding:4px;height:auto}
}
@media(max-width:620px){
  .game-grid{grid-template-rows:46px 80px minmax(0,1fr)}
  .sidebar .nav{min-width:106px;height:36px;min-height:36px;padding:2px 7px;gap:7px}
  .sidebar .nav .nav-icon{width:25px;min-width:25px;height:25px}
}

/* v26：其餘常見省略號位置改成可換行完整顯示 */
.resource-cell b{max-width:none;overflow:visible;text-overflow:clip}
.fleet-dispatch-summary b,.battle-cinematic-caption b{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
.battle-cinematic-caption{max-width:48%;align-items:flex-start;flex-wrap:wrap}

/* ========================================================================== */
/* v2026.08.21.27：資源頁加成改獨立列；桌面頂端資源列防破版                */
/* ========================================================================== */
.resource-production-table{min-width:760px;table-layout:fixed}
.resource-production-table th:nth-child(1){width:34%}
.resource-production-table th:nth-child(2){width:12%}
.resource-production-table th:nth-child(3){width:14%}
.resource-production-table th:nth-child(4){width:14%}
.resource-production-table th:nth-child(5){width:26%}
.resource-bonus-detail-row td{padding:7px 12px 10px 72px!important;background:rgba(20,58,70,.16);border-top:0!important;border-bottom:1px solid rgba(74,113,130,.46)!important}
.resource-bonus-line{display:grid;grid-template-columns:140px minmax(0,1fr) auto;align-items:center;gap:8px 14px;min-width:0}
.resource-bonus-title{color:#8fb0bd;font-weight:700;white-space:nowrap}
.resource-bonus-source-list{display:flex;align-items:center;flex-wrap:wrap;gap:7px 18px;min-width:0}
.resource-bonus-source{display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px 8px;padding:0;min-width:0}
.resource-bonus-source i{font-style:normal;color:#b6cbd3;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:break-word;word-break:normal}
.resource-bonus-source small{color:#7fa1ad;white-space:nowrap!important}
.resource-bonus-source b{color:#82cc98;white-space:nowrap!important;grid-column:auto!important;grid-row:auto!important}
.resource-bonus-source em{font-style:normal;color:#7d99a4;white-space:nowrap;grid-column:auto!important}
.resource-bonus-source.negative b,.resource-bonus-source.negative small{color:#dc8b7e}
.resource-bonus-total{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;padding:0!important;margin:0!important;border:0!important;white-space:nowrap}
.resource-bonus-total>span{color:#7e9eaa}
.resource-bonus-total>b{white-space:nowrap!important}
.resource-bonus-empty{color:#718c98}

@media(min-width:901px){
  .topbar{grid-template-columns:240px minmax(0,1fr) 450px!important}
  .brand-area{padding:6px 12px}
  .game-brand{min-width:0}
  .resource-bar{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:6px;padding:0 8px;overflow:visible!important;min-width:0}
  .resource-cell{width:auto!important;min-width:0!important;max-width:none!important;height:68px;box-sizing:border-box;padding:5px 9px;gap:7px}
  .resource-cell>div{min-width:0}
  .resource-cell img{width:38px;height:38px;flex:0 0 38px}
  .resource-cell span{white-space:nowrap}
  .resource-cell b{max-width:none!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important}
  .account-area{min-width:0;padding:0 12px;overflow:hidden}
  .server-line{width:100%;justify-content:flex-end;flex-wrap:nowrap;white-space:nowrap;overflow:visible}
  .server-line>span:first-child{display:inline!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:normal!important;word-break:normal!important;flex:0 0 auto}
  .build-version,.speed-badge{flex:0 0 auto;white-space:nowrap}
  .account-area>div:last-child{white-space:nowrap}
}
@media(min-width:901px) and (max-width:1280px){
  .topbar{grid-template-columns:210px minmax(0,1fr) 250px!important}
  .resource-bar{gap:4px;padding:0 5px}
  .resource-cell{padding:4px 5px;gap:4px}
  .resource-cell img{width:32px;height:32px;flex-basis:32px}
  .server-line>span:first-child{display:none!important}
  .account-area{padding:0 8px}
}
@media(max-width:1050px){
  .resource-bonus-line{grid-template-columns:120px minmax(0,1fr)}
  .resource-bonus-total{grid-column:2;justify-content:flex-start!important}
}
@media(max-width:720px){
  .resource-production-table{min-width:700px}
  .resource-bonus-detail-row td{padding-left:14px!important}
  .resource-bonus-line{grid-template-columns:1fr}
  .resource-bonus-total{grid-column:1;justify-content:flex-start!important}
}

/* v2026.08.21.28 萬潮群島：海洋世界視覺層。舊 class 名稱為相容性保留，不代表世界觀。 */
.auth-stars{position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(180deg,rgba(97,210,225,.09),transparent 34%),radial-gradient(ellipse at 50% 110%,rgba(25,151,178,.32),transparent 62%);overflow:hidden}
.auth-stars:before,.auth-stars:after{content:"";position:absolute;left:-15%;width:130%;height:120px;border-radius:50%;border-top:2px solid rgba(157,238,240,.18);animation:tide-drift 9s ease-in-out infinite alternate}
.auth-stars:before{bottom:12%;transform:rotate(-2deg)}.auth-stars:after{bottom:5%;animation-duration:13s;transform:rotate(2deg);opacity:.7}
@keyframes tide-drift{from{translate:-2% 0}to{translate:2% -10px}}
.topbar{background:linear-gradient(180deg,rgba(8,54,67,.97),rgba(5,32,43,.97))}
.sidebar,.rightbar{background:linear-gradient(180deg,rgba(6,43,54,.96),rgba(4,28,37,.98))}
.panel{box-shadow:0 10px 30px rgba(0,15,22,.24)}

/* v2026.08.21.30：完整美術重製。圖片失敗時使用無文字的海洋占位圖，且不顯示瀏覽器破圖圖示。 */
img.asset-fallback{object-fit:cover;background:#062b38;filter:none!important;}

/* ========================================================================== 
   v2026.08.21.31 — Ocean Command UI
   目的：徹底脫離舊式三欄策略頁面。桌面、平板與手機都採「上方資源 → 橫向功能列 → 領地整備 → 內容工作區」。
   ========================================================================== */
:root{
  --oc-shell:#06151b;
  --oc-panel:#0b222b;
  --oc-panel-hi:#10313b;
  --oc-line:rgba(125,190,205,.22);
  --oc-line-strong:rgba(145,214,226,.42);
  --oc-text:#d9e9ee;
  --oc-muted:#87a7b1;
  --oc-accent:#70c7d7;
  --oc-accent-2:#9ee1d2;
  --oc-warn:#e1bd71;
  --oc-danger:#e58c7a;
}
body.in-game{background:#04161d url('/assets/scene_bg_global_ocean.png') center/cover fixed;}
body.in-game .page-frame{
  width:min(1760px,100%);height:100vh;margin:0 auto;border:0;background:linear-gradient(180deg,rgba(4,19,25,.96),rgba(4,14,19,.985));
  box-shadow:0 0 80px rgba(0,0,0,.46);display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;
}
body.in-game .topbar{
  min-height:88px;height:auto;display:grid;grid-template-columns:minmax(210px,280px) minmax(540px,1fr) minmax(220px,280px);align-items:center;gap:18px;
  padding:12px 20px;background:linear-gradient(135deg,rgba(10,38,48,.97),rgba(5,21,28,.98));border:0;border-bottom:1px solid var(--oc-line-strong);box-shadow:0 12px 34px rgba(0,0,0,.24);z-index:20;
}
body.in-game .brand-area{min-width:0}.game-brand{display:flex;align-items:center;gap:11px}.game-brand .brand-emblem{width:54px;height:54px}.game-brand b{font-size:24px;letter-spacing:1.7px;color:#edfaff}.game-brand small{display:block;margin-top:2px;color:#83aeb9;letter-spacing:2px}
body.in-game .resource-bar{display:grid;grid-template-columns:repeat(5,minmax(105px,1fr));gap:8px;min-width:0}
body.in-game .resource-cell{min-width:0;height:62px;padding:8px 10px;border:1px solid var(--oc-line);border-radius:12px;background:linear-gradient(160deg,rgba(15,49,60,.78),rgba(7,27,35,.88));box-shadow:inset 0 1px rgba(255,255,255,.04);display:flex;align-items:center;gap:8px}
body.in-game .resource-cell img{width:30px;height:30px;flex:0 0 auto}.resource-cell>div{min-width:0}.resource-cell span{display:block;color:#7fa2ad;font-size:24px}.resource-cell b{display:block;overflow:hidden;text-overflow:clip;color:#e8f5f8;font-size:24px}.resource-cell small{font-size:24px}
body.in-game .account-area{text-align:right;min-width:0}.server-line{justify-content:flex-end;flex-wrap:wrap}.account-area>div:last-child{display:flex;align-items:center;justify-content:flex-end;gap:8px}

body.in-game .game-grid{
  min-height:0;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:0;background:transparent;overflow:hidden;
}
body.in-game .sidebar{
  grid-column:1!important;grid-row:1!important;width:auto!important;min-width:0!important;height:auto!important;padding:8px 14px!important;display:flex!important;align-items:stretch;gap:6px;overflow-x:auto;overflow-y:hidden;
  background:linear-gradient(180deg,rgba(8,31,40,.97),rgba(6,23,30,.97));border:0!important;border-bottom:1px solid var(--oc-line)!important;scrollbar-width:thin;z-index:12;
}
body.in-game .sidebar .menu-cap{flex:0 0 126px;display:flex;flex-direction:column;justify-content:center;padding:0 12px;border-right:1px solid var(--oc-line);color:#8eb2bc;text-transform:none;letter-spacing:0}
body.in-game .sidebar .menu-cap b{font-size:24px;color:#d7e9ee}body.in-game .sidebar .menu-cap span{margin-top:2px;font-size:24px;color:#638591}
body.in-game .sidebar .nav{flex:0 0 auto;min-width:82px;min-height:58px;padding:7px 10px!important;margin:0!important;border:1px solid transparent!important;border-radius:12px!important;background:transparent!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#86a7b1!important;box-shadow:none!important;white-space:nowrap}
body.in-game .sidebar .nav:hover{background:rgba(36,93,107,.22)!important;border-color:rgba(125,190,205,.17)!important;color:#d9edf2!important}
body.in-game .sidebar .nav.active{background:linear-gradient(180deg,rgba(40,112,126,.42),rgba(17,61,72,.48))!important;border-color:rgba(126,208,221,.48)!important;color:#ecfbff!important;box-shadow:inset 0 1px rgba(255,255,255,.06),0 5px 18px rgba(0,0,0,.12)!important}
body.in-game .sidebar .nav-icon{width:23px!important;height:23px!important;margin:0!important;opacity:.9}.sidebar .nav span{font-size:24px;font-weight:650}.sidebar .menu-sep{display:none!important}.sidebar .sidebar-status{flex:0 0 86px;margin:0 0 0 auto!important;padding:7px 10px!important;border:1px solid var(--oc-line)!important;border-radius:12px;background:rgba(3,18,24,.55);display:flex;flex-direction:column;align-items:center;justify-content:center}.sidebar-status span{font-size:24px!important}.sidebar-status b{font-size:24px!important}

body.in-game .rightbar{
  grid-column:1!important;grid-row:2!important;width:auto!important;min-width:0!important;height:auto!important;padding:8px 14px!important;display:grid!important;grid-template-columns:minmax(250px,330px) minmax(0,1fr) minmax(180px,245px);gap:9px;align-items:stretch;overflow:hidden;
  background:rgba(4,20,27,.93);border:0!important;border-bottom:1px solid var(--oc-line)!important;
}
body.in-game .rightbar .island-card{min-height:70px;margin:0!important;padding:7px 10px!important;border:1px solid var(--oc-line)!important;border-radius:13px!important;background:linear-gradient(135deg,rgba(17,53,63,.7),rgba(7,29,37,.78));display:grid!important;grid-template-columns:54px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:10px;align-items:center;text-align:left!important}
.rightbar .island-title{grid-column:2;font-size:24px!important;text-transform:uppercase;letter-spacing:1.5px;color:#638895!important}.rightbar .island-thumb{grid-column:1;grid-row:1/4;width:54px!important;height:54px!important;margin:0!important;border-radius:12px!important;object-fit:cover}.rightbar .island-card strong{grid-column:2;font-size:24px!important;overflow:hidden;text-overflow:clip;white-space:nowrap}.rightbar .island-card .coords,.rightbar .island-meta{grid-column:2;font-size:24px!important;white-space:nowrap;overflow:hidden;text-overflow:clip}
body.in-game .rightbar>.island-list-title{display:none!important}.rightbar .island-list{display:flex!important;gap:7px;overflow-x:auto;overflow-y:hidden;padding:0 2px;scrollbar-width:thin;min-width:0}.rightbar .planet-choice{flex:0 0 min(240px,34vw);min-height:70px;margin:0!important;padding:7px 9px!important;border:1px solid var(--oc-line)!important;border-radius:12px!important;background:rgba(7,28,36,.78)!important;display:grid!important;grid-template-columns:48px minmax(0,1fr);gap:8px;text-align:left}.rightbar .planet-choice:hover{border-color:var(--oc-line-strong)!important;background:rgba(18,54,64,.82)!important}.rightbar .planet-choice.selected{border-color:#69bdca!important;background:linear-gradient(135deg,rgba(30,91,103,.62),rgba(11,41,50,.85))!important;box-shadow:inset 3px 0 #77cbd8}.rightbar .planet-choice img{width:48px!important;height:48px!important;border-radius:10px!important;object-fit:cover}.planet-choice>div{min-width:0}.planet-choice b,.planet-choice span,.planet-choice small{overflow:hidden;text-overflow:clip;white-space:nowrap}.planet-choice b{font-size:24px}.planet-choice span,.planet-choice small{font-size:24px!important}


body.in-game #content{grid-column:1!important;grid-row:3!important;min-width:0;min-height:0;width:100%;max-width:none!important;margin:0!important;padding:18px clamp(12px,2vw,28px) 36px!important;overflow:auto;background:radial-gradient(circle at 50% -20%,rgba(46,110,122,.1),transparent 42%)}
body.in-game #content>*{width:min(1440px,100%);margin-left:auto;margin-right:auto}
.panel{border:1px solid var(--oc-line)!important;border-radius:17px!important;background:linear-gradient(160deg,rgba(10,35,44,.9),rgba(6,24,31,.94))!important;box-shadow:0 12px 34px rgba(0,0,0,.17),inset 0 1px rgba(255,255,255,.025)!important;overflow:hidden}.panel>h2,.panel>h3{border:0!important;background:transparent!important;padding:16px 18px 8px!important;color:#e1f0f4!important}.panel-subline{margin:5px 14px 12px!important;border:1px solid rgba(125,190,205,.12);border-radius:10px;background:rgba(6,23,29,.55)!important;padding:9px 11px!important;color:#8eabb4!important;line-height:1.6}
.cards{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(310px,1fr))!important;gap:12px!important;padding:10px 14px 16px!important}.card.item-card{min-width:0!important;display:grid!important;grid-template-columns:122px minmax(0,1fr)!important;align-items:stretch!important;border:1px solid rgba(126,190,204,.17)!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(14,46,56,.8),rgba(7,28,35,.88))!important;box-shadow:none!important;overflow:hidden}.card.item-card:hover{transform:translateY(-1px);border-color:rgba(126,207,220,.4)!important;box-shadow:0 12px 28px rgba(0,0,0,.18)!important}.card.item-card.locked{opacity:.7}.item-card .item-image{width:122px!important;height:100%!important;min-height:174px!important;object-fit:cover!important;margin:0!important;border-radius:0!important;border:0!important;border-right:1px solid rgba(127,189,201,.13)!important;background:#061a21}.item-card .item-info{padding:12px 12px 11px!important;min-width:0}.item-card .item-info h3{margin:0 0 3px!important;font-size:24px!important;color:#e1f1f4!important}.item-level{font-size:24px!important;color:#7fa2ad!important}.cost-row{display:flex!important;flex-wrap:wrap!important;gap:5px!important}.cost-row span{border-radius:8px!important;padding:4px 7px!important}.item-actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin-top:9px!important}.item-actions button,.item-actions input{min-height:34px;border-radius:9px!important}.item-actions button:first-of-type{background:linear-gradient(#246878,#174754)!important;border-color:#3e8190!important;color:#ecfbff!important}.info-btn,.soft-btn,.mini-btn,.gal-act{border-radius:9px!important}
.overview-hero{border-radius:18px!important;border:1px solid var(--oc-line)!important;background:linear-gradient(120deg,rgba(13,48,58,.92),rgba(6,27,35,.92))!important;overflow:hidden!important;box-shadow:0 14px 36px rgba(0,0,0,.18)!important}.overview-planet{border-radius:15px!important}.overview-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}.stat-line{border:1px solid rgba(125,190,205,.11)!important;border-radius:10px!important;background:rgba(3,18,24,.38)!important;padding:8px 10px!important}.resource-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important}.summary-box{border-radius:12px!important;border:1px solid rgba(125,190,205,.14)!important;background:rgba(6,28,35,.62)!important}

/* 5×5 fixed topology. Mobile keeps the 5-column topology and scrolls instead of reshuffling positions. */
.ocean-map-panel{padding-bottom:14px!important}.map-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:16px 18px 11px;border-bottom:1px solid var(--oc-line)}.map-head h2{margin:2px 0 5px;padding:0!important}.map-head p{margin:0;color:var(--oc-muted);font-size:24px}.section-kicker{display:block;color:#70a9b6;font-size:24px;letter-spacing:2px;text-transform:uppercase}.galaxy-tools{display:flex!important;align-items:end;gap:7px;flex-wrap:wrap}.galaxy-tools label{display:grid;gap:3px;color:#7798a4;font-size:24px}.galaxy-tools input{width:80px!important;height:35px!important;border-radius:8px!important}.galaxy-tools button{height:35px;border-radius:8px!important}
.archipelago-legend{display:flex;gap:15px;flex-wrap:wrap;padding:11px 18px 4px;color:#7f9fa9;font-size:24px}.archipelago-legend span{display:flex;align-items:center;gap:5px}.legend-dot{width:8px;height:8px;border-radius:50%;background:#55707a}.legend-dot.own{background:#7bd3c1;box-shadow:0 0 10px rgba(123,211,193,.5)}.legend-dot.occupied{background:#71afc3}.legend-dot.vacant{border:1px solid #52737f;background:transparent}
.archipelago-scroll{overflow:auto;padding:8px 18px 16px;scrollbar-width:thin}.archipelago-axis.x-axis{min-width:820px;display:grid;grid-template-columns:repeat(5,minmax(156px,1fr));padding-left:28px;margin-bottom:5px;gap:7px}.archipelago-axis.x-axis span{text-align:center;color:#6f949f;font-size:24px;letter-spacing:1px}.archipelago-board{min-width:848px;display:grid;grid-template-columns:22px minmax(0,1fr);gap:6px}.y-axis{display:grid;grid-template-rows:repeat(5,minmax(178px,auto));gap:7px}.y-axis span{display:grid;place-items:center;color:#6f949f;font-size:24px;writing-mode:vertical-rl;letter-spacing:1px}.archipelago-grid{display:grid;grid-template-columns:repeat(5,minmax(156px,1fr));grid-template-rows:repeat(5,minmax(178px,auto));gap:7px}.archipelago-cell{position:relative;min-width:0;padding:8px;border:1px solid rgba(114,173,188,.17);border-radius:13px;background:linear-gradient(155deg,rgba(10,40,49,.78),rgba(5,23,30,.9));display:flex;flex-direction:column;gap:6px;overflow:hidden;transition:.16s}.archipelago-cell:hover{border-color:rgba(112,199,215,.48);transform:translateY(-1px);background:linear-gradient(155deg,rgba(16,54,64,.84),rgba(7,29,36,.92))}.archipelago-cell.current{border-color:#7bd5c4;box-shadow:inset 0 0 0 1px rgba(123,213,196,.28),0 0 22px rgba(80,184,169,.1)}.archipelago-cell>header{display:flex;align-items:center;justify-content:space-between;color:#8cb0ba;font-size:24px}.archipelago-cell>header b{color:#c5dce2;font-size:24px}.archipelago-cell>header span{opacity:.55}.map-island-main{display:grid;grid-template-columns:54px minmax(0,1fr);gap:7px;align-items:center}.map-island-main img{width:54px;height:54px;border-radius:12px;object-fit:cover}.map-island-main strong,.map-island-main span{display:block;overflow:hidden;text-overflow:clip;white-space:nowrap}.map-island-main strong{color:#e2f1f4;font-size:24px}.map-island-main span{margin-top:2px;color:#7698a3;font-size:24px}.map-empty-island{min-height:58px;border:1px dashed rgba(104,165,179,.22);border-radius:11px;display:flex;align-items:center;justify-content:center;gap:6px;color:#587b86}.map-empty-island span{font-size:24px;font-weight:200}.map-empty-island small{font-size:24px}.map-owner{min-height:31px;color:#8aa7b0;font-size:24px;overflow:hidden}.map-owner>b{display:block;color:#bcd2d8;overflow:hidden;text-overflow:clip;white-space:nowrap}.map-owner .galaxy-social{margin-top:3px}.map-outpost{display:flex;align-items:center;gap:5px;padding:4px 6px;border-radius:8px;background:rgba(23,57,68,.45);font-size:24px}.map-outpost img{width:25px;height:25px;border-radius:7px}.map-outpost span,.map-outpost small{display:block;overflow:hidden;text-overflow:clip;white-space:nowrap}.map-debris{font-size:24px}.map-debris .debris-cell{padding:5px!important;border-radius:8px!important}.map-debris .debris-cell>span,.map-debris .debris-cell>small{font-size:24px!important}.map-debris .debris-actions{gap:3px}.map-debris button{min-height:24px!important;padding:3px 5px!important;font-size:24px!important}.map-actions{margin-top:auto;display:flex;gap:4px;flex-wrap:wrap}.map-actions .gal-act{min-height:26px;padding:4px 6px!important;font-size:24px!important;flex:1 1 auto}.map-empty{color:#5f7f89;font-size:24px}.primary-map-act{border-color:#4c9188!important;background:linear-gradient(#1d625c,#12443f)!important;color:#dff9f2!important}
.special-zones-section{margin:0 18px 4px;border-top:1px solid var(--oc-line);padding-top:14px}.special-zones-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:9px}.special-zones-head h3{margin:2px 0 0;padding:0!important}.special-zones-head p{margin:0;color:#6e919c;font-size:24px}.special-zone-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.special-zone-card{min-width:0;min-height:142px;padding:10px;border:1px solid rgba(123,183,197,.16);border-radius:13px;background:linear-gradient(150deg,rgba(9,34,43,.78),rgba(5,21,28,.91));display:grid;grid-template-columns:38px minmax(0,1fr);gap:8px}.special-zone-card.active{border-color:rgba(216,164,103,.42);background:linear-gradient(150deg,rgba(51,42,30,.52),rgba(8,27,33,.94))}.special-zone-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;border:1px solid rgba(116,184,198,.2);background:rgba(11,49,59,.6);font-size:24px;color:#9ed5de}.special-zone-main{min-width:0}.special-zone-main>header{display:flex;justify-content:space-between;gap:6px}.special-zone-main header b{display:block;color:#dbecef;font-size:24px}.special-zone-main header small{display:block;margin-top:2px;color:#73959f;font-size:24px;line-height:1.35}.special-zone-main header em{font-style:normal;font-size:24px;color:#547580;white-space:nowrap}.special-zone-status{margin-top:7px;padding:6px;border-radius:8px;background:rgba(3,20,26,.45)}.special-zone-status b,.special-zone-status span,.special-zone-status small{display:block;font-size:24px}.special-zone-status b{color:#bdd9df}.special-zone-status span,.special-zone-status small{margin-top:2px;color:#6f919a}.special-zone-status.active b{color:#efd09c}

/* Responsive command shell */
@media(max-width:1280px){
  body.in-game .topbar{grid-template-columns:210px minmax(0,1fr) 210px;padding:10px 12px;gap:10px}.game-brand small{display:none}.resource-cell{padding:7px!important}.resource-cell img{width:25px!important;height:25px!important}.resource-cell span{font-size:24px!important}.resource-cell b{font-size:24px!important}
  body.in-game .rightbar{grid-template-columns:260px minmax(0,1fr);}.event-mini{display:none!important}.special-zone-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cards{grid-template-columns:repeat(auto-fit,minmax(285px,1fr))!important}
}
@media(max-width:900px){
  body.in-game{height:auto!important;min-height:100vh;overflow:auto!important}.page-frame{height:auto!important;min-height:100vh!important;overflow:visible!important;grid-template-rows:auto auto!important}.topbar{position:sticky;top:0;grid-template-columns:1fr auto!important;z-index:30!important;padding:8px 10px!important}.brand-area{display:none}.resource-bar{grid-column:1;grid-template-columns:repeat(5,minmax(82px,1fr))!important;overflow-x:auto}.resource-cell{min-width:82px;height:52px!important}.account-area{grid-column:2;min-width:120px}.account-area .server-line{display:none!important}.game-grid{overflow:visible!important}.sidebar{position:sticky;top:68px;z-index:25}.sidebar .menu-cap,.sidebar .sidebar-status{display:none!important}.rightbar{grid-template-columns:minmax(230px,290px) minmax(0,1fr)!important}.rightbar .planet-choice{flex-basis:220px}#content{overflow:visible!important;min-height:60vh}.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.resource-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.special-zone-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.map-head{align-items:stretch;flex-direction:column}.galaxy-tools{align-items:end}
}
@media(max-width:620px){
  body.in-game .topbar{display:block!important}.account-area{display:none!important}.resource-bar{gap:5px!important}.resource-cell{min-width:76px!important;height:48px!important;padding:5px!important;border-radius:9px!important}.resource-cell img{width:21px!important;height:21px!important}.resource-cell b{font-size:24px!important}.resource-cell span{font-size:24px!important}.sidebar{top:48px;padding:6px 7px!important}.sidebar .nav{min-width:68px!important;min-height:50px!important;padding:5px 7px!important}.sidebar .nav-icon{width:20px!important;height:20px!important}.sidebar .nav span{font-size:24px!important}.rightbar{padding:6px 7px!important;grid-template-columns:1fr!important}.rightbar .island-card{display:none!important}.rightbar .planet-choice{flex:0 0 200px;min-height:62px}.rightbar .planet-choice img{width:42px!important;height:42px!important}.rightbar .island-list{min-height:62px}#content{padding:11px 7px 28px!important}.panel{border-radius:13px!important}.cards{grid-template-columns:1fr!important;padding:8px!important;gap:8px!important}.card.item-card{grid-template-columns:96px minmax(0,1fr)!important}.item-card .item-image{width:96px!important;min-height:160px!important}.item-card .item-info{padding:10px 9px!important}.item-card .item-info h3{font-size:24px!important}.overview-hero{grid-template-columns:1fr!important}.overview-stats{grid-template-columns:1fr 1fr!important}.resource-summary{grid-template-columns:1fr 1fr!important;gap:6px!important}.map-head{padding:12px 10px 9px}.galaxy-tools{display:grid!important;grid-template-columns:auto 1fr 1fr auto!important;width:100%}.galaxy-tools label{min-width:0}.galaxy-tools input{width:100%!important}.galaxy-tools #galaxyGo{grid-column:1/-1}.archipelago-scroll{padding:8px 8px 13px}.special-zones-section{margin:0 8px}.special-zones-head{align-items:flex-start;flex-direction:column}.special-zone-grid{grid-template-columns:1fr}.help-modal-card{width:calc(100vw - 14px)!important;max-height:calc(100vh - 14px)!important;border-radius:14px!important}
}

/* v2026.08.21.31 — XY target controls */
.fleet-xy-picker{display:grid;grid-template-columns:repeat(2,minmax(76px,1fr));gap:7px;align-items:end;min-width:166px;padding:0;margin:0}
.fleet-xy-picker label{display:grid;gap:3px;color:#7899a4;font-size:24px}
.fleet-xy-picker input{width:100%!important}
.fleet-xy-picker.special-target{grid-template-columns:1fr}
.fleet-xy-picker.special-target label{display:none}
.fleet-xy-picker.disabled-target{opacity:.72}
.fleet-special-target{min-height:38px;display:flex;align-items:center;justify-content:center;padding:7px 10px;border:1px solid rgba(116,184,198,.26);border-radius:9px;background:rgba(9,45,55,.72);color:#c6e2e7;font-size:24px;font-weight:700;letter-spacing:.3px}
.fleet-special-target.hidden{display:none!important}
.moon-form>input[type="hidden"],.moonshot-target>input[type="hidden"]{display:none}
@media(max-width:620px){
  .fleet-xy-picker{min-width:0;width:100%;grid-column:1/-1}
  .fleet-special-target{min-height:34px}
}

/* ========================================================================== 
   v2026.08.22.01 — Command Center UX Rebuild
   修正 v31 橫向功能列沿用 .nav{width:100%} 導致每顆按鈕佔滿整個視窗的問題，
   並重新建立清楚、可見、可響應的遊戲操作層級。
   ========================================================================== */
:root{
  --cc-bg:#04141b;
  --cc-panel:#09242d;
  --cc-panel2:#0d303a;
  --cc-line:rgba(120,198,210,.22);
  --cc-line-hi:rgba(128,216,224,.46);
  --cc-accent:#72d1d5;
  --cc-accent2:#8fe2c7;
  --cc-text:#e5f3f6;
  --cc-muted:#86a8b2;
}
body.in-game .page-frame{width:min(1800px,100%);background:linear-gradient(180deg,rgba(4,21,28,.985),rgba(3,14,19,.995))}
body.in-game .topbar{min-height:86px;padding:10px 18px;gap:14px;grid-template-columns:minmax(205px,260px) minmax(570px,1fr) minmax(230px,285px)}
body.in-game .resource-cell{height:58px;border-radius:14px;background:linear-gradient(145deg,rgba(13,48,58,.92),rgba(5,27,34,.94));transition:border-color .15s,transform .15s}
body.in-game .resource-cell:hover{border-color:var(--cc-line-hi);transform:translateY(-1px)}
.nav-toggle-btn{display:none;border:1px solid #467787;background:linear-gradient(#194655,#0c2d38);color:#dff6fb;border-radius:9px;padding:7px 12px;font-weight:700}

/* 功能列：不允許任何按鈕繼承舊版 width:100% 造成整頁橫向捲動。 */
body.in-game .game-grid{grid-template-rows:auto auto minmax(0,1fr)!important;overflow:hidden!important}
body.in-game .sidebar{
  width:100%!important;height:auto!important;padding:10px 14px!important;
  display:grid!important;grid-template-columns:minmax(650px,1.18fr) minmax(520px,1fr) 92px!important;align-items:stretch!important;gap:10px!important;
  overflow:visible!important;background:linear-gradient(180deg,rgba(8,34,43,.98),rgba(5,24,31,.98))!important;
}
body.in-game .sidebar .nav-cluster{min-width:0;display:grid;grid-template-columns:118px minmax(0,1fr);gap:8px;padding:7px;border:1px solid var(--cc-line);border-radius:15px;background:linear-gradient(145deg,rgba(12,46,56,.72),rgba(5,27,34,.72))}
body.in-game .sidebar .nav-cluster-title{display:flex;flex-direction:column;justify-content:center;padding:8px 10px;border-right:1px solid var(--cc-line);min-width:0}
body.in-game .sidebar .nav-cluster-title b{color:#dceef2;font-size:24px;white-space:nowrap}
body.in-game .sidebar .nav-cluster-title span{margin-top:4px;color:#6f929d;font-size:24px;line-height:1.35}
body.in-game .sidebar .nav-cluster-grid{min-width:0;display:grid;grid-template-columns:repeat(4,minmax(92px,1fr));gap:6px;align-content:center}
body.in-game .sidebar .nav{
  width:auto!important;min-width:0!important;min-height:40px!important;height:auto!important;flex:initial!important;
  padding:6px 9px!important;margin:0!important;border:1px solid rgba(119,190,203,.12)!important;border-radius:10px!important;
  background:rgba(5,26,33,.55)!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;
  color:#91adb6!important;text-align:left!important;white-space:nowrap!important;overflow:hidden!important;
}
body.in-game .sidebar .nav:before{display:none!important}
body.in-game .sidebar .nav:hover{background:rgba(27,79,90,.42)!important;border-color:rgba(122,203,214,.34)!important;color:#e8f6f8!important;transform:translateY(-1px)}
body.in-game .sidebar .nav.active{background:linear-gradient(135deg,rgba(38,111,119,.62),rgba(14,62,70,.64))!important;border-color:#69c2c9!important;color:#f1fcfd!important;box-shadow:inset 3px 0 #80ddd3,0 5px 16px rgba(0,0,0,.16)!important}
body.in-game .sidebar .nav.nav-emphasis{border-color:rgba(112,205,202,.25)!important;background:rgba(13,55,61,.62)!important}
body.in-game .sidebar .nav-icon{width:24px!important;min-width:24px!important;height:24px!important;padding:2px!important;border-radius:7px!important;flex:0 0 24px!important}
body.in-game .sidebar .nav span{font-size:24px!important;font-weight:700!important;overflow:hidden;text-overflow:clip}
body.in-game .sidebar .sidebar-status{width:92px!important;min-width:92px!important;min-height:100%;margin:0!important;border-radius:15px!important;align-self:stretch}

/* 領地 Dock：目前領地只顯示一次，其他領地才出現在右側清單。 */
body.in-game .rightbar{padding:8px 14px!important;grid-template-columns:minmax(250px,330px) minmax(260px,1fr) minmax(190px,245px)!important;min-height:78px!important;gap:9px!important}
body.in-game .rightbar .island-card{min-height:62px!important;padding:6px 10px!important}
body.in-game .rightbar .island-thumb{width:48px!important;height:48px!important}
body.in-game .rightbar .island-list{align-items:stretch;min-height:62px}
body.in-game .rightbar .planet-choice{flex:0 0 225px;min-height:62px!important}
.territory-empty{min-height:62px;display:flex;align-items:center;padding:9px 13px;border:1px dashed rgba(124,191,203,.24);border-radius:12px;color:#7496a0;background:rgba(5,27,34,.45);font-size:24px;line-height:1.5}

/* 內容工作區 */
body.in-game #content{padding:16px clamp(12px,2vw,30px) 34px!important;background:radial-gradient(circle at 50% -12%,rgba(43,118,126,.11),transparent 38%)}
body.in-game #content>*{width:min(1480px,100%)}
.overview-hero-v32{grid-template-columns:220px minmax(0,1fr)!important;min-height:158px!important;border-radius:18px!important;overflow:hidden;background:linear-gradient(135deg,rgba(10,42,51,.93),rgba(5,25,32,.96))!important;border-color:rgba(118,194,205,.25)!important}
.overview-hero-v32 .overview-planet{width:220px!important;min-height:158px!important;height:100%!important}
.overview-hero-v32 .overview-info{padding:15px 18px!important}
.overview-eyebrow{display:block;margin-bottom:2px;color:#6fa0aa;font-size:24px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase}
.overview-hero-v32 .overview-info h2{font-size:24px!important;margin-bottom:2px!important;color:#eef9fb!important}
.overview-stats-v32{grid-template-columns:repeat(3,minmax(150px,1fr))!important;gap:3px 18px!important;margin-top:12px!important}
.overview-stats-v32 .stat-line{padding:6px 0!important}

/* 首頁的真正操作入口 */
.overview-command-center{margin:12px auto;border:1px solid rgba(115,199,207,.26);border-radius:18px;background:linear-gradient(145deg,rgba(10,39,47,.94),rgba(5,24,31,.96));box-shadow:0 16px 36px rgba(0,0,0,.18);padding:15px}
.overview-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}
.overview-section-head span{display:block;color:#65a9b3;font-size:24px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase}
.overview-section-head h2{margin:2px 0 0;color:#e9f7f9;font-size:24px}
.overview-section-head>small{color:#7597a1;font-size:24px;text-align:right}
.overview-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.overview-action{position:relative;min-width:0;min-height:82px;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;padding:11px 12px;border:1px solid rgba(123,193,205,.18);border-radius:14px;background:linear-gradient(145deg,rgba(13,49,58,.78),rgba(6,29,36,.86));color:inherit;text-align:left;transition:.15s}
.overview-action:hover{transform:translateY(-2px);border-color:rgba(119,216,218,.55);background:linear-gradient(145deg,rgba(22,72,80,.86),rgba(9,39,46,.92));box-shadow:0 10px 24px rgba(0,0,0,.18)}
.overview-action img{width:44px;height:44px;padding:6px;border-radius:12px;border:1px solid rgba(119,204,214,.24);background:radial-gradient(circle at 35% 25%,rgba(42,128,139,.42),rgba(5,25,32,.7));object-fit:contain}
.overview-action span{min-width:0;display:block}.overview-action b{display:block;color:#e4f3f5;font-size:24px}.overview-action small{display:block;margin-top:4px;color:#7f9fa8;font-size:24px;line-height:1.35}
.overview-action em{position:absolute;right:8px;top:7px;max-width:92px;overflow:hidden;text-overflow:clip;white-space:nowrap;font-style:normal;font-size:24px;color:#9dded1;background:rgba(19,71,71,.62);border:1px solid rgba(123,215,202,.22);border-radius:999px;padding:2px 6px}

.overview-production-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 auto 12px}
.overview-production-strip>div{min-width:0;min-height:62px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 11px;border:1px solid rgba(118,190,201,.16);border-radius:13px;background:rgba(7,30,37,.72)}
.overview-production-strip img{width:36px;height:36px}.overview-production-strip span{color:#97b0b8;font-size:24px}.overview-production-strip span small{display:block;margin-top:2px;color:#5f818b;font-size:24px}.overview-production-strip b{color:#91d7b0;font-size:24px;white-space:nowrap}
.overview-activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.panel-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:6px;padding:0 6px;border-radius:999px;background:rgba(76,143,154,.25);color:#a6d9df;font-size:24px}.incoming-panel h3 small{margin-left:8px;color:#6d929c;font-size:24px;font-weight:500}.incoming-panel.has-alert{border-color:rgba(222,154,104,.45)!important}

/* 平板：功能仍全部可見，以群組換行，不再靠超長橫向捲軸。 */
@media(max-width:1450px){
  body.in-game .sidebar{grid-template-columns:1fr 1fr 82px!important}
  body.in-game .sidebar .nav-cluster{grid-template-columns:100px minmax(0,1fr)}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(4,minmax(78px,1fr))}
  body.in-game .sidebar .nav{padding:6px 7px!important}.sidebar .nav span{font-size:24px!important}
  .overview-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1120px){
  body.in-game .topbar{grid-template-columns:180px minmax(0,1fr) 180px!important;gap:8px!important}.game-brand b{font-size:24px!important}
  body.in-game .sidebar{grid-template-columns:1fr!important;gap:7px!important;padding:8px 10px!important}
  body.in-game .sidebar .nav-cluster{grid-template-columns:108px minmax(0,1fr)}
  body.in-game .sidebar .sidebar-status{display:none!important}
  body.in-game .rightbar{grid-template-columns:240px minmax(0,1fr)!important}.event-mini{display:none!important}
  .overview-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .overview-stats-v32{grid-template-columns:repeat(2,minmax(150px,1fr))!important}
}

/* 手機與小平板：功能改為可開關的選單面板，不佔內容高度。 */
@media(max-width:900px){
  body.in-game{height:auto!important;min-height:100vh!important;overflow:auto!important}
  body.in-game .page-frame{height:auto!important;min-height:100vh!important;overflow:visible!important;grid-template-rows:auto minmax(0,1fr)!important}
  body.in-game .topbar{position:sticky!important;top:0!important;z-index:70!important;min-height:104px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:48px 56px!important;padding:5px 8px!important;gap:4px 8px!important}
  body.in-game .brand-area{display:flex!important;grid-column:1;grid-row:1;padding:0!important}.game-brand .brand-emblem{width:38px!important;height:38px!important}.game-brand b{font-size:24px!important}.game-brand small{display:none!important}
  body.in-game .account-area{display:flex!important;grid-column:2;grid-row:1;padding:0!important;align-items:flex-end!important;justify-content:center!important;gap:0!important}.account-area .server-line{display:none!important}.account-area .account-actions{display:flex!important;gap:6px!important}.account-area #playerName{display:none}.nav-toggle-btn{display:inline-flex!important;align-items:center;justify-content:center}
  body.in-game .resource-bar{grid-column:1/3!important;grid-row:2!important;display:grid!important;grid-template-columns:repeat(5,minmax(78px,1fr))!important;gap:5px!important;overflow-x:auto!important;padding:1px 0 3px!important}.resource-cell{min-width:78px!important;height:50px!important;padding:5px 7px!important}.resource-cell img{width:23px!important;height:23px!important}.resource-cell span{font-size:24px!important}.resource-cell b{font-size:24px!important}
  body.in-game .game-grid{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto minmax(0,1fr)!important;overflow:visible!important}
  body.in-game:not(.nav-open) .sidebar{display:none!important}
  body.in-game.nav-open .sidebar{display:grid!important;position:fixed!important;left:8px!important;right:8px!important;top:108px!important;z-index:65!important;width:auto!important;max-height:calc(100dvh - 118px)!important;overflow-y:auto!important;padding:9px!important;border:1px solid var(--cc-line-hi)!important;border-radius:16px!important;box-shadow:0 22px 70px rgba(0,0,0,.68)!important;background:rgba(5,25,32,.985)!important}
  body.in-game .sidebar .nav-cluster{grid-template-columns:1fr!important;padding:8px!important}.sidebar .nav-cluster-title{border-right:0!important;border-bottom:1px solid var(--cc-line)!important;padding:5px 6px 8px!important}.sidebar .nav-cluster-title span{display:none!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.sidebar .nav{min-height:48px!important;justify-content:center!important;flex-direction:column!important;gap:3px!important;text-align:center!important}.sidebar .nav-icon{width:22px!important;height:22px!important}.sidebar .nav span{font-size:24px!important}
  body.in-game .rightbar{grid-column:1!important;grid-row:1!important;display:grid!important;grid-template-columns:minmax(220px,270px) minmax(0,1fr)!important;padding:6px 8px!important;overflow:hidden!important}.rightbar .island-card{display:grid!important}.rightbar .island-list{overflow-x:auto!important}.rightbar .planet-choice{flex:0 0 205px!important}.territory-empty{min-width:250px}
  body.in-game #content{grid-column:1!important;grid-row:2!important;overflow:visible!important;padding:10px 8px 26px!important}
  .overview-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-production-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-activity-grid{grid-template-columns:1fr!important}
}
@media(max-width:620px){
  body.in-game .topbar{min-height:100px!important;grid-template-rows:44px 56px!important}.mini-btn{padding:5px 7px!important}.nav-toggle-btn{padding:6px 9px!important}
  body.in-game.nav-open .sidebar{top:104px!important}
  body.in-game .rightbar{grid-template-columns:1fr!important}.rightbar .island-card{min-height:58px!important}.rightbar .island-list{display:none!important}.rightbar .territory-empty{display:none!important}
  .overview-hero-v32{grid-template-columns:104px minmax(0,1fr)!important;min-height:132px!important}.overview-hero-v32 .planet-visual-wrap{height:auto!important}.overview-hero-v32 .overview-planet{width:104px!important;height:100%!important;min-height:132px!important;border:0!important;border-right:1px solid rgba(118,194,205,.2)!important}.overview-hero-v32 .overview-info{padding:10px!important}.overview-hero-v32 .overview-title-line{display:block!important}.overview-hero-v32 .planet-actions{margin-top:7px;display:flex;gap:5px}.overview-hero-v32 .overview-info h2{font-size:24px!important}.overview-stats-v32{grid-template-columns:1fr 1fr!important;gap:0 10px!important}.overview-stats-v32 .stat-line{font-size:24px!important}.overview-stats-v32 .stat-line:nth-child(3),.overview-stats-v32 .stat-line:nth-child(4){display:none}.overview-section-head{align-items:flex-start;flex-direction:column;gap:3px}.overview-section-head>small{display:none}.overview-action-grid{grid-template-columns:1fr!important}.overview-action{min-height:68px;grid-template-columns:38px minmax(0,1fr)}.overview-action img{width:38px;height:38px}.overview-action small{font-size:24px}.overview-production-strip{grid-template-columns:1fr 1fr}.overview-production-strip>div{grid-template-columns:30px minmax(0,1fr);min-height:56px}.overview-production-strip img{width:30px;height:30px}.overview-production-strip b{grid-column:2;margin-top:-3px}.incoming-panel h3 small{display:block;margin:4px 0 0}
}


/* ========================================================================
   v2026.08.22.02 — Refined Catalog Cards + Ocean XY Map
   目標：研究／港灣整備／海防不再使用長條裁切圖；全部使用固定正方形場景圖，
   將資訊拆成標題、用途、需求、成本、數值與操作區，避免卡片擁擠。
   ======================================================================== */
.catalog-cards{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))!important;gap:14px!important;padding:14px!important;align-items:start}
.catalog-card{display:grid!important;grid-template-rows:auto auto auto!important;min-width:0!important;min-height:0!important;overflow:hidden!important;border:1px solid rgba(116,180,193,.22)!important;border-radius:17px!important;background:linear-gradient(155deg,rgba(11,36,44,.97),rgba(5,21,28,.985))!important;box-shadow:0 12px 28px rgba(0,0,0,.18)!important;transition:transform .16s,border-color .16s,box-shadow .16s!important}
.catalog-card:hover{transform:translateY(-2px)!important;border-color:rgba(119,210,210,.55)!important;box-shadow:0 18px 38px rgba(0,0,0,.26)!important}
.catalog-card.locked{opacity:.82!important}.catalog-card.locked .catalog-art{filter:saturate(.58) brightness(.76)}
.catalog-card-head{display:grid;grid-template-columns:132px minmax(0,1fr);gap:13px;padding:13px;border-bottom:1px solid rgba(111,176,189,.14);align-items:start}
.catalog-card .catalog-art,.catalog-card .item-image{width:132px!important;height:132px!important;aspect-ratio:1/1!important;object-fit:cover!important;border:1px solid rgba(130,205,212,.27)!important;border-radius:14px!important;background:#06212a!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 9px 20px rgba(0,0,0,.28)!important}
.catalog-title{min-width:0}.catalog-title h3{margin:2px 0 5px!important;padding:0!important;border:0!important;background:none!important;color:#e5f5f5!important;font-size:24px!important;line-height:1.28!important;overflow-wrap:anywhere}
.catalog-title .item-level{margin:0 0 7px!important;color:#9ec0c6!important;font-size:24px!important;font-weight:650}
.catalog-title p{margin:0;color:#789ba4;font-size:24px;line-height:1.48;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.catalog-eyebrow{display:block;color:#62b1b5;font-size:24px;font-weight:800;letter-spacing:1.45px;text-transform:uppercase}
.catalog-card-body{display:grid;gap:9px;padding:11px 13px 12px;min-width:0}
.catalog-status{min-height:28px}.catalog-status .requirement-ok,.catalog-status .requirement-missing,.catalog-status .queue-busy-note{margin:0!important;padding:6px 8px;border-radius:8px;font-size:24px!important;line-height:1.4}.catalog-status .requirement-ok{background:rgba(54,126,90,.11);border:1px solid rgba(91,171,123,.14)}.catalog-status .requirement-missing{background:rgba(148,77,68,.10);border:1px solid rgba(193,117,104,.14)}
.catalog-section-label{margin-top:1px;color:#617f88;font-size:24px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase}
.catalog-costs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;margin:0!important;font-size:24px!important}.catalog-costs span{min-width:0;padding:7px 7px;border:1px solid rgba(108,166,178,.14);border-radius:8px;background:rgba(3,20,26,.48);overflow:hidden;text-overflow:clip}.catalog-costs .enough{color:#8fd0a7}.catalog-costs .short{color:#d69488}
.catalog-stats{display:grid;gap:6px}.catalog-stats .unit-stat-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;margin:0!important}.catalog-stats .unit-stat-grid>div{min-width:0;padding:6px 7px!important;border:1px solid rgba(106,163,175,.14)!important;border-radius:8px!important;background:rgba(3,19,25,.46)!important}.catalog-stats .unit-stat-grid span{display:block;color:#668791!important;font-size:24px!important}.catalog-stats .unit-stat-grid b{display:block;margin-top:2px;color:#bfd7db!important;font-size:24px!important;white-space:normal!important;overflow-wrap:anywhere}.catalog-stats .followup-strike-brief{margin:0!important;padding:6px 8px!important;border-radius:8px!important;font-size:24px!important}
.catalog-upgrade-effect>*{margin-top:0!important}
.unit-build-max{margin:7px 0 0!important;padding:6px 8px!important;border-radius:8px!important;background:rgba(12,55,65,.5)!important;border:1px solid rgba(83,157,171,.18)!important;color:#86aeb6!important;font-size:24px!important}.unit-build-max b{color:#d5ecec!important;font-size:24px!important}.unit-build-max.none{background:rgba(85,49,44,.28)!important;color:#b98c83!important}
.unit-order-preview{min-height:0!important;margin:0!important;padding:7px 8px!important;border-radius:8px!important;background:rgba(5,23,29,.54)!important;border:1px solid rgba(95,150,161,.12)!important;color:#7897a0!important;font-size:24px!important;line-height:1.45!important}
.catalog-actions{margin:0!important;padding:10px 13px 12px!important;border-top:1px solid rgba(111,176,189,.13)!important;display:flex!important;gap:7px!important;align-items:center!important;flex-wrap:wrap!important;background:rgba(3,17,23,.32)}
.catalog-actions>button{min-height:34px!important;border-radius:9px!important;padding:6px 11px!important;font-size:24px!important}.catalog-actions>button[data-build],.catalog-actions>button[data-research],.catalog-actions>button[data-produce]{background:linear-gradient(180deg,#23675f,#164641)!important;border-color:#438e82!important;color:#e7fbf5!important;font-weight:750!important}
.catalog-amount{display:flex;align-items:end;gap:5px;margin-right:auto}.catalog-amount label{display:grid;gap:3px;color:#6f929a;font-size:24px}.catalog-amount input{width:70px!important;height:34px!important;border-radius:8px!important;padding:5px 7px!important}.catalog-amount .unit-all-btn{height:34px!important;border-radius:8px!important}

/* 海域航圖本體就是海面；25 個座標像海圖上的航區，不再浮在一塊黑底上。 */
.ocean-map-panel{overflow:hidden;background:linear-gradient(180deg,rgba(4,24,32,.98),rgba(3,18,25,.99))!important}
.archipelago-scroll{position:relative;margin:0 18px 14px!important;padding:18px!important;border:1px solid rgba(91,176,193,.22)!important;border-radius:18px!important;background:
 radial-gradient(ellipse at 18% 18%,rgba(78,179,192,.17),transparent 26%),
 radial-gradient(ellipse at 78% 70%,rgba(28,116,145,.18),transparent 30%),
 repeating-linear-gradient(176deg,rgba(96,190,202,.035) 0 2px,transparent 2px 23px),
 linear-gradient(180deg,#0a5066 0%,#0b4259 33%,#073448 62%,#062a3b 100%)!important;box-shadow:inset 0 0 80px rgba(0,0,0,.24)}
.archipelago-scroll:before,.archipelago-scroll:after{content:"";position:absolute;left:-5%;width:110%;height:32px;pointer-events:none;opacity:.22;background:radial-gradient(ellipse at center,rgba(186,235,236,.35) 0 2px,transparent 3px) 0 0/58px 13px repeat-x}.archipelago-scroll:before{top:31%}.archipelago-scroll:after{top:68%;transform:scaleX(.8);opacity:.12}
.archipelago-axis.x-axis,.archipelago-board{position:relative;z-index:1}.archipelago-axis.x-axis span,.y-axis span{color:#a9d7dd!important;text-shadow:0 1px 2px rgba(0,0,0,.8)!important;font-weight:800!important}
.archipelago-cell{border-color:rgba(163,224,229,.21)!important;background:linear-gradient(155deg,rgba(4,43,55,.72),rgba(3,29,40,.78))!important;backdrop-filter:blur(2px)}
.archipelago-cell:hover{background:linear-gradient(155deg,rgba(7,63,77,.82),rgba(4,38,49,.87))!important}.archipelago-cell.current{border-color:#87ddd0!important;box-shadow:inset 0 0 0 1px rgba(135,221,208,.26),0 0 24px rgba(54,177,174,.16)!important}
.map-empty-island{min-height:82px!important;display:grid!important;grid-template-columns:66px minmax(0,1fr)!important;align-items:center!important;justify-content:stretch!important;gap:8px!important;padding:6px!important;border:1px dashed rgba(183,232,228,.28)!important;border-radius:12px!important;background:rgba(2,30,40,.34)!important;color:#a6ccd1!important;text-align:left!important}.map-empty-island img{width:66px!important;height:66px!important;aspect-ratio:1!important;object-fit:cover!important;border-radius:10px!important;border:1px solid rgba(176,226,225,.23)!important}.map-empty-island strong{display:block;color:#cbe4e6;font-size:24px}.map-empty-island small{display:block;margin-top:3px;color:#729da6;font-size:24px!important;line-height:1.3}
.map-island-main img{aspect-ratio:1!important;height:54px!important;object-fit:cover!important}

@media(max-width:1180px){.catalog-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.catalog-card-head{grid-template-columns:116px minmax(0,1fr)}.catalog-card .catalog-art,.catalog-card .item-image{width:116px!important;height:116px!important}.catalog-stats .unit-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:720px){.catalog-cards{grid-template-columns:1fr!important;padding:9px!important;gap:10px!important}.catalog-card-head{grid-template-columns:104px minmax(0,1fr);gap:10px;padding:10px}.catalog-card .catalog-art,.catalog-card .item-image{width:104px!important;height:104px!important}.catalog-title h3{font-size:24px!important}.catalog-title p{display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;max-height:none!important;overflow:visible!important}.catalog-card-body{padding:9px 10px}.catalog-actions{padding:9px 10px}.catalog-costs{grid-template-columns:repeat(3,minmax(0,1fr))}.archipelago-scroll{margin:0 8px 12px!important;padding:12px!important}}
@media(max-width:460px){.catalog-card-head{grid-template-columns:92px minmax(0,1fr)}.catalog-card .catalog-art,.catalog-card .item-image{width:92px!important;height:92px!important}.catalog-costs{grid-template-columns:1fr 1fr!important}.catalog-stats .unit-stat-grid{grid-template-columns:1fr 1fr!important}.catalog-amount{width:100%;margin-right:0}.catalog-actions>button{flex:1 1 auto}.archipelago-scroll{padding:9px!important}}


/* ================================================================
   v2026.08.22.03 — readability / ocean motion / floating events
   ================================================================ */
:root{--ui-min-font:16px}
body.in-game,body.in-game button,body.in-game input,body.in-game select,body.in-game textarea,body.in-game label,body.in-game table,body.in-game small{font-size:24px!important}
body.in-game p,body.in-game span,body.in-game b,body.in-game strong,body.in-game small,body.in-game em,body.in-game td,body.in-game th,body.in-game button{max-width:100%;text-overflow:clip!important;overflow-wrap:anywhere;word-break:normal}
body.in-game .nav span,body.in-game .resource-cell b,body.in-game .resource-cell span,.planet-choice b,.planet-choice span,.planet-choice small,.catalog-title p,.catalog-costs span,.queue>span,.queue-lane>b,.map-island-main strong,.map-island-main span,.map-owner>b,.map-outpost span,.map-outpost small,.overview-action em{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
body.in-game .nav{min-height:52px!important;padding:8px 10px!important;align-items:center!important}
body.in-game .nav-icon{width:34px!important;height:34px!important;flex:0 0 34px!important}
.nav-cluster-grid{align-items:stretch}.rightbar .planet-choice{min-height:92px!important}.rightbar .planet-choice img{width:64px!important;height:64px!important}.rightbar .planet-choice{grid-template-columns:64px minmax(0,1fr)!important}
.resource-cell{min-height:76px;height:auto!important}.resource-cell b{white-space:normal!important}
.catalog-title p{display:block!important;overflow:visible!important;line-height:1.55!important}.catalog-card{overflow:visible!important}.catalog-card-body{overflow:visible!important}.catalog-costs span{overflow:visible!important}
.archipelago-cell{min-height:210px!important;overflow:visible!important}.archipelago-grid{grid-template-rows:repeat(5,minmax(210px,auto))!important}.y-axis{grid-template-rows:repeat(5,minmax(210px,auto))!important}.map-island-main strong,.map-owner>b{white-space:normal!important}.map-actions .gal-act{font-size:24px!important;min-height:38px!important}

/* moving ocean layer shared by fleet dispatch and the 5x5 sea chart */
.ocean-motion-surface{position:relative;isolation:isolate;background:
 radial-gradient(ellipse at 18% 28%,rgba(128,224,224,.13) 0 2px,transparent 3px) 0 0/92px 31px,
 radial-gradient(ellipse at 78% 72%,rgba(102,204,214,.12) 0 2px,transparent 3px) 0 0/137px 39px,
 linear-gradient(180deg,rgba(9,72,91,.96),rgba(4,53,72,.97) 48%,rgba(3,38,56,.99))!important;
 background-size:92px 31px,137px 39px,100% 100%!important;animation:oceanDrift 15s linear infinite}
.ocean-motion-surface:before,.ocean-motion-surface:after{content:"";position:absolute;z-index:-1;left:-12%;width:124%;height:90px;pointer-events:none;background:repeating-radial-gradient(ellipse at center,transparent 0 23px,rgba(159,232,233,.10) 25px 27px,transparent 29px 52px);animation:oceanWave 9s ease-in-out infinite}
.ocean-motion-surface:before{top:18%;opacity:.7}.ocean-motion-surface:after{bottom:12%;opacity:.38;animation-duration:13s;animation-direction:reverse}
.ocean-motion-sheen{position:absolute;z-index:-1;inset:0;pointer-events:none;overflow:hidden;background:linear-gradient(105deg,transparent 18%,rgba(149,230,230,.055) 42%,transparent 62%);background-size:220% 100%;animation:oceanSheen 10s linear infinite}
@keyframes oceanDrift{to{background-position:92px 0,-137px 0,0 0}}
@keyframes oceanWave{0%,100%{transform:translate3d(-2%,0,0) scaleY(.92)}50%{transform:translate3d(2%,12px,0) scaleY(1.08)}}
@keyframes oceanSheen{from{background-position:120% 0}to{background-position:-120% 0}}
@media(prefers-reduced-motion:reduce){.ocean-motion-surface,.ocean-motion-surface:before,.ocean-motion-surface:after,.ocean-motion-sheen{animation:none!important}}
.fleet-ocean-panel{border-color:rgba(101,190,202,.38)!important;box-shadow:inset 0 0 70px rgba(0,51,70,.28)}
.fleet-ocean-panel>h2,.fleet-ocean-panel>h3,.fleet-ocean-panel>.fleet-target,.fleet-ocean-panel>.fleet-ships,.fleet-ocean-panel>.fleet-cargo,.fleet-ocean-panel>.fleet-hint,.fleet-ocean-panel>#jointAttackPanel,.fleet-ocean-panel>.fleet-dispatch-summary{position:relative;z-index:2;background:rgba(3,24,33,.72);backdrop-filter:blur(3px)}
.archipelago-scroll{border:1px solid rgba(105,191,205,.26);border-radius:16px;box-shadow:inset 0 0 80px rgba(0,37,54,.34)}
.archipelago-cell{background:linear-gradient(155deg,rgba(6,42,54,.83),rgba(3,27,39,.91))!important;backdrop-filter:blur(2px)}

/* floating event drawer */
.event-drawer-toggle{position:fixed;z-index:150;right:0;top:42%;min-width:102px;min-height:54px;border:1px solid #39798a;border-right:0;border-radius:14px 0 0 14px;background:linear-gradient(135deg,#123c49,#092632);color:#dff5f7;display:grid;grid-template-columns:26px auto 28px;gap:7px;align-items:center;padding:9px 10px;box-shadow:0 8px 26px rgba(0,0,0,.34);font-weight:800}
.event-drawer-toggle:hover{background:linear-gradient(135deg,#185568,#0b3443)}.event-drawer-toggle .event-drawer-icon{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#1b6170;color:#eafcff;font-weight:900}.event-drawer-toggle b{min-width:28px;height:28px;border-radius:14px;display:grid;place-items:center;background:#0b1b22;border:1px solid #3b6470}
.event-drawer-toggle.urgent{background:linear-gradient(135deg,#a52626,#5d1116);border-color:#e15a54;animation:urgentPulse 1.5s ease-in-out infinite}.event-drawer-toggle.urgent .event-drawer-icon,.event-drawer-toggle.urgent b{background:#d63b35;border-color:#ff8b82;color:white}
@keyframes urgentPulse{0%,100%{box-shadow:0 8px 26px rgba(0,0,0,.34),0 0 0 rgba(220,48,43,0)}50%{box-shadow:0 8px 26px rgba(0,0,0,.34),0 0 26px rgba(220,48,43,.55)}}
.event-drawer{position:fixed;z-index:149;right:0;top:20%;width:min(430px,94vw);max-height:68vh;display:flex;flex-direction:column;transform:translateX(calc(100% + 18px));transition:transform .22s ease;background:rgba(4,20,28,.98);border:1px solid #315c68;border-right:0;border-radius:16px 0 0 16px;box-shadow:0 18px 44px rgba(0,0,0,.5);overflow:hidden}.event-drawer.open{transform:translateX(0)}
.event-drawer-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 16px;background:linear-gradient(135deg,#123844,#0a2530);border-bottom:1px solid #31515c}.event-drawer-head>div{display:grid;gap:4px}.event-drawer-head b{font-size:24px!important;color:#e3f5f6}.event-drawer-head span{color:#8db0b8}.event-drawer-head button{width:42px;height:42px;border-radius:10px;font-size:25px!important}
.event-drawer-list{min-height:0;overflow:auto;padding:10px;display:grid;gap:8px}.event-drawer-footer{flex:0 0 auto;padding:10px 12px 12px;border-top:1px solid #31515c;background:linear-gradient(180deg,rgba(7,29,38,.98),rgba(4,20,28,.99))}.event-drawer-message-btn{width:100%;min-height:50px;display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 12px;border:1px solid #3a7180;border-radius:11px;background:linear-gradient(135deg,#123c49,#0a2a36);color:#e3f5f6;font-weight:800;text-align:left}.event-drawer-message-btn:hover,.event-drawer-message-btn:focus-visible{background:linear-gradient(135deg,#185568,#0c3948);border-color:#5da9b7}.event-drawer-message-btn img{width:28px;height:28px;object-fit:contain}.event-drawer-message-btn>span{min-width:0}.event-drawer-message-btn>b{min-width:30px;height:30px;padding:0 8px;border-radius:15px;display:inline-flex;align-items:center;justify-content:center;justify-self:end;align-self:center;background:#9b342f;border:1px solid #d05d54;color:#fff;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;transform:translateY(-1px)}.event-drawer-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid #294954;border-radius:12px;background:#081b23}.event-drawer-item b{display:block;color:#cce5e8}.event-drawer-item p{margin:5px 0 0;color:#87a8b0;line-height:1.5}.event-drawer-item time,.event-drawer-item>span{color:#8cc8c7;font-weight:800;white-space:nowrap}.event-drawer-item.urgent{border-color:#9f3937;background:linear-gradient(135deg,rgba(94,22,24,.55),rgba(24,18,22,.85))}.event-drawer-item.urgent b{color:#ffaaa4}.event-drawer-item.urgent time{color:#ffb3aa}
@media(max-width:760px){.event-drawer-toggle{top:auto;bottom:92px;min-width:94px}.event-drawer{top:auto;bottom:0;max-height:72vh;width:100%;border-radius:18px 18px 0 0;border-right:1px solid #315c68;transform:translateY(calc(100% + 18px))}.event-drawer.open{transform:translateY(0)}.event-drawer-footer{padding:8px 10px calc(8px + env(safe-area-inset-bottom))}.event-drawer-message-btn{min-height:46px;grid-template-columns:26px minmax(0,1fr) auto;gap:8px;padding:8px 10px}.event-drawer-message-btn img{width:24px;height:24px}.event-drawer-message-btn>b{min-width:26px;height:26px;padding:0 7px}}


/* ========================================================================
   v2026.08.22.03 — 16px accessibility + never truncate player-facing text
   ======================================================================== */
body.in-game{font-size:24px}
body.in-game small,body.in-game button,body.in-game input,body.in-game select,body.in-game textarea{font-size:24px}
body.in-game .planet-choice b,body.in-game .planet-choice span,body.in-game .planet-choice small,
body.in-game .rightbar .island-card strong,body.in-game .rightbar .island-card .coords,body.in-game .rightbar .island-meta,
body.in-game .summary-box span,body.in-game .summary-box b,body.in-game .summary-box em,
body.in-game .queue>span,body.in-game .map-island-main strong,body.in-game .map-island-main span,
body.in-game .map-owner>b,body.in-game .map-outpost span,body.in-game .map-outpost small,
body.in-game .server-line>span:first-child,body.in-game .sidebar .nav>span:last-child,
body.in-game .catalog-title h3,body.in-game .catalog-title p,body.in-game .catalog-requirements,
body.in-game .catalog-costs,body.in-game .catalog-stat,body.in-game .overview-action span,
body.in-game .overview-action small,body.in-game .event-drawer-item b,body.in-game .event-drawer-item p{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  overflow-wrap:anywhere!important;word-break:break-word!important;max-width:none!important;
  -webkit-line-clamp:unset!important;line-clamp:unset!important;max-height:none!important;
}
body.in-game .planet-choice,body.in-game .rightbar .island-card,body.in-game .summary-box,
body.in-game .queue,body.in-game .catalog-card,body.in-game .catalog-card-head,body.in-game .map-island-main,
body.in-game .map-outpost,body.in-game .overview-action{height:auto!important}
body.in-game button,body.in-game .nav,body.in-game .mini-btn{white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.35!important;height:auto}
body.in-game .resource-hover-tooltip{white-space:normal!important;overflow-wrap:anywhere!important}
body.in-game .event-drawer-item{grid-template-columns:minmax(0,1fr)!important;align-items:start!important}
body.in-game .event-drawer-item time,body.in-game .event-drawer-item>span{white-space:normal!important;justify-self:start}
@media(max-width:900px){body.in-game .rightbar .planet-choice{min-height:72px!important;height:auto!important}}


/* ========================================================================
   v2026.08.22.04 — 24px readability, six-resource topbar and no truncation
   ======================================================================== */
html{font-size:24px}
body{font-size:24px}
html body .auth-shell .auth-card *,html body .ban-shell .ban-card *,
html body.in-game .page-frame *,html body.in-game #eventDrawer *,html body.in-game #helpModal *,
html body.in-game #toast,html body.share-battle-body *{font-size:24px!important;line-height:1.48}
html body.in-game h1,html body.share-battle-body h1{font-size:40px!important;line-height:1.25}
html body.in-game h2,html body.share-battle-body h2{font-size:34px!important;line-height:1.3}
html body.in-game h3,html body.share-battle-body h3{font-size:29px!important;line-height:1.35}
html body.in-game h4{font-size:26px!important;line-height:1.4}

/* Player-facing text must wrap rather than being hidden or replaced by dots. */
html body.in-game .page-frame *,html body.in-game #eventDrawer *,html body.in-game #helpModal *,
html body.share-battle-body *{text-overflow:clip!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;max-height:none!important}
html body.in-game p,html body.in-game span,html body.in-game b,html body.in-game strong,html body.in-game small,
html body.in-game em,html body.in-game td,html body.in-game th,html body.in-game label,html body.in-game button,
html body.in-game a,html body.in-game li,html body.in-game .coords,
html body.share-battle-body p,html body.share-battle-body span,html body.share-battle-body b,
html body.share-battle-body small,html body.share-battle-body td,html body.share-battle-body th{
  overflow-wrap:anywhere!important;word-break:break-word!important;white-space:normal!important;overflow:visible!important;max-width:none!important
}
html body.in-game button,html body.in-game input,html body.in-game select,html body.in-game textarea{
  min-height:58px!important;padding:10px 14px!important
}
html body.in-game textarea{min-height:150px!important}

/* Top resources: Gold → Wood → Mineral → Algae oil → Tide energy → Pearls. */
body.in-game .page-frame{grid-template-rows:auto minmax(0,1fr)!important}
body.in-game .topbar{height:auto!important;min-height:128px!important;grid-template-columns:minmax(240px,.8fr) minmax(0,3.6fr) minmax(300px,1fr)!important;gap:14px!important;padding:14px 18px!important;align-items:center!important}
body.in-game .resource-bar{display:grid!important;grid-template-columns:repeat(6,minmax(145px,1fr))!important;gap:9px!important;overflow:visible!important;min-width:0!important}
body.in-game .resource-cell{height:auto!important;min-height:94px!important;min-width:0!important;padding:10px 12px!important;gap:10px!important;overflow:visible!important}
body.in-game .resource-cell img{width:52px!important;height:52px!important;flex:0 0 52px!important;object-fit:contain!important}
body.in-game .resource-cell>div{min-width:0!important}.resource-cell span,.resource-cell b,.resource-cell small{white-space:normal!important}
body.in-game .gold-resource{border-color:rgba(225,181,78,.36)!important;background:linear-gradient(145deg,rgba(72,52,18,.48),rgba(8,30,34,.78))!important}
body.in-game .pearl-resource{border-color:rgba(197,181,235,.38)!important;background:linear-gradient(145deg,rgba(61,46,85,.5),rgba(8,30,37,.8))!important}

/* Navigation has to grow with 24px labels instead of clipping them. */
body.in-game .sidebar{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) 150px!important;gap:12px!important;padding:12px 16px!important}
body.in-game .sidebar .nav-cluster{grid-template-columns:180px minmax(0,1fr)!important;gap:10px!important;padding:10px!important}
body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(3,minmax(155px,1fr))!important;gap:9px!important}
body.in-game .sidebar .nav{min-height:72px!important;padding:10px 12px!important;gap:10px!important;white-space:normal!important;overflow:visible!important}
body.in-game .sidebar .nav-icon{width:42px!important;height:42px!important;min-width:42px!important;flex:0 0 42px!important}
body.in-game .sidebar .sidebar-status{width:auto!important;min-width:150px!important}

/* Larger text requires larger cards and scrollable tables, never clipping. */
body.in-game #content{padding:20px clamp(14px,2vw,34px) 48px!important;overflow-x:hidden!important}
body.in-game #content>*{width:min(1560px,100%)!important}
body.in-game .panel{overflow:visible!important}
body.in-game .catalog-cards{grid-template-columns:repeat(auto-fit,minmax(470px,1fr))!important;gap:18px!important}
body.in-game .catalog-card{min-width:0!important;height:auto!important;overflow:visible!important}
body.in-game .catalog-card-head{grid-template-columns:180px minmax(0,1fr)!important;gap:18px!important;padding:18px!important;height:auto!important}
body.in-game .catalog-card .catalog-art,body.in-game .catalog-card .item-image{width:180px!important;height:180px!important;aspect-ratio:1/1!important;object-fit:cover!important;border-radius:16px!important;align-self:start!important}
body.in-game .catalog-card-body,body.in-game .catalog-actions{padding:16px 18px!important;overflow:visible!important}
body.in-game .catalog-costs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body.in-game .cost-row span{min-height:48px!important;display:flex!important;align-items:center!important;white-space:normal!important}
body.in-game .table-scroll{overflow-x:auto!important;overflow-y:visible!important;padding-bottom:8px!important}
body.in-game .table{min-width:980px!important}.resource-production-table{min-width:1120px!important}
body.in-game .resource-facility{min-width:280px!important}.resource-facility img{width:72px!important;height:72px!important;object-fit:cover!important}
body.in-game .resource-summary{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;gap:12px!important}
body.in-game .summary-box{min-height:104px!important;padding:14px!important;overflow:visible!important}.summary-box img{width:60px!important;height:60px!important}
body.in-game .overview-production-strip{grid-template-columns:repeat(5,minmax(210px,1fr))!important;gap:10px!important;overflow-x:auto!important;padding-bottom:5px!important}
body.in-game .overview-production-strip>div{min-height:92px!important;grid-template-columns:54px minmax(0,1fr)!important;align-items:center!important}.overview-production-strip>div>b{grid-column:2!important}
body.in-game .overview-production-strip img{width:54px!important;height:54px!important}
body.in-game .overview-action-grid{grid-template-columns:repeat(3,minmax(280px,1fr))!important;gap:12px!important}
body.in-game .overview-action{min-height:126px!important;grid-template-columns:64px minmax(0,1fr)!important;gap:14px!important;padding:14px!important;overflow:visible!important}.overview-action img{width:64px!important;height:64px!important}
body.in-game .overview-action em{position:static!important;grid-column:2!important;justify-self:start!important;max-width:none!important;margin-top:7px!important;white-space:normal!important}
body.in-game .rightbar{grid-template-columns:minmax(330px,.8fr) minmax(420px,1fr)!important;gap:14px!important;padding:12px 16px!important;height:auto!important;overflow:visible!important}.rightbar .island-card,.rightbar .planet-choice{height:auto!important;min-height:110px!important;overflow:visible!important}
body.in-game .rightbar .island-thumb,body.in-game .rightbar .planet-choice img{width:82px!important;height:82px!important;object-fit:cover!important}
body.in-game .event-drawer{width:min(680px,96vw)!important}.event-drawer-toggle{min-width:154px!important;min-height:70px!important}
body.in-game .help-modal-card{width:min(1000px,96vw)!important;max-height:92vh!important}
.auth-card{width:min(650px,94vw)!important;padding:26px!important}.auth-card input{min-height:60px!important}.auth-brand .brand-emblem{width:72px!important;height:72px!important}
.share-wrap{width:min(1500px,96vw)!important}

.fixed-operation{display:inline-flex;align-items:center;min-height:46px;padding:5px 10px;border-radius:10px;border:1px solid rgba(211,178,79,.34);background:rgba(101,75,21,.28);color:#ead68c}
.gold-production-row{background:linear-gradient(90deg,rgba(95,68,14,.16),transparent)!important}

@media(max-width:1500px){
  body.in-game .topbar{grid-template-columns:1fr auto!important;grid-template-areas:"brand account" "resources resources"!important}
  body.in-game .brand-area{grid-area:brand!important}.account-area{grid-area:account!important}.resource-bar{grid-area:resources!important}
  body.in-game .resource-bar{grid-template-columns:repeat(3,minmax(200px,1fr))!important}
  body.in-game .sidebar{grid-template-columns:1fr!important}.sidebar-status{display:none!important}
  body.in-game .overview-action-grid{grid-template-columns:repeat(2,minmax(300px,1fr))!important}
  body.in-game .overview-production-strip{grid-template-columns:repeat(3,minmax(260px,1fr))!important}
}
@media(max-width:1050px){
  body.in-game .topbar{grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important}
  body.in-game .resource-bar{grid-template-columns:repeat(2,minmax(230px,1fr))!important}
  body.in-game .sidebar .nav-cluster{grid-template-columns:1fr!important}.sidebar .nav-cluster-title{border-right:0!important;border-bottom:1px solid var(--cc-line)!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(2,minmax(220px,1fr))!important}
  body.in-game .overview-action-grid{grid-template-columns:1fr!important}
  body.in-game .overview-production-strip{grid-template-columns:repeat(2,minmax(270px,1fr))!important}
  body.in-game .rightbar{grid-template-columns:1fr!important}
  body.in-game .catalog-cards{grid-template-columns:1fr!important}
}
@media(max-width:700px){
  body.in-game .resource-bar{grid-template-columns:1fr!important}.resource-cell{min-height:86px!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:1fr!important}
  body.in-game .catalog-card-head{grid-template-columns:1fr!important}.catalog-card .catalog-art,.catalog-card .item-image{width:min(100%,320px)!important;height:auto!important;aspect-ratio:1/1!important;justify-self:center!important}
  body.in-game .catalog-costs{grid-template-columns:1fr!important}
  body.in-game .overview-production-strip{grid-template-columns:1fr!important;overflow:visible!important}
}

/* v2026.08.22.04 final readability guard: no 24px text may be clipped or replaced by dots. */
body.in-game .catalog-title p,
body.in-game .catalog-title,
body.in-game .catalog-title h3,
body.in-game .resource-cell,
body.in-game .resource-cell > div,
body.in-game .nav,
body.in-game .nav span,
body.in-game .island-card,
body.in-game .planet-choice,
body.in-game .overview-action,
body.in-game .overview-action span,
body.in-game .event-drawer,
body.in-game .event-drawer *{
  white-space:normal!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  -webkit-line-clamp:unset!important;
  line-clamp:unset!important;
  max-height:none!important;
}
body.in-game .nav,body.in-game .resource-cell,body.in-game .overview-action{display:flex!important}
body.in-game .catalog-title p{overflow:visible!important}
body.in-game .resource-cell > div{min-width:0!important}
body.in-game .resource-cell b{font-variant-numeric:tabular-nums}
@media(max-width:520px){
  body.in-game #content{padding-left:10px!important;padding-right:10px!important}
  body.in-game .catalog-cards{padding-left:0!important;padding-right:0!important}
  body.in-game .catalog-card-head,body.in-game .catalog-card-body,body.in-game .catalog-actions{padding-left:12px!important;padding-right:12px!important}
}

/* ========================================================================
   v2026.08.22.06 — Command Deck UX Rebuild
   24px remains the minimum readable size. The layout is rebuilt around it;
   text is never clipped, ellipsized, or allowed to escape its own component.
   ======================================================================== */
:root{
  --ux-bg:#04151c;
  --ux-panel:#08252e;
  --ux-panel-2:#0b313b;
  --ux-panel-3:#0e3a45;
  --ux-line:rgba(126,199,211,.22);
  --ux-line-strong:rgba(126,216,222,.5);
  --ux-text:#e7f5f7;
  --ux-muted:#8aaab3;
  --ux-cyan:#79d3d6;
  --ux-green:#8bd2b1;
  --ux-gold:#e7c66d;
}

/* ---------- Global containment: big text must reflow, never escape ---------- */
html,body{max-width:100%;overflow-x:hidden}
body.in-game{height:auto!important;min-height:100vh!important;overflow-y:auto!important;overflow-x:hidden!important}
body.in-game .page-frame,
body.in-game .page-frame *,
body.in-game #eventDrawer *,
body.in-game #helpModal *{box-sizing:border-box}
body.in-game .page-frame{width:min(1900px,100%)!important;min-height:100vh!important;height:auto!important;overflow:visible!important;margin:0 auto!important}
body.in-game .page-frame p,
body.in-game .page-frame span,
body.in-game .page-frame b,
body.in-game .page-frame strong,
body.in-game .page-frame small,
body.in-game .page-frame em,
body.in-game .page-frame label,
body.in-game .page-frame a,
body.in-game .page-frame button,
body.in-game .page-frame td,
body.in-game .page-frame th{
  min-width:0!important;max-width:100%!important;white-space:normal!important;
  overflow-wrap:break-word!important;word-break:normal!important;
  text-overflow:clip!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;
}
body.in-game img{max-width:100%}
body.in-game button{cursor:pointer}

/* ---------- Header: identity row + one clean resource row ---------- */
body.in-game .topbar{
  position:relative!important;top:auto!important;height:auto!important;min-height:0!important;
  display:grid!important;grid-template-columns:minmax(260px,1fr) minmax(430px,auto)!important;
  grid-template-areas:"brand account" "resources resources"!important;
  align-items:center!important;gap:12px 20px!important;padding:14px 22px 16px!important;
  background:linear-gradient(180deg,rgba(5,29,37,.99),rgba(4,22,29,.99))!important;
  border-bottom:1px solid var(--ux-line)!important;
}
body.in-game .brand-area{grid-area:brand!important;display:flex!important;padding:0!important;min-width:0!important}
body.in-game .game-brand{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important}
body.in-game .game-brand .brand-emblem{width:62px!important;height:62px!important;flex:0 0 62px!important}
body.in-game .game-brand b{font-size:28px!important;line-height:1.1!important;letter-spacing:1.4px!important}
body.in-game .game-brand small{display:block!important;margin-top:4px!important;color:#83a5ae!important}
body.in-game .account-area{grid-area:account!important;display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-content:center!important;gap:8px!important;padding:0!important;min-width:0!important}
body.in-game .server-line,body.in-game .account-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;min-width:0!important}
body.in-game .build-version,body.in-game .speed-badge{white-space:nowrap!important;flex:0 0 auto!important}
body.in-game .nav-toggle-btn{display:none}

body.in-game .resource-bar{
  grid-area:resources!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:10px!important;min-width:0!important;overflow:visible!important;padding:0!important;
}
body.in-game .resource-cell{
  min-width:0!important;min-height:78px!important;height:auto!important;padding:10px 12px!important;
  display:grid!important;grid-template-columns:50px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;
  border:1px solid var(--ux-line)!important;border-radius:15px!important;
  background:linear-gradient(145deg,rgba(11,48,58,.92),rgba(5,27,34,.96))!important;overflow:hidden!important;
}
body.in-game .resource-cell img{width:50px!important;height:50px!important;flex:none!important;object-fit:contain!important}
body.in-game .resource-cell>div{min-width:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:baseline!important;column-gap:8px!important}
body.in-game .resource-cell span{grid-column:1!important;color:#8ba8b0!important}
body.in-game .resource-cell b{grid-column:2!important;color:#e1f0f3!important;text-align:right!important;font-variant-numeric:tabular-nums!important}
body.in-game .resource-cell small{grid-column:1/3!important;margin-top:2px!important;color:#82bfa5!important}
body.in-game .gold-resource{border-color:rgba(228,190,91,.38)!important}
body.in-game .pearl-resource{border-color:rgba(198,178,237,.38)!important}

/* ---------- Game shell: navigation, territory dock, content in clear layers ---------- */
body.in-game .game-grid{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"nav" "territory" "content"!important;
  grid-template-rows:auto auto auto!important;height:auto!important;min-height:0!important;overflow:visible!important;
}

/* Primary navigation stays visible; secondary services are on-demand. */
body.in-game .sidebar{
  grid-area:nav!important;position:relative!important;top:auto!important;left:auto!important;right:auto!important;
  width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;
  display:block!important;padding:12px 18px!important;border:0!important;border-bottom:1px solid var(--ux-line)!important;
  background:linear-gradient(180deg,rgba(7,34,43,.985),rgba(5,25,32,.99))!important;box-shadow:none!important;
}
body.in-game .sidebar .nav-cluster{
  width:100%!important;min-width:0!important;display:grid!important;grid-template-columns:180px minmax(0,1fr)!important;
  gap:12px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;
}
body.in-game .sidebar .nav-cluster-title{
  display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important;
  padding:8px 16px 8px 4px!important;border:0!important;border-right:1px solid var(--ux-line)!important;
}
body.in-game .sidebar .nav-cluster-title b{font-size:26px!important;color:#e2f1f4!important;white-space:normal!important}
body.in-game .sidebar .nav-cluster-title span{margin-top:4px!important;color:#7899a3!important}
body.in-game .sidebar .nav-cluster-grid{
  display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important;align-items:stretch!important;min-width:0!important;
}
body.in-game .sidebar .nav{
  width:100%!important;min-width:0!important;min-height:72px!important;height:auto!important;margin:0!important;padding:10px 12px!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;
  border:1px solid rgba(122,190,202,.15)!important;border-radius:13px!important;background:rgba(5,27,34,.7)!important;
  color:#a4bdc4!important;text-align:left!important;overflow:hidden!important;transition:transform .14s,border-color .14s,background .14s!important;
}
body.in-game .sidebar .nav:hover{transform:translateY(-1px)!important;border-color:rgba(119,215,220,.42)!important;background:rgba(20,65,75,.72)!important;color:#f2fbfc!important}
body.in-game .sidebar .nav.active{border-color:#70cbd1!important;background:linear-gradient(135deg,rgba(38,111,119,.72),rgba(12,55,64,.8))!important;color:#fff!important;box-shadow:inset 4px 0 #8ae0d4!important}
body.in-game .sidebar .nav-icon{width:38px!important;height:38px!important;min-width:38px!important;flex:0 0 38px!important;padding:3px!important;border-radius:10px!important}
body.in-game .sidebar .nav span{font-weight:750!important;line-height:1.25!important}
body.in-game .sidebar .sidebar-status{display:none!important}


/* Territory dock: one current-island card + actual alternatives/action; no duplicate giant boxes. */
body.in-game .rightbar{
  grid-area:territory!important;position:relative!important;display:grid!important;grid-template-columns:minmax(390px,500px) minmax(0,1fr)!important;
  align-items:stretch!important;gap:12px!important;width:100%!important;height:auto!important;min-height:0!important;
  padding:12px 18px!important;border:0!important;border-bottom:1px solid var(--ux-line)!important;
  background:rgba(4,22,29,.96)!important;overflow:visible!important;
}
body.in-game .rightbar .island-card{
  min-width:0!important;min-height:104px!important;height:auto!important;margin:0!important;padding:10px 14px!important;
  display:grid!important;grid-template-columns:82px minmax(0,1fr)!important;grid-template-rows:auto auto auto auto!important;
  column-gap:14px!important;align-content:center!important;text-align:left!important;
  border:1px solid rgba(121,195,206,.2)!important;border-radius:15px!important;background:linear-gradient(145deg,rgba(11,45,55,.86),rgba(5,27,34,.9))!important;
}
body.in-game .rightbar .island-thumb{grid-column:1!important;grid-row:1/5!important;width:82px!important;height:82px!important;border-radius:12px!important;object-fit:cover!important;align-self:center!important}
body.in-game .rightbar .island-title{grid-column:2!important;grid-row:1!important;height:auto!important;padding:0!important;background:none!important;border:0!important;justify-content:flex-start!important;color:#7899a3!important}
body.in-game .rightbar .island-card strong{grid-column:2!important;grid-row:2!important;color:#e3f3f5!important;font-size:28px!important;line-height:1.25!important}
body.in-game .rightbar .island-card .coords{grid-column:2!important;grid-row:3!important;color:#8fb0b9!important;margin-top:2px!important}
body.in-game .rightbar .island-meta{grid-column:2!important;grid-row:4!important;color:#73b5a0!important;margin-top:2px!important}
body.in-game .rightbar .island-list-title{display:none!important}
body.in-game .rightbar .island-list{min-width:0!important;min-height:104px!important;display:flex!important;align-items:stretch!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important}
body.in-game .rightbar .planet-choice{
  flex:0 0 330px!important;min-width:0!important;min-height:104px!important;height:auto!important;margin:0!important;padding:10px 12px!important;
  display:grid!important;grid-template-columns:74px minmax(0,1fr)!important;align-items:center!important;gap:12px!important;
  border:1px solid rgba(119,190,203,.18)!important;border-radius:15px!important;background:rgba(5,28,36,.76)!important;color:#adc5cb!important;text-align:left!important;overflow:hidden!important;
}
body.in-game .rightbar .planet-choice img{width:74px!important;height:74px!important;border-radius:11px!important;object-fit:cover!important}
body.in-game .rightbar .planet-choice>div{min-width:0!important}.rightbar .planet-choice b{font-size:26px!important;color:#e0eef1!important}.rightbar .planet-choice span,.rightbar .planet-choice small{display:block!important;margin-top:2px!important;color:#829fa8!important}
.territory-discover{
  flex:1 1 360px!important;min-width:300px!important;min-height:104px!important;padding:12px 16px!important;
  display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-content:center!important;column-gap:12px!important;
  border:1px dashed rgba(113,196,206,.3)!important;border-radius:15px!important;background:rgba(5,29,36,.5)!important;color:#9ebac1!important;text-align:left!important;
}
.territory-discover>span{grid-column:1!important;grid-row:1/3!important;align-self:center!important;justify-self:center!important;font-size:42px!important;color:#76cbd0!important}.territory-discover b{grid-column:2!important;color:#dbecef!important;font-size:26px!important}.territory-discover small{grid-column:2!important;margin-top:3px!important;color:#7799a2!important}

/* ---------- Main workspace ---------- */
body.in-game #content{grid-area:content!important;width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;overflow:visible!important;padding:18px 22px 54px!important}
body.in-game #content>*{width:min(1780px,100%)!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;min-width:0!important}
body.in-game .panel,body.in-game .card,body.in-game .catalog-card,body.in-game .overview-command-center{min-width:0!important;max-width:100%!important}

/* Overview becomes an action-first dashboard with generous spacing. */
body.in-game .overview-hero-v32{grid-template-columns:270px minmax(0,1fr)!important;min-height:205px!important;border-radius:18px!important}
body.in-game .overview-hero-v32 .overview-planet{width:270px!important;min-height:205px!important;height:100%!important;object-fit:cover!important}
body.in-game .overview-hero-v32 .overview-info{padding:18px 22px!important;min-width:0!important}
body.in-game .overview-title-line{gap:16px!important;align-items:flex-start!important;flex-wrap:wrap!important}.overview-title-line>div{min-width:0!important;flex:1 1 380px!important}.planet-actions{flex:0 1 auto!important;display:flex!important;gap:8px!important;flex-wrap:wrap!important}
body.in-game .overview-stats-v32{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin-top:16px!important}.overview-stats-v32 .stat-line{min-width:0!important;padding:10px 12px!important;border:1px solid rgba(119,186,198,.12)!important;border-radius:11px!important;background:rgba(4,25,32,.45)!important}
body.in-game .overview-section-head{align-items:flex-start!important;flex-wrap:wrap!important}.overview-section-head>div{min-width:0!important;flex:1 1 420px!important}.overview-section-head>small{flex:1 1 360px!important;text-align:right!important}
body.in-game .overview-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
body.in-game .overview-action{min-width:0!important;min-height:142px!important;padding:14px!important;display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-items:center!important;gap:10px 14px!important;border-radius:15px!important;overflow:hidden!important}
body.in-game .overview-action img{grid-row:1/3!important;width:64px!important;height:64px!important}.overview-action span{min-width:0!important}.overview-action b{font-size:27px!important;line-height:1.25!important}.overview-action small{margin-top:5px!important;color:#88a8b1!important}.overview-action em{position:static!important;grid-column:2!important;justify-self:start!important;max-width:100%!important;margin:2px 0 0!important;padding:3px 8px!important;white-space:normal!important}
body.in-game .overview-production-strip{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important;overflow:visible!important}.overview-production-strip>div{min-width:0!important;min-height:105px!important;grid-template-columns:54px minmax(0,1fr)!important;grid-template-rows:auto auto!important}.overview-production-strip>div>b{grid-column:2!important;justify-self:start!important;white-space:normal!important}.overview-production-strip span{min-width:0!important}
body.in-game .overview-activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.overview-activity-grid>.panel{min-width:0!important}

/* Catalog pages: at 24px, two roomy cards are better than three cramped ones. */
body.in-game .catalog-cards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;padding:14px!important}
body.in-game .catalog-card{min-width:0!important;overflow:hidden!important;border-radius:17px!important}
body.in-game .catalog-card-head{grid-template-columns:190px minmax(0,1fr)!important;gap:18px!important;padding:18px!important;align-items:start!important}.catalog-card .catalog-art,.catalog-card .item-image{width:190px!important;height:190px!important;aspect-ratio:1!important;object-fit:cover!important;border-radius:15px!important}
body.in-game .catalog-title{min-width:0!important}.catalog-title h3{font-size:29px!important;line-height:1.3!important;margin-bottom:7px!important}.catalog-title p{line-height:1.5!important;color:#93adb5!important}
body.in-game .catalog-card-body{padding:15px 18px!important;display:grid!important;gap:12px!important}.catalog-costs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.catalog-costs span{min-width:0!important;min-height:54px!important;padding:8px 10px!important;display:flex!important;align-items:center!important;border-radius:9px!important}
body.in-game .catalog-stats .unit-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}.catalog-stats .unit-stat-grid>div{min-width:0!important;padding:9px!important}.catalog-actions{padding:14px 18px 16px!important;gap:10px!important}.catalog-actions>button{min-height:58px!important;padding:9px 14px!important}
body.in-game .catalog-amount{min-width:0!important;flex-wrap:wrap!important}.catalog-amount input{width:120px!important;min-width:100px!important;height:58px!important}.catalog-amount .unit-all-btn{height:58px!important}

/* Tables and forms stay inside their own scroll/container instead of breaking the page. */
body.in-game .table-scroll{max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;overscroll-behavior-x:contain!important}
body.in-game .table{width:max-content!important;min-width:100%!important;max-width:none!important}
body.in-game input,body.in-game select,body.in-game textarea{max-width:100%!important}
body.in-game .form-grid,body.in-game .fleet-form,body.in-game .market-grid{min-width:0!important;max-width:100%!important}

/* Event button stays reachable without covering the command deck. */
body.in-game .event-drawer-toggle{right:max(14px,calc((100vw - min(1900px,100vw))/2 + 14px))!important;top:auto!important;bottom:22px!important;z-index:85!important}
body.in-game .event-drawer{z-index:90!important}

/* ---------- Responsive ---------- */
@media(max-width:1650px){
  body.in-game .resource-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body.in-game .overview-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .overview-production-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:1250px){
  body.in-game .topbar{grid-template-columns:minmax(0,1fr) auto!important}
  body.in-game .sidebar .nav-cluster{grid-template-columns:1fr!important}.sidebar .nav-cluster-title{border-right:0!important;border-bottom:1px solid var(--ux-line)!important;padding:3px 0 10px!important;margin-bottom:1px!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.in-game .rightbar{grid-template-columns:1fr!important}.rightbar .island-list{min-height:0!important}
  body.in-game .overview-stats-v32{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .catalog-cards{grid-template-columns:1fr!important}
}
@media(max-width:900px){
  body.in-game .topbar{position:sticky!important;top:0!important;z-index:70!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"brand account" "resources resources"!important;padding:9px 10px 10px!important;gap:8px!important}
  body.in-game .game-brand .brand-emblem{width:50px!important;height:50px!important;flex-basis:50px!important}.game-brand b{font-size:25px!important}.game-brand small{display:none!important}
  body.in-game .server-line{display:none!important}.account-actions{gap:7px!important}.account-actions #playerName{display:none!important}.nav-toggle-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:54px!important}
  body.in-game .resource-bar{display:flex!important;gap:7px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity!important;padding-bottom:4px!important}
  body.in-game .resource-cell{flex:0 0 205px!important;min-height:72px!important;scroll-snap-align:start!important;grid-template-columns:44px minmax(0,1fr)!important}.resource-cell img{width:44px!important;height:44px!important}
  body.in-game:not(.nav-open) .sidebar{display:none!important}
  body.in-game.nav-open .sidebar{display:block!important;position:fixed!important;inset:10px!important;z-index:95!important;width:auto!important;max-height:calc(100dvh - 20px)!important;overflow-y:auto!important;padding:14px!important;border:1px solid var(--ux-line-strong)!important;border-radius:18px!important;background:rgba(4,22,29,.995)!important;box-shadow:0 24px 80px rgba(0,0,0,.72)!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.sidebar .nav{min-height:78px!important}.sidebar .nav-cluster-title{padding-top:0!important}
  body.in-game .rightbar{padding:9px 10px!important}.rightbar .island-card{min-height:94px!important}.rightbar .island-list{display:none!important}.territory-discover{display:none!important}
  body.in-game #content{padding:12px 10px 42px!important}
  body.in-game .overview-hero-v32{grid-template-columns:1fr!important}.overview-hero-v32 .overview-planet{width:100%!important;height:auto!important;min-height:0!important;max-height:300px!important}.overview-hero-v32 .overview-info{padding:14px!important}
  body.in-game .overview-section-head>small{text-align:left!important}.overview-action-grid{grid-template-columns:1fr!important}.overview-production-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}.overview-activity-grid{grid-template-columns:1fr!important}
  body.in-game .catalog-card-head{grid-template-columns:160px minmax(0,1fr)!important;gap:14px!important}.catalog-card .catalog-art,.catalog-card .item-image{width:160px!important;height:160px!important}
  body.in-game .event-drawer-toggle{right:10px!important;bottom:12px!important}
}
@media(max-width:620px){
  body.in-game .brand-area{min-width:0!important}.game-brand>div{min-width:0!important}.game-brand b{font-size:24px!important}
  body.in-game .resource-cell{flex-basis:190px!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:1fr!important}
  body.in-game .rightbar .island-card{grid-template-columns:68px minmax(0,1fr)!important}.rightbar .island-thumb{width:68px!important;height:68px!important}
  body.in-game .overview-stats-v32{grid-template-columns:1fr!important}.overview-production-strip{grid-template-columns:1fr!important}
  body.in-game .catalog-card-head{grid-template-columns:1fr!important}.catalog-card .catalog-art,.catalog-card .item-image{width:min(100%,320px)!important;height:auto!important;justify-self:center!important}.catalog-costs{grid-template-columns:1fr!important}.catalog-stats .unit-stat-grid{grid-template-columns:1fr!important}
}

/* v06 priority corrections over legacy !important rules. */

@media(max-width:900px){
  body.in-game .topbar{position:relative!important;top:auto!important}
  body.in-game .resource-bar{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;overflow:visible!important;padding:0!important;
  }
  body.in-game .resource-cell{width:auto!important;min-width:0!important;flex:none!important;min-height:78px!important;scroll-snap-align:none!important}
}
@media(max-width:430px){
  body.in-game .topbar{grid-template-columns:minmax(0,1fr) auto!important;padding-left:8px!important;padding-right:8px!important}
  body.in-game .resource-bar{gap:6px!important}
  body.in-game .resource-cell{grid-template-columns:40px minmax(0,1fr)!important;padding:8px!important;gap:7px!important}
  body.in-game .resource-cell img{width:40px!important;height:40px!important}
  body.in-game .resource-cell>div{grid-template-columns:1fr!important;display:block!important}
  body.in-game .resource-cell b{display:block!important;text-align:left!important;margin-top:2px!important}
  body.in-game .resource-cell small{display:block!important}
}

/* v06 vertical-density pass: preserve 24px text while exposing gameplay sooner. */
@media(min-width:901px){
  body.in-game .topbar{padding:10px 18px 12px!important;gap:8px 18px!important}
  body.in-game .game-brand .brand-emblem{width:50px!important;height:50px!important;flex-basis:50px!important}
  body.in-game .game-brand b{font-size:26px!important}.game-brand small{margin-top:1px!important}
  body.in-game .account-area{gap:4px!important}
  body.in-game .resource-cell{min-height:68px!important;padding:7px 10px!important;grid-template-columns:42px minmax(0,1fr)!important;gap:8px!important}
  body.in-game .resource-cell img{width:42px!important;height:42px!important}
  body.in-game .sidebar{padding:9px 16px!important}
  body.in-game .sidebar .nav{min-height:64px!important;padding:8px 10px!important}
  body.in-game .sidebar .nav-icon{width:34px!important;height:34px!important;min-width:34px!important;flex-basis:34px!important}
  body.in-game .rightbar{padding:9px 16px!important}
  body.in-game .rightbar .island-title{display:none!important}
  body.in-game .rightbar .island-card{min-height:96px!important;grid-template-rows:auto auto auto!important;align-content:center!important}
  body.in-game .rightbar .island-thumb{grid-row:1/4!important;width:76px!important;height:76px!important}
  body.in-game .rightbar .island-card strong{grid-row:1!important}
  body.in-game .rightbar .island-card .coords{grid-row:2!important}
  body.in-game .rightbar .island-meta{grid-row:3!important}
  body.in-game .rightbar .island-list{min-height:96px!important}.territory-discover{min-height:96px!important}
}

@media(max-width:430px){
  body.in-game .game-brand b{display:none!important}
  body.in-game .game-brand small{display:block!important;margin:0!important;color:#dceef2!important;font-size:24px!important;font-weight:800!important;white-space:nowrap!important}
  body.in-game .game-brand{gap:8px!important}
  body.in-game .game-brand .brand-emblem{width:46px!important;height:46px!important;flex-basis:46px!important}
  body.in-game .account-actions{flex-wrap:nowrap!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{min-height:52px!important;padding:7px 10px!important}
}

/* v06 mobile density/containment corrections. */
@media(max-width:900px){
  body.in-game .rightbar .island-list{display:none!important;min-height:0!important;height:0!important}
  body.in-game .rightbar .island-title{display:none!important}
  body.in-game .rightbar .island-card{min-height:120px!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;align-content:center!important}
  body.in-game .rightbar .island-thumb{grid-column:1!important;grid-row:1/4!important;width:72px!important;height:72px!important}
  body.in-game .rightbar .island-card strong{grid-column:2!important;grid-row:1!important}
  body.in-game .rightbar .island-card .coords{grid-column:2!important;grid-row:2!important}
  body.in-game .rightbar .island-meta{grid-column:2!important;grid-row:3!important}
  body.in-game .overview-hero-v32 .planet-visual-wrap{display:none!important}
  body.in-game .overview-hero-v32{display:block!important;min-height:0!important}
  body.in-game .overview-stats-v32{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  body.in-game .overview-stats-v32{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* v06 breakpoint refinement for ordinary 1366–1600px desktops. */
@media(min-width:1251px) and (max-width:1650px){
  body.in-game .resource-bar{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  body.in-game .sidebar .nav-cluster-core{grid-template-columns:1fr!important}
  body.in-game .sidebar .nav-cluster-core .nav-cluster-title{display:none!important}
  body.in-game .sidebar .nav-cluster-core .nav-cluster-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important}
  body.in-game .sidebar .nav{min-height:62px!important;padding:7px 8px!important;gap:8px!important}
  body.in-game .sidebar .nav-icon{width:32px!important;height:32px!important;min-width:32px!important;flex-basis:32px!important}
}
@media(max-width:1200px) and (min-width:901px){
  body.in-game .resource-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:900px){
  body.in-game .rightbar.single-territory{display:none!important}
}

/* Tablets use the same focused navigation drawer instead of stacking a huge menu above content. */
@media(max-width:1100px) and (min-width:901px){
  body.in-game .nav-toggle-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important}
  body.in-game .server-line{display:none!important}
  body.in-game:not(.nav-open) .sidebar{display:none!important}
  body.in-game.nav-open .sidebar{display:block!important;position:fixed!important;inset:14px!important;z-index:95!important;width:auto!important;max-height:calc(100dvh - 28px)!important;overflow-y:auto!important;padding:16px!important;border:1px solid var(--ux-line-strong)!important;border-radius:18px!important;background:rgba(4,22,29,.995)!important;box-shadow:0 24px 80px rgba(0,0,0,.72)!important}
  body.in-game .sidebar .nav-cluster{grid-template-columns:1fr!important}
  body.in-game .sidebar .nav-cluster-title{border-right:0!important;border-bottom:1px solid var(--ux-line)!important;padding:4px 0 10px!important}
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .rightbar.single-territory{display:none!important}
}

/* v2026.08.22.08 — Market/Admin/Readable UX final overrides */
body:not(.in-game) #eventDrawerToggle,
body:not(.in-game) #eventDrawer{display:none!important}

/* Resource capacity status: <90% white, 90–<100% yellow, >=100% red. */
body.in-game #rGold.resource-normal,body.in-game #rMetal.resource-normal,body.in-game #rCrystal.resource-normal,body.in-game #rDeut.resource-normal{color:#f4f8fa!important;text-shadow:none!important}
body.in-game #rGold.resource-near-full,body.in-game #rMetal.resource-near-full,body.in-game #rCrystal.resource-near-full,body.in-game #rDeut.resource-near-full{color:#ffd35c!important;text-shadow:0 0 10px rgba(255,192,44,.28)!important}
body.in-game #rGold.resource-full,body.in-game #rMetal.resource-full,body.in-game #rCrystal.resource-full,body.in-game #rDeut.resource-full{color:#ff675f!important;text-shadow:0 0 12px rgba(255,74,65,.38)!important}

.build-time-line{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:12px 14px;margin:10px 0;border:1px solid rgba(78,137,150,.38);border-radius:12px;background:rgba(7,39,48,.62);flex-wrap:wrap}
.build-time-line span{color:#a9c1c8}.build-time-line b{color:#d9f3f5;text-align:right}

/* Pearl screen: wide readable cards instead of narrow vertical strips. */
.pearl-panel{overflow:visible!important}.pearl-hero{display:grid;grid-template-columns:132px minmax(0,1fr);gap:24px;align-items:center;padding:22px;border:1px solid rgba(104,143,173,.45);border-radius:18px;background:linear-gradient(135deg,rgba(33,48,78,.72),rgba(8,32,42,.84))}.pearl-hero img{width:132px;height:132px;object-fit:cover;border-radius:22px}.pearl-hero span{display:block;color:#b9cbd6}.pearl-hero strong{display:block;font-size:36px!important;color:#f5d9f1;margin:4px 0 8px}.pearl-hero p{margin:0;line-height:1.55}.pearl-section-title{margin:24px 0 12px}.pearl-section-title h2,.pearl-section-title p{margin:0}.pearl-section-title p{margin-top:5px;color:#a8bdc4}.advisor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.advisor-card{display:grid;grid-template-columns:150px minmax(0,1fr);gap:20px;min-width:0;padding:16px;border:1px solid rgba(64,113,127,.44);border-radius:16px;background:rgba(3,25,32,.86)}.advisor-card.premium-active{border-color:#5ea998;box-shadow:0 0 0 1px rgba(94,169,152,.16) inset}.advisor-art{width:150px;height:150px;object-fit:cover;border-radius:14px}.advisor-main{min-width:0;display:flex;flex-direction:column;gap:10px}.advisor-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.advisor-title h3{margin:0}.advisor-title span{padding:4px 9px;border-radius:999px;border:1px solid #416b76;color:#bdd3d8}.advisor-main p{margin:0;line-height:1.55;color:#c3d0d3}.advisor-footer{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.advisor-footer b{color:#f1c8eb}.advisor-main small{color:#8fbab0}

/* Player market: readable workflow, clear reference values, no cramped form. */
.market-page{overflow:visible!important}.market-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.market-tabs button{min-height:52px;padding:10px 18px}.market-tabs button.active{border-color:#58a9b7;background:#123d48}.market-value-guide{display:grid;grid-template-columns:minmax(260px,1.6fr) repeat(4,minmax(120px,.7fr));gap:12px;align-items:stretch;padding:16px;border:1px solid rgba(68,121,134,.5);border-radius:16px;background:rgba(6,34,42,.7);margin-bottom:18px}.market-value-guide>div:first-child{display:flex;flex-direction:column;gap:5px}.market-value-guide>div:first-child span{color:#a9bdc3}.market-value-chip{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:10px;border-radius:12px;background:rgba(5,25,31,.8);border:1px solid rgba(54,92,103,.6)}.market-value-chip b{font-size:28px!important;color:#e8f4f5}.market-value-guide>small{grid-column:1/-1;color:#b4c8cd}.market-card{border:1px solid rgba(63,113,127,.5);border-radius:16px;background:rgba(3,27,34,.82);padding:18px;margin-bottom:18px}.market-create-title h3,.market-create-title p{margin:0}.market-create-title p{margin-top:6px;color:#a9bdc3}.market-form{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) auto minmax(150px,1fr) minmax(150px,1fr) auto;gap:12px;align-items:end;margin-top:16px}.market-form label,.merchant-trade label,.merchant-call-row label{display:flex;flex-direction:column;gap:7px;min-width:0}.market-arrow{align-self:center;font-size:32px!important;color:#75b5c2;padding-bottom:8px}.market-check{margin-top:14px;padding:15px;border-radius:14px;border:1px solid}.market-check.ok{border-color:#3d8b72;background:rgba(22,76,60,.24)}.market-check.bad{border-color:#935149;background:rgba(95,33,31,.25)}.market-check-head{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}.market-range{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}.market-quick{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.market-orders-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.market-note{padding:14px 16px;border-radius:12px;background:rgba(8,41,50,.7);margin-bottom:15px}.market-table td,.market-table th{vertical-align:top;white-space:normal!important;overflow-wrap:anywhere}

/* Merchant fixed-value exchange UI. */
.merchant-ux-head{display:flex;justify-content:space-between;gap:22px;align-items:flex-start;flex-wrap:wrap}.merchant-ux-head h3,.merchant-ux-head p{margin:0}.merchant-ux-head p{max-width:900px;margin-top:6px;color:#a9bec4}.merchant-pearl{min-width:220px;padding:12px 15px;border:1px solid #5c5577;border-radius:14px;background:rgba(38,31,60,.48);display:grid;grid-template-columns:1fr auto;gap:4px 12px}.merchant-pearl small{grid-column:1/-1}.merchant-value-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.merchant-value-grid>div,.merchant-storage>div{padding:12px;border:1px solid rgba(59,103,114,.48);border-radius:12px;background:rgba(5,27,34,.7);display:flex;flex-direction:column;gap:4px}.merchant-value-grid b{font-size:28px!important}.merchant-call-row,.merchant-trade{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(260px,1.2fr) auto;gap:12px;align-items:end}.merchant-call-row{grid-template-columns:minmax(260px,1fr) auto}.merchant-selected{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;margin-bottom:14px}.merchant-selected b{font-size:30px!important}.merchant-preview{min-height:58px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:9px 12px;border-radius:12px;background:rgba(8,42,51,.72)}.merchant-preview small{flex-basis:100%;text-align:center;color:#9db5bb}.merchant-storage{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.merchant-storage h3{grid-column:1/-1}

@media(max-width:1200px){.advisor-grid{grid-template-columns:1fr}.market-value-guide{grid-template-columns:repeat(2,minmax(0,1fr))}.market-value-guide>div:first-child,.market-value-guide>small{grid-column:1/-1}.market-form{grid-template-columns:repeat(2,minmax(0,1fr))}.market-arrow{display:none}.merchant-value-grid,.merchant-storage{grid-template-columns:repeat(2,minmax(0,1fr))}.merchant-trade{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.pearl-hero{grid-template-columns:1fr}.pearl-hero img{width:112px;height:112px}.advisor-card{grid-template-columns:1fr}.advisor-art{width:120px;height:120px}.market-value-guide,.market-form,.merchant-value-grid,.merchant-storage,.merchant-trade,.merchant-call-row{grid-template-columns:1fr}.market-range{grid-template-columns:1fr}}


/* v2026.08.22.09 — 統一右上角關閉按鈕與航隊金幣貨艙 */
.ui-close-button,
#eventDrawerClose,
#helpModalClose,
#battleReplayClose{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  min-height:48px!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1!important;
  font-size:28px!important;
  font-family:"Segoe UI Symbol","Microsoft JhengHei",sans-serif!important;
  flex:0 0 48px!important;
  box-sizing:border-box!important;
}
.fleet-cargo{grid-template-columns:repeat(4,minmax(150px,1fr)) minmax(190px,auto)!important;align-items:end!important;}
@media(max-width:1100px){.fleet-cargo{grid-template-columns:repeat(2,minmax(0,1fr))!important}.fleet-cargo .big-action{grid-column:1/-1!important}}
@media(max-width:620px){.fleet-cargo{grid-template-columns:1fr!important}.fleet-cargo .big-action{grid-column:auto!important}}

/* v2026.08.22.09：飛行中航隊直接顯示實際攜帶資源，避免金幣已裝載但玩家看不到。 */
.fleet-cargo-inline{display:block;margin-top:6px;white-space:normal;overflow-wrap:anywhere;color:var(--muted,#9fb5bb);font-size:24px;line-height:1.35;}

/* v2026.08.22.11 — Multi-island clarity / fixed territory cards / sea-map social actions */
body.in-game .rightbar{
  align-items:stretch!important;
}
body.in-game .rightbar .island-card,
body.in-game .rightbar .planet-choice{
  height:148px!important;
  min-height:148px!important;
  max-height:148px!important;
  box-sizing:border-box!important;
  border-radius:16px!important;
}
body.in-game .rightbar .island-card{
  position:relative!important;
  overflow:hidden!important;
  grid-template-columns:96px minmax(0,1fr)!important;
  grid-template-rows:auto auto auto auto!important;
  column-gap:14px!important;
  padding:14px 86px 14px 14px!important;
  border:4px solid #78f4df!important;
  background:linear-gradient(135deg,rgba(15,105,102,.86),rgba(5,35,44,.98))!important;
  box-shadow:0 0 0 3px rgba(120,244,223,.14),0 0 30px rgba(58,223,205,.32)!important;
}
body.in-game .rightbar .island-card::after{
  content:"目前";
  position:absolute;
  top:12px;
  right:12px;
  min-width:58px;
  height:38px;
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#62e7d1;
  color:#052d35;
  font-weight:800;
  font-size:24px!important;
  line-height:1!important;
  box-sizing:border-box;
}
body.in-game .rightbar .island-thumb{
  grid-column:1!important;
  grid-row:1/5!important;
  width:96px!important;
  height:96px!important;
  align-self:center!important;
  border-radius:13px!important;
  object-fit:cover!important;
  border:2px solid rgba(165,255,242,.55)!important;
}
body.in-game .rightbar .island-title{
  grid-column:2!important;
  grid-row:1!important;
  display:block!important;
  padding:0!important;
  margin:0!important;
  color:#b7eee7!important;
  background:none!important;
  border:0!important;
  font-weight:700!important;
}
body.in-game .rightbar .island-card strong{
  grid-column:2!important;
  grid-row:2!important;
  min-width:0!important;
  font-size:28px!important;
  line-height:1.18!important;
  color:#fff!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game .rightbar .island-card .coords{
  grid-column:2!important;
  grid-row:3!important;
  min-width:0!important;
  color:#c4dfe3!important;
  line-height:1.2!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game .rightbar .island-meta{
  grid-column:2!important;
  grid-row:4!important;
  color:#8bd6bd!important;
  line-height:1.15!important;
}
body.in-game .rightbar .island-list{
  min-height:148px!important;
  height:148px!important;
  display:flex!important;
  align-items:stretch!important;
  gap:12px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
body.in-game .rightbar .planet-choice{
  flex:0 0 320px!important;
  width:320px!important;
  display:grid!important;
  grid-template-columns:96px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
  padding:14px!important;
  border:2px solid #315c69!important;
  background:linear-gradient(145deg,rgba(6,37,47,.96),rgba(4,26,34,.96))!important;
  text-align:left!important;
  overflow:hidden!important;
}
body.in-game .rightbar .planet-choice:hover,
body.in-game .rightbar .planet-choice:focus-visible{
  border-color:#65c9bd!important;
  background:linear-gradient(145deg,rgba(10,62,69,.98),rgba(5,32,41,.98))!important;
  box-shadow:0 0 0 2px rgba(101,201,189,.16)!important;
}
body.in-game .rightbar .planet-choice img{
  width:96px!important;
  height:96px!important;
  border-radius:13px!important;
  object-fit:cover!important;
}
body.in-game .rightbar .planet-choice>div{min-width:0!important;align-self:center!important}
body.in-game .rightbar .planet-choice b,
body.in-game .rightbar .planet-choice span,
body.in-game .rightbar .planet-choice small{
  display:block!important;
  min-width:0!important;
  margin:0 0 5px!important;
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  text-overflow:clip!important;
  line-height:1.18!important;
}
body.in-game .rightbar .planet-choice b{color:#f2fbfc!important;font-size:26px!important}
body.in-game .rightbar .planet-choice span{color:#a6c1c8!important}
body.in-game .rightbar .planet-choice small{color:#75b99f!important}

.archipelago-cell.current{
  border:4px solid #77f7df!important;
  background:linear-gradient(150deg,rgba(21,111,108,.72),rgba(4,34,43,.96))!important;
  box-shadow:0 0 0 3px rgba(119,247,223,.18),0 0 34px rgba(58,231,209,.40),inset 0 0 28px rgba(69,210,194,.13)!important;
}
.archipelago-cell.current>header b::after{
  content:" · 目前";
  color:#a5fff0;
  font-weight:800;
}
.locate-current-island{
  border-color:#65d8c8!important;
  background:rgba(20,94,93,.62)!important;
  color:#eafffb!important;
  font-weight:800!important;
}
.galaxy-player-social{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;margin-top:8px!important}
.gal-social-pair{display:inline-flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important}
.gal-social-state.friend{display:inline-flex;align-items:center;min-height:44px;padding:6px 12px;border-radius:10px;border:1px solid #4d8b75;background:rgba(29,91,70,.24);color:#a8efd0}

.islands-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.islands-overview-card{min-width:0;border:2px solid rgba(66,111,123,.55);border-radius:18px;padding:18px;background:linear-gradient(145deg,rgba(5,34,43,.94),rgba(4,25,32,.96));display:flex;flex-direction:column;gap:16px}
.islands-overview-card.current{border:4px solid #78f4df;background:linear-gradient(145deg,rgba(15,95,94,.76),rgba(4,32,40,.98));box-shadow:0 0 28px rgba(67,221,205,.22)}
.islands-overview-card header{display:grid;grid-template-columns:104px minmax(0,1fr);gap:16px;align-items:center}
.islands-overview-card header img{width:104px;height:104px;object-fit:cover;border-radius:15px}
.islands-overview-card header h3,.islands-overview-card header span,.islands-overview-card header small{margin:0;white-space:normal;overflow-wrap:anywhere}
.island-resource-mini,.island-overview-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.island-resource-mini>span,.island-overview-facts>span{padding:12px;border-radius:12px;border:1px solid rgba(55,96,107,.5);background:rgba(3,26,33,.7);display:flex;flex-direction:column;gap:4px}
.island-resource-mini em{font-style:normal;color:#7ec9ac}
.island-work-summary{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:12px;border-radius:12px;background:rgba(8,40,49,.72)}
.island-work-summary small{flex-basis:100%;color:#a8bdc4}
.island-overview-actions{margin-top:auto;display:flex;gap:10px;flex-wrap:wrap}
.island-overview-actions button{flex:1 1 210px}

@media(max-width:1200px){
  .islands-overview-grid{grid-template-columns:1fr}
  body.in-game .rightbar .planet-choice{flex-basis:300px!important;width:300px!important}
}
@media(max-width:700px){
  body.in-game .rightbar .island-card,
  body.in-game .rightbar .planet-choice{height:130px!important;min-height:130px!important;max-height:130px!important}
  body.in-game .rightbar .island-list{height:130px!important;min-height:130px!important}
  body.in-game .rightbar .planet-choice{flex-basis:280px!important;width:280px!important;grid-template-columns:78px minmax(0,1fr)!important;padding:10px!important}
  body.in-game .rightbar .planet-choice img{width:78px!important;height:78px!important}
  body.in-game .rightbar .island-card{grid-template-columns:78px minmax(0,1fr)!important;padding:10px 72px 10px 10px!important}
  body.in-game .rightbar .island-thumb{width:78px!important;height:78px!important}
  .islands-overview-card header{grid-template-columns:86px minmax(0,1fr)}
  .islands-overview-card header img{width:86px;height:86px}
  .island-resource-mini,.island-overview-facts{grid-template-columns:1fr}
}

/* v2026.08.22.12 — Story / kinetic-energy / shared research / ranking polish */
.story-intro-btn{width:100%;min-height:54px;margin:-4px 0 18px;border:1px solid #4f8d92;border-radius:12px;background:linear-gradient(135deg,rgba(20,75,82,.85),rgba(11,45,57,.92));color:#d9f4f1;font-weight:800;cursor:pointer}
.story-intro-btn:hover,.story-intro-btn:focus-visible{border-color:#79d6cb;background:linear-gradient(135deg,rgba(28,105,106,.9),rgba(12,61,69,.96));box-shadow:0 0 0 3px rgba(75,206,190,.14)}
.story-modal{position:fixed;inset:0;z-index:1700;display:grid;place-items:center;padding:28px;background:rgba(0,8,12,.82);backdrop-filter:blur(8px)}
.story-modal.hidden{display:none!important}.story-modal-card{width:min(1120px,96vw);max-height:92vh;overflow:hidden;border:1px solid #527883;border-radius:20px;background:linear-gradient(160deg,rgba(7,33,43,.99),rgba(3,18,25,.995));box-shadow:0 36px 110px #000d;display:grid;grid-template-rows:auto minmax(0,1fr)}
.story-modal-head{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 28px;border-bottom:1px solid rgba(85,134,145,.5);background:linear-gradient(135deg,rgba(18,67,76,.9),rgba(8,35,45,.95))}.story-modal-head>div{min-width:0}.story-modal-head span{display:block;color:#85c5bb;margin-bottom:5px}.story-modal-head h2{margin:0;color:#ecfbfa;line-height:1.25;overflow-wrap:anywhere}.story-modal-body{overflow:auto;padding:28px;line-height:1.65;color:#c1d5da}.story-lead{padding:22px 24px;margin-bottom:20px;border:1px solid rgba(90,160,160,.45);border-radius:16px;background:rgba(10,55,63,.5)}.story-lead h3,.story-grid h3{margin:0 0 10px;color:#d9f7f2}.story-lead p,.story-grid p{margin:0}.story-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.story-grid section{min-width:0;padding:20px;border-radius:16px;border:1px solid rgba(64,106,118,.48);background:rgba(4,29,38,.72)}.story-note{margin-top:20px;padding:18px 20px;border-left:5px solid #58b7a8;background:rgba(13,59,61,.42);color:#d1e8e3}.story-modal-open{overflow:hidden}
.research-network-summary,.common-research-strip{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:0 0 18px;padding:16px 18px;border:1px solid rgba(76,148,145,.58);border-radius:14px;background:linear-gradient(135deg,rgba(12,61,64,.58),rgba(6,34,43,.72))}.research-network-summary b,.common-research-strip b{color:#9ff4df}.research-network-summary span,.common-research-strip span{flex:1 1 360px;min-width:0}.common-research-strip em{font-style:normal;color:#a8cfd6}
.score-table{min-width:980px!important}.score-table th,.score-table td{white-space:normal!important;overflow-wrap:anywhere!important}
@media(max-width:720px){.story-modal{padding:8px}.story-modal-card{width:100%;max-height:96dvh;border-radius:14px}.story-modal-head{padding:18px}.story-modal-body{padding:16px}.story-grid{grid-template-columns:1fr}.research-network-summary,.common-research-strip{align-items:flex-start;flex-direction:column}}

/* v12：多島領地 Dock 固定尺寸；目前島與其他島同高，避免名稱長短造成卡片忽大忽小。 */
body.in-game .rightbar .island-card,
body.in-game .rightbar .planet-choice{height:164px!important;min-height:164px!important;max-height:164px!important;box-sizing:border-box!important}
body.in-game .rightbar .island-list{height:164px!important;min-height:164px!important;max-height:164px!important}
@media(max-width:700px){
  body.in-game .rightbar .island-card,body.in-game .rightbar .planet-choice{height:150px!important;min-height:150px!important;max-height:150px!important}
  body.in-game .rightbar .island-list{height:150px!important;min-height:150px!important;max-height:150px!important}
}

/* v2026.08.22.16 — 可讀性硬規則：所有玩家可見 UI 文字最小 20px。
   任何後續新增/修改的 font-size 都不得低於 20px；tools/check_ui_font_size.js 會阻擋違規。 */
/* v2026.08.22.15 — 設施整片陸地／船型整片大海／低成本背景動態 */
.facility-scene-panel,.shipyard-scene-panel{overflow:hidden}
.scene-panel-head{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:16px}
.scene-panel-head>div:first-child{min-width:0;flex:1 1 auto}
.scene-panel-head h2{margin:2px 0 7px}
.scene-panel-head p{margin:0;max-width:980px;color:#a9c0c7;line-height:1.55}
.scene-island-chip,.shipyard-summary-chip{flex:0 0 auto;min-width:260px;display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid rgba(77,139,145,.58);border-radius:14px;background:linear-gradient(145deg,rgba(7,42,51,.88),rgba(3,28,36,.94))}
.scene-island-chip img{width:72px;height:72px;object-fit:cover;border-radius:12px;border:1px solid rgba(141,224,210,.5)}
.scene-island-chip span,.shipyard-summary-chip span{display:flex;min-width:0;flex-direction:column;gap:3px}
.scene-island-chip b,.shipyard-summary-chip b{color:#e8faf7}
.scene-island-chip small,.shipyard-summary-chip small{color:#8eb7be}
.facility-scene-scroll,.shipyard-scene-scroll{width:100%;overflow-x:auto;overflow-y:hidden;padding:0 0 8px;overscroll-behavior-inline:contain}
.facility-island-stage,.shipyard-harbor-stage{position:relative;width:100%;min-width:1380px;height:850px;overflow:hidden;border-radius:20px;isolation:isolate}
.facility-island-stage:after,.shipyard-harbor-stage:after{content:"";position:absolute;z-index:30;inset:0;box-shadow:inset 0 0 100px rgba(0,11,16,.42);pointer-events:none}

/* 一般島設施：整張場景就是可使用陸地，不再有島岸線，也不會再把設施排到海上。 */
.facility-island-stage.land-stage{border:1px solid rgba(91,137,80,.82);background:
  radial-gradient(ellipse at 16% 13%,rgba(143,185,91,.34),transparent 27%),
  radial-gradient(ellipse at 81% 27%,rgba(124,170,78,.28),transparent 31%),
  radial-gradient(ellipse at 43% 72%,rgba(76,126,66,.25),transparent 36%),
  linear-gradient(180deg,#5d9959 0%,#4f8b50 34%,#477f49 67%,#3e7444 100%);
  box-shadow:inset 0 0 85px rgba(23,52,30,.34),0 18px 42px rgba(0,0,0,.22)}
.facility-island-stage.land-stage:before{content:"";position:absolute;z-index:0;inset:-8%;background:
  radial-gradient(circle at 14px 18px,rgba(218,238,159,.15) 0 1.2px,transparent 1.7px),
  radial-gradient(circle at 39px 31px,rgba(24,79,40,.17) 0 1.6px,transparent 2.1px),
  repeating-linear-gradient(112deg,transparent 0 17px,rgba(214,239,169,.026) 18px 20px,transparent 21px 38px);
  background-size:54px 48px,67px 59px,95px 95px;opacity:.72;animation:landTextureDrift 32s linear infinite;pointer-events:none}
.facility-land-texture{position:absolute;z-index:1;inset:0;background:
  radial-gradient(ellipse at 10% 52%,rgba(30,90,46,.12),transparent 18%),
  radial-gradient(ellipse at 90% 66%,rgba(33,86,45,.14),transparent 20%),
  radial-gradient(ellipse at 52% 7%,rgba(200,226,138,.08),transparent 28%);pointer-events:none}
.facility-land-path{position:absolute;z-index:2;background:linear-gradient(180deg,rgba(184,157,101,.72),rgba(150,126,78,.68));border:1px solid rgba(92,74,48,.28);box-shadow:inset 0 1px rgba(235,212,160,.20),0 3px 8px rgba(29,55,31,.13);opacity:.70;pointer-events:none}
.land-path-h1,.land-path-h2,.land-path-h3{left:-2%;width:104%;height:26px;border-radius:48%;transform:rotate(-.6deg)}
.land-path-h1{top:31%}.land-path-h2{top:50%;transform:rotate(.45deg)}.land-path-h3{top:69%;transform:rotate(-.35deg)}
.land-path-v{left:49.3%;top:-5%;width:28px;height:110%;border-radius:48%;transform:rotate(.8deg)}
.facility-land-breeze{position:absolute;z-index:3;width:520px;height:150px;border-top:2px solid rgba(221,245,187,.11);border-radius:50%;filter:blur(.2px);pointer-events:none;animation:landBreezeSweep 16s ease-in-out infinite alternate}
.land-breeze-a{left:-9%;top:16%;transform:rotate(-5deg);animation-delay:-3s}.land-breeze-b{right:-7%;top:47%;transform:rotate(6deg);animation-delay:-8s}.land-breeze-c{left:31%;bottom:7%;width:620px;transform:rotate(-2deg);animation-delay:-12s}
.facility-sun-sweep{position:absolute;z-index:2;top:-24%;left:-42%;width:52%;height:148%;background:linear-gradient(102deg,transparent 0 38%,rgba(224,244,174,.055) 49%,rgba(238,250,190,.10) 53%,rgba(224,244,174,.045) 57%,transparent 68%);transform:skewX(-12deg);animation:landSunSweep 34s linear infinite;pointer-events:none}
.scene-cloud-shadow{position:absolute;z-index:4;width:360px;height:125px;border-radius:50%;background:rgba(17,54,35,.18);filter:blur(26px);pointer-events:none;animation:cloudShadowPass 28s linear infinite}
.cloud-shadow-a{top:18%;left:-28%;animation-delay:-5s}.cloud-shadow-b{top:62%;left:-38%;width:440px;height:140px;animation-duration:35s;animation-delay:-19s}

/* 外海前哨仍維持海上平台意象；只影響 is_moon，避免一般島再出現海岸邊界。 */
.facility-island-stage.moon-stage{border:1px solid rgba(65,129,143,.72);background:linear-gradient(180deg,#062f42 0%,#075a6e 34%,#087b88 68%,#066376 100%);box-shadow:inset 0 0 95px rgba(0,8,16,.64),0 18px 42px rgba(0,0,0,.22)}
.facility-island-stage.moon-stage:before{content:"";position:absolute;z-index:0;inset:-16%;background:repeating-radial-gradient(ellipse at 54% 48%,transparent 0 52px,rgba(153,244,235,.055) 54px 56px,transparent 58px 96px);opacity:.72;animation:oceanSurfaceDrift 24s linear infinite;pointer-events:none}
.scene-ocean-current{position:absolute;z-index:1;width:720px;height:145px;border:2px solid rgba(145,242,234,.09);border-left-color:transparent;border-right-color:transparent;border-radius:50%;filter:blur(.2px);pointer-events:none;animation:oceanCurrent 19s ease-in-out infinite alternate}
.current-a{left:-10%;top:11%;transform:rotate(-6deg);animation-delay:-3s}.current-b{right:-8%;top:56%;transform:rotate(7deg);animation-delay:-9s}.current-c{left:28%;bottom:3%;transform:rotate(-3deg);animation-delay:-14s}
.scene-wave-ring{position:absolute;z-index:1;width:230px;height:74px;border:2px solid rgba(195,255,249,.12);border-radius:50%;pointer-events:none;animation:waveRing 7s ease-out infinite}
.wave-ring-a{left:6%;top:19%;animation-delay:-1.4s}.wave-ring-b{right:8%;top:29%;animation-delay:-4.2s}.wave-ring-c{right:24%;bottom:8%;animation-delay:-2.7s}
.facility-island-landmass{position:absolute;z-index:2;left:50%;top:-215px;width:1210px;height:1210px;max-width:none;object-fit:cover;transform:translateX(-50%);filter:saturate(.78) contrast(1.08) brightness(.76);pointer-events:none;user-select:none}
.facility-island-ground-shade{position:absolute;z-index:1;left:50%;top:54%;width:1060px;height:460px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(1,35,42,.08),rgba(0,20,30,.28) 66%,transparent 72%);filter:blur(8px);opacity:.2;pointer-events:none}

/* 設施主體固定，不跟著背景動畫移動；只保留滑鼠 hover 放大。 */
.facility-spot{position:absolute!important;z-index:7!important;left:var(--scene-x)!important;top:var(--scene-y)!important;transform:translate(-50%,-50%)!important;width:224px!important;min-width:224px!important;height:154px!important;min-height:154px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#ecfbf8!important;box-shadow:none!important;display:block!important;text-align:center!important;cursor:pointer!important;transition:transform .18s ease,filter .18s ease!important;overflow:visible!important}
.facility-spot:hover,.facility-spot:focus-visible{z-index:24!important;transform:translate(-50%,-50%) scale(1.10)!important;filter:brightness(1.08)!important;outline:none!important}
.facility-pad{position:absolute;z-index:0;left:50%;top:76px;width:105px;height:23px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(0,11,14,.42),rgba(0,13,16,.10) 68%,transparent 72%);filter:blur(2px);pointer-events:none}
.facility-art-wrap{position:absolute!important;z-index:1!important;left:50%!important;top:0!important;display:block!important;width:150px!important;height:96px!important;transform:translateX(-50%)!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;pointer-events:none!important}
.facility-art-wrap img{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important;transform:none!important;filter:drop-shadow(0 9px 8px rgba(0,16,20,.48)) saturate(1.04)!important;transform-origin:50% 88%!important}
.facility-spot-copy{position:absolute!important;z-index:3!important;left:50%!important;bottom:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"name level" "metric metric"!important;align-items:center!important;width:214px!important;min-width:0!important;gap:3px 8px!important;transform:translateX(-50%)!important;padding:8px 10px!important;box-sizing:border-box!important;border:1px solid rgba(98,177,170,.52)!important;border-radius:9px!important;background:linear-gradient(160deg,rgba(2,28,34,.88),rgba(3,43,47,.83))!important;box-shadow:0 7px 15px rgba(0,0,0,.30)!important;backdrop-filter:blur(3px)!important}
body.in-game .facility-spot-copy b{grid-area:name!important;max-width:100%!important;font-size:20px!important;line-height:1.12!important;color:#effcf9!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:left!important}
body.in-game .facility-spot-copy em{grid-area:level!important;font-size:20px!important;line-height:1!important;font-style:normal!important;color:#8de5cd!important;white-space:nowrap!important}
body.in-game .facility-spot-copy small{grid-area:metric!important;max-width:100%!important;font-size:20px!important;line-height:1.1!important;color:#a8c4c7!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:left!important}
.facility-spot:hover .facility-spot-copy,.facility-spot:focus-visible .facility-spot-copy{border-color:#7be6d4!important;background:linear-gradient(160deg,rgba(3,42,47,.94),rgba(5,60,62,.91))!important;box-shadow:0 9px 19px rgba(0,0,0,.38),0 0 0 2px rgba(85,225,206,.12)!important}
.facility-spot.unbuilt .facility-art-wrap{opacity:.25!important;filter:grayscale(.82)!important}
.facility-spot.unbuilt .facility-pad{width:88px;height:36px;top:54px;border:1px dashed rgba(173,215,208,.34);background:rgba(8,52,55,.14);filter:none}
.facility-spot.unbuilt .facility-spot-copy{border-style:dashed!important;opacity:.82!important;background:rgba(3,33,39,.72)!important}
.facility-spot.queued .facility-spot-copy{border-color:#e0bd70!important;box-shadow:0 7px 15px rgba(0,0,0,.30),0 0 0 2px rgba(233,192,104,.12)!important}
.scene-compass{position:absolute;z-index:22;right:20px;top:20px;width:62px;height:62px;border:1px solid rgba(193,239,235,.34);border-radius:50%;background:rgba(2,28,37,.46);box-shadow:0 4px 18px rgba(0,0,0,.24)}
.scene-compass i{position:absolute;left:29px;top:11px;width:3px;height:39px;background:linear-gradient(#e5fff9 0 48%,#5c938f 48%)}
.scene-compass i:before{content:"";position:absolute;left:-5px;top:-2px;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:10px solid #e5fff9;transform:translateY(-5px)}
body.in-game .scene-compass span{position:absolute!important;right:7px!important;top:4px!important;font-size:20px!important;line-height:1!important;color:#d9f6f1!important}
.scene-help-line{margin-top:9px;padding:10px 13px;border-left:3px solid #4db6a8;background:rgba(8,49,56,.38);color:#9fc3c8;border-radius:8px}
.scene-operation-shell{max-width:920px;margin:0 auto}.scene-operation-shell .catalog-card{margin:0!important}
body.in-game #helpModalBody .scene-operation-shell .catalog-card *{font-size:20px!important}
body.in-game #helpModalBody .scene-operation-shell .catalog-card h3{font-size:28px!important}
body.in-game #helpModalBody .scene-operation-shell .catalog-card .catalog-eyebrow,body.in-game #helpModalBody .scene-operation-shell .catalog-card .item-level,body.in-game #helpModalBody .scene-operation-shell .catalog-card small{font-size:20px!important}

/* 船型主畫面：100% 開放海面。禁止岸地、碼頭、倉房、船塢結構或吊架出現在背景。 */
.shipyard-harbor-stage{border:1px solid rgba(52,132,151,.78);background:
  radial-gradient(ellipse at 18% 17%,rgba(72,196,201,.11),transparent 29%),
  radial-gradient(ellipse at 78% 62%,rgba(49,171,181,.10),transparent 36%),
  linear-gradient(180deg,#06394e 0%,#075c70 32%,#087b89 65%,#06677b 100%);
  box-shadow:inset 0 0 95px rgba(0,8,16,.60),0 18px 42px rgba(0,0,0,.22)}
.shipyard-harbor-stage:before{content:"";position:absolute;z-index:0;inset:-18%;background:repeating-radial-gradient(ellipse at 48% 44%,transparent 0 58px,rgba(170,247,239,.06) 60px 63px,transparent 65px 108px);opacity:.78;animation:oceanSurfaceDrift 22s linear infinite;pointer-events:none}
.harbor-water-sheen{position:absolute;z-index:1;inset:0;background:
  radial-gradient(ellipse at 68% 42%,rgba(110,246,232,.10),transparent 45%),
  repeating-linear-gradient(174deg,transparent 0 34px,rgba(181,255,247,.04) 35px 37px,transparent 38px 77px),
  repeating-linear-gradient(8deg,transparent 0 73px,rgba(75,184,193,.035) 75px 77px,transparent 79px 126px);
  pointer-events:none;animation:harborSheen 15s ease-in-out infinite alternate}
.harbor-current-a{left:-5%;top:8%;animation-delay:-4s}.harbor-current-b{left:37%;top:46%;animation-delay:-11s}.harbor-current-c{left:58%;bottom:3%;animation-delay:-17s}
.open-sea-swell{position:absolute;z-index:2;width:760px;height:185px;border-top:3px solid rgba(202,255,250,.085);border-radius:50%;filter:blur(.1px);pointer-events:none;animation:openSeaSwell 11s ease-in-out infinite alternate}
.sea-swell-a{left:-10%;top:17%;transform:rotate(-4deg);animation-delay:-2s}.sea-swell-b{right:-8%;top:45%;width:880px;transform:rotate(5deg);animation-delay:-6s}.sea-swell-c{left:25%;bottom:-3%;width:920px;transform:rotate(-2deg);animation-delay:-9s}
.harbor-wave-line{position:absolute;z-index:3;height:42px;border-top:2px solid rgba(210,255,250,.11);border-radius:50%;pointer-events:none;animation:harborWaveSlide 9s ease-in-out infinite alternate}
.hwave-a{left:5%;top:31%;width:360px;transform:rotate(-3deg);animation-delay:-2s}.hwave-b{right:4%;top:16%;width:430px;transform:rotate(5deg);animation-delay:-5s}.hwave-c{left:35%;bottom:12%;width:510px;transform:rotate(-2deg);animation-delay:-8s}.hwave-d{left:53%;top:54%;width:360px;transform:rotate(3deg);animation-delay:-3.6s}.hwave-e{left:8%;bottom:22%;width:420px;transform:rotate(-5deg);animation-delay:-6.7s}
.open-sea-foam{position:absolute;z-index:3;width:520px;height:22px;border-radius:50%;background:repeating-radial-gradient(ellipse at center,rgba(221,255,252,.18) 0 2px,transparent 3px 15px);filter:blur(.35px);opacity:.34;pointer-events:none;animation:seaFoamDrift 13s linear infinite}
.sea-foam-a{left:-18%;top:61%;transform:rotate(-5deg)}.sea-foam-b{right:-22%;top:34%;width:640px;transform:rotate(4deg);animation-delay:-7s}
.harbor-label{position:absolute;z-index:23;left:24px;bottom:24px;display:flex;flex-direction:column;gap:3px;padding:10px 14px;border:1px solid rgba(140,211,202,.48);border-radius:11px;background:rgba(3,31,40,.76);backdrop-filter:blur(4px)}
body.in-game .harbor-label b{font-size:20px!important;line-height:1.15!important;color:#e7fbf6!important}body.in-game .harbor-label span{font-size:20px!important;line-height:1.15!important;color:#9abfc4!important}

/* 船艦直接顯示透明船體，不用黑色大圖卡；海域位置固定，僅船體做小幅上下浮動。 */
.shipyard-berth{position:absolute!important;z-index:9!important;left:var(--berth-x)!important;top:var(--berth-y)!important;transform:translate(-50%,-50%)!important;width:224px!important;min-width:224px!important;height:150px!important;min-height:150px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#e9faf8!important;box-shadow:none!important;display:block!important;cursor:pointer!important;text-align:center!important;transition:transform .18s ease,filter .18s ease!important;overflow:visible!important}
.shipyard-berth:hover,.shipyard-berth:focus-visible{z-index:27!important;transform:translate(-50%,-50%) scale(1.11)!important;filter:brightness(1.12)!important;outline:none!important}
.shipyard-wake{position:absolute;z-index:0;left:12px;top:44px;width:98px;height:35px;border-top:3px solid rgba(219,255,250,.18);border-radius:50%;transform:rotate(-6deg);filter:blur(.2px);animation:wakePulse 2.8s ease-in-out infinite;animation-delay:var(--berth-delay)!important;pointer-events:none}
.shipyard-ship-art-wrap{position:absolute!important;z-index:1!important;left:50%!important;top:0!important;display:flex!important;align-items:center!important;justify-content:center!important;width:164px!important;height:88px!important;transform:translateX(-50%)!important;border:0!important;border-radius:0!important;overflow:visible!important;background:transparent!important;box-shadow:none!important;pointer-events:none!important;animation:shipBob 5.4s ease-in-out infinite;animation-delay:var(--berth-delay)!important}
.shipyard-ship-art{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important;transform:none!important;filter:drop-shadow(0 9px 8px rgba(0,14,22,.58)) saturate(1.06)!important}
.empty-berth-mark{position:absolute!important;z-index:1!important;left:50%!important;top:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;width:72px!important;height:48px!important;transform:translateX(-50%)!important;border:2px dashed rgba(179,230,224,.38)!important;border-radius:50%!important;background:rgba(8,70,75,.10)!important;box-shadow:0 0 0 8px rgba(87,197,190,.026)!important;animation:emptyBerthPulse 4.6s ease-in-out infinite;animation-delay:var(--berth-delay)!important}
.empty-berth-mark:before{content:"";width:30px;height:16px;border:1px solid rgba(177,224,219,.29);border-radius:50%}.empty-berth-mark i{position:absolute;width:3px;height:31px;background:rgba(154,205,203,.35);border-radius:5px}
.shipyard-berth-copy{position:absolute!important;z-index:3!important;left:50%!important;bottom:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"name qty" "state state"!important;width:214px!important;min-width:0!important;gap:3px 8px!important;transform:translateX(-50%)!important;padding:8px 10px!important;box-sizing:border-box!important;border:1px solid rgba(95,173,168,.48)!important;border-radius:9px!important;background:linear-gradient(160deg,rgba(2,27,34,.86),rgba(3,44,48,.81))!important;box-shadow:0 7px 15px rgba(0,0,0,.30)!important;backdrop-filter:blur(3px)!important}
body.in-game .shipyard-berth-copy b{grid-area:name!important;font-size:20px!important;line-height:1.1!important;color:#f0fcfa!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:left!important}body.in-game .shipyard-berth-copy em{grid-area:qty!important;font-size:20px!important;line-height:1!important;font-style:normal!important;color:#8ce3cc!important;white-space:nowrap!important}body.in-game .shipyard-berth-copy small{grid-area:state!important;font-size:20px!important;line-height:1.08!important;color:#adc5ca!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:left!important}
.shipyard-berth:hover .shipyard-berth-copy,.shipyard-berth:focus-visible .shipyard-berth-copy{border-color:#79e2d1!important;background:linear-gradient(160deg,rgba(3,41,47,.94),rgba(4,59,62,.91))!important;box-shadow:0 9px 19px rgba(0,0,0,.38),0 0 0 2px rgba(85,225,206,.11)!important}
.shipyard-berth.locked{opacity:.55!important}.shipyard-berth.queued .shipyard-berth-copy{border-color:#d8bb74!important;box-shadow:0 7px 15px rgba(0,0,0,.30),0 0 0 2px rgba(241,197,107,.13)!important}.shipyard-berth.empty{opacity:.72!important}.shipyard-berth.empty:hover,.shipyard-berth.empty:focus-visible{opacity:1!important}.shipyard-block-note{margin:0 0 14px!important}

@keyframes landTextureDrift{0%{transform:translate3d(-1.2%,0,0)}50%{transform:translate3d(1.2%,.8%,0)}100%{transform:translate3d(-1.2%,0,0)}}
@keyframes landBreezeSweep{0%{opacity:.22;translate:-24px 0}100%{opacity:.72;translate:31px 7px}}
@keyframes landSunSweep{0%{transform:translateX(-8%) skewX(-12deg);opacity:.20}45%{opacity:.65}100%{transform:translateX(295%) skewX(-12deg);opacity:.18}}
@keyframes oceanSurfaceDrift{0%{transform:translate3d(-2%,0,0)}50%{transform:translate3d(2%,1.5%,0)}100%{transform:translate3d(-2%,0,0)}}
@keyframes oceanCurrent{0%{opacity:.28;translate:-25px 0}100%{opacity:.82;translate:30px 8px}}
@keyframes waveRing{0%{opacity:0;transform:scale(.72)}35%{opacity:.55}100%{opacity:0;transform:scale(1.22)}}
@keyframes cloudShadowPass{0%{transform:translateX(0) rotate(-5deg);opacity:0}12%{opacity:.7}88%{opacity:.55}100%{transform:translateX(1900px) rotate(4deg);opacity:0}}
@keyframes harborSheen{0%{background-position:0 0,0 0,0 0}100%{background-position:-38px 8px,0 18px,26px -8px}}
@keyframes openSeaSwell{0%{opacity:.24;translate:-18px 0;scale:.96 1}100%{opacity:.80;translate:25px 8px;scale:1.05 1.08}}
@keyframes harborWaveSlide{0%{translate:-14px 0;opacity:.28}100%{translate:26px 7px;opacity:.84}}
@keyframes seaFoamDrift{0%{translate:-90px 0;opacity:.16}50%{opacity:.42}100%{translate:160px 12px;opacity:.18}}
@keyframes shipBob{0%,100%{transform:translateX(-50%) translateY(0) rotate(-.35deg)}50%{transform:translateX(-50%) translateY(-4px) rotate(.4deg)}}
@keyframes wakePulse{0%,100%{opacity:.18;transform:rotate(-6deg) scaleX(.88)}50%{opacity:.72;transform:rotate(-6deg) scaleX(1.12)}}
@keyframes emptyBerthPulse{0%,100%{opacity:.38;scale:.94}50%{opacity:.74;scale:1.04}}

@media(max-width:1100px){
  .scene-panel-head{align-items:flex-start;flex-direction:column}.scene-island-chip,.shipyard-summary-chip{width:100%;min-width:0;box-sizing:border-box}
  .facility-island-stage,.shipyard-harbor-stage{width:1380px;min-width:1380px}.scene-help-line:after{content:"　畫面較窄時可左右滑動查看完整配置。"}
}
@media(max-width:700px){
  .facility-island-stage,.shipyard-harbor-stage{height:810px}.facility-spot{width:214px!important;min-width:214px!important}.facility-spot-copy{width:204px!important}.shipyard-berth{width:214px!important;min-width:214px!important}.shipyard-berth-copy{width:204px!important}
}
@media(prefers-reduced-motion:reduce){
  .facility-island-stage:before,.shipyard-harbor-stage:before,.facility-land-breeze,.facility-sun-sweep,.scene-ocean-current,.scene-wave-ring,.scene-cloud-shadow,.harbor-water-sheen,.open-sea-swell,.harbor-wave-line,.open-sea-foam,.shipyard-ship-art-wrap,.shipyard-wake,.empty-berth-mark{animation:none!important}
}

/* ========================================================================
   v2026.08.22.17 — 海防場景化 + 研究所高科技中控室
   玩家可見文字硬下限仍為 20px；空間不足時以捲動／重排處理。
   ======================================================================== */
.research-lab-scroll,.defense-scene-scroll{overflow-x:auto;overflow-y:hidden;padding:8px 0 14px;scrollbar-gutter:stable}
.research-lab-stage,.defense-sea-stage{position:relative;width:100%;min-width:1500px;overflow:hidden;border-radius:20px;isolation:isolate}
.research-lab-stage:after,.defense-sea-stage:after{content:"";position:absolute;z-index:40;inset:0;pointer-events:none;box-shadow:inset 0 0 120px rgba(0,8,15,.68)}

/* Research institute interior: no static background image, the room is built from CSS layers. */
.research-lab-stage{height:1180px;border:1px solid rgba(82,211,224,.42);background:linear-gradient(180deg,#07151d 0%,#0b222d 34%,#0d2d38 64%,#071820 100%);box-shadow:inset 0 0 90px rgba(0,0,0,.66),0 18px 46px rgba(0,0,0,.24)}
.lab-ceiling{position:absolute;z-index:1;left:-4%;right:-4%;top:-4%;height:23%;background:linear-gradient(180deg,#020a0e 0%,#071b22 75%,rgba(10,42,51,.1) 100%);clip-path:polygon(0 0,100% 0,92% 100%,8% 100%);box-shadow:0 28px 45px rgba(0,0,0,.38)}
.lab-ceiling:before,.lab-ceiling:after{content:"";position:absolute;left:9%;right:9%;height:5px;background:linear-gradient(90deg,transparent,rgba(96,238,238,.82),transparent);box-shadow:0 0 24px rgba(73,224,231,.64)}
.lab-ceiling:before{top:42%}.lab-ceiling:after{top:72%;opacity:.58}
.lab-back-wall{position:absolute;z-index:0;left:5%;right:5%;top:13%;bottom:20%;border:1px solid rgba(95,183,197,.2);background:linear-gradient(90deg,rgba(9,31,40,.9),rgba(15,58,68,.82) 50%,rgba(9,31,40,.9)),repeating-linear-gradient(90deg,transparent 0 118px,rgba(95,212,219,.06) 120px 122px);clip-path:polygon(5% 0,95% 0,100% 100%,0 100%)}
.lab-ambient-grid{position:absolute;z-index:2;left:8%;right:8%;top:17%;bottom:23%;opacity:.26;background-image:linear-gradient(rgba(95,233,226,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(95,233,226,.11) 1px,transparent 1px);background-size:72px 72px;mask-image:linear-gradient(180deg,rgba(0,0,0,.8),rgba(0,0,0,.08));animation:labGridDrift 18s linear infinite;pointer-events:none}
.lab-floor{position:absolute;z-index:1;left:-10%;right:-10%;bottom:-13%;height:43%;background:repeating-linear-gradient(90deg,transparent 0 108px,rgba(103,225,221,.08) 110px 112px),repeating-linear-gradient(0deg,transparent 0 72px,rgba(103,225,221,.07) 74px 76px),linear-gradient(180deg,#0b2b35,#061219 72%);transform:perspective(620px) rotateX(55deg);transform-origin:bottom;box-shadow:inset 0 20px 40px rgba(89,230,224,.05)}
.lab-side-column{position:absolute;z-index:8;top:14%;bottom:12%;width:5.5%;background:linear-gradient(90deg,#061017,#153d48 48%,#07141a);border:1px solid rgba(95,220,224,.2);box-shadow:0 0 36px rgba(0,0,0,.44)}
.lab-side-column:after{content:"";position:absolute;left:40%;top:6%;bottom:6%;width:5px;background:linear-gradient(180deg,transparent,rgba(80,239,232,.82),transparent);box-shadow:0 0 18px rgba(70,236,231,.58)}
.lab-side-column.column-left{left:1.5%;transform:skewY(-4deg)}.lab-side-column.column-right{right:1.5%;transform:skewY(4deg)}
.lab-light-sweep{position:absolute;z-index:3;top:8%;bottom:15%;width:19%;left:-24%;background:linear-gradient(90deg,transparent,rgba(99,241,238,.07),rgba(163,255,244,.12),transparent);transform:skewX(-14deg);filter:blur(5px);animation:labLightSweep 13s ease-in-out infinite;pointer-events:none}
.lab-holo-orbit{position:absolute;z-index:4;width:240px;height:240px;border:2px solid rgba(94,232,226,.14);border-radius:50%;box-shadow:0 0 34px rgba(54,224,228,.12),inset 0 0 28px rgba(54,224,228,.08);pointer-events:none;animation:labOrbitPulse 7s ease-in-out infinite}
.lab-holo-orbit:before,.lab-holo-orbit:after{content:"";position:absolute;border-radius:50%;inset:22%;border:2px dashed rgba(122,247,239,.14)}
.lab-holo-orbit:after{inset:41%;border-style:solid;background:rgba(74,226,227,.05)}
.lab-holo-orbit.orbit-a{left:6%;top:45%;animation-delay:-2s}.lab-holo-orbit.orbit-b{right:5%;top:49%;width:190px;height:190px;animation-delay:-5s}
.research-lab-chip,.defense-summary-chip{display:flex;align-items:center;min-height:78px;padding:12px 16px;border:1px solid rgba(99,207,212,.38);border-radius:14px;background:rgba(4,30,38,.78)}
.research-lab-chip span,.defense-summary-chip span{display:flex;flex-direction:column;gap:5px}.research-lab-chip b,.defense-summary-chip b{font-size:22px!important;color:#dffafa}.research-lab-chip small,.defense-summary-chip small{font-size:20px!important;color:#9fc9ce}

.research-console{position:absolute;z-index:16;left:var(--research-x);top:var(--research-y);width:300px;min-width:300px;height:185px;padding:0;border:0;background:none;transform:translate(-50%,-50%);cursor:pointer;overflow:visible;text-align:left;transition:filter .18s ease,transform .18s ease;animation:researchConsoleIdle 5.2s ease-in-out infinite;animation-delay:var(--research-delay)}
.research-console:hover{transform:translate(-50%,-50%) scale(1.035);filter:brightness(1.16)}
.research-console.locked{filter:saturate(.35) brightness(.64)}.research-console.queued{filter:drop-shadow(0 0 16px rgba(237,199,92,.42))}
.research-console-frame{position:absolute;z-index:0;inset:-10px -12px -15px;border:2px solid rgba(84,176,190,.54);border-radius:15px 15px 10px 10px;background:linear-gradient(145deg,#17343e,#07141a 58%,#16313b);box-shadow:0 13px 24px rgba(0,0,0,.44),inset 0 0 18px rgba(108,230,227,.08)}
.research-console-frame:before{content:"";position:absolute;left:7%;right:7%;top:7px;height:3px;background:linear-gradient(90deg,transparent,rgba(93,242,234,.78),transparent);box-shadow:0 0 10px rgba(93,242,234,.56)}
.console-led{position:absolute;bottom:6px;width:9px;height:9px;border-radius:50%;background:#4ee3c9;box-shadow:0 0 9px currentColor}.console-led.led-a{left:16px}.console-led.led-b{left:31px;color:#e1c868;background:#e1c868}.console-led.led-c{right:16px;color:#70c6e7;background:#70c6e7}
.research-monitor{position:absolute;z-index:2;inset:0;display:grid;grid-template-columns:86px 1fr;align-items:center;gap:10px;padding:13px 15px;border:1px solid rgba(115,247,239,.44);border-radius:10px;background:radial-gradient(circle at 78% 24%,rgba(70,205,205,.14),transparent 36%),linear-gradient(180deg,rgba(2,35,43,.97),rgba(3,20,27,.97));overflow:hidden;box-shadow:inset 0 0 26px rgba(36,211,213,.11)}
.research-monitor:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(180deg,transparent 0 5px,rgba(108,247,237,.025) 6px 7px);pointer-events:none}
.research-monitor>img{position:relative;z-index:2;width:82px;height:82px;object-fit:cover;border-radius:12px;border:1px solid rgba(113,231,229,.34);filter:saturate(.86) brightness(1.06)}
.research-monitor-copy{position:relative;z-index:3;display:flex;flex-direction:column;gap:3px;min-width:0}.research-monitor-copy b{font-size:20px!important;line-height:1.12!important;color:#e5fbf8}.research-monitor-copy em{font-size:20px!important;line-height:1.12!important;color:#73e0d6;font-style:normal}.research-monitor-copy small{font-size:20px!important;line-height:1.12!important;color:#a7c8cb}
.research-monitor-scan{position:absolute;z-index:1;left:0;right:0;height:34%;top:-38%;background:linear-gradient(180deg,transparent,rgba(80,238,229,.12),transparent);animation:monitorScan 4.8s linear infinite;animation-delay:var(--research-delay);pointer-events:none}
.research-console-base{position:absolute;z-index:-1;left:16%;right:16%;bottom:-30px;height:25px;background:linear-gradient(180deg,#17343d,#08161c);clip-path:polygon(10% 0,90% 0,100% 100%,0 100%);border-bottom:2px solid rgba(75,214,213,.26)}
.lab-status-desk{position:absolute;z-index:18;left:50%;bottom:22px;transform:translateX(-50%);width:620px;max-width:46%;min-height:84px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:14px 18px;border:1px solid rgba(91,231,225,.42);border-radius:14px;background:rgba(3,25,32,.88);box-shadow:0 0 30px rgba(46,198,204,.12)}
.lab-status-desk b,.lab-status-desk span,.lab-status-desk em{font-size:20px!important;line-height:1.2!important}.lab-status-desk b{color:#8cf2e7}.lab-status-desk span{color:#e7f8f7}.lab-status-desk em{font-style:normal;color:#d6bd69}

/* Sea-defense presentation: a fixed defensive perimeter over a living ocean. */
.defense-sea-stage{height:900px;border:1px solid rgba(65,155,172,.72);background:radial-gradient(ellipse at 50% 48%,rgba(27,123,139,.42),transparent 42%),linear-gradient(180deg,#052d40 0%,#075a70 34%,#08798a 66%,#045366 100%);box-shadow:inset 0 0 105px rgba(0,9,16,.62),0 18px 42px rgba(0,0,0,.24)}
.defense-sea-stage:before{content:"";position:absolute;z-index:0;inset:-15%;background:repeating-radial-gradient(ellipse at 46% 44%,transparent 0 54px,rgba(174,248,239,.055) 56px 59px,transparent 61px 108px);opacity:.8;animation:oceanSurfaceDrift 23s linear infinite;pointer-events:none}
.defense-sea-sheen{position:absolute;z-index:1;inset:0;background:linear-gradient(115deg,transparent 0 28%,rgba(203,255,248,.08) 33%,transparent 39% 100%),repeating-linear-gradient(174deg,transparent 0 45px,rgba(151,240,234,.045) 48px 50px,transparent 53px 94px);background-size:140% 100%,100% 100%;animation:defenseSeaSheen 14s ease-in-out infinite alternate;pointer-events:none}
.defense-swell-a{left:-5%;top:19%;width:72%}.defense-swell-b{right:-7%;bottom:15%;width:76%;animation-delay:-7s}.defense-current-a{left:3%;top:7%;animation-delay:-5s}.defense-current-b{right:8%;bottom:3%;animation-delay:-14s}
.defense-command-ring{position:absolute;z-index:4;left:50%;top:50%;width:470px;height:470px;transform:translate(-50%,-50%);border:2px solid rgba(94,221,217,.18);border-radius:50%;box-shadow:0 0 40px rgba(53,221,217,.08),inset 0 0 55px rgba(53,221,217,.05);pointer-events:none}
.defense-command-ring:before,.defense-command-ring:after{content:"";position:absolute;border-radius:50%;inset:14%;border:1px dashed rgba(106,238,229,.18)}.defense-command-ring:after{inset:36%;border-style:solid;background:rgba(77,219,218,.025)}
.defense-command-ring i{position:absolute;left:50%;top:50%;width:50%;height:2px;transform-origin:left center;background:linear-gradient(90deg,rgba(97,237,229,.34),transparent);animation:defenseRadarSweep 8s linear infinite}
.defense-sonar-pulse{position:absolute;z-index:3;width:120px;height:120px;border:2px solid rgba(118,244,236,.24);border-radius:50%;pointer-events:none;animation:defenseSonarPulse 6s ease-out infinite}.defense-sonar-pulse.pulse-a{left:20%;top:58%}.defense-sonar-pulse.pulse-b{right:15%;top:30%;animation-delay:-3s}
.defense-emplacement{position:absolute;z-index:16;left:var(--def-x);top:var(--def-y);width:235px;min-width:235px;height:210px;padding:0;border:0;background:none;transform:translate(-50%,-50%);cursor:pointer;overflow:visible;text-align:left;transition:transform .18s ease,filter .18s ease}
.defense-emplacement:hover{transform:translate(-50%,-50%) scale(1.045);filter:brightness(1.12)}.defense-emplacement.locked{filter:saturate(.35) brightness(.65)}
.defense-water-ring{position:absolute;z-index:0;left:50%;top:42%;width:150px;height:64px;transform:translate(-50%,-50%);border:2px solid rgba(171,248,239,.2);border-radius:50%;box-shadow:0 0 24px rgba(75,214,218,.11);animation:defenseWaterRing 4.8s ease-in-out infinite;animation-delay:var(--def-delay)}
.defense-platform{position:absolute;z-index:2;left:50%;top:45%;width:132px;height:67px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,#315761 0 36%,#16313b 38% 66%,#071c25 68%);border:2px solid rgba(93,183,191,.54);box-shadow:0 11px 18px rgba(0,0,0,.38),inset 0 0 15px rgba(116,231,225,.12)}
.defense-art-wrap{position:absolute;z-index:4;left:50%;top:37%;width:130px;height:118px;transform:translate(-50%,-50%);display:flex;align-items:flex-end;justify-content:center;animation:defenseFloat 4.7s ease-in-out infinite;animation-delay:var(--def-delay)}
.defense-art-wrap img{max-width:130px;max-height:118px;object-fit:contain;filter:drop-shadow(0 12px 9px rgba(0,0,0,.42))}
.defense-holo-mark{position:absolute;z-index:5;left:50%;top:39%;width:88px;height:88px;transform:translate(-50%,-50%);border:2px dashed rgba(113,232,225,.36);border-radius:50%;background:rgba(31,165,168,.08)}
.defense-holo-mark:before,.defense-holo-mark:after{content:"";position:absolute;background:rgba(124,241,233,.42)}.defense-holo-mark:before{left:18px;right:18px;top:50%;height:2px}.defense-holo-mark:after{top:18px;bottom:18px;left:50%;width:2px}.defense-holo-mark i{position:absolute;inset:14px;border:1px solid rgba(124,241,233,.2);border-radius:50%;animation:defenseHoloSpin 7s linear infinite}
.defense-emplacement-copy{position:absolute;z-index:7;left:50%;bottom:0;transform:translateX(-50%);width:230px;min-height:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:9px 10px;border:1px solid rgba(108,202,205,.35);border-radius:12px;background:rgba(3,31,39,.84);box-shadow:0 8px 18px rgba(0,0,0,.28);text-align:center}
.defense-emplacement-copy b,.defense-emplacement-copy em,.defense-emplacement-copy small{font-size:20px!important;line-height:1.12!important;white-space:normal!important;overflow-wrap:anywhere!important}.defense-emplacement-copy b{color:#e7f8f6}.defense-emplacement-copy em{font-style:normal;color:#76e1d7}.defense-emplacement-copy small{color:#a3c5c8}
.defense-status-label{position:absolute;z-index:22;left:24px;bottom:24px;display:flex;flex-direction:column;gap:4px;padding:12px 16px;border:1px solid rgba(122,218,211,.42);border-radius:12px;background:rgba(2,30,39,.82)}
.defense-status-label b,.defense-status-label span{font-size:20px!important;line-height:1.18!important}.defense-status-label b{color:#e6fbf7}.defense-status-label span{color:#a7c9cb}
.defense-cap-panel{padding-top:12px!important;padding-bottom:12px!important}

@keyframes labGridDrift{from{background-position:0 0,0 0}to{background-position:72px 72px,72px 72px}}
@keyframes labLightSweep{0%,12%{left:-24%;opacity:0}28%{opacity:1}58%{left:110%;opacity:.8}72%,100%{left:110%;opacity:0}}
@keyframes labOrbitPulse{0%,100%{transform:scale(.92);opacity:.32}50%{transform:scale(1.08);opacity:.76}}
@keyframes researchConsoleIdle{0%,100%{margin-top:0}50%{margin-top:-3px}}
@keyframes monitorScan{0%{top:-38%}100%{top:108%}}
@keyframes defenseSeaSheen{0%{background-position:-12% 0,0 0}100%{background-position:80% 0,24px 7px}}
@keyframes defenseRadarSweep{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes defenseSonarPulse{0%{transform:scale(.25);opacity:.8}100%{transform:scale(3.8);opacity:0}}
@keyframes defenseWaterRing{0%,100%{transform:translate(-50%,-50%) scale(.92);opacity:.3}50%{transform:translate(-50%,-50%) scale(1.08);opacity:.72}}
@keyframes defenseFloat{0%,100%{translate:0 0}50%{translate:0 -4px}}
@keyframes defenseHoloSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}

@media(max-width:1500px){.research-lab-stage,.defense-sea-stage{width:1500px;min-width:1500px}.research-lab-scroll,.defense-scene-scroll{padding-bottom:18px}}
@media(max-width:900px){.research-lab-stage{height:1180px}.defense-sea-stage{height:900px}.research-lab-chip,.defense-summary-chip{width:100%}.lab-status-desk{max-width:700px;width:700px}}
@media(prefers-reduced-motion:reduce){.lab-ambient-grid,.lab-light-sweep,.lab-holo-orbit,.research-console,.research-monitor-scan,.defense-sea-stage:before,.defense-sea-sheen,.defense-command-ring i,.defense-sonar-pulse,.defense-water-ring,.defense-art-wrap,.defense-holo-mark i{animation:none!important}}

/* ========================================================================
   v2026.08.22.18 — 海防主畫面可視化修正
   比照港灣船型：防禦本體直接顯示在海面，底下僅保留精簡文字資訊牌。
   未部署防禦保留半透明主體預覽，避免玩家只能看文字猜種類。
   玩家可見文字硬下限：20px。
   ======================================================================== */
.defense-emplacement{
  width:244px!important;
  min-width:244px!important;
  height:208px!important;
  min-height:208px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#e9faf8!important;
  text-align:center!important;
  overflow:visible!important;
}
.defense-emplacement:hover,.defense-emplacement:focus-visible{
  z-index:29!important;
  transform:translate(-50%,-50%) scale(1.075)!important;
  filter:brightness(1.13)!important;
  outline:none!important;
}
.defense-emplacement.locked{filter:saturate(.48) brightness(.78)!important}

/* 防禦圖片本身就是完整透明主體，不再疊第二個橢圓平台把圖蓋髒。 */
.defense-art-wrap{
  position:absolute!important;
  z-index:4!important;
  left:50%!important;
  top:0!important;
  width:178px!important;
  height:118px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  transform:translateX(-50%)!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  pointer-events:none!important;
  animation:defenseFloatVisual 5.1s ease-in-out infinite!important;
  animation-delay:var(--def-delay)!important;
}
.defense-art-wrap img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  opacity:1!important;
  filter:drop-shadow(0 11px 9px rgba(0,12,18,.58)) saturate(1.08) brightness(1.08)!important;
}
/* 0 個時仍給玩家看這是哪種防禦，但明確做成藍圖/預覽感。 */
.defense-art-wrap.preview{opacity:.42!important;filter:saturate(.34) brightness(.90)!important}
.defense-emplacement.empty:hover .defense-art-wrap.preview,.defense-emplacement.empty:focus-visible .defense-art-wrap.preview{opacity:.68!important;filter:saturate(.58) brightness(1.02)!important}

/* 海面水紋放到防禦圖後方，增加「部署在海上」的感覺，不遮住主體。 */
.defense-water-ring{
  z-index:1!important;
  left:50%!important;
  top:51px!important;
  width:174px!important;
  height:58px!important;
  border:2px solid rgba(181,250,241,.26)!important;
  box-shadow:0 0 24px rgba(82,222,219,.13)!important;
}

/* 比照港灣船型的精簡資訊牌：名稱 / 數量一列，操作狀態第二列。 */
.defense-emplacement-copy{
  position:absolute!important;
  z-index:8!important;
  left:50%!important;
  bottom:0!important;
  width:238px!important;
  min-width:0!important;
  min-height:78px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"name qty" "state state"!important;
  align-items:center!important;
  gap:4px 10px!important;
  transform:translateX(-50%)!important;
  padding:9px 11px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(95,185,185,.50)!important;
  border-radius:10px!important;
  background:linear-gradient(160deg,rgba(2,28,35,.89),rgba(4,47,51,.84))!important;
  box-shadow:0 8px 18px rgba(0,0,0,.32)!important;
  backdrop-filter:blur(3px)!important;
  text-align:left!important;
}
body.in-game .defense-emplacement-copy b{
  grid-area:name!important;
  font-size:20px!important;
  line-height:1.12!important;
  color:#f0fcfa!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  text-align:left!important;
}
body.in-game .defense-emplacement-copy em{
  grid-area:qty!important;
  font-size:20px!important;
  line-height:1.12!important;
  color:#8ce3cc!important;
  font-style:normal!important;
  white-space:nowrap!important;
  text-align:right!important;
}
body.in-game .defense-emplacement-copy small{
  grid-area:state!important;
  font-size:20px!important;
  line-height:1.12!important;
  color:#adc9cc!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  text-align:left!important;
}
.defense-emplacement:hover .defense-emplacement-copy,.defense-emplacement:focus-visible .defense-emplacement-copy{
  border-color:#79e2d1!important;
  background:linear-gradient(160deg,rgba(3,42,48,.96),rgba(5,60,63,.93))!important;
  box-shadow:0 10px 22px rgba(0,0,0,.40),0 0 0 2px rgba(85,225,206,.12)!important;
}
.defense-emplacement.queued .defense-emplacement-copy{
  border-color:#d8bb74!important;
  box-shadow:0 8px 18px rgba(0,0,0,.32),0 0 0 2px rgba(241,197,107,.14)!important;
}
.defense-emplacement.empty{opacity:.82!important}
.defense-emplacement.empty:hover,.defense-emplacement.empty:focus-visible{opacity:1!important}

@keyframes defenseFloatVisual{
  0%,100%{transform:translateX(-50%) translateY(0) rotate(-.25deg)}
  50%{transform:translateX(-50%) translateY(-4px) rotate(.3deg)}
}
@media(max-width:900px){
  .defense-emplacement{width:238px!important;min-width:238px!important}
  .defense-emplacement-copy{width:232px!important}
}
@media(prefers-reduced-motion:reduce){.defense-art-wrap{animation:none!important}}

/* ============================================================
   v2026.08.22.19 — 運輸任務：己方島嶼快速選擇
   ============================================================ */
.fleet-own-island{min-width:min(430px,100%);flex:1 1 390px;padding:8px 10px;border:1px solid #376574;background:linear-gradient(180deg,rgba(15,47,58,.96),rgba(5,22,30,.96));border-radius:4px}
.fleet-own-island select{width:100%;min-width:320px;border-color:#5b8c98!important;background:#071820!important;color:#d8edf2!important}
.fleet-own-island small{display:block;font-size:20px;line-height:1.35;color:#79a0ad;white-space:normal}
@media(max-width:620px){.fleet-own-island{flex:1 1 100%;min-width:100%}.fleet-own-island select{min-width:0;width:100%}}

/* v2026.08.22.23：訊息未讀提示與來襲警報。 */
.nav-message-badge{margin-left:auto;min-width:30px;height:30px;padding:0 7px;border-radius:15px;display:inline-flex;align-items:center;justify-content:center;background:#9b3131;color:#fff;font-size:20px;line-height:1;font-weight:800}.nav-message-badge.hidden{display:none}.incoming-intel.hostile{border-color:#7e4141;background:linear-gradient(180deg,rgba(72,25,25,.86),rgba(22,16,18,.9))}


/* v2026.08.22.24：設施分類、研究分支流程圖與航隊到達時間。玩家可見字維持至少 20px。 */
.facility-category-tabs,.shipyard-category-tabs,.research-branch-tabs{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 18px;padding:10px;border:1px solid rgba(83,152,151,.48);border-radius:14px;background:rgba(4,31,38,.72)}
.facility-category-tabs button,.shipyard-category-tabs button,.research-branch-tabs button{min-width:150px;min-height:50px;padding:11px 22px;border:1px solid rgba(100,164,164,.55);border-radius:11px;background:linear-gradient(180deg,#123c45,#092832);color:#c7e5e7;font-size:20px!important;font-weight:800;line-height:1.2;cursor:pointer}
.facility-category-tabs button:hover,.shipyard-category-tabs button:hover,.research-branch-tabs button:hover{border-color:#7adfce;color:#effffb}
.facility-category-tabs button.active,.shipyard-category-tabs button.active,.research-branch-tabs button.active{border-color:#87ecd8;background:linear-gradient(180deg,#1c625f,#104447);color:#f4fffb;box-shadow:0 0 0 2px rgba(101,223,203,.14),inset 0 0 20px rgba(90,226,205,.08)}
.fleet-preview-arrival{border-color:rgba(83,156,147,.7)!important;background:linear-gradient(180deg,rgba(13,53,57,.96),rgba(8,35,43,.96))!important}
.fleet-preview-arrival b{white-space:normal!important;overflow-wrap:anywhere!important}
.research-flow-stage{height:980px!important}
.research-flow-lines{position:absolute;z-index:10;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 0 5px rgba(79,231,219,.34))}
.research-flow-lines path{fill:none;stroke:rgba(97,224,213,.58);stroke-width:.34;vector-effect:non-scaling-stroke;marker-end:url(#researchFlowArrow)}
.research-flow-lines marker path{fill:rgba(126,241,226,.9);stroke:none;marker-end:none}
.research-flow-stage .research-console{z-index:18;width:260px;min-width:260px;height:172px}
.research-flow-stage .research-monitor-copy b{font-size:20px!important;line-height:1.12!important}
.research-flow-stage .research-monitor-copy em,.research-flow-stage .research-monitor-copy small{font-size:20px!important;line-height:1.12!important}
@media(max-width:900px){.facility-category-tabs button,.shipyard-category-tabs button,.research-branch-tabs button{flex:1 1 180px}.research-flow-stage{height:980px!important}}


/* v2026.08.22.25 — 排行榜聯盟公開資訊 */
.alliance-rank-link{font:inherit;font-size:20px!important;line-height:1.25;color:#9fdcf0;background:transparent;border:0;padding:4px 6px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}.alliance-rank-link:hover{color:#d9f4ff}.alliance-public-profile{display:grid;gap:14px}.alliance-public-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.alliance-public-stats span{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid #315566;border-radius:12px;background:#07151c;font-size:20px}.alliance-public-stats b{font-size:24px}.alliance-public-eligibility{display:grid;gap:4px;padding:12px 14px;border:1px solid #315566;border-radius:12px;background:#07151c;font-size:20px;line-height:1.4}.alliance-public-eligibility.can-apply b{color:#8fe5c0}.alliance-public-eligibility.cannot-apply b{color:#f2c879}.alliance-public-eligibility span{color:#b9d4de}.alliance-public-apply{display:flex;justify-content:flex-end}@media(max-width:650px){.alliance-public-stats{grid-template-columns:1fr}.alliance-public-eligibility{font-size:12px}.alliance-public-apply .big-action{width:100%}}


/* v2026.08.22.26：訊息座標可直接前往海域航圖。 */
.message-coordinate-link{
  display:inline;
  padding:2px 8px;
  margin:0 2px;
  border:1px solid rgba(99,210,255,.62);
  border-radius:8px;
  background:rgba(18,86,119,.34);
  color:#bfeeff;
  font:inherit;
  font-size:inherit;
  font-weight:800;
  line-height:1.5;
  cursor:pointer;
  vertical-align:baseline;
}
.message-coordinate-link:hover,.message-coordinate-link:focus-visible{background:rgba(31,132,180,.55);outline:2px solid rgba(125,226,255,.65);outline-offset:2px;}
.archipelago-cell.coordinate-focus{outline:4px solid rgba(255,219,92,.95);outline-offset:3px;box-shadow:0 0 0 6px rgba(255,219,92,.16),0 0 34px rgba(255,219,92,.42);}

/* v2026.08.22.26：8 種群島動物顧問直接以大型動物標記辨識，不再沿用舊顧問角色圖片。 */
.advisor-animal-icon{
  width:128px;
  min-width:128px;
  min-height:128px;
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  font-size:72px;
  line-height:1;
  border-radius:18px;
  background:radial-gradient(circle at 38% 32%,rgba(142,229,255,.24),rgba(12,54,78,.86) 70%);
  border:1px solid rgba(116,213,255,.28);
  box-shadow:inset 0 0 28px rgba(100,220,255,.08);
}
@media(max-width:760px){.advisor-animal-icon{width:100%;min-width:0;min-height:112px;font-size:64px;}}

/* v2026.08.22.26：訊息座標可直接定位一般島位或已解鎖的外海特殊航區。 */
.special-zone-card.coordinate-focus{outline:3px solid rgba(125,224,255,.95);outline-offset:5px;box-shadow:0 0 0 7px rgba(66,185,255,.14),0 0 30px rgba(75,205,255,.35);}


/* v2026.08.23.01：生產與動能表格中鍵自動捲動啟用時，只用游標提示狀態。 */
body.middle-auto-scroll-active,body.middle-auto-scroll-active *{cursor:all-scroll!important}


/* 遠洋／近海探索固定探索階段與狐狸自動探索設定；v2026.09.19.02 起固定探索 3 小時。 */
.fleet-expedition-fixed{align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:300px;padding:8px 12px;border:1px solid #365b67;background:#081c24;color:#b9ccd3}
.fleet-expedition-fixed b,.fleet-expedition-fixed span{font-size:24px!important}.fleet-expedition-fixed b{color:#8fd3c8}
.auto-expedition-box{position:relative;z-index:2;margin:10px 12px 14px;padding:14px;border:1px solid #4b665d;border-radius:12px;background:rgba(7,28,28,.9);backdrop-filter:blur(3px)}
.auto-expedition-box.active{border-color:#78aa86;box-shadow:0 0 0 1px rgba(120,170,134,.18) inset}.auto-expedition-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.auto-expedition-head>div{display:flex;flex-direction:column;gap:3px}.auto-expedition-head b,.auto-expedition-head span,.auto-expedition-head strong{font-size:24px!important}.auto-expedition-head b{color:#d3d8b0}.auto-expedition-head strong{color:#9cd5aa}.auto-expedition-controls{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-top:12px}.auto-expedition-controls label{display:grid;gap:5px;font-size:24px!important}.auto-expedition-controls select{min-width:150px;background:#040c11;color:#d8e8ef;border:1px solid #345360;padding:7px}.auto-expedition-box small{display:block;margin-top:10px;font-size:24px!important;line-height:1.5;color:#9eb3ad}
@media(max-width:700px){.fleet-expedition-fixed{min-width:100%}.auto-expedition-controls>*{flex:1 1 100%}.auto-expedition-controls button{width:100%}}


/* ========================================================================
   v2026.08.23.11 — 航隊階段顯示與玩家可見內容溢位／捲動修正
   ======================================================================== */
/* 活動航隊列不能因文字或倒數變長而把內容推出卡片。 */
body.in-game .fleet-overview-row,
body.in-game .fleet-row{
  min-width:0!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;
  overflow:visible!important;
}
body.in-game .fleet-overview-row>span,
body.in-game .fleet-row>span{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game .fleet-overview-row>b,
body.in-game .fleet-row-actions>b{white-space:nowrap!important;justify-self:end!important}

/* 詳細說明／建造視窗永遠由視窗本身負責垂直捲動，不讓長內容掉到螢幕外。 */
body.in-game .help-modal{overflow:hidden!important}
body.in-game .help-modal-card{
  width:min(1060px,calc(100vw - 28px))!important;
  max-width:calc(100vw - 28px)!important;
  max-height:calc(100dvh - 28px)!important;
  min-height:0!important;
  overflow:hidden!important;
  grid-template-rows:auto minmax(0,1fr)!important;
}
body.in-game .help-modal-body{
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  -webkit-overflow-scrolling:touch;
}
body.in-game .help-modal-body>*{min-width:0!important;max-width:100%!important}
body.in-game #helpModalBody .scene-operation-shell{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
}
body.in-game #helpModalBody .scene-operation-shell .catalog-card{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
body.in-game #helpModalBody .catalog-card-head,
body.in-game #helpModalBody .catalog-card-body,
body.in-game #helpModalBody .catalog-title,
body.in-game #helpModalBody .catalog-stats,
body.in-game #helpModalBody .catalog-actions,
body.in-game #helpModalBody .unit-order-preview,
body.in-game #helpModalBody .help-current,
body.in-game #helpModalBody .help-cost{
  min-width:0!important;
  max-width:100%!important;
}
body.in-game #helpModalBody .followup-strike-brief{
  grid-template-columns:1fr!important;
  gap:5px!important;
}
body.in-game #helpModalBody .followup-strike-brief span,
body.in-game #helpModalBody .followup-strike-brief b{
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  text-overflow:clip!important;
}
body.in-game #helpModalBody .followup-strike-list>div{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:6px 10px!important;
}
body.in-game #helpModalBody .followup-strike-list em{
  grid-column:1/-1!important;
  text-align:left!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game #helpModalBody .help-cost .cost-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  min-width:0!important;
}

/* 場景資訊牌不再用省略號截斷玩家需要看的名稱／狀態。 */
body.in-game .facility-spot-copy,
body.in-game .shipyard-berth-copy,
body.in-game .defense-emplacement-copy{
  height:auto!important;
  min-height:84px!important;
  overflow:visible!important;
}
body.in-game .facility-spot-copy b,
body.in-game .facility-spot-copy small,
body.in-game .shipyard-berth-copy b,
body.in-game .shipyard-berth-copy small,
body.in-game .defense-emplacement-copy b,
body.in-game .defense-emplacement-copy small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
}
body.in-game .facility-spot-copy em,
body.in-game .shipyard-berth-copy em,
body.in-game .defense-emplacement-copy em{white-space:normal!important}

/* 所有大型玩家場景都有真正可操作的橫向捲動容器；垂直滾輪仍交給頁面。 */
body.in-game .facility-scene-scroll,
body.in-game .shipyard-scene-scroll,
body.in-game .defense-scene-scroll,
body.in-game .research-lab-scroll,
body.in-game .table-scroll{
  max-width:100%!important;
  overflow-x:auto!important;
  overscroll-behavior-x:contain!important;
  scrollbar-gutter:stable!important;
}

@media(max-width:760px){
  body.in-game .help-modal{padding:6px!important}
  body.in-game .help-modal-card{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important}
  body.in-game #helpModalBody .catalog-card-head{grid-template-columns:1fr!important}
  body.in-game #helpModalBody .catalog-art,
  body.in-game #helpModalBody .item-image{width:min(100%,300px)!important;height:auto!important;justify-self:center!important}
  body.in-game #helpModalBody .help-cost .cost-row{grid-template-columns:1fr!important}
  body.in-game #helpModalBody .catalog-stats .unit-stat-grid{grid-template-columns:1fr!important}
}

/* v2026.08.23.15：所有大型說明／建造視窗必須完整留在可視範圍內。
   長內容只在內容區捲動，標題與關閉按鈕永遠可見；避免高解析度縮放、瀏覽器工具列或 20px 最小字級讓視窗上下超出畫面。 */
body.in-game .help-modal{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:0!important;
  padding:12px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
}
body.in-game .help-modal-card{
  width:min(1060px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  height:min(92dvh,900px)!important;
  max-height:calc(100dvh - 24px)!important;
  min-height:0!important;
  margin:auto!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
}
body.in-game .help-modal-head{
  position:relative!important;
  z-index:3!important;
  flex:0 0 auto!important;
  min-width:0!important;
}
body.in-game .help-modal-head h2{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game .help-modal-body{
  min-height:0!important;
  height:100%!important;
  max-height:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  scrollbar-gutter:stable both-edges!important;
  padding-bottom:max(22px,env(safe-area-inset-bottom))!important;
}
body.in-game #helpModalBody .scene-operation-shell{
  min-height:0!important;
  padding-bottom:4px!important;
}
body.in-game #helpModalBody .scene-operation-shell .catalog-card{
  overflow:visible!important;
}
body.in-game #helpModalBody .catalog-actions{
  position:relative!important;
  bottom:auto!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:visible!important;
}
body.in-game #helpModalBody .catalog-amount{
  min-width:0!important;
  max-width:100%!important;
  flex-wrap:wrap!important;
}

/* 同類型的全螢幕視窗也採同一個可視高度原則，避免日後再出現內容被瀏覽器底部切掉。 */
body.in-game .battle-replay-modal,
body.in-game .story-modal{
  max-width:100vw!important;
  max-height:100dvh!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
body.in-game .battle-replay-card,
body.in-game .story-modal-card{
  max-height:calc(100dvh - 24px)!important;
  min-height:0!important;
  margin:auto!important;
}

@media(max-height:760px){
  body.in-game .help-modal{padding:6px!important;align-items:center!important}
  body.in-game .help-modal-card{
    width:min(1060px,calc(100vw - 12px))!important;
    max-width:calc(100vw - 12px)!important;
    height:calc(100dvh - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
  }
  body.in-game .help-modal-head{padding-top:8px!important;padding-bottom:8px!important}
  body.in-game .help-modal-body{padding-top:10px!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
}

@media(max-width:760px){
  body.in-game .help-modal{padding:6px!important}
  body.in-game .help-modal-card{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    height:calc(100dvh - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
    margin:auto!important;
  }
}

/* 詳細視窗的捲軸必須看得見；建造／研究操作列固定在內容區底部，長資料不用先摸索到最下方才找得到按鈕。 */
body.in-game .help-modal-body{
  scrollbar-width:auto!important;
  scrollbar-color:#4d7f8c #07171e!important;
  scroll-padding-bottom:88px!important;
}
body.in-game .help-modal-body::-webkit-scrollbar{width:12px!important;height:12px!important}
body.in-game .help-modal-body::-webkit-scrollbar-track{background:#07171e!important}
body.in-game .help-modal-body::-webkit-scrollbar-thumb{background:#416d79!important;border:2px solid #07171e!important;border-radius:8px!important}
body.in-game .help-modal-body::-webkit-scrollbar-thumb:hover{background:#5c929f!important}
body.in-game #helpModalBody .scene-operation-shell .catalog-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:6!important;
  background:rgba(5,24,31,.97)!important;
  box-shadow:0 -10px 20px rgba(0,0,0,.28)!important;
}

/* v2026.08.23.16：遠洋探索限定艦船的未發現／已發現狀態。 */
body.in-game .shipyard-berth.mystery{
  opacity:.9!important;
  filter:none!important;
}
body.in-game .shipyard-berth.mystery:hover,
body.in-game .shipyard-berth.mystery:focus-visible{
  opacity:1!important;
}
body.in-game .mystery-berth-mark{
  position:absolute!important;
  left:50%!important;
  top:12px!important;
  transform:translateX(-50%)!important;
  width:82px!important;
  height:82px!important;
  display:grid!important;
  place-items:center!important;
  border:2px dashed rgba(132,211,206,.72)!important;
  border-radius:50%!important;
  background:radial-gradient(circle,rgba(23,91,98,.42),rgba(2,22,29,.7))!important;
  color:#d6f5f1!important;
  font-size:48px!important;
  line-height:1!important;
  font-weight:900!important;
  box-shadow:0 0 24px rgba(77,202,194,.16)!important;
}
body.in-game .shipyard-berth.expedition-only .shipyard-berth-copy{
  border-color:rgba(116,198,190,.72)!important;
}
body.in-game .shipyard-berth.expedition-only .discovered-empty{
  opacity:.48!important;
  filter:saturate(.62) brightness(.82)!important;
}
body.in-game .expedition-only-card .catalog-eyebrow{
  color:#9ce8d8!important;
}


/* v2026.08.23.17：航隊編成採按需視窗顯示，歷史預設不查詢。 */
.fleet-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.fleet-composition-btn{white-space:nowrap;font-size:20px;min-height:38px}.fleet-composition-modal{display:grid;gap:14px}.fleet-composition-route{display:grid;gap:7px;padding:12px;border:1px solid #294852;background:#07191f;border-radius:8px}.fleet-composition-route>b{font-size:22px}.fleet-composition-route>span{font-size:20px;line-height:1.55;overflow-wrap:anywhere}.fleet-composition-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.fleet-composition-unit{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #274650;background:#071a21;border-radius:8px;min-width:0}.fleet-composition-unit img{width:86px;height:62px;object-fit:contain;flex:0 0 auto}.fleet-composition-unit span{display:flex;flex:1;min-width:0;align-items:center;justify-content:space-between;gap:12px}.fleet-composition-unit b,.fleet-composition-unit em{font-size:20px;overflow-wrap:anywhere}.fleet-composition-unit em{font-style:normal;font-weight:800;color:#8fd5b0;white-space:nowrap}.fleet-overview-row>.fleet-row-actions{margin-left:auto}.history-filter button{font-size:20px;min-height:40px}
@media(max-width:760px){.fleet-composition-grid{grid-template-columns:1fr}.fleet-composition-unit img{width:72px;height:52px}.fleet-overview-row{align-items:flex-start}.fleet-overview-row>.fleet-row-actions{width:100%;justify-content:flex-start}}

/* v2026.08.23.18：共用詳細視窗 hidden 狀態必須高於 in-game 的 display:flex 規則；遠洋探索訊息的派出艦隊改為可展開內容。 */
body.in-game .help-modal.hidden{display:none!important}
.message-fleet-details{margin:8px 0 2px;border:1px solid rgba(69,123,142,.58);border-radius:8px;background:rgba(8,31,40,.72);white-space:normal;overflow:hidden}
.message-fleet-details summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;color:#a9d7e3;font-size:20px;font-weight:700;cursor:pointer;user-select:none;list-style:none}
.message-fleet-details summary::-webkit-details-marker{display:none}
.message-fleet-details summary::before{content:'';display:inline-block;width:20px;height:20px;transition:transform .16s ease}
.message-fleet-details[open] summary::before{transform:rotate(90deg)}
.message-fleet-detail-list{display:flex;flex-wrap:wrap;gap:8px;padding:0 12px 12px;border-top:1px solid rgba(69,123,142,.32)}
.message-fleet-detail-list span{margin-top:10px;padding:6px 9px;border:1px solid rgba(77,133,150,.42);border-radius:7px;background:rgba(10,45,56,.72);color:#c4dce3;font-size:20px;line-height:1.4}

/* v2026.08.23.20：造船／海防多批生產排程 — 每批數量、工期、預計完成與全部剩餘時間。 */
.unit-queue-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px 12px;margin-bottom:8px;border:1px solid #31515f;background:linear-gradient(180deg,#0b2029,#07161d);border-radius:8px}
.unit-queue-summary span{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;color:#8faab5;font-size:24px;line-height:1.4;min-width:0}
.unit-queue-summary b{color:#d4e4e9;font-size:24px;overflow-wrap:anywhere}
.unit-queue-list{border:1px solid #213a45;background:#061219}
.unit-queue-row{padding:10px 12px!important;align-items:center!important;gap:16px!important}
.unit-queue-main{display:grid!important;gap:5px;min-width:0;white-space:normal!important;overflow:visible!important}
.unit-queue-title{display:block;color:#c9dce3!important;font-size:24px;font-weight:700;white-space:normal;overflow-wrap:anywhere}
.unit-queue-meta{display:flex;flex-wrap:wrap;gap:6px 14px;color:#7896a2;font-size:24px;line-height:1.4}
.unit-queue-meta em{font-style:normal;white-space:normal}
.unit-queue-active{border-left:3px solid #4f9f76}
.unit-queue-end{display:grid!important;grid-template-columns:1fr;text-align:right;justify-items:end;gap:2px!important;min-width:260px}
.unit-queue-end small{color:#6f8d99;font-size:24px!important;white-space:normal}
.unit-queue-end b{color:#d7c27c;font-size:24px;white-space:nowrap}
.joint-attack-invites>div>span small,.joint-attack-groups>div>span small{display:block;margin-top:4px;color:#7896a2;font-size:24px;line-height:1.4;white-space:normal}
@media(max-width:1100px){.unit-queue-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.unit-queue-end{min-width:220px}}
@media(max-width:720px){.unit-queue-summary{grid-template-columns:1fr}.unit-queue-row{display:grid!important;grid-template-columns:1fr!important}.unit-queue-main{width:100%}.unit-queue-end{width:100%!important;min-width:0;justify-items:start;text-align:left}.unit-queue-meta{display:grid;grid-template-columns:1fr}.unit-queue-end b{margin-left:0!important}}

/* v2026.08.23.22：所有表格保留中鍵自動捲動；hover 只影響視覺，不攔截中鍵。 */
body.in-game table,body.in-game .table-scroll{touch-action:pan-x pan-y}.player-rename-form{display:grid;gap:10px}.player-rename-form label{font-weight:800;color:#cce0e8}.player-rename-form input{min-height:44px;background:#06141b;border:1px solid #365866;color:#f2fbff;padding:8px 10px;font-size:24px}.player-rename-form small{color:#78939e;line-height:1.55}.help-action-row{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.account-rename-btn{white-space:nowrap}

/* ========================================================================
   v2026.08.23.23 — Mobile playability / fleet +/- / unified interface colors
   - Player-visible UI stays within the established Tidebound Isles navy/teal palette.
   - Success/increase stays green; destructive/decrease stays red.
   - Mobile keeps >=20px player-visible text and >=48px primary touch targets.
   ======================================================================== */
:root{
  --tb-bg:#04151c;
  --tb-surface:#071b23;
  --tb-surface-2:#0a252e;
  --tb-surface-3:#0d303a;
  --tb-line:rgba(119,190,203,.28);
  --tb-line-strong:rgba(121,213,218,.58);
  --tb-text:#e3f2f5;
  --tb-muted:#88a7b0;
  --tb-accent:#75cdd1;
  --tb-accent-deep:#174653;
  --tb-success:#8fd0aa;
  --tb-success-bg:#12392a;
  --tb-danger:#e59a91;
  --tb-danger-bg:#4a211f;
  --tb-warn:#e2c879;
}

/* One visual language for normal panels, tables, forms and standard actions. */
body.in-game .panel,
body.in-game .card,
body.in-game .message-card,
body.in-game .friend-section,
body.in-game .friends-search-card,
body.in-game .friend-search-results,
body.in-game .admin-box,
body.in-game .market-card,
body.in-game .stats-card,
body.in-game .joint-attack-panel{
  border-color:var(--tb-line)!important;
  background-color:var(--tb-surface)!important;
}
body.in-game .panel>h2,
body.in-game .panel>h3,
body.in-game .friend-section>header,
body.in-game .message-head,
body.in-game .table th{
  border-color:var(--tb-line)!important;
  background:var(--tb-surface-2)!important;
  color:var(--tb-text)!important;
}
body.in-game .table td{
  border-color:rgba(119,190,203,.18)!important;
  background:var(--tb-surface)!important;
  color:#b9cfd5!important;
}
body.in-game .table tr:hover td{background:#0c2a34!important}
body.in-game input,
body.in-game select,
body.in-game textarea{
  border-color:rgba(119,190,203,.38)!important;
  background:#041219!important;
  color:#edf9fb!important;
  caret-color:#edf9fb!important;
}
body.in-game input::placeholder,
body.in-game textarea::placeholder{color:#718f98!important;opacity:1}
body.in-game .soft-btn,
body.in-game .gal-act,
body.in-game .info-btn,
body.in-game .mini-btn,
body.in-game .nav-toggle-btn,
body.in-game .big-action,
body.in-game .item-actions button:not(.danger-action):not(.unit-scrap-btn),
body.in-game .galaxy-tools button:not(.danger-act),
body.in-game .friend-more,
body.in-game .friend-add-btn{
  border-color:rgba(117,205,209,.46)!important;
  background:linear-gradient(180deg,#174653,#0d303a)!important;
  color:#e9f8fa!important;
}
body.in-game .soft-btn:hover,
body.in-game .gal-act:hover,
body.in-game .info-btn:hover,
body.in-game .mini-btn:hover,
body.in-game .big-action:hover{border-color:var(--tb-line-strong)!important;background:linear-gradient(180deg,#215c68,#123b46)!important}
body.in-game .danger-act,
body.in-game .danger-action,
body.in-game .danger-soft-btn,
body.in-game .unit-scrap-btn{border-color:rgba(222,125,116,.58)!important;background:linear-gradient(180deg,#4a211f,#2d1514)!important;color:#f1b0a8!important}

/* Fleet quantity control: direct typing remains available, +/- are large touch targets. */
body.in-game .fleet-pick{
  grid-template-columns:76px minmax(0,1fr) auto!important;
  gap:0!important;
  min-height:78px;
  border-color:var(--tb-line)!important;
  background:linear-gradient(145deg,rgba(8,31,40,.94),rgba(5,23,30,.96))!important;
  border-radius:10px;
  overflow:hidden;
}
body.in-game .fleet-pick-info{padding:8px 10px!important}
body.in-game .fleet-pick-controls{
  display:grid;grid-template-columns:minmax(76px,94px) 50px 50px;gap:6px;align-items:center;
  padding:7px 8px 7px 4px;min-width:0;
}
body.in-game .fleet-pick-controls input{
  width:100%!important;min-width:0!important;height:50px!important;padding:6px 7px!important;
  text-align:center;font-variant-numeric:tabular-nums;font-size:20px!important;border-radius:8px!important;
}
body.in-game .fleet-step-btn{
  width:50px;height:50px;min-width:50px;min-height:50px;padding:0!important;border-radius:9px!important;
  display:grid;place-items:center;font-size:30px!important;font-weight:900;line-height:1;touch-action:manipulation;
}
body.in-game .fleet-step-btn.plus{border:1px solid rgba(100,205,148,.68)!important;background:linear-gradient(180deg,#1c5b3d,#123b2b)!important;color:#bdf2d2!important}
body.in-game .fleet-step-btn.minus{border:1px solid rgba(226,113,104,.68)!important;background:linear-gradient(180deg,#5a2623,#371817)!important;color:#ffc1bb!important}
body.in-game .fleet-step-btn:active{transform:translateY(1px);filter:brightness(1.14)}

/* Special-zone heading no longer reserves a second explanatory column. */
body.in-game .special-zones-head{justify-content:flex-start!important}

/* Mobile / tablet gameplay pass. */
@media(max-width:900px){
  body.in-game{font-size:20px!important;-webkit-text-size-adjust:100%}
  body.in-game #content{padding:9px 8px calc(68px + env(safe-area-inset-bottom))!important}
  body.in-game #content>*{max-width:100%!important;min-width:0!important}
  body.in-game .panel{overflow:hidden!important;border-radius:12px!important}
  body.in-game .panel>h2,body.in-game .panel>h3{padding:11px 12px!important;margin:0!important;font-size:22px!important;line-height:1.35!important}

  /* 20px is the mobile floor; headings remain larger. */
  body.in-game p,body.in-game span,body.in-game b,body.in-game strong,body.in-game small,body.in-game em,
  body.in-game label,body.in-game a,body.in-game button,body.in-game td,body.in-game th,
  body.in-game input,body.in-game select,body.in-game textarea,
  body.in-game .muted,body.in-game .panel-subline,body.in-game .fleet-hint,body.in-game .tool-stat,
  body.in-game .message-retention,body.in-game .coords,body.in-game .item-level,body.in-game .item-info,
  body.in-game .queue,body.in-game .empty-state{font-size:20px!important}
  body.in-game h1{font-size:28px!important}body.in-game h2{font-size:25px!important}body.in-game h3{font-size:22px!important}body.in-game h4{font-size:20px!important}

  /* Touch targets / forms. */
  body.in-game button,body.in-game input,body.in-game select{min-height:48px}
  body.in-game textarea{min-height:96px}
  body.in-game .big-action{min-height:54px!important}
  body.in-game .row,body.in-game .fleet-target,body.in-game .fleet-cargo,body.in-game .galaxy-tools,
  body.in-game .market-form,body.in-game .admin-form{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:end!important;gap:10px!important;padding:10px!important;
  }
  body.in-game .row>label,body.in-game .fleet-target>label,body.in-game .fleet-cargo>label,body.in-game .galaxy-tools>label,
  body.in-game .market-form>label,body.in-game .admin-form>label{width:100%!important;min-width:0!important}
  body.in-game .row input,body.in-game .row select,body.in-game .fleet-target input,body.in-game .fleet-target select,
  body.in-game .fleet-cargo input,body.in-game .galaxy-tools input,body.in-game .market-form input,body.in-game .market-form select,
  body.in-game .admin-form input,body.in-game .admin-form select{width:100%!important;min-width:0!important}
  body.in-game .fleet-expedition-fixed,body.in-game .fleet-own-island,body.in-game .auto-expedition-box{grid-column:1/-1!important;min-width:0!important;width:100%!important}
  body.in-game .fleet-xy-picker{grid-column:auto!important;width:100%!important;min-width:0!important}

  /* Fleet selection is a real mobile control instead of a narrow desktop number field. */
  body.in-game .fleet-grid{grid-template-columns:1fr!important;padding:10px!important;gap:9px!important}
  body.in-game .fleet-pick{grid-template-columns:72px minmax(0,1fr) auto!important;min-height:86px!important}
  body.in-game .fleet-pick img{width:72px!important;height:64px!important;object-fit:contain!important}
  body.in-game .fleet-pick b,body.in-game .fleet-pick span,body.in-game .fleet-pick small{font-size:20px!important}
  body.in-game .fleet-pick-controls{grid-template-columns:minmax(70px,94px) 50px 50px!important}
  body.in-game .fleet-step-btn{font-size:30px!important}

  /* Tables remain usable on touch screens instead of expanding the whole page. */
  body.in-game .table-scroll,body.in-game .galaxy-table-wrap,body.in-game .fleet-history-wrap{
    max-width:100%!important;overflow-x:auto!important;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;
  }
  body.in-game .table{font-size:20px!important;min-width:max(760px,100%)!important}
  body.in-game .table th,body.in-game .table td{font-size:20px!important;padding:9px 10px!important;line-height:1.4!important}

  /* General content grids collapse without hiding actions. */
  body.in-game .overview-action-grid,body.in-game .overview-activity-grid,body.in-game .two-col,
  body.in-game .friend-grid.refined,body.in-game .alliance-profile-grid,body.in-game .stats-rank,
  body.in-game .market-range{grid-template-columns:1fr!important}
  body.in-game .overview-action{min-height:96px!important;grid-template-columns:52px minmax(0,1fr)!important;padding:11px!important}
  body.in-game .overview-action img{width:52px!important;height:52px!important}
  body.in-game .overview-action b{font-size:22px!important}
  body.in-game .overview-production-strip>div{min-height:82px!important}
  body.in-game .overview-production-strip span,body.in-game .overview-production-strip b{font-size:20px!important}

  /* Modals and drawers must stay fully reachable on a phone viewport. */
  body.in-game .help-modal{padding:6px!important}
  body.in-game .help-modal-card{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;border-radius:12px!important}
  body.in-game .help-modal-body{overflow:auto!important;-webkit-overflow-scrolling:touch!important;padding:12px!important}
  body.in-game .event-drawer{left:6px!important;right:6px!important;bottom:6px!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 70px)!important}
  body.in-game .event-drawer-toggle{bottom:calc(10px + env(safe-area-inset-bottom))!important;right:8px!important;min-height:52px!important}

  /* Header/account controls must never force horizontal page overflow. */
  body.in-game .topbar{max-width:100vw!important;overflow:hidden!important}
  body.in-game .account-actions{min-width:0!important;flex-wrap:wrap!important;justify-content:flex-end!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{min-height:48px!important}
  body.in-game .resource-cell span,body.in-game .resource-cell b,body.in-game .resource-cell small{font-size:20px!important}

  /* Messages / fleet rows keep actions reachable below long text. */
  body.in-game .fleet-row,body.in-game .fleet-overview-row,body.in-game .queue{align-items:flex-start!important;flex-wrap:wrap!important}
  body.in-game .fleet-row-actions{width:100%!important;justify-content:flex-start!important;margin-left:0!important}
  body.in-game .fleet-row-actions button{min-height:46px!important}
}

@media(max-width:620px){
  body.in-game #content{padding-left:6px!important;padding-right:6px!important}
  body.in-game .topbar{padding:7px 7px 9px!important}
  body.in-game .resource-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game .resource-cell{min-height:68px!important;padding:7px!important;grid-template-columns:36px minmax(0,1fr)!important;gap:6px!important}
  body.in-game .resource-cell img{width:36px!important;height:36px!important}
  body.in-game .rightbar{padding:7px!important}
  body.in-game .rightbar .island-card{min-height:92px!important;grid-template-columns:60px minmax(0,1fr)!important;padding:8px!important;column-gap:9px!important}
  body.in-game .rightbar .island-thumb{width:60px!important;height:60px!important}

  body.in-game .row,body.in-game .fleet-target,body.in-game .fleet-cargo,body.in-game .galaxy-tools,
  body.in-game .market-form,body.in-game .admin-form{grid-template-columns:1fr!important;padding:8px!important}
  body.in-game .fleet-xy-picker{grid-column:1!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .galaxy-tools #galaxyGo{grid-column:1!important}

  body.in-game .fleet-pick{grid-template-columns:64px minmax(0,1fr)!important;padding:7px!important;gap:8px!important}
  body.in-game .fleet-pick img{width:64px!important;height:58px!important;border-radius:7px!important}
  body.in-game .fleet-pick-info{padding:0!important}
  body.in-game .fleet-pick-controls{grid-column:1/-1!important;grid-template-columns:minmax(0,1fr) 54px 54px!important;padding:2px 0 0!important;gap:7px!important}
  body.in-game .fleet-pick-controls input{height:54px!important;font-size:22px!important}
  body.in-game .fleet-step-btn{width:54px;height:54px;min-width:54px;min-height:54px}

  body.in-game .fleet-dispatch-summary{margin:0 7px 8px!important;padding:6px!important;grid-template-columns:1fr!important}
  body.in-game .fleet-dispatch-summary>div{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:center!important;gap:9px!important;padding:9px!important}
  body.in-game .fleet-dispatch-summary span,body.in-game .fleet-dispatch-summary b{font-size:20px!important}
  body.in-game .fleet-dispatch-summary b{text-align:right!important;overflow-wrap:anywhere!important;white-space:normal!important}
  body.in-game .fleet-cargo .big-action{width:100%!important}

  body.in-game .overview-stats-v32,body.in-game .overview-production-strip{grid-template-columns:1fr!important}
  body.in-game .overview-title-line .planet-actions{width:100%!important}
  body.in-game .overview-title-line .planet-actions button{flex:1 1 160px!important}
  body.in-game .friends-overview{grid-template-columns:1fr!important;padding:8px!important}
  body.in-game .friends-hero,body.in-game .friend-grid.refined{padding-left:8px!important;padding-right:8px!important}
  body.in-game .message-card{margin:7px 4px!important}
  body.in-game .message-head{padding:9px!important}
  body.in-game .message{padding:10px!important}

  body.in-game .catalog-card-head{grid-template-columns:1fr!important}
  body.in-game .catalog-card .catalog-art,body.in-game .catalog-card .item-image{width:min(100%,280px)!important;height:auto!important;justify-self:center!important}
  body.in-game .catalog-actions{display:grid!important;grid-template-columns:1fr!important}
  body.in-game .catalog-actions>*{width:100%!important;max-width:100%!important}
  body.in-game .catalog-amount{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%!important}
  body.in-game .catalog-amount label{min-width:0!important}.catalog-amount input{width:100%!important;min-width:0!important}

  body.in-game .table{min-width:700px!important}
}

@media(max-width:430px){
  body.in-game .account-actions{gap:5px!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{padding:6px 8px!important;font-size:20px!important}
  body.in-game .resource-cell{grid-template-columns:32px minmax(0,1fr)!important}.resource-cell img{width:32px!important;height:32px!important}
  body.in-game .fleet-grid{padding:7px!important}
  body.in-game .fleet-pick{grid-template-columns:56px minmax(0,1fr)!important;gap:7px!important}
  body.in-game .fleet-pick img{width:56px!important;height:52px!important}
  body.in-game .fleet-pick-controls{grid-template-columns:minmax(0,1fr) 52px 52px!important}
  body.in-game .fleet-step-btn{width:52px;height:52px;min-width:52px;min-height:52px}
  body.in-game .overview-command-center{padding:8px!important}.overview-action-grid{gap:7px!important}
}

/* v2026.08.24.01 — 島政 / 遠洋動物人才 / 玩家交易 */
.nav-symbol{width:28px;height:28px;display:inline-grid;place-items:center;margin-right:9px;font-size:24px;line-height:1;color:var(--cyan2);vertical-align:middle}
.governance-hero{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,.8fr);gap:14px;padding:16px}.governance-hero h2{margin:3px 0 7px;color:var(--cyan2);font-size:28px}.governance-hero p,.governance-rule-note,.governance-list-head p{margin:4px 0;line-height:1.6;color:var(--text);font-size:20px}.governance-discovery{border:1px solid var(--line2);background:var(--panel2);padding:13px;display:grid;gap:6px;align-content:center}.governance-discovery b{color:var(--gold);font-size:22px}.governance-discovery span,.governance-discovery small{font-size:20px;color:var(--text)}
.governance-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px}.governance-role-card,.governance-system-card{border:1px solid var(--line);background:linear-gradient(180deg,var(--panel2),var(--panel));padding:12px;min-width:0}.governance-role-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.governance-role-head span,.governance-system-card>div>span{display:block;color:var(--muted);font-size:20px}.governance-role-head h3,.governance-system-card h3{margin:2px 0;color:var(--cyan2);font-size:24px}.governance-role-effect{font-size:24px;color:var(--green);white-space:nowrap}.governance-role-card p,.governance-system-card p{min-height:58px;line-height:1.45;font-size:20px;color:var(--text)}.governance-role-current{min-height:78px;padding:9px;border:1px solid var(--line);background:rgba(0,0,0,.14);display:grid;gap:5px}.governance-role-current b,.governance-role-current span,.governance-role-current strong,.governance-role-card small{font-size:20px}.governance-role-current strong{color:var(--green)}.governance-role-controls{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;margin-top:9px}.governance-role-controls select,.governance-sort-controls select{min-height:46px;background:var(--panel);color:var(--text);border:1px solid var(--line2);padding:6px 9px;font-size:20px}.governance-role-controls button,.governance-system-card button,.gov-row-actions button,.governance-market-table button{min-height:46px;font-size:20px}.governance-rule-note{margin:0 12px 12px;padding:10px 12px;border-left:4px solid var(--cyan);background:var(--panel2)}
.governance-system-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px;padding:12px}.governance-system-card>div{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px}.governance-system-card>div>span{grid-column:1/-1}.governance-system-card>div>b{color:var(--gold);font-size:20px}.governance-system-card .cost-row{margin:9px 0}.governance-system-card>button{width:100%;border:1px solid var(--line2);background:linear-gradient(#1e5267,#123947);color:#fff}.governance-system-card>button:disabled{opacity:.5;cursor:not-allowed}
.governance-list-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:12px}.governance-list-head h3{margin:0;color:var(--cyan2);font-size:24px}.governance-list-head>span{font-size:20px;color:var(--muted)}.governance-sort-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.governance-sort-controls label{display:grid;gap:4px;color:var(--muted);font-size:20px}.governance-animal-table,.governance-market-table{min-width:1020px}.governance-animal-table th,.governance-animal-table td,.governance-market-table th,.governance-market-table td{font-size:20px;vertical-align:middle}.gov-animal-id{display:grid;gap:3px;border-left:4px solid var(--line2);padding-left:8px}.gov-animal-id b,.gov-animal-id small{font-size:20px}.gov-animal-id small{color:var(--muted)}.gov-animal-id.gov-gold{border-left-color:var(--gold)}.gov-animal-id.gov-silver{border-left-color:#9fb2bc}.gov-animal-id.gov-bronze{border-left-color:#b57b52}.gov-stat{font-weight:700;color:var(--cyan2);white-space:nowrap}.gov-row-actions{display:flex;gap:6px;align-items:center}.gov-row-actions span{font-size:20px;color:var(--muted)}.trade-action{border:1px solid var(--gold);background:var(--panel2);color:var(--gold)}.empty-cell{text-align:center;color:var(--muted);padding:18px!important}.error-box{padding:14px;color:var(--red);font-size:20px}
@media(max-width:900px){.governance-hero{grid-template-columns:1fr}.governance-role-grid{grid-template-columns:1fr}.governance-list-head{align-items:stretch;flex-direction:column}.governance-sort-controls{justify-content:flex-start}.governance-sort-controls label{flex:1 1 180px}.governance-role-controls{grid-template-columns:1fr 1fr}.governance-role-controls select{grid-column:1/-1}}
@media(max-width:620px){.governance-hero{padding:10px}.governance-system-grid,.governance-role-grid{padding:8px}.governance-role-controls{grid-template-columns:1fr}.governance-role-controls select{grid-column:auto}.governance-role-controls button,.governance-system-card button,.gov-row-actions button,.governance-market-table button,.governance-sort-controls select{min-height:50px}.governance-sort-controls{display:grid;grid-template-columns:1fr}.governance-animal-table,.governance-market-table{min-width:980px}}



/* v2026.08.24.14 — 島政分流至正式設施／研究頁面，玩家交易市場整合動物掛售 */
.governance-quick-links{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  align-content:center;
}
.governance-quick-links button{
  min-height:54px;
  padding:10px 14px;
  border:1px solid var(--line2);
  background:linear-gradient(180deg,rgba(22,76,91,.92),rgba(9,48,61,.96));
  color:var(--cyan2);
  font-size:20px;
  font-weight:700;
  cursor:pointer;
}
.governance-quick-links button:hover{
  border-color:var(--cyan);
  background:linear-gradient(180deg,rgba(28,94,111,.96),rgba(12,61,75,.98));
}
.animal-market-note{
  display:grid;
  gap:6px;
  margin-bottom:14px;
  border-left:4px solid var(--gold);
}
.animal-market-note b,
.animal-market-note span{
  font-size:20px;
  line-height:1.5;
}
.animal-market-note b{color:var(--gold)}
.animal-owned-head{margin-top:22px}
.gov-row-actions{
  flex-wrap:wrap;
  min-width:190px;
}
.gov-row-actions small{
  display:block;
  width:100%;
  color:var(--muted);
  font-size:20px;
  line-height:1.35;
}
@media(max-width:900px){
  .governance-quick-links{grid-template-columns:1fr}
}
@media(max-width:620px){
  .governance-quick-links{gap:8px}
  .governance-quick-links button{min-height:52px;width:100%}
}

/* v2026.08.24.04 — 航隊派遣版面修正與共用溢位防呆
   v23 加入 +/- 後，桌面卡片右欄寬度被控制鈕吃掉，中文艦名會被壓成一字一行。
   本版把「艦船資料」與「數量控制」拆成上下兩列；桌面與手機都保留完整可讀寬度。 */
body.in-game .fleet-grid{
  grid-template-columns:repeat(auto-fit,minmax(330px,1fr))!important;
  align-items:stretch!important;
}
body.in-game .fleet-pick{
  grid-template-columns:84px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-items:center!important;
  min-width:0!important;
  min-height:0!important;
}
body.in-game .fleet-pick img{
  width:84px!important;
  height:68px!important;
  object-fit:contain!important;
  align-self:center!important;
}
body.in-game .fleet-pick-info{
  min-width:0!important;
  padding:9px 11px!important;
}
body.in-game .fleet-pick-info b,
body.in-game .fleet-pick-info span,
body.in-game .fleet-pick-info small{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  line-height:1.38!important;
}
body.in-game .fleet-pick-controls{
  grid-column:1/-1!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  padding:7px 9px 9px!important;
  border-top:1px solid rgba(119,190,203,.14)!important;
}
body.in-game .fleet-pick-controls input{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
body.in-game .panel,
body.in-game .row,
body.in-game .fleet-target,
body.in-game .fleet-cargo,
body.in-game .fleet-grid,
body.in-game .fleet-pick,
body.in-game .fleet-pick-info,
body.in-game .fleet-pick-controls{
  box-sizing:border-box!important;
}
body.in-game input,
body.in-game select,
body.in-game textarea{
  max-width:100%!important;
  box-sizing:border-box!important;
}

@media(max-width:900px){
  body.in-game .fleet-grid{grid-template-columns:1fr!important}
  body.in-game .fleet-pick{grid-template-columns:76px minmax(0,1fr)!important}
  body.in-game .fleet-pick img{width:76px!important;height:64px!important}
  body.in-game .fleet-pick-controls{grid-template-columns:minmax(0,1fr) 54px 54px!important}
}
@media(max-width:620px){
  body.in-game .fleet-pick{grid-template-columns:64px minmax(0,1fr)!important;padding:7px!important;gap:8px!important}
  body.in-game .fleet-pick img{width:64px!important;height:58px!important}
  body.in-game .fleet-pick-controls{grid-column:1/-1!important;padding:7px 0 0!important;border-top:1px solid rgba(119,190,203,.14)!important}
}
@media(max-width:430px){
  body.in-game .fleet-pick{grid-template-columns:56px minmax(0,1fr)!important}
  body.in-game .fleet-pick img{width:56px!important;height:52px!important}
  body.in-game .fleet-pick-controls{grid-template-columns:minmax(0,1fr) 52px 52px!important}
}

/* ========================================================================
   v2026.08.24.06 — 航隊派遣 UX 重整
   目標：不改原本派遣規則，只把操作流程拆成「任務 → 艦船 → 航程 → 資源／派遣」，
   同時維持手機 20px 文字下限與既有深海藍綠配色。
   ======================================================================== */
body.in-game .fleet-ocean-panel{
  padding:0 0 18px!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,rgba(5,34,43,.98),rgba(4,24,32,.99))!important;
}
body.in-game .fleet-dispatch-head{
  position:relative;z-index:2;
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;
  padding:18px 20px;border-bottom:1px solid rgba(105,191,205,.26);
  background:linear-gradient(135deg,rgba(14,59,70,.96),rgba(7,34,44,.96));
}
body.in-game .fleet-dispatch-head h2{margin:2px 0 5px!important;color:#dff8f7!important}
body.in-game .fleet-dispatch-head p{margin:0;color:#9ab7bd!important;line-height:1.5}
body.in-game .fleet-dispatch-head .fleet-slots{
  padding:0!important;border:0!important;justify-content:flex-end!important;align-items:stretch!important;
}
body.in-game .fleet-dispatch-head .fleet-slots span{
  min-width:150px;display:grid;gap:3px;align-content:center;padding:9px 12px!important;
  background:rgba(4,25,33,.72)!important;border:1px solid rgba(103,190,199,.28)!important;border-radius:10px;
  color:#9db9c0!important;
}
body.in-game .fleet-dispatch-head .fleet-slots b{color:#dff4f5!important}
body.in-game .fleet-flow{position:relative;z-index:2;display:grid;gap:14px;padding:14px 16px 0}
body.in-game .fleet-step-card{
  min-width:0;overflow:hidden;border:1px solid rgba(96,178,190,.28);border-radius:14px;
  background:linear-gradient(180deg,rgba(7,31,40,.96),rgba(4,23,30,.96));
  box-shadow:0 10px 30px rgba(0,0,0,.14);
}
body.in-game .fleet-step-head{
  display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:12px;align-items:center;
  padding:13px 15px;background:linear-gradient(90deg,rgba(17,67,77,.8),rgba(8,37,47,.72));
  border-bottom:1px solid rgba(94,170,181,.22);
}
body.in-game .fleet-step-no{
  width:42px;height:42px;display:grid;place-items:center;border-radius:50%;font-weight:900;
  color:#e7fbf8!important;background:#155a63;border:1px solid rgba(127,222,214,.5);box-shadow:inset 0 0 0 3px rgba(0,0,0,.12);
}
body.in-game .fleet-step-head h3{margin:0 0 2px!important;color:#d8f1f2!important}
body.in-game .fleet-step-head p{margin:0!important;color:#8eabb2!important;line-height:1.45}
body.in-game .fleet-step-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
body.in-game .fleet-step-actions>b{color:#9bd9cf!important;white-space:nowrap!important}
body.in-game .fleet-step-actions .soft-btn,body.in-game #fleetClearCargo{min-width:128px}

body.in-game .fleet-step-card .joint-attack-panel{margin:12px 12px 0!important;border-radius:10px!important;overflow:hidden}
body.in-game .fleet-step-card .fleet-target{
  display:grid!important;grid-template-columns:minmax(180px,1.15fr) minmax(130px,.7fr) minmax(150px,.8fr) minmax(220px,1fr) minmax(145px,.75fr)!important;
  gap:10px!important;align-items:end!important;padding:12px!important;background:transparent!important;
}
body.in-game .fleet-step-card .fleet-target>label{width:100%!important;min-width:0!important}
body.in-game .fleet-step-card .fleet-target input,body.in-game .fleet-step-card .fleet-target select{width:100%!important;min-width:0!important}
body.in-game .fleet-step-card .fleet-own-island,
body.in-game .fleet-step-card .fleet-expedition-fixed,
body.in-game .fleet-step-card #jointAttackGroupWrap,
body.in-game .fleet-step-card #holdMinutesWrap{min-width:0!important}
body.in-game .fleet-step-card .fleet-own-island{grid-column:span 2}
body.in-game .fleet-step-card .fleet-expedition-fixed{grid-column:span 2;border-radius:10px!important}
body.in-game .fleet-step-card .fleet-xy-picker{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;min-width:0!important;width:100%!important}
body.in-game .fleet-step-card .fleet-special-target{grid-column:1/-1}
body.in-game .fleet-advanced-strip{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 12px 12px;padding:10px 12px;
  border:1px solid rgba(83,144,155,.22);border-radius:10px;background:rgba(5,23,30,.72);
}
body.in-game .fleet-advanced-strip>div{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
body.in-game .fleet-advanced-strip>div>span{color:#8eaab1!important}
body.in-game .fleet-advanced-strip>div>b{color:#cfe7e9!important}
body.in-game .fleet-advanced-strip>div>small{color:#738f97!important}
body.in-game .fleet-advanced-strip select{min-width:120px!important;opacity:.8}
body.in-game .auto-expedition-box{margin:0 12px 12px!important}

body.in-game .fleet-step-ships .fleet-grid{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(360px,1fr))!important;gap:10px!important;padding:12px!important;background:transparent!important;
}
body.in-game .fleet-step-ships .fleet-pick{
  grid-template-columns:92px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:0!important;
  border:1px solid rgba(77,145,158,.30)!important;border-radius:12px!important;background:linear-gradient(145deg,rgba(8,35,44,.94),rgba(5,25,32,.98))!important;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
body.in-game .fleet-step-ships .fleet-pick.selected{
  border-color:rgba(103,208,177,.72)!important;box-shadow:0 0 0 1px rgba(103,208,177,.18),inset 0 0 26px rgba(55,150,116,.08);
  background:linear-gradient(145deg,rgba(9,45,45,.98),rgba(5,29,33,.98))!important;
}
body.in-game .fleet-step-ships .fleet-pick img{width:92px!important;height:78px!important;padding:7px!important;object-fit:contain!important;box-sizing:border-box}
body.in-game .fleet-step-ships .fleet-pick-info{padding:9px 11px!important}
body.in-game .fleet-pick-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:0!important}
body.in-game .fleet-pick-title b{min-width:0;color:#d7ecef!important}
body.in-game .fleet-all-btn{
  flex:0 0 auto;min-width:70px!important;min-height:42px!important;padding:4px 10px!important;border-radius:8px!important;
  border:1px solid rgba(109,191,199,.38)!important;background:rgba(15,62,72,.7)!important;color:#bde6e7!important;
}
body.in-game .fleet-step-ships .fleet-pick-info>span{color:#99c9c3!important;margin-top:3px}
body.in-game .fleet-step-ships .fleet-pick-info>small{color:#738f97!important;margin-top:3px}
body.in-game .fleet-step-ships .fleet-pick-controls{
  grid-column:1/-1!important;display:grid!important;grid-template-columns:minmax(0,1fr) 56px 56px!important;gap:8px!important;
  width:100%!important;padding:9px!important;border-top:1px solid rgba(96,168,179,.15)!important;background:rgba(2,17,23,.34);
}
body.in-game .fleet-step-ships .fleet-pick-controls input{height:56px!important;font-variant-numeric:tabular-nums;font-weight:800}
body.in-game .fleet-step-ships .fleet-step-btn{width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important}

body.in-game .fleet-step-preview .fleet-dispatch-summary{
  margin:12px!important;padding:0!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;
  border:0!important;background:transparent!important;
}
body.in-game .fleet-step-preview .fleet-dispatch-summary>div{
  min-width:0!important;min-height:88px;padding:11px 12px!important;border:1px solid rgba(79,148,160,.28)!important;border-radius:10px!important;
  background:rgba(4,24,31,.82)!important;display:grid;align-content:center;gap:4px;
}
body.in-game .fleet-step-preview .fleet-dispatch-summary .fleet-preview-primary{
  border-color:rgba(91,189,181,.54)!important;background:linear-gradient(145deg,rgba(12,60,62,.78),rgba(5,30,36,.86))!important;
}
body.in-game .fleet-step-preview .fleet-dispatch-summary span{color:#82a1a9!important}
body.in-game .fleet-step-preview .fleet-dispatch-summary b{color:#d5e9ec!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.in-game .fleet-step-preview .fleet-route-help{margin:0 12px 12px;border:1px solid rgba(75,135,147,.22);border-radius:10px;background:rgba(4,22,29,.56);overflow:hidden}
body.in-game .fleet-step-preview .fleet-route-help summary{cursor:pointer;padding:10px 12px;color:#9ebcc2;font-weight:800;user-select:none}
body.in-game .fleet-step-preview .fleet-route-help .fleet-hint{padding:0 12px 12px!important;color:#718f97!important}

body.in-game .fleet-step-cargo .fleet-cargo{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:12px!important;background:transparent!important;
}
body.in-game .fleet-step-cargo .fleet-cargo label{min-width:0!important;width:100%!important}
body.in-game .fleet-step-cargo .fleet-cargo input{width:100%!important;min-width:0!important}
body.in-game .fleet-send-bar{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,320px);gap:14px;align-items:center;
  margin:0 12px 12px;padding:12px 14px;border:1px solid rgba(97,188,181,.38);border-radius:12px;
  background:linear-gradient(135deg,rgba(12,55,61,.88),rgba(5,29,36,.94));
}
body.in-game .fleet-send-bar>div{display:grid;gap:3px;min-width:0}
body.in-game .fleet-send-bar span{color:#83a6ad!important}
body.in-game .fleet-send-bar b{color:#d8eeee!important}
body.in-game .fleet-send-bar .big-action{width:100%!important;min-height:62px!important;font-weight:900!important}
body.in-game .fleet-send-bar .big-action:disabled{opacity:.48!important;cursor:not-allowed!important;filter:saturate(.45)!important}
body.in-game .fleet-panel-title{padding:13px 15px;border-bottom:1px solid rgba(87,154,166,.22);background:linear-gradient(90deg,rgba(15,57,68,.76),rgba(6,31,40,.7))}
body.in-game .fleet-panel-title h3{margin:1px 0!important;color:#d8ecef!important}
body.in-game .fleet-live-panel,body.in-game .fleet-history-panel{overflow:hidden!important}

@media(max-width:1180px){
  body.in-game .fleet-dispatch-head{grid-template-columns:1fr!important}
  body.in-game .fleet-dispatch-head .fleet-slots{justify-content:flex-start!important}
  body.in-game .fleet-step-card .fleet-target{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.in-game .fleet-step-card .fleet-own-island,body.in-game .fleet-step-card .fleet-expedition-fixed{grid-column:span 3!important}
  body.in-game .fleet-step-preview .fleet-dispatch-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:900px){
  body.in-game .fleet-flow{padding:9px 9px 0!important;gap:10px!important}
  body.in-game .fleet-dispatch-head{padding:13px 12px!important;gap:11px!important}
  body.in-game .fleet-dispatch-head .fleet-slots{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}
  body.in-game .fleet-dispatch-head .fleet-slots span{min-width:0!important;padding:8px!important}
  body.in-game .fleet-step-head{grid-template-columns:42px minmax(0,1fr)!important;padding:10px!important;gap:9px!important}
  body.in-game .fleet-step-head>.fleet-step-actions,body.in-game .fleet-step-head>#fleetClearCargo{grid-column:1/-1!important;justify-self:stretch!important}
  body.in-game .fleet-step-actions{justify-content:space-between!important}
  body.in-game #fleetClearCargo{width:100%!important}
  body.in-game .fleet-step-card .fleet-target{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:9px!important}
  body.in-game .fleet-step-card .fleet-own-island,body.in-game .fleet-step-card .fleet-expedition-fixed{grid-column:1/-1!important}
  body.in-game .fleet-step-ships .fleet-grid{grid-template-columns:1fr!important;padding:9px!important}
  body.in-game .fleet-step-ships .fleet-pick{grid-template-columns:78px minmax(0,1fr)!important}
  body.in-game .fleet-step-ships .fleet-pick img{width:78px!important;height:68px!important}
  body.in-game .fleet-step-preview .fleet-dispatch-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:9px!important}
  body.in-game .fleet-step-cargo .fleet-cargo{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:9px!important}
  body.in-game .fleet-send-bar{grid-template-columns:1fr!important;margin:0 9px 9px!important;padding:10px!important}
  body.in-game .fleet-send-bar .big-action{min-height:58px!important}
}
@media(max-width:620px){
  body.in-game .fleet-dispatch-head .fleet-slots{grid-template-columns:1fr!important;gap:6px!important}
  body.in-game .fleet-dispatch-head .fleet-slots span{display:flex!important;justify-content:space-between!important;gap:10px!important}
  body.in-game .fleet-step-card .fleet-target{grid-template-columns:1fr!important;padding:8px!important}
  body.in-game .fleet-step-card .fleet-own-island,body.in-game .fleet-step-card .fleet-expedition-fixed{grid-column:1!important}
  body.in-game .fleet-advanced-strip{align-items:stretch!important;flex-direction:column!important;margin:0 8px 8px!important;padding:9px!important}
  body.in-game .fleet-advanced-strip select{width:100%!important}
  body.in-game .fleet-step-ships .fleet-grid{padding:8px!important}
  body.in-game .fleet-step-ships .fleet-pick{grid-template-columns:68px minmax(0,1fr)!important;padding:0!important;gap:0!important}
  body.in-game .fleet-step-ships .fleet-pick img{width:68px!important;height:62px!important;padding:6px!important}
  body.in-game .fleet-pick-title{align-items:flex-start!important}
  body.in-game .fleet-all-btn{min-width:68px!important;min-height:46px!important}
  body.in-game .fleet-step-ships .fleet-pick-controls{grid-template-columns:minmax(0,1fr) 56px 56px!important;padding:8px!important}
  body.in-game .fleet-step-preview .fleet-dispatch-summary{grid-template-columns:1fr!important;margin:8px!important;gap:7px!important}
  body.in-game .fleet-step-preview .fleet-dispatch-summary>div{min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:center!important;padding:9px 10px!important}
  body.in-game .fleet-step-preview .fleet-dispatch-summary b{text-align:right!important}
  body.in-game .fleet-step-preview .fleet-route-help{margin:0 8px 8px!important}
  body.in-game .fleet-step-cargo .fleet-cargo{grid-template-columns:1fr!important;padding:8px!important}
  body.in-game .fleet-send-bar{margin:0 8px 8px!important}
}
@media(max-width:430px){
  body.in-game .fleet-flow{padding:7px 6px 0!important}
  body.in-game .fleet-step-head{grid-template-columns:38px minmax(0,1fr)!important;padding:9px 8px!important}
  body.in-game .fleet-step-no{width:38px;height:38px}
  body.in-game .fleet-step-actions{display:grid!important;grid-template-columns:1fr!important}
  body.in-game .fleet-step-actions .soft-btn{width:100%!important}
  body.in-game .fleet-step-ships .fleet-pick{grid-template-columns:60px minmax(0,1fr)!important}
  body.in-game .fleet-step-ships .fleet-pick img{width:60px!important;height:56px!important}
  body.in-game .fleet-step-ships .fleet-pick-controls{grid-template-columns:minmax(0,1fr) 54px 54px!important;gap:6px!important}
  body.in-game .fleet-step-ships .fleet-step-btn{width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important}
}

/* v2026.08.24.08：島政在尚未發現第一個動物前保留入口位置，但保持不可操作。
   另外修正後段 nav display:flex!important 壓過 .hidden 的問題，避免真正需隱藏的管理參數等導覽項目被顯示。 */
body.in-game .sidebar .nav.hidden{display:none!important}
body.in-game .sidebar .nav.governance-nav-locked,
body.in-game .sidebar .nav:disabled{
  opacity:.42!important;
  cursor:not-allowed!important;
  filter:saturate(.45) grayscale(.35);
  border-color:rgba(110,145,154,.14)!important;
  background:rgba(8,28,35,.34)!important;
  color:#69858d!important;
  box-shadow:none!important;
  transform:none!important;
}
body.in-game .sidebar .nav.governance-nav-locked:hover,
body.in-game .sidebar .nav:disabled:hover{
  background:rgba(8,28,35,.34)!important;
  border-color:rgba(110,145,154,.14)!important;
  color:#69858d!important;
  box-shadow:none!important;
  transform:none!important;
}
body.in-game .sidebar .nav.governance-nav-locked .nav-symbol,
body.in-game .sidebar .nav:disabled .nav-symbol{opacity:.55!important}

/* v2026.08.24.11：守方船艦由父層 scaleX(-1) 翻面，因此尾流定位仍必須留在原始素材左側；父層翻面後才會出現在畫面右側的真正艦尾。禁止再改成 right:0，否則尾流會跑到守方船頭。 */


/* v2026.08.24.15：島政職位說明改為清楚摘要＋獨立說明視窗，避免把公式直接塞在職位卡。 */
.governance-role-head-actions{display:flex;align-items:flex-end;flex-direction:column;gap:7px;flex:0 0 auto}.governance-role-help-btn{min-height:42px!important;padding:6px 14px!important;font-size:20px!important}.governance-role-summary{min-height:58px!important;margin:9px 0!important}.governance-section-head{padding:12px 12px 0}.governance-section-head h3{margin:0 0 5px;font-size:24px;color:var(--cyan2)}.governance-section-head p{margin:0;color:var(--text);font-size:20px;line-height:1.55}.governance-role-help h3{margin:16px 0 7px;color:var(--cyan2);font-size:22px}.governance-role-help p,.governance-role-help li,.governance-role-help b,.governance-role-help strong{font-size:20px}.governance-role-help p{line-height:1.65}.governance-role-help ul{margin:7px 0 14px;padding-left:25px}.governance-role-help li{margin:7px 0;line-height:1.6}.governance-role-help .help-current{line-height:1.65}
@media(max-width:620px){.governance-role-head-actions{align-items:stretch}.governance-role-help-btn{min-height:50px!important}.governance-section-head{padding:10px 8px 0}}


/* v2026.08.24.16 歷史規則：正式工期以 Server 排程為準；v2026.08.25.09 起等待項目可顯示明確標示的 Server 預估工期。 */
.building-time-authoritative b,.building-time-pending b{line-height:1.45;white-space:normal;text-align:right}
.queue-total-duration{display:block;opacity:.78;line-height:1.35;text-align:right}
@media(max-width:620px){.building-time-authoritative,.building-time-pending{align-items:flex-start}.building-time-authoritative b,.building-time-pending b{text-align:left}.queue-total-duration{text-align:left}}

/* ========================================================================
   v2026.08.25.01 — 資源總覽 / 生產與動能分配卡片化
   目的：桌面版不再依賴寬表格橫向捲動；額外加成預設收合，只保留總量。
   ======================================================================== */
body.in-game .resource-control-panel,
body.in-game .production-distribution-panel{min-width:0!important;overflow:hidden!important}
body.in-game .resource-overview-title{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:18px 20px 0}
body.in-game .resource-overview-title h2{margin:2px 0 0}
body.in-game .resource-control-hints{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
body.in-game .resource-control-hints>span{display:inline-flex;align-items:center;min-height:48px;padding:7px 12px;border:1px solid rgba(104,171,188,.2);border-radius:10px;background:rgba(8,34,43,.7);color:#9bb8c2}
body.in-game .slot-bonus-strip{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:10px;padding:10px 12px;border:1px solid rgba(93,180,255,.22);border-radius:10px;background:rgba(24,69,91,.2)}
body.in-game .slot-bonus-strip>b{color:#e6f5fa;margin-right:4px}
body.in-game .slot-bonus-strip>span{display:inline-flex;align-items:center;min-height:46px;padding:5px 10px;border-radius:9px;background:rgba(4,27,36,.55);color:#b7d2dc}

body.in-game .production-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;border-bottom:1px solid #294652;background:linear-gradient(180deg,#0c2530,#091b23)}
body.in-game .production-panel-head h3{margin:0}
body.in-game .production-panel-head>span{color:#84a5b1}
body.in-game .production-group{padding:16px 18px 4px}
body.in-game .production-group+.production-group{padding-top:18px;margin-top:8px;border-top:1px solid rgba(101,158,174,.15)}
body.in-game .production-group-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
body.in-game .production-group-title>b{color:#d8ebf1}
body.in-game .production-group-title>span{color:#7898a4;text-align:right}

body.in-game .resource-production-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0}
body.in-game .production-resource-card,
body.in-game .production-power-card{min-width:0;border:1px solid rgba(91,154,172,.24);border-radius:14px;background:linear-gradient(160deg,rgba(9,35,44,.94),rgba(5,22,29,.97));box-shadow:0 9px 22px rgba(0,0,0,.16);overflow:hidden}
body.in-game .production-resource-card.gold-card{border-color:rgba(210,174,74,.28);background:linear-gradient(160deg,rgba(56,45,15,.47),rgba(5,24,29,.97) 58%)}
body.in-game .production-card-head{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:center;padding:14px 14px 0}
body.in-game .production-card-head img{width:72px!important;height:72px!important;object-fit:cover;border:1px solid rgba(89,151,169,.28);border-radius:12px;background:#031017}
body.in-game .production-card-head>div{min-width:0}
body.in-game .production-card-head b{display:block;color:#d7ebf1;font-weight:850}
body.in-game .production-card-head span{display:block;color:#799aa6;margin-top:2px}

body.in-game .production-output{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:baseline;margin:12px 14px 0;padding:11px 12px;border:1px solid rgba(93,177,199,.17);border-radius:11px;background:rgba(3,21,28,.58)}
body.in-game .production-output>span{color:#8eacb6}
body.in-game .production-output>b{font-weight:900;white-space:nowrap!important}
body.in-game .production-output>em{font-style:normal;color:#718f9a;white-space:nowrap!important}

body.in-game .production-card-controls{display:grid;grid-template-columns:minmax(210px,.9fr) minmax(190px,1.1fr);gap:10px;padding:12px 14px 0}
body.in-game .production-card-controls>label,
body.in-game .power-card-bottom>label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;min-width:0;padding:8px 10px;border:1px solid rgba(87,145,161,.16);border-radius:10px;background:rgba(3,19,26,.46);color:#829fa9}
body.in-game .production-card-controls .production-percent,
body.in-game .power-card-bottom .production-percent{min-width:116px!important;width:116px!important}
body.in-game .production-stat{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:9px 10px;border:1px solid rgba(87,145,161,.14);border-radius:10px;background:rgba(3,19,26,.38)}
body.in-game .production-stat>span{color:#7897a2}
body.in-game .production-stat>b{color:#cfe2e8;text-align:right;white-space:nowrap!important}
body.in-game .production-card-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;padding:10px 14px 0}

body.in-game .resource-bonus-quiet{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;margin:10px 14px 14px;padding:10px 11px;border-top:1px solid rgba(99,153,169,.13);color:#7896a1}
body.in-game .resource-bonus-quiet>b{white-space:nowrap!important}
body.in-game .resource-bonus-quiet>small{color:#66838e}
body.in-game .resource-bonus-details{margin:10px 14px 14px;border:1px solid rgba(91,154,172,.19);border-radius:11px;background:rgba(4,22,29,.48);overflow:hidden}
body.in-game .resource-bonus-details>summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;min-height:58px;padding:9px 11px;cursor:pointer;list-style:none;user-select:none}
body.in-game .resource-bonus-details>summary::-webkit-details-marker{display:none}
body.in-game .resource-bonus-details>summary>span{display:flex;align-items:center;gap:9px;min-width:0}
body.in-game .resource-bonus-details>summary>span>b{color:#b8d2da}
body.in-game .resource-bonus-details>summary>span>em{font-style:normal;color:#7896a1}
body.in-game .resource-bonus-details>summary>strong{font-weight:900;white-space:nowrap!important}
body.in-game .resource-bonus-toggle{font-style:normal;color:#87b6c4;white-space:nowrap!important}
body.in-game .resource-bonus-toggle:after{content:''}
body.in-game .resource-bonus-details[open] .resource-bonus-toggle:after{content:''}
body.in-game .resource-bonus-items{display:grid;gap:0;border-top:1px solid rgba(91,154,172,.16)}
body.in-game .resource-bonus-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:10px 11px;border-bottom:1px solid rgba(90,145,160,.11)}
body.in-game .resource-bonus-item:last-child{border-bottom:0}
body.in-game .resource-bonus-name{min-width:0}
body.in-game .resource-bonus-name>b{display:block;color:#a9c5ce;font-weight:700}
body.in-game .resource-bonus-name>small{display:block;color:#698894;margin-top:2px}
body.in-game .resource-bonus-percent{display:inline-flex;justify-content:center;min-width:84px;padding:4px 8px;border-radius:9px;background:rgba(45,99,113,.28);color:#8fbdca;white-space:nowrap!important}
body.in-game .resource-bonus-item>strong{color:#82cc98;white-space:nowrap!important}
body.in-game .resource-bonus-item.negative>strong,
body.in-game .resource-bonus-item.negative .resource-bonus-percent{color:#dc8b7e}

body.in-game .power-production-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-bottom:12px;min-width:0}
body.in-game .production-power-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'head output' 'fuel fuel' 'bottom bottom';align-items:center;padding-bottom:12px}
body.in-game .production-power-card>.production-card-head{grid-area:head;padding-right:8px}
body.in-game .power-output{grid-area:output;display:grid;justify-items:end;gap:2px;padding:14px 14px 0 8px}
body.in-game .power-output>span{color:#7899a4}
body.in-game .power-output>b{font-weight:900;white-space:nowrap!important}
body.in-game .power-card-fuel{grid-area:fuel;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 14px 0;padding:8px 10px;border-radius:9px;background:rgba(3,19,26,.38);color:#7898a3}
body.in-game .power-card-fuel>b{white-space:nowrap!important}
body.in-game .power-card-bottom{grid-area:bottom;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 14px 0}
body.in-game .power-card-bottom>label{flex:1 1 auto}
body.in-game .power-card-bottom>.table-manage-btn{flex:0 0 auto}
body.in-game .power-card-empty{color:#688590}
body.in-game .production-power-card.power-offline{border-color:rgba(177,91,77,.3)}

body.in-game .production-apply-cardbar{margin-top:8px;border-radius:0 0 14px 14px}

@media(max-width:1180px){
  body.in-game .resource-production-grid{grid-template-columns:1fr}
  body.in-game .power-production-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  body.in-game .resource-overview-title{padding:14px 12px 0}
  body.in-game .production-panel-head,
  body.in-game .production-group-title{align-items:flex-start;flex-direction:column}
  body.in-game .production-group{padding:12px 10px 3px}
  body.in-game .production-card-controls{grid-template-columns:1fr}
  body.in-game .production-output{grid-template-columns:1fr auto}
  body.in-game .production-output>em{grid-column:1/-1}
  body.in-game .resource-bonus-details>summary,
  body.in-game .resource-bonus-item,
  body.in-game .resource-bonus-quiet{grid-template-columns:minmax(0,1fr) auto}
  body.in-game .resource-bonus-details>summary>.resource-bonus-toggle,
  body.in-game .resource-bonus-quiet>small{grid-column:1/-1}
  body.in-game .resource-bonus-percent{grid-column:2}
  body.in-game .resource-bonus-item>strong{grid-column:2}
  body.in-game .production-power-card{grid-template-columns:1fr;grid-template-areas:'head' 'output' 'fuel' 'bottom'}
  body.in-game .power-output{justify-items:start;padding:8px 14px 0}
  body.in-game .power-card-bottom{align-items:stretch;flex-direction:column}
  body.in-game .power-card-bottom>.table-manage-btn{width:100%}
}


/* ========================================================================
   v2026.08.25.03 — 聯盟補給潮階機率 50 / 40 / 10
   研究節點改用固定像素安全間距，避免 20px 最小字級時節點互相壓住；
   目前研究資訊移到流程圖上方，不再覆蓋科技內容。
   ======================================================================== */
body.in-game .research-current-strip{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);gap:12px;margin:0 0 16px}
body.in-game .research-current-strip>div{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;min-height:72px;padding:12px 15px;border:1px solid rgba(82,174,182,.28);border-radius:13px;background:linear-gradient(145deg,rgba(7,45,53,.78),rgba(5,25,33,.9))}
body.in-game .research-current-strip span{color:#82a7b0;white-space:nowrap!important}
body.in-game .research-current-strip b{color:#d9f4f2;min-width:0;overflow-wrap:anywhere}
body.in-game .research-current-strip small{color:#8db5bd;text-align:right;white-space:nowrap!important}
body.in-game .research-lab-chip{min-width:260px}
body.in-game .research-lab-chip span{align-items:flex-end;text-align:right}
body.in-game .research-flow-stage{height:var(--research-stage-height,980px)!important;min-height:820px!important}
body.in-game .research-flow-stage .research-console{width:270px!important;min-width:270px!important;height:170px!important}
body.in-game .research-flow-stage .research-console-frame{inset:-8px -9px -13px!important}
body.in-game .research-flow-stage .research-monitor{inset:8px 8px 27px!important}
body.in-game .research-flow-stage .research-monitor-copy{min-width:0!important}
body.in-game .research-flow-stage .research-monitor-copy b,
body.in-game .research-flow-stage .research-monitor-copy em,
body.in-game .research-flow-stage .research-monitor-copy small{overflow-wrap:anywhere!important;white-space:normal!important}
body.in-game .research-flow-lines path{stroke-width:2.1!important;vector-effect:non-scaling-stroke!important}

body.in-game .research-flow-column-title{position:absolute;z-index:14;left:var(--research-column-x);top:26px;transform:translateX(-50%);pointer-events:none}
body.in-game .research-flow-column-title>span{display:inline-flex;align-items:center;justify-content:center;min-width:170px;min-height:42px;padding:7px 14px;border:1px solid rgba(78,184,184,.25);border-radius:999px;background:rgba(4,31,38,.82);box-shadow:0 6px 16px rgba(0,0,0,.18);color:#8ec5c8;font-weight:800;white-space:nowrap!important}
body.in-game .research-lab-scroll{padding:6px 0 14px!important}
body.in-game .research-lab-scroll:after{content:'可左右拖曳查看完整科技流程';display:block;padding-top:8px;color:#6f949d;text-align:center}
body.in-game .lab-status-desk{display:none!important}

body.in-game .speedup-shop-groups{display:grid;gap:14px;margin-bottom:18px}
body.in-game .speedup-shop-groups>section{padding:13px;border:1px solid rgba(85,155,173,.2);border-radius:13px;background:rgba(4,24,32,.5)}
body.in-game .speedup-shop-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}
body.in-game .speedup-shop-head>b{color:#cce8ec}
body.in-game .speedup-shop-head>span{color:#789ca6;text-align:right}
body.in-game .speedup-item-card{border-color:rgba(80,181,184,.28)!important;background:linear-gradient(150deg,rgba(9,49,54,.72),rgba(5,22,29,.94))!important}

body.in-game .alliance-supply-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;margin:18px 0;padding:16px 18px;border:1px solid rgba(93,199,187,.35);border-radius:15px;background:linear-gradient(135deg,rgba(9,65,63,.62),rgba(6,29,39,.9));box-shadow:0 10px 26px rgba(0,0,0,.14)}
body.in-game .alliance-supply-copy{min-width:0}
body.in-game .alliance-supply-copy>span{display:block;color:#78b8b4;font-weight:800}
body.in-game .alliance-supply-copy h3{margin:5px 0 4px;color:#e7fbf7}
body.in-game .alliance-supply-copy p{margin:0;color:#a1c3c7}
body.in-game .alliance-supply-copy small{display:block;margin-top:6px;color:#779ca5}
body.in-game .alliance-supply-card.claimed{border-color:rgba(107,151,158,.22);background:rgba(5,31,39,.64)}
body.in-game .alliance-supply-card>button{min-width:150px}

@media(max-width:900px){
  body.in-game .research-current-strip{grid-template-columns:1fr}
  body.in-game .research-current-strip>div{grid-template-columns:1fr}
  body.in-game .research-current-strip small{text-align:left;white-space:normal!important}
  body.in-game .research-lab-chip{width:100%;min-width:0}
  body.in-game .research-lab-chip span{align-items:flex-start;text-align:left}
  body.in-game .speedup-shop-head{align-items:flex-start;flex-direction:column}
  body.in-game .speedup-shop-head>span{text-align:left}
  body.in-game .alliance-supply-card{grid-template-columns:1fr}
  body.in-game .alliance-supply-card>button{width:100%}
}

/* ========================================================================
   v2026.08.25.05 — 海洋研究院改為響應式研究卡片 + 可定位前置研究
   不再為了畫連線而把科技節點硬塞進固定座標；桌機、平板、手機都不需水平捲動。
   ======================================================================== */
body.in-game .research-card-layout{overflow:visible!important}
body.in-game .research-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
  margin-top:16px;
  min-width:0;
}
body.in-game .research-grid-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:13px;
  padding:17px;
  border:1px solid rgba(78,169,177,.34);
  border-radius:16px;
  background:linear-gradient(150deg,rgba(8,48,56,.9),rgba(5,25,34,.96));
  box-shadow:0 12px 30px rgba(0,0,0,.14),inset 0 1px rgba(188,255,247,.035);
}
body.in-game .research-grid-card.ready{border-color:rgba(84,204,185,.5)}
body.in-game .research-grid-card.locked{border-color:rgba(110,133,140,.3);filter:none!important;opacity:.88!important}
body.in-game .research-grid-card.queued{box-shadow:0 0 0 2px rgba(89,215,201,.18),0 12px 30px rgba(0,0,0,.16)}
body.in-game .research-grid-card.maxed{border-color:rgba(133,205,175,.44)}
body.in-game .research-grid-card-head{display:grid;grid-template-columns:92px minmax(0,1fr);gap:14px;align-items:center;min-width:0}
body.in-game .research-grid-card-head img{width:92px;height:92px;object-fit:cover;border:1px solid rgba(76,158,172,.36);border-radius:13px;background:#071b24;box-shadow:0 8px 18px rgba(0,0,0,.2)}
body.in-game .research-grid-card-head>div{min-width:0}
body.in-game .research-grid-kicker{display:block;margin-bottom:3px;color:#78aeb6;font-weight:800}
body.in-game .research-grid-card h3{margin:0 0 5px;color:#d8f1ef;font-size:22px!important;line-height:1.2;overflow-wrap:anywhere}
body.in-game .research-grid-level{color:#8fd2c7;font-weight:800;line-height:1.25}
body.in-game .research-grid-card>p{margin:0;color:#9db8bf;line-height:1.55;overflow-wrap:anywhere;flex:1}
body.in-game .research-grid-status{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap}
body.in-game .research-grid-status>span{display:inline-flex;align-items:center;min-height:38px;padding:6px 10px;border:1px solid rgba(95,145,155,.26);border-radius:999px;background:rgba(5,30,39,.68);color:#92adb4;font-weight:700}
body.in-game .research-grid-status>span.ok{border-color:rgba(76,188,162,.4);color:#8fe0ca}
body.in-game .research-grid-status>span.warn{border-color:rgba(190,143,76,.38);color:#d9b37b}
body.in-game .research-time-line{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid rgba(76,158,172,.28);border-radius:10px;background:rgba(5,28,37,.58);color:#a8c0c6}
body.in-game .research-time-line b{color:#d9f3f5;text-align:right;white-space:nowrap}
body.in-game .research-time-line.compact{padding:7px 10px;min-height:38px}
body.in-game .research-grid-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:2px}
body.in-game .research-grid-actions button{width:100%;min-width:0;min-height:48px}
body.in-game .research-focus-pulse{animation:researchFocusPulse .78s ease-in-out 3}
@keyframes researchFocusPulse{
  0%,100%{box-shadow:0 12px 30px rgba(0,0,0,.14),inset 0 1px rgba(188,255,247,.035)}
  32%,62%{box-shadow:0 0 0 4px rgba(94,238,210,.62),0 0 42px rgba(73,226,206,.34)}
}
body.in-game .research-prereq-modal{display:grid;gap:18px}
body.in-game .research-prereq-modal>p{margin:0;color:#9dbac0;line-height:1.55}
body.in-game .research-prereq-modal>section{display:grid;gap:10px;padding:14px;border:1px solid rgba(79,153,164,.28);border-radius:14px;background:rgba(4,28,37,.68)}
body.in-game .research-prereq-modal h3{margin:0 0 2px;color:#d3efec}
body.in-game .research-prereq-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 13px;border:1px solid rgba(90,142,151,.22);border-radius:11px;background:rgba(5,36,44,.72);min-width:0}
body.in-game .research-prereq-row>span{min-width:0}
body.in-game .research-prereq-row b{display:block;color:#cbe5e4;overflow-wrap:anywhere}
body.in-game .research-prereq-row small{display:block;margin-top:3px;color:#83a6ae;white-space:normal!important}
body.in-game .research-prereq-row.done{border-color:rgba(75,180,154,.34)}
body.in-game .research-prereq-row.done>em{color:#83d6bf;font-style:normal;font-weight:800}
body.in-game .research-prereq-row.missing{border-color:rgba(183,132,69,.32)}
body.in-game .research-prereq-row.missing>em{color:#d7aa70;font-style:normal;font-weight:800}
body.in-game .empty-state.compact{padding:12px!important;min-height:0!important}

@media(max-width:1180px){
  body.in-game .research-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  body.in-game .research-grid{grid-template-columns:1fr;gap:14px}
  body.in-game .research-grid-card{padding:14px}
  body.in-game .research-grid-card-head{grid-template-columns:78px minmax(0,1fr);gap:12px}
  body.in-game .research-grid-card-head img{width:78px;height:78px}
  body.in-game .research-grid-actions{grid-template-columns:1fr}
  body.in-game .research-prereq-row{grid-template-columns:1fr}
  body.in-game .research-prereq-row .soft-btn{width:100%}
}
@media(prefers-reduced-motion:reduce){body.in-game .research-focus-pulse{animation:none!important;outline:3px solid rgba(94,238,210,.45)}}


/* ========================================================================
   v2026.08.25.08 — 研究卡片精簡 + 整備場未知單位泊位修正
   主研究頁只保留名稱、等級、短狀態與三個操作；詳細原理／成本／需求留在「查看」。
   ======================================================================== */
body.in-game .research-grid-card{gap:11px!important;padding:15px!important}
body.in-game .research-grid-card-head{grid-template-columns:78px minmax(0,1fr)!important;gap:12px!important}
body.in-game .research-grid-card-head img{width:78px!important;height:78px!important}
body.in-game .research-grid-kicker{display:none!important}
body.in-game .research-grid-card>p{display:none!important}
body.in-game .research-grid-card h3{margin:0 0 4px!important}
body.in-game .research-grid-status{min-height:38px!important}
body.in-game .research-grid-status>span{min-height:36px!important;padding:5px 10px!important}
body.in-game .research-grid-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin-top:auto!important}
body.in-game .research-grid-actions button{min-height:46px!important;padding:7px 8px!important}
@media(max-width:720px){
  body.in-game .research-grid-card-head{grid-template-columns:72px minmax(0,1fr)!important}
  body.in-game .research-grid-card-head img{width:72px!important;height:72px!important}
  body.in-game .research-grid-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .research-grid-actions button[data-research]{grid-column:1/-1!important}
}

/* v2026.08.25.09：等待中的建築仍顯示預估工期；備註維持 20px 硬下限。 */
.building-time-pending small{flex:1 0 100%;font-size:20px;line-height:1.45;color:#78959f;text-align:right}
@media(max-width:620px){.building-time-pending small{text-align:left}}
.building-time-authoritative small{flex:1 0 100%;font-size:20px;line-height:1.45;color:#78959f;text-align:right}
@media(max-width:620px){.building-time-authoritative small{text-align:left}}

/* v2026.08.25.12：打撈任務使用獨立提示列，讓玩家直接確認真正可打撈的單位與本次貨艙。 */
body.in-game .fleet-salvage-hint{
  margin:0 12px 10px;padding:10px 12px;border:1px solid #315866;border-radius:10px;
  background:rgba(5,29,39,.82);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 14px;align-items:center;
}
body.in-game .fleet-salvage-hint.hidden{display:none!important}
body.in-game .fleet-salvage-hint b,body.in-game .fleet-salvage-hint span,body.in-game .fleet-salvage-hint small{font-size:20px!important;line-height:1.45}
body.in-game .fleet-salvage-hint b{color:#9ed9cf}
body.in-game .fleet-salvage-hint span{color:#d8eeee;font-weight:800;text-align:right}
body.in-game .fleet-salvage-hint small{grid-column:1/-1;color:#89a7ae}
@media(max-width:700px){
  body.in-game .fleet-salvage-hint{grid-template-columns:1fr;margin:0 9px 9px}
  body.in-game .fleet-salvage-hint span{text-align:left}
  body.in-game .fleet-salvage-hint small{grid-column:1}
}


/* v2026.08.25.13：海域航圖可直接快速回收；巨鯨優先，飛魚只在不足時補位。 */
body.in-game .debris-actions .quick-salvage-act{border-color:#4c9188!important;background:linear-gradient(#1d625c,#12443f)!important;color:#e8fff9!important;font-weight:800}
body.in-game .debris-actions .quick-salvage-act:disabled{opacity:.45!important;cursor:not-allowed!important}
/* v2026.08.25.14：大量島政動物採 Server 分頁，頁尾控制需在電腦／平板／手機保持清楚可操作。 */
.governance-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border-top:1px solid var(--line);font-size:20px;color:var(--muted)}
.governance-pager>div{display:flex;gap:8px}.governance-pager button{min-height:46px;font-size:20px}
@media(max-width:620px){.governance-pager{align-items:stretch;flex-direction:column}.governance-pager>div{display:grid;grid-template-columns:1fr 1fr}.governance-pager button{min-height:50px}}

/* ========================================================================
   v2026.08.25.15 — 資源總覽：目前量 / 儲藏百分比 / 滿倉時間
   ======================================================================== */
body.in-game .resource-capacity-panel{min-width:0!important;overflow:hidden!important}
body.in-game .resource-capacity-title{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;border-bottom:1px solid rgba(93,154,172,.18);background:linear-gradient(180deg,rgba(11,39,49,.94),rgba(7,28,36,.94))}
body.in-game .resource-capacity-title h3{margin:0;color:#d8ebf1}
body.in-game .resource-capacity-title span{display:block;margin-top:4px;color:#7898a4;line-height:1.5}
body.in-game .resource-capacity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px 16px 16px;min-width:0}
body.in-game .resource-capacity-card{min-width:0;padding:13px;border:1px solid rgba(95,158,176,.22);border-radius:13px;background:linear-gradient(160deg,rgba(8,34,43,.95),rgba(4,21,28,.97));box-shadow:0 8px 20px rgba(0,0,0,.14)}
body.in-game .resource-capacity-card.near{border-color:rgba(207,158,69,.48)}
body.in-game .resource-capacity-card.full{border-color:rgba(194,93,77,.58);box-shadow:0 0 0 1px rgba(194,93,77,.1),0 8px 20px rgba(0,0,0,.14)}
body.in-game .resource-capacity-head{display:grid;grid-template-columns:50px minmax(0,1fr) auto;gap:9px;align-items:center;min-width:0}
body.in-game .resource-capacity-head img{width:50px!important;height:50px!important;object-fit:contain}
body.in-game .resource-capacity-head>div{min-width:0}
body.in-game .resource-capacity-head b{display:block;color:#d6e9ef;font-weight:850}
body.in-game .resource-capacity-head span{display:block;margin-top:2px;color:#728f9a;line-height:1.35}
body.in-game .resource-capacity-head strong{align-self:start;color:#8fc4d0;white-space:nowrap!important}
body.in-game .resource-capacity-card.near .resource-capacity-head strong{color:#d5b06c}
body.in-game .resource-capacity-card.full .resource-capacity-head strong{color:#df8b7e}
body.in-game .resource-capacity-values{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px}
body.in-game .resource-capacity-values>div{min-width:0;padding:8px 9px;border:1px solid rgba(89,145,161,.14);border-radius:9px;background:rgba(2,18,24,.45)}
body.in-game .resource-capacity-values span,body.in-game .resource-capacity-foot span{display:block;color:#7896a1}
body.in-game .resource-capacity-values b{display:block;margin-top:3px;color:#d4e7ed;font-weight:850;overflow-wrap:anywhere}
body.in-game .resource-capacity-meter{height:13px;margin-top:10px;border:1px solid rgba(84,142,158,.28);border-radius:999px;background:#031017;overflow:hidden}
body.in-game .resource-capacity-meter>span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2d6375,#72aaba);transition:width .25s ease}
body.in-game .resource-capacity-card.near .resource-capacity-meter>span{background:linear-gradient(90deg,#8a6736,#c99d54)}
body.in-game .resource-capacity-card.full .resource-capacity-meter>span{background:linear-gradient(90deg,#86483e,#d17769)}
body.in-game .resource-capacity-foot{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
body.in-game .resource-capacity-foot>div{min-width:0;padding:7px 9px;border-radius:9px;background:rgba(4,23,30,.52)}
body.in-game .resource-capacity-foot b{display:block;margin-top:3px;color:#cfe3e9;font-weight:800;overflow-wrap:anywhere}
@media(max-width:1280px){body.in-game .resource-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){body.in-game .resource-capacity-title{padding:12px 10px}.resource-capacity-grid,body.in-game .resource-capacity-grid{grid-template-columns:1fr;padding:10px}.resource-capacity-values,body.in-game .resource-capacity-values,.resource-capacity-foot,body.in-game .resource-capacity-foot{grid-template-columns:1fr 1fr}}
@media(max-width:430px){body.in-game .resource-capacity-values,body.in-game .resource-capacity-foot{grid-template-columns:1fr}}

/* ============================================================
   v2026.08.26.01 — 海域航圖：自然島群 + 環境偵查
   - 25 個座標仍維持 X/Y 邏輯，但不再用 25 張管理卡片排成棋盤。
   - 海圖只顯示可點選的島位節點，詳細資訊集中在右側/下方選取面板。
   - 未開拓島嶼在環境偵查後顯示實際島型與資源加成。
   ============================================================ */
.ocean-map-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(310px,390px);gap:14px;align-items:stretch;padding:0 16px 16px}
.ocean-chart-scroll{margin:0!important;padding:0!important;min-height:710px!important;border-radius:22px!important;overflow:auto!important;isolation:isolate}
.ocean-chart-stage{position:relative;min-width:760px;min-height:710px;overflow:hidden;border-radius:20px;background:radial-gradient(circle at 18% 20%,rgba(100,190,198,.09),transparent 30%),radial-gradient(circle at 78% 65%,rgba(80,158,176,.10),transparent 34%),linear-gradient(180deg,rgba(7,54,68,.64),rgba(4,31,44,.82))}
.ocean-chart-stage:before,.ocean-chart-stage:after{content:"";position:absolute;pointer-events:none;border-radius:50%;filter:blur(.2px)}
.ocean-chart-stage:before{width:430px;height:210px;left:8%;top:35%;border:1px solid rgba(145,214,219,.09);transform:rotate(-10deg)}
.ocean-chart-stage:after{width:360px;height:180px;right:7%;top:10%;border:1px solid rgba(145,214,219,.07);transform:rotate(18deg)}
.ocean-chart-grid-lines{position:absolute;inset:7%;opacity:.18;background-image:linear-gradient(to right,transparent calc(20% - 1px),rgba(171,222,226,.25) 20%,transparent calc(20% + 1px)),linear-gradient(to bottom,transparent calc(20% - 1px),rgba(171,222,226,.20) 20%,transparent calc(20% + 1px));background-size:20% 100%,100% 20%;mask-image:linear-gradient(to bottom,transparent,black 8%,black 92%,transparent)}
.map-island-node{position:absolute;left:var(--map-left);top:var(--map-top);width:112px;min-height:118px;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;padding:5px 6px 7px;border:1px solid transparent;border-radius:28px;background:rgba(3,28,38,.20);color:#d5ebed;cursor:pointer;z-index:2;transition:transform .18s,border-color .18s,background .18s,box-shadow .18s}
.map-island-node:hover,.map-island-node:focus-visible{transform:translate(-50%,-50%) scale(1.05);background:rgba(7,43,54,.66);border-color:rgba(169,225,227,.38);outline:none}
.map-island-node.selected{z-index:4;background:rgba(8,48,60,.78);border-color:rgba(143,220,216,.72);box-shadow:0 0 0 3px rgba(105,196,192,.12),0 8px 28px rgba(0,0,0,.22)}
.map-island-node.current{box-shadow:0 0 0 3px rgba(121,221,193,.30),0 0 28px rgba(89,204,181,.20)}
.map-island-node.current:after{content:"目前";position:absolute;right:-8px;top:24px;padding:2px 7px;border-radius:999px;background:#1c6b61;color:#effffb;font-size:20px;font-weight:800}
.map-node-coordinate{font-size:20px;font-weight:800;color:#a8cdd3;line-height:1.1;white-space:nowrap}
.map-node-image{width:66px;height:66px;display:block;border-radius:50%;overflow:hidden;border:1px solid rgba(181,230,229,.28);box-shadow:0 5px 14px rgba(0,0,0,.22)}
.map-node-image img{width:100%;height:100%;object-fit:cover;display:block}
.map-island-node.vacant:not(.scouted) .map-node-image{filter:saturate(.48) brightness(.78);opacity:.82}
.map-island-node.scouted .map-node-image{border-color:rgba(111,198,218,.58)}
.map-node-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:20px;font-weight:800;line-height:1.1}
.map-island-node small{font-size:20px;color:#86aeb7;line-height:1.05;white-space:nowrap}
.map-node-debris{position:absolute;left:7px;top:37px;width:14px;height:14px;border-radius:50%;background:#e6c66d;border:2px solid rgba(5,29,38,.9);box-shadow:0 0 0 3px rgba(230,198,109,.13)}
.ocean-chart-compass{position:absolute;right:22px;bottom:20px;width:58px;height:58px;border:1px solid rgba(184,227,229,.28);border-radius:50%;display:grid;place-items:center;color:#b9d9dc;opacity:.72}
.ocean-chart-compass b{font-size:20px;position:absolute;top:3px}.ocean-chart-compass i{width:2px;height:27px;background:linear-gradient(#d5eded 0 48%,#7498a1 49%);clip-path:polygon(50% 0,100% 30%,65% 30%,65% 100%,35% 100%,35% 30%,0 30%)}
.map-selection-panel{min-width:0;border:1px solid rgba(119,185,198,.22);border-radius:18px;background:linear-gradient(180deg,rgba(8,39,49,.90),rgba(4,27,36,.96));padding:14px;display:flex;flex-direction:column;gap:12px;overflow:hidden}
.map-selection-visual{display:grid;grid-template-columns:108px minmax(0,1fr);gap:12px;align-items:center;padding-bottom:12px;border-bottom:1px solid rgba(120,180,191,.17)}
.map-selection-visual img{width:108px;height:108px;border-radius:18px;object-fit:cover;border:1px solid rgba(170,218,220,.23)}
.map-selection-visual span{display:block;font-size:20px;color:#8fb6be;font-weight:800}.map-selection-visual h3{margin:3px 0 2px;font-size:26px;color:#e3f2f3}.map-selection-visual p{margin:0;font-size:20px;line-height:1.35;color:#a9c4ca}
.map-selection-owner{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 10px;border-radius:12px;background:rgba(16,57,67,.44)}
.map-selection-owner>span{font-size:20px;color:#83a9b2}.map-selection-owner>b{font-size:22px;color:#d8eaed}.map-selection-owner .galaxy-player-social{width:100%;margin-top:3px}
.map-selection-type-badge{display:inline-flex;align-items:center;padding:2px 8px;border:1px solid rgba(99,215,255,.45);border-radius:999px;background:rgba(41,108,126,.22);color:#b9efff;font-size:17px;line-height:1.35;white-space:nowrap}
.map-selection-section{display:flex;flex-direction:column;gap:7px;padding:10px;border-radius:13px;background:rgba(2,27,36,.50);border:1px solid rgba(112,173,187,.13)}
.map-selection-section>b{font-size:21px;color:#cfe4e7}.map-selection-section>small{font-size:20px;line-height:1.45;color:#89aeb7}
.island-env-bonuses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.island-env-bonuses span{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:68px;padding:5px;border-radius:10px;background:rgba(7,45,55,.58);border:1px solid rgba(103,165,179,.15)}
.island-env-bonuses small{font-size:20px;color:#8cb1b9}.island-env-bonuses b{font-size:22px;color:#c7dfe3}.island-env-bonuses .positive b{color:#8ed8bd}
.map-selection-placeholder{display:flex;flex-direction:column;gap:5px;padding:14px;border:1px dashed rgba(136,195,202,.27);border-radius:13px;background:rgba(3,31,41,.38)}
.map-selection-placeholder b{font-size:22px;color:#c9e0e3}.map-selection-placeholder span{font-size:20px;line-height:1.5;color:#8fafb7}
.map-selection-actions{margin-top:auto;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
.map-selection-actions .gal-act{min-height:46px!important;font-size:20px!important}
.archipelago-legend .legend-dot.scouted{background:#6cb8c9;box-shadow:0 0 0 3px rgba(108,184,201,.14)}

@media(max-width:1120px){.ocean-map-workspace{grid-template-columns:1fr}.ocean-chart-scroll{min-height:620px!important}.ocean-chart-stage{min-height:620px}.map-selection-panel{min-height:0}.map-selection-visual{grid-template-columns:90px minmax(0,1fr)}.map-selection-visual img{width:90px;height:90px}}
@media(max-width:720px){.ocean-map-workspace{padding:0 8px 12px;gap:10px}.ocean-chart-scroll{min-height:520px!important}.ocean-chart-stage{min-width:660px;min-height:520px}.map-island-node{width:96px;min-height:104px}.map-node-image{width:56px;height:56px}.map-selection-panel{padding:10px}.map-selection-visual{grid-template-columns:76px minmax(0,1fr);gap:9px}.map-selection-visual img{width:76px;height:76px}.island-env-bonuses{grid-template-columns:1fr 1fr 1fr}.map-selection-actions{grid-template-columns:1fr}}

/* v2026.08.26.03：島政已有任命時只保留解除任命；研究條件不足／資源不足等狀態要有明確不可操作視覺。 */
body.in-game .governance-role-controls.has-assignment{
  grid-template-columns:1fr!important;
}
body.in-game .governance-role-controls.has-assignment .governance-unassign-only{
  width:100%!important;
}
body.in-game .research-action-btn:disabled,
body.in-game .research-grid-actions button[data-research]:disabled,
body.in-game .catalog-actions button[data-research]:disabled,
body.in-game .help-action-row button[data-research]:disabled,
body.in-game .governance-system-card button[data-governance-research]:disabled{
  opacity:.38!important;
  cursor:not-allowed!important;
  filter:saturate(.2) brightness(.72)!important;
  background:linear-gradient(180deg,#182a31,#101b20)!important;
  border-color:#2d434b!important;
  color:#71868f!important;
  box-shadow:none!important;
}
body.in-game .research-action-btn:disabled:hover,
body.in-game .research-grid-actions button[data-research]:disabled:hover,
body.in-game .catalog-actions button[data-research]:disabled:hover,
body.in-game .help-action-row button[data-research]:disabled:hover,
body.in-game .governance-system-card button[data-governance-research]:disabled:hover{
  transform:none!important;
  border-color:#2d434b!important;
  background:linear-gradient(180deg,#182a31,#101b20)!important;
}

/* ============================================================
   v2026.08.26.04 — 海域航圖版面重整
   - 修正 25 個島位在桌面版互相重疊、文字壓圖、水平捲軸異常。
   - 島位維持 5×5 座標，但只保留像素級自然錯位，視覺不僵硬且不互撞。
   - 海域／群島跳轉與上一／下一群島改成清楚的兩組工具列。
   ============================================================ */
body.in-game .ocean-map-panel .map-head{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
  align-items:stretch!important;
  padding:16px 18px 14px!important;
}
body.in-game .ocean-map-panel .map-head-copy{min-width:0}
body.in-game .ocean-map-panel .map-head-copy p{max-width:920px;margin-bottom:0}
body.in-game .ocean-map-panel .galaxy-tools{
  width:100%!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:12px!important;
  flex-wrap:wrap!important;
  padding:12px!important;
  border:1px solid rgba(100,177,191,.18)!important;
  border-radius:14px!important;
  background:rgba(3,27,36,.52)!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-tools,
body.in-game .ocean-map-panel .galaxy-step-tools{
  display:flex!important;
  align-items:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  min-width:0!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-tools label{
  display:grid!important;
  gap:5px!important;
  min-width:108px!important;
  margin:0!important;
  font-size:20px!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-tools input{
  width:108px!important;
  min-height:44px!important;
  font-size:20px!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-tools button,
body.in-game .ocean-map-panel .galaxy-step-tools button{
  min-height:44px!important;
  padding:8px 13px!important;
  font-size:20px!important;
  white-space:nowrap!important;
}
body.in-game .ocean-map-panel .galaxy-step-btn{min-width:142px!important}

body.in-game .ocean-map-workspace{
  grid-template-columns:minmax(620px,1fr) minmax(300px,360px)!important;
  gap:14px!important;
  align-items:stretch!important;
  padding:0 16px 16px!important;
}
body.in-game .ocean-chart-scroll{
  width:100%!important;
  min-width:0!important;
  min-height:660px!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
}
body.in-game .ocean-chart-stage{
  width:100%!important;
  min-width:0!important;
  min-height:660px!important;
  height:660px!important;
  overflow:hidden!important;
}
body.in-game .ocean-chart-grid-lines{
  inset:0!important;
  opacity:.13!important;
  background-size:20% 100%,100% 20%!important;
  mask-image:linear-gradient(to bottom,transparent 1%,black 8%,black 92%,transparent 99%)!important;
}
body.in-game .map-island-node{
  left:var(--map-left)!important;
  top:var(--map-top)!important;
  width:108px!important;
  height:112px!important;
  min-height:112px!important;
  padding:5px 6px 6px!important;
  gap:3px!important;
  overflow:visible!important;
  transform:translate(-50%,-50%) translate(var(--map-shift-x,0px),var(--map-shift-y,0px))!important;
  border-radius:20px!important;
  background:rgba(3,28,38,.24)!important;
}
body.in-game .map-island-node:hover,
body.in-game .map-island-node:focus-visible{
  transform:translate(-50%,-50%) translate(var(--map-shift-x,0px),var(--map-shift-y,0px)) scale(1.035)!important;
}
body.in-game .map-island-node.selected{
  transform:translate(-50%,-50%) translate(var(--map-shift-x,0px),var(--map-shift-y,0px))!important;
}
body.in-game .map-node-coordinate{
  width:100%!important;
  height:22px!important;
  line-height:22px!important;
  font-size:20px!important;
  text-align:center!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
body.in-game .map-node-image{
  flex:0 0 56px!important;
  width:56px!important;
  height:56px!important;
  border-radius:50%!important;
}
body.in-game .map-node-name{
  width:100%!important;
  height:22px!important;
  line-height:22px!important;
  font-size:20px!important;
  text-align:center!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.in-game .map-island-node>small{display:none!important}
body.in-game .map-island-node.current:after{
  right:-5px!important;
  top:28px!important;
  min-height:24px!important;
  padding:1px 6px!important;
  font-size:20px!important;
  line-height:22px!important;
}
body.in-game .map-node-debris{
  left:10px!important;
  top:39px!important;
  width:14px!important;
  height:14px!important;
}
body.in-game .map-selection-panel{
  min-height:660px!important;
  height:auto!important;
}
body.in-game .archipelago-legend{
  margin:0 16px 12px!important;
  display:flex!important;
  gap:14px!important;
  flex-wrap:wrap!important;
}
body.in-game .archipelago-legend span{white-space:nowrap!important}

@media(max-width:1260px){
  body.in-game .ocean-map-workspace{grid-template-columns:minmax(580px,1fr) minmax(290px,330px)!important}
  body.in-game .map-island-node{width:102px!important}
}
@media(max-width:1120px){
  body.in-game .ocean-map-workspace{grid-template-columns:1fr!important}
  body.in-game .ocean-chart-scroll{min-height:640px!important}
  body.in-game .ocean-chart-stage{height:640px!important;min-height:640px!important}
  body.in-game .map-selection-panel{min-height:0!important}
}
@media(max-width:760px){
  body.in-game .ocean-map-panel .galaxy-tools{align-items:stretch!important}
  body.in-game .ocean-map-panel .galaxy-coordinate-tools,
  body.in-game .ocean-map-panel .galaxy-step-tools{width:100%!important}
  body.in-game .ocean-map-panel .galaxy-coordinate-tools{display:grid!important;grid-template-columns:1fr 1fr!important}
  body.in-game .ocean-map-panel .galaxy-coordinate-tools label{min-width:0!important}
  body.in-game .ocean-map-panel .galaxy-coordinate-tools input{width:100%!important}
  body.in-game .ocean-map-panel .galaxy-coordinate-tools #galaxyGo{grid-column:1/-1!important}
  body.in-game .ocean-map-panel .galaxy-step-tools{display:grid!important;grid-template-columns:1fr 1fr!important}
  body.in-game .ocean-map-panel .galaxy-step-tools .locate-current-island{grid-column:1/-1!important}
  body.in-game .ocean-map-panel .galaxy-step-btn{min-width:0!important}
  body.in-game .ocean-map-workspace{padding:0 8px 12px!important}
  body.in-game .ocean-chart-scroll{overflow-x:auto!important;overflow-y:hidden!important;min-height:600px!important}
  body.in-game .ocean-chart-stage{width:620px!important;min-width:620px!important;height:600px!important;min-height:600px!important}
  body.in-game .map-island-node{width:100px!important;height:104px!important;min-height:104px!important}
  body.in-game .map-node-image{width:50px!important;height:50px!important;flex-basis:50px!important}
}

/* ============================================================
   v2026.08.26.05 — 海圖左右箭頭與戰報損失總覽
   ============================================================ */
body.in-game .ocean-map-panel .galaxy-tools{
  justify-content:flex-start!important;
  align-items:flex-end!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-tools{
  display:flex!important;
  align-items:flex-end!important;
  gap:12px!important;
  flex-wrap:wrap!important;
  width:100%!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-group{
  display:grid!important;
  gap:5px!important;
  min-width:0!important;
  margin:0!important;
  font-size:20px!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-group>span{color:#86aab2!important}
body.in-game .ocean-map-panel .galaxy-number-stepper{
  display:grid!important;
  grid-template-columns:46px 112px 46px!important;
  align-items:center!important;
  gap:5px!important;
}
body.in-game .ocean-map-panel .galaxy-number-stepper input{
  width:112px!important;
  min-width:0!important;
  min-height:46px!important;
  height:46px!important;
  text-align:center!important;
  font-size:20px!important;
  font-weight:800!important;
  font-variant-numeric:tabular-nums;
}
body.in-game .ocean-map-panel .galaxy-arrow-btn{
  width:46px!important;
  min-width:46px!important;
  height:46px!important;
  min-height:46px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  font-size:26px!important;
  line-height:1!important;
  font-weight:900!important;
}
body.in-game .ocean-map-panel #galaxyGo,
body.in-game .ocean-map-panel .locate-current-island{
  min-height:46px!important;
  height:46px!important;
  padding:7px 14px!important;
  font-size:20px!important;
  white-space:nowrap!important;
}

.battle-summary{
  display:grid!important;
  gap:10px!important;
  padding:10px!important;
}
.battle-outcome-title{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:2px 2px 4px}
.battle-outcome-title>b{font-size:24px;color:#d7e8ee}
.battle-outcome-title>span{font-size:20px;color:#7897a2}
.battle-outcome-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.battle-outcome-side{min-width:0;border:1px solid #264650;background:#06161d;border-radius:8px;overflow:hidden}
.battle-outcome-side>header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 11px;background:#0d2933;border-bottom:1px solid #264650}
.battle-outcome-side>header>div{min-width:0;display:grid;gap:2px}
.battle-outcome-side>header span{font-size:20px;color:#73949f}
.battle-outcome-side>header b{font-size:22px;color:#d1e4e9;overflow-wrap:anywhere}
.battle-outcome-side>header>strong{font-size:22px;color:#9ed8c4;white-space:nowrap;font-variant-numeric:tabular-nums}
.battle-outcome-total{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 11px;border-bottom:1px solid #18363f;background:#071c24}
.battle-outcome-total>span,.battle-outcome-total>small{font-size:20px;color:#7796a0}
.battle-outcome-total>b{font-size:22px;color:#ef9f90}
.battle-outcome-total>small{margin-left:auto;color:#a5b66f}
.battle-result-unit-list{display:grid;gap:0}
.battle-result-unit-row{display:grid;grid-template-columns:54px minmax(160px,1fr) auto;align-items:center;gap:8px;min-width:0;padding:7px 10px;border-bottom:1px solid #15323a;background:#071920}
.battle-result-unit-row:last-child{border-bottom:0}
.battle-result-unit-row.lost{background:linear-gradient(90deg,rgba(83,31,29,.34),#071920 56%)}
.battle-result-unit-row img{width:54px;height:42px;object-fit:contain;background:#030b0e;border-radius:5px}
.battle-result-unit-name{min-width:0;display:grid;gap:2px}
.battle-result-unit-name b{font-size:20px;color:#bfd6dd;white-space:normal;overflow-wrap:anywhere}
.battle-result-unit-name small{font-size:20px;color:#75a98a}
.battle-result-unit-row.lost .battle-result-unit-name small{color:#e29283}
.battle-result-count{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.battle-result-count span,.battle-result-count strong{font-size:20px;white-space:nowrap}
.battle-result-count span{color:#a9c0c7}.battle-result-count strong{color:#587a84}
.battle-resource-loss{padding:9px 10px;border-top:1px solid #294852;background:#091f27}
.battle-resource-loss>b{display:block;margin-bottom:7px;font-size:20px;color:#c8dce2}
.battle-resource-loss-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.battle-resource-loss-grid span{display:grid;gap:2px;padding:6px 7px;border:1px solid #24434c;border-radius:6px;background:#06171d;font-size:20px;color:#78969f}
.battle-resource-loss-grid strong{font-size:20px;color:#e4c3a1;overflow-wrap:anywhere}
.battle-economy-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.battle-economy-card{display:grid;gap:4px;padding:9px 10px;border:1px solid #31504d;border-radius:7px;background:#0a2425}
.battle-economy-card.debris{border-color:#40505f;background:#0b1d28}
.battle-economy-card span{font-size:20px;color:#83a5a8}.battle-economy-card b{font-size:20px;color:#d3e6e8;overflow-wrap:anywhere}
.battle-result-empty{padding:12px;font-size:20px;color:#748f98}

@media(max-width:900px){
  .battle-outcome-grid{grid-template-columns:1fr}
  .battle-resource-loss-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.in-game .ocean-map-panel .galaxy-coordinate-tools{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:end!important}
  body.in-game .ocean-map-panel .galaxy-coordinate-group{width:100%!important}
  body.in-game .ocean-map-panel .galaxy-number-stepper{grid-template-columns:44px minmax(0,1fr) 44px!important;width:100%!important}
  body.in-game .ocean-map-panel .galaxy-number-stepper input{width:100%!important}
  body.in-game .ocean-map-panel #galaxyGo,body.in-game .ocean-map-panel .locate-current-island{width:100%!important}
}
@media(max-width:620px){
  body.in-game .ocean-map-panel .galaxy-coordinate-tools{grid-template-columns:1fr!important}
  .battle-result-unit-row{grid-template-columns:48px minmax(0,1fr);align-items:start}
  .battle-result-unit-row img{width:48px;height:38px}
  .battle-result-count{grid-column:1/-1;justify-content:flex-start;padding-left:56px}
  .battle-economy-summary{grid-template-columns:1fr}
}
.share-report-economy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.share-report-economy>div{padding:10px 12px;border:1px solid #2a4658;background:#0b1c29;border-radius:8px;font-size:20px;line-height:1.55}.share-report-economy b{color:#d8e8ef}
.share-loss-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.share-loss-side{border:1px solid #29475a;background:#091823;border-radius:10px;overflow:hidden;min-width:0}
.share-loss-side>header{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 12px;background:#102637}.share-loss-side>header>div{display:grid;gap:2px;min-width:0}.share-loss-side>header span{font-size:20px;color:#87a0b2}.share-loss-side>header b{font-size:22px;color:#eef7fb;overflow-wrap:anywhere}.share-loss-side>header strong{font-size:22px;color:#9bd2c5;white-space:nowrap}
.share-loss-total{padding:8px 12px;border-top:1px solid #203d4e;border-bottom:1px solid #203d4e;font-size:20px;color:#8ea8b8}.share-loss-total b{color:#ef9f8e}
.share-loss-units{display:grid}.share-loss-unit{display:grid;grid-template-columns:54px minmax(0,1fr);gap:8px;align-items:center;padding:8px 10px;border-bottom:1px solid #1b3443}.share-loss-unit:last-child{border-bottom:0}.share-loss-unit.lost{background:linear-gradient(90deg,rgba(91,40,36,.28),transparent 65%)}.share-loss-unit img{width:54px;height:42px;object-fit:contain}.share-loss-unit b{display:block;font-size:20px}.share-loss-unit small{display:block;font-size:20px;color:#8aa5b4}.share-loss-unit.lost small{color:#e09a8d}
.share-loss-resources{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px;border-top:1px solid #254657;background:#0b202c}.share-loss-resources>b{grid-column:1/-1;font-size:20px;color:#d7e7ed}.share-loss-resources span{font-size:20px;color:#d5b89a;padding:5px 7px;background:#071720;border-radius:5px}
@media(max-width:720px){.share-report-economy,.share-loss-grid{grid-template-columns:1fr}.share-loss-resources{grid-template-columns:1fr}.share-loss-resources>b{grid-column:1}}
body.in-game .ocean-map-panel .galaxy-number-stepper input[type=number]{appearance:textfield;-moz-appearance:textfield}
body.in-game .ocean-map-panel .galaxy-number-stepper input[type=number]::-webkit-inner-spin-button,
body.in-game .ocean-map-panel .galaxy-number-stepper input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* v2026.08.26.08 — 單一「發展與航行」導覽：移除舊次要收合區，降低導覽雜訊。 */
body.in-game .sidebar .nav-cluster-unified{
  display:grid!important;
  grid-template-columns:168px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:stretch!important;
}
body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title{
  display:flex!important;
  align-self:stretch!important;
  justify-content:center!important;
  padding:10px 16px 10px 4px!important;
}
body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title b{font-size:24px!important;line-height:1.22!important}
body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title span{font-size:20px!important;line-height:1.35!important}
body.in-game .sidebar .nav-unified-sections{
  min-width:0!important;
  display:grid!important;
  gap:7px!important;
}
body.in-game .sidebar .nav-section{
  min-width:0!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  padding:0 0 7px!important;
  border-bottom:1px solid rgba(117,190,202,.12)!important;
}
body.in-game .sidebar .nav-section:last-child{padding-bottom:0!important;border-bottom:0!important}
body.in-game .sidebar .nav-section-label{
  min-height:54px!important;
  display:grid!important;
  place-items:center!important;
  padding:6px!important;
  border:1px solid rgba(117,190,202,.16)!important;
  border-radius:10px!important;
  background:rgba(5,28,35,.56)!important;
  color:#87a8b0!important;
  font-size:20px!important;
  font-weight:800!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
body.in-game .sidebar .nav-section .nav-cluster-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(138px,1fr))!important;
  gap:7px!important;
  min-width:0!important;
}
body.in-game .sidebar .nav-cluster-unified .nav{
  min-height:58px!important;
  padding:7px 10px!important;
  gap:8px!important;
  border-radius:11px!important;
}
body.in-game .sidebar .nav-cluster-unified .nav-icon{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  flex-basis:32px!important;
  padding:2px!important;
  border-radius:8px!important;
}
body.in-game .sidebar .nav-cluster-unified .nav-symbol{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  margin-right:0!important;
  font-size:24px!important;
}
body.in-game .sidebar .nav-cluster-unified .nav span{
  min-width:0!important;
  font-size:20px!important;
  line-height:1.2!important;
  font-weight:750!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game .sidebar .nav-cluster-unified .nav-message-badge{
  min-width:26px!important;
  height:26px!important;
  padding:0 6px!important;
  font-size:20px!important;
}
@media(max-width:1180px){
  body.in-game .sidebar .nav-cluster-unified{grid-template-columns:1fr!important;gap:9px!important}
  body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title{
    display:flex!important;flex-direction:row!important;align-items:baseline!important;justify-content:flex-start!important;gap:10px!important;
    padding:0 0 9px!important;border-right:0!important;border-bottom:1px solid var(--ux-line)!important;
  }
  body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title span{margin-top:0!important}
}
@media(max-width:820px){
  body.in-game .sidebar .nav-section{grid-template-columns:1fr!important;gap:6px!important;padding-bottom:9px!important}
  body.in-game .sidebar .nav-section-label{
    min-height:0!important;place-items:start!important;padding:0!important;border:0!important;background:transparent!important;
  }
  body.in-game .sidebar .nav-section .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:500px){
  body.in-game .sidebar .nav-section .nav-cluster-grid{grid-template-columns:1fr!important}
}


/* v2026.08.27.01 — 發展與航行 RWD：手機/小平板隱藏主標題，保留完整功能入口。 */
@media(max-width:900px){
  body.in-game .sidebar .nav-cluster-unified{
    grid-template-columns:1fr!important;
    gap:0!important;
  }
  body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title{
    display:none!important;
  }
  body.in-game .sidebar .nav-unified-sections{
    gap:10px!important;
  }
  body.in-game .sidebar .nav-section{
    grid-template-columns:1fr!important;
    gap:6px!important;
    padding:0 0 10px!important;
  }
  body.in-game .sidebar .nav-section-label{
    min-height:0!important;
    place-items:start!important;
    padding:0 2px 4px!important;
    border:0!important;
    background:transparent!important;
    font-size:20px!important;
  }
  body.in-game .sidebar .nav-section .nav-cluster-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.in-game .sidebar .nav-cluster-unified .nav{
    min-width:0!important;
    min-height:62px!important;
    padding:8px 9px!important;
    justify-content:flex-start!important;
    text-align:left!important;
  }
  body.in-game .sidebar .nav-cluster-unified .nav span{
    min-width:0!important;
    overflow-wrap:anywhere!important;
  }
}
@media(max-width:420px){
  body.in-game.nav-open .sidebar{
    inset:8px!important;
    max-height:calc(100dvh - 16px)!important;
    padding:10px!important;
    border-radius:14px!important;
  }
  body.in-game .sidebar .nav-unified-sections{gap:8px!important}
  body.in-game .sidebar .nav-section{gap:5px!important;padding-bottom:8px!important}
  body.in-game .sidebar .nav-section .nav-cluster-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  body.in-game .sidebar .nav-cluster-unified .nav{
    min-height:60px!important;
    padding:7px 8px!important;
    gap:7px!important;
  }
  body.in-game .sidebar .nav-cluster-unified .nav-icon,
  body.in-game .sidebar .nav-cluster-unified .nav-symbol{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    flex-basis:30px!important;
  }
}
@media(max-width:340px){
  body.in-game .sidebar .nav-section .nav-cluster-grid{grid-template-columns:1fr!important}
}

/* v2026.08.27.02 — 手機／平板可遊玩修正。
   行動版採完整功能抽屜；主畫面本身保持 100% viewport 寬度、資源橫向滑動、島嶼切換精簡，
   避免功能列／資源列／領地列把真正遊戲內容擠出首屏。 */
body.in-game .mobile-nav-head,
body.in-game .nav-backdrop{display:none}

@media(max-width:1100px){
  body.in-game .nav-toggle-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important}
  body.in-game:not(.nav-open) .sidebar{display:none!important}
  body.in-game.nav-open{overflow:hidden!important}
  body.in-game.nav-open .nav-backdrop{
    display:block!important;position:fixed!important;inset:0!important;z-index:94!important;
    width:100vw!important;height:100dvh!important;border:0!important;padding:0!important;margin:0!important;
    background:rgba(0,8,12,.72)!important;backdrop-filter:blur(2px);cursor:pointer!important;
  }
  body.in-game.nav-open .sidebar{
    display:block!important;position:fixed!important;z-index:95!important;
    top:16px!important;bottom:16px!important;left:50%!important;right:auto!important;
    width:min(760px,calc(100vw - 32px))!important;height:auto!important;max-height:none!important;
    transform:translateX(-50%)!important;overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
    padding:0 14px 16px!important;border:1px solid var(--ux-line-strong)!important;border-radius:18px!important;
    background:rgba(4,22,29,.995)!important;box-shadow:0 24px 80px rgba(0,0,0,.78)!important;
  }
  body.in-game .mobile-nav-head{
    position:sticky!important;top:0!important;z-index:4!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
    gap:12px!important;margin:0 -14px 12px!important;padding:12px 14px!important;
    border-bottom:1px solid rgba(117,190,202,.28)!important;background:linear-gradient(180deg,#0b303a,#071f27)!important;
  }
  body.in-game .mobile-nav-head>div{min-width:0!important;display:grid!important;gap:2px!important}
  body.in-game .mobile-nav-head b{font-size:24px!important;line-height:1.2!important;color:#e8f6f8!important}
  body.in-game .mobile-nav-head span{font-size:20px!important;line-height:1.25!important;color:#86a5ad!important}
  body.in-game .mobile-nav-close{
    width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;padding:0!important;
    display:grid!important;place-items:center!important;border:1px solid rgba(117,205,209,.48)!important;border-radius:12px!important;
    background:linear-gradient(180deg,#174653,#0d303a)!important;color:#f0fbfc!important;font-size:30px!important;line-height:1!important;
  }
  body.in-game .sidebar .nav-cluster-unified{display:block!important;width:100%!important;padding:0!important}
  body.in-game .sidebar .nav-cluster-unified>.nav-cluster-title{display:none!important}
  body.in-game .sidebar .nav-unified-sections{display:grid!important;gap:12px!important;width:100%!important}
  body.in-game .sidebar .nav-section{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;padding:0 0 12px!important}
  body.in-game .sidebar .nav-section-label{
    min-height:0!important;padding:2px 1px 5px!important;border:0!important;background:transparent!important;
    place-items:start!important;color:#8fb2ba!important;font-size:20px!important;font-weight:900!important;
  }
  body.in-game .sidebar .nav-section .nav-cluster-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.in-game .sidebar .nav-cluster-unified .nav{
    min-width:0!important;min-height:66px!important;padding:9px 10px!important;display:flex!important;flex-direction:row!important;
    align-items:center!important;justify-content:flex-start!important;gap:9px!important;text-align:left!important;white-space:normal!important;
  }
  body.in-game .sidebar .nav-cluster-unified .nav-icon,
  body.in-game .sidebar .nav-cluster-unified .nav-symbol{
    width:34px!important;height:34px!important;min-width:34px!important;flex:0 0 34px!important;margin:0!important;
  }
  body.in-game .sidebar .nav-cluster-unified .nav span{font-size:20px!important;line-height:1.25!important;overflow-wrap:anywhere!important}
}

@media(max-width:900px){
  html,body,body.in-game{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
  body.in-game{height:auto!important;min-height:100dvh!important;overflow-y:auto!important}
  body.in-game #game{display:block!important;width:100%!important;max-width:100vw!important;min-width:0!important}
  body.in-game .page-frame{
    width:100%!important;max-width:100vw!important;min-width:0!important;height:auto!important;min-height:100dvh!important;
    margin:0!important;overflow:visible!important;display:block!important;border-left:0!important;border-right:0!important;
  }
  body.in-game .topbar{
    position:sticky!important;top:0!important;z-index:70!important;width:100%!important;max-width:100vw!important;height:auto!important;min-height:0!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;
    grid-template-areas:"brand account" "resources resources"!important;gap:6px 8px!important;padding:6px 8px 7px!important;overflow:hidden!important;
  }
  body.in-game .brand-area{grid-area:brand!important;display:flex!important;min-width:0!important;padding:0!important;align-items:center!important}
  body.in-game .game-brand{min-width:0!important;gap:7px!important}
  body.in-game .game-brand .brand-emblem{width:42px!important;height:42px!important;min-width:42px!important;flex:0 0 42px!important}
  body.in-game .game-brand b{display:none!important}
  body.in-game .game-brand small{display:block!important;margin:0!important;color:#dceef2!important;font-size:20px!important;font-weight:850!important;white-space:nowrap!important}
  body.in-game .account-area{grid-area:account!important;display:flex!important;min-width:0!important;padding:0!important;align-items:center!important;justify-content:flex-end!important}
  body.in-game .server-line,body.in-game .account-area #playerName{display:none!important}
  body.in-game .account-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;min-width:0!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{
    min-height:44px!important;height:44px!important;padding:5px 8px!important;font-size:20px!important;line-height:1!important;white-space:nowrap!important;
  }
  body.in-game .resource-bar{
    grid-area:resources!important;display:flex!important;grid-template-columns:none!important;width:100%!important;min-width:0!important;
    gap:6px!important;padding:1px 0 2px!important;overflow-x:auto!important;overflow-y:hidden!important;
    scroll-snap-type:x proximity!important;overscroll-behavior-x:contain!important;-webkit-overflow-scrolling:touch!important;
  }
  body.in-game .resource-cell{
    flex:0 0 146px!important;width:146px!important;min-width:146px!important;min-height:62px!important;height:62px!important;
    grid-template-columns:38px minmax(0,1fr)!important;gap:7px!important;padding:7px 8px!important;border-radius:11px!important;scroll-snap-align:start!important;
  }
  body.in-game .resource-cell img{width:38px!important;height:38px!important;min-width:38px!important}
  body.in-game .resource-cell>div{min-width:0!important;display:block!important}
  body.in-game .resource-cell span,body.in-game .resource-cell b,body.in-game .resource-cell small{font-size:20px!important;line-height:1.12!important}
  body.in-game .resource-cell b{display:block!important;text-align:left!important;margin-top:2px!important;white-space:nowrap!important;overflow:hidden!important}
  body.in-game .resource-cell small{display:block!important;margin-top:2px!important;white-space:nowrap!important}

  body.in-game .game-grid{display:block!important;width:100%!important;max-width:100vw!important;min-width:0!important;height:auto!important;overflow:visible!important}

  body.in-game .rightbar,body.in-game .rightbar.single-territory{
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(120px,38%)!important;align-items:center!important;gap:8px!important;
    width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;padding:7px 8px!important;overflow:hidden!important;
    border-bottom:1px solid var(--ux-line)!important;background:rgba(4,22,29,.97)!important;
  }
  body.in-game .rightbar .island-card{
    display:grid!important;min-width:0!important;min-height:72px!important;height:auto!important;padding:7px 8px!important;
    grid-template-columns:54px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:8px!important;align-content:center!important;
  }
  body.in-game .rightbar .island-title,body.in-game .rightbar .island-meta{display:none!important}
  body.in-game .rightbar .island-thumb{grid-column:1!important;grid-row:1/3!important;width:54px!important;height:54px!important;border-radius:9px!important}
  body.in-game .rightbar .island-card strong{grid-column:2!important;grid-row:1!important;font-size:20px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
  body.in-game .rightbar .island-card .coords{grid-column:2!important;grid-row:2!important;font-size:20px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
  body.in-game .rightbar .island-list,body.in-game .rightbar .island-list-title,body.in-game .territory-discover{display:none!important}
  body.in-game .rightbar #islandSelect.hidden{
    display:block!important;width:100%!important;min-width:0!important;max-width:none!important;min-height:48px!important;height:48px!important;
    padding:5px 7px!important;font-size:20px!important;border-radius:9px!important;
  }

  body.in-game #content{
    display:block!important;width:100%!important;max-width:100vw!important;min-width:0!important;min-height:calc(100dvh - 190px)!important;
    margin:0!important;padding:9px 7px calc(72px + env(safe-area-inset-bottom))!important;overflow:visible!important;
  }
  body.in-game #content>*{width:100%!important;max-width:100%!important;min-width:0!important;margin-left:0!important;margin-right:0!important}

  body.in-game.nav-open .sidebar{
    top:max(6px,env(safe-area-inset-top))!important;right:6px!important;bottom:max(6px,env(safe-area-inset-bottom))!important;left:6px!important;
    width:auto!important;max-width:none!important;height:auto!important;transform:none!important;border-radius:14px!important;padding:0 10px 12px!important;
  }
  body.in-game .mobile-nav-head{margin:0 -10px 10px!important;padding:10px 10px!important}
  body.in-game .mobile-nav-close{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}
  body.in-game .event-drawer-toggle{right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;min-height:50px!important}
}

@media(max-width:520px){
  body.in-game .rightbar,body.in-game .rightbar.single-territory{grid-template-columns:minmax(0,1fr) 132px!important;gap:6px!important;padding:6px!important}
  body.in-game .rightbar .island-card{grid-template-columns:48px minmax(0,1fr)!important;min-height:66px!important;padding:6px!important;column-gap:7px!important}
  body.in-game .rightbar .island-thumb{width:48px!important;height:48px!important}
  body.in-game .rightbar #islandSelect.hidden{height:46px!important;min-height:46px!important;padding:4px 5px!important}
  body.in-game .sidebar .nav-section .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game .sidebar .nav-cluster-unified .nav{min-height:62px!important;padding:7px 8px!important;gap:7px!important}
  body.in-game .sidebar .nav-cluster-unified .nav-icon,
  body.in-game .sidebar .nav-cluster-unified .nav-symbol{width:30px!important;height:30px!important;min-width:30px!important;flex-basis:30px!important}
}

@media(max-width:350px){
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{padding-left:6px!important;padding-right:6px!important}
  body.in-game .rightbar,body.in-game .rightbar.single-territory{grid-template-columns:1fr!important}
  body.in-game .rightbar #islandSelect.hidden{width:100%!important}
  body.in-game .sidebar .nav-section .nav-cluster-grid{grid-template-columns:1fr!important}
}

/* v2026.08.27.02 — tablet landscape density correction + mobile territory ordering. */
@media(max-width:900px){
  body.in-game .game-grid{
    display:grid!important;grid-template-columns:1fr!important;grid-template-areas:"territory" "content"!important;
    grid-template-rows:auto auto!important;
  }
  body.in-game .rightbar,body.in-game .rightbar.single-territory{grid-area:territory!important}
  body.in-game #content{grid-area:content!important}
}

@media(max-width:1100px) and (min-width:901px){
  body.in-game{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body.in-game #game,body.in-game .page-frame{width:100%!important;max-width:100vw!important;min-width:0!important}
  body.in-game .page-frame{height:auto!important;min-height:100dvh!important;overflow:visible!important;display:block!important}
  body.in-game .topbar{
    position:sticky!important;top:0!important;z-index:70!important;height:auto!important;min-height:0!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"brand account" "resources resources"!important;
    grid-template-rows:auto auto!important;gap:7px 12px!important;padding:8px 12px 9px!important;overflow:hidden!important;
  }
  body.in-game .brand-area{grid-area:brand!important;padding:0!important}
  body.in-game .game-brand .brand-emblem{width:48px!important;height:48px!important;flex-basis:48px!important}
  body.in-game .game-brand b{font-size:24px!important}
  body.in-game .game-brand small{font-size:20px!important;margin-top:1px!important}
  body.in-game .account-area{grid-area:account!important;padding:0!important;justify-content:center!important}
  body.in-game .server-line{display:none!important}
  body.in-game .account-actions{flex-wrap:nowrap!important;gap:7px!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{min-height:48px!important;height:48px!important;font-size:20px!important;padding:6px 10px!important}
  body.in-game .resource-bar{
    grid-area:resources!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:7px!important;padding:0!important;overflow:visible!important;
  }
  body.in-game .resource-cell{
    min-width:0!important;width:auto!important;min-height:62px!important;height:62px!important;
    grid-template-columns:36px minmax(0,1fr)!important;gap:7px!important;padding:7px 8px!important;border-radius:11px!important;
  }
  body.in-game .resource-cell img{width:36px!important;height:36px!important;min-width:36px!important}
  body.in-game .resource-cell>div{display:block!important;min-width:0!important}
  body.in-game .resource-cell span,body.in-game .resource-cell b,body.in-game .resource-cell small{font-size:20px!important;line-height:1.12!important}
  body.in-game .resource-cell b{display:block!important;text-align:left!important;margin-top:2px!important;white-space:nowrap!important;overflow:hidden!important}
  body.in-game .resource-cell small{display:block!important;margin-top:2px!important;white-space:nowrap!important}

  body.in-game .game-grid{
    display:grid!important;grid-template-columns:1fr!important;grid-template-areas:"territory" "content"!important;
    grid-template-rows:auto auto!important;width:100%!important;height:auto!important;overflow:visible!important;
  }
  body.in-game .rightbar,body.in-game .rightbar.single-territory{
    grid-area:territory!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,36%)!important;
    align-items:center!important;gap:10px!important;width:100%!important;min-height:0!important;height:auto!important;
    padding:8px 12px!important;overflow:hidden!important;
  }
  body.in-game .rightbar .island-card{
    min-height:78px!important;height:auto!important;padding:8px 10px!important;grid-template-columns:60px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;column-gap:10px!important;align-content:center!important;
  }
  body.in-game .rightbar .island-title,body.in-game .rightbar .island-meta{display:none!important}
  body.in-game .rightbar .island-thumb{grid-column:1!important;grid-row:1/3!important;width:60px!important;height:60px!important}
  body.in-game .rightbar .island-card strong{grid-column:2!important;grid-row:1!important;font-size:22px!important;line-height:1.2!important}
  body.in-game .rightbar .island-card .coords{grid-column:2!important;grid-row:2!important;font-size:20px!important;line-height:1.2!important}
  body.in-game .rightbar .island-list,body.in-game .rightbar .island-list-title,body.in-game .territory-discover{display:none!important}
  body.in-game .rightbar #islandSelect.hidden{display:block!important;width:100%!important;min-height:50px!important;height:50px!important;font-size:20px!important}
  body.in-game #content{grid-area:content!important;display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:12px!important;overflow:visible!important}
}


/* ========================================================================
   v2026.08.27.03 — 手機／平板全頁面 UX 稽核
   - 行動版玩家可見文字 14px 為絕對下限；一般正文／按鈕以 16px 為主。
   - 主要觸控控制至少 44px。
   - 關閉抽屜／Modal 不可攔截點擊。
   - 大型設施場景在手機改成真正可點擊的卡片網格。
   ======================================================================== */
body.in-game .nav-backdrop,
body.in-game .event-drawer,
body.in-game .help-modal.hidden,
body.in-game .story-modal.hidden,
body.in-game .battle-replay-modal.hidden{pointer-events:none!important}
body.in-game.nav-open .nav-backdrop,
body.in-game .event-drawer.open,
body.in-game .help-modal:not(.hidden),
body.in-game .story-modal:not(.hidden),
body.in-game .battle-replay-modal:not(.hidden){pointer-events:auto!important}

@media(max-width:1100px){
  body.in-game .event-drawer-toggle.event-toggle-inline{
    position:static!important;inset:auto!important;z-index:auto!important;display:inline-flex!important;order:2!important;
    min-width:auto!important;width:auto!important;height:44px!important;min-height:44px!important;margin:0!important;padding:5px 8px!important;
    gap:5px!important;border-radius:9px!important;box-shadow:none!important;font-size:16px!important;
  }
  body.in-game .event-drawer-toggle.event-toggle-inline .event-drawer-icon{width:24px!important;height:24px!important;min-width:24px!important;font-size:15px!important}
  body.in-game .event-drawer-toggle.event-toggle-inline b{min-width:22px!important;height:22px!important;padding:0 5px!important;font-size:14px!important}
}

@media(max-width:900px){
  body.in-game{font-size:16px!important;-webkit-text-size-adjust:100%!important}
  body.in-game p,body.in-game span,body.in-game b,body.in-game strong,body.in-game small,body.in-game em,
  body.in-game label,body.in-game a,body.in-game button,body.in-game td,body.in-game th,
  body.in-game input,body.in-game select,body.in-game textarea,body.in-game .muted,body.in-game .panel-subline,
  body.in-game .fleet-hint,body.in-game .tool-stat,body.in-game .message-retention,body.in-game .coords,
  body.in-game .item-level,body.in-game .item-info,body.in-game .queue,body.in-game .empty-state{font-size:16px!important;line-height:1.42!important}
  body.in-game small,body.in-game .muted,body.in-game .panel-subline,body.in-game .coords,
  body.in-game .item-level,body.in-game .item-info,body.in-game .queue small,body.in-game .resource-cell small{font-size:14px!important;line-height:1.35!important}
  body.in-game h1{font-size:25px!important}body.in-game h2{font-size:22px!important}body.in-game h3{font-size:19px!important}body.in-game h4{font-size:17px!important}
  body.in-game .panel>h2,body.in-game .panel>h3{font-size:20px!important;padding:10px 11px!important}

  body.in-game button,body.in-game input,body.in-game select{min-height:44px!important}
  body.in-game textarea{min-height:92px!important}
  body.in-game .big-action{min-height:48px!important;font-size:17px!important}
  body.in-game .soft-btn,body.in-game .gal-act,body.in-game .info-btn,body.in-game .mini-btn{min-height:44px!important;font-size:16px!important}
  body.in-game #content{padding:8px 7px calc(66px + env(safe-area-inset-bottom))!important}
  body.in-game #content>*+*{margin-top:9px!important}
  body.in-game .panel{border-radius:11px!important}

  /* 頂部：手機優先保留功能與事件入口，改名／登出維持可點但減少高度。 */
  body.in-game .topbar{gap:5px 7px!important;padding:5px 7px 6px!important}
  body.in-game .game-brand .brand-emblem{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important}
  body.in-game .game-brand small{font-size:17px!important}
  body.in-game .account-actions{gap:4px!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{height:44px!important;min-height:44px!important;padding:5px 7px!important;font-size:16px!important}
  body.in-game .resource-cell{flex-basis:126px!important;width:126px!important;min-width:126px!important;height:54px!important;min-height:54px!important;grid-template-columns:32px minmax(0,1fr)!important;padding:5px 7px!important}
  body.in-game .resource-cell img{width:32px!important;height:32px!important;min-width:32px!important}
  body.in-game .resource-cell span,body.in-game .resource-cell b{font-size:15px!important;line-height:1.15!important}
  body.in-game .resource-cell small{font-size:14px!important}

  body.in-game .rightbar,body.in-game .rightbar.single-territory{padding:5px 7px!important;gap:6px!important}
  body.in-game .rightbar .island-card{min-height:64px!important;grid-template-columns:46px minmax(0,1fr)!important;padding:5px 6px!important;column-gap:7px!important}
  body.in-game .rightbar .island-thumb{width:46px!important;height:46px!important}
  body.in-game .rightbar .island-card strong{font-size:17px!important}
  body.in-game .rightbar .island-card .coords{font-size:14px!important}
  body.in-game .rightbar #islandSelect.hidden{height:44px!important;min-height:44px!important;font-size:15px!important}

  /* 所有標準工具列與表單在手機可自然換行。 */
  body.in-game .row,body.in-game .fleet-target,body.in-game .fleet-cargo,body.in-game .galaxy-tools,
  body.in-game .market-form,body.in-game .admin-form{gap:8px!important;padding:8px!important}
  body.in-game .scene-panel-head,body.in-game .resource-overview-title,body.in-game .production-panel-head,
  body.in-game .overview-section-head,body.in-game .battle-library-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important;padding:10px!important}
  body.in-game .scene-island-chip,body.in-game .shipyard-summary-chip,body.in-game .defense-summary-chip{align-self:stretch!important;max-width:100%!important}
  body.in-game .facility-category-tabs,body.in-game .shipyard-category-tabs,body.in-game .research-branch-tabs,
  body.in-game .message-tabs,body.in-game .message-hub-nav{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:7px!important;scrollbar-width:thin!important;-webkit-overflow-scrolling:touch!important}
  body.in-game .facility-category-tabs button,body.in-game .shipyard-category-tabs button,body.in-game .research-branch-tabs button,
  body.in-game .message-tabs button,body.in-game .message-hub-nav button{flex:0 0 auto!important;min-width:max-content!important;min-height:44px!important;font-size:15px!important;padding:6px 10px!important}

  /* 大型桌機場景在手機改成卡片網格，不需要精準點小島位。 */
  body.in-game .facility-scene-scroll,body.in-game .shipyard-scene-scroll,body.in-game .defense-scene-scroll{overflow:visible!important;padding:8px!important}
  body.in-game .facility-island-stage,body.in-game .shipyard-harbor-stage,body.in-game .defense-sea-stage{
    width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;
  }
  body.in-game .facility-island-stage>*:not(.facility-spot),
  body.in-game .shipyard-harbor-stage>*:not(.shipyard-berth),
  body.in-game .defense-sea-stage>*:not(.defense-emplacement){display:none!important}
  body.in-game .facility-spot,body.in-game .shipyard-berth,body.in-game .defense-emplacement{
    position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;
    width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:126px!important;margin:0!important;padding:8px!important;
    display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;grid-template-rows:auto!important;gap:7px!important;align-items:center!important;
    border:1px solid rgba(112,190,199,.3)!important;border-radius:11px!important;background:linear-gradient(160deg,rgba(8,35,44,.95),rgba(4,23,30,.98))!important;
  }
  body.in-game .facility-art-wrap,body.in-game .shipyard-ship-art-wrap,body.in-game .defense-art-wrap,
  body.in-game .empty-berth-mark,body.in-game .mystery-berth-mark{
    position:relative!important;inset:auto!important;left:auto!important;top:auto!important;transform:none!important;width:54px!important;height:54px!important;grid-column:1!important;grid-row:1!important;
  }
  body.in-game .facility-art-wrap img,body.in-game .shipyard-ship-art-wrap img,body.in-game .defense-art-wrap img{width:54px!important;height:54px!important;object-fit:contain!important}
  body.in-game .facility-spot-copy,body.in-game .shipyard-berth-copy,body.in-game .defense-emplacement-copy{
    position:relative!important;inset:auto!important;width:auto!important;height:auto!important;min-height:0!important;grid-column:2!important;grid-row:1!important;
    padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;text-align:left!important;display:grid!important;gap:2px!important;align-content:center!important;
  }
  body.in-game .facility-spot-copy b,body.in-game .shipyard-berth-copy b,body.in-game .defense-emplacement-copy b{font-size:16px!important}
  body.in-game .facility-spot-copy em,body.in-game .shipyard-berth-copy em,body.in-game .defense-emplacement-copy em{font-size:15px!important}
  body.in-game .facility-spot-copy small,body.in-game .shipyard-berth-copy small,body.in-game .defense-emplacement-copy small{font-size:14px!important}

  /* 海圖：只讓地圖本身捲動，詳情放下方。 */
  body.in-game .galaxy-map-layout{grid-template-columns:1fr!important;gap:8px!important}
  body.in-game .galaxy-map-main,body.in-game .galaxy-map-stage,body.in-game .galaxy-map-scroll{max-width:100%!important;min-width:0!important}
  body.in-game .galaxy-map-scroll{overflow:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x pan-y!important}
  body.in-game .galaxy-selection{position:relative!important;inset:auto!important;width:100%!important;max-width:100%!important}

  /* Modal / 浮層：內容可捲、底部操作永遠可抵達。 */
  body.in-game .help-modal-card{width:calc(100vw - 10px)!important;max-width:calc(100vw - 10px)!important;height:calc(100dvh - 10px)!important;max-height:calc(100dvh - 10px)!important}
  body.in-game .help-modal-head{padding:8px 9px!important;gap:7px!important}
  body.in-game .help-modal-head h2{font-size:20px!important}
  body.in-game .ui-close-button,body.in-game .mobile-nav-close{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
  body.in-game .help-modal-body{padding:9px!important;scroll-padding-bottom:76px!important}
  body.in-game #helpModalBody .scene-operation-shell .catalog-actions{bottom:0!important;padding:8px!important}

  body.in-game .table{font-size:15px!important;min-width:680px!important}
  body.in-game .table th,body.in-game .table td{font-size:15px!important;padding:8px!important}
  body.in-game .governance-animal-table,body.in-game .governance-market-table{min-width:820px!important}

  /* 訊息／好友／聯盟：操作列允許換行，避免按鈕跑出卡片。 */
  body.in-game .message-actions,body.in-game .friend-request-actions,body.in-game .battle-library-actions,
  body.in-game .galaxy-player-social,body.in-game .gov-row-actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;min-width:0!important}
  body.in-game .message-actions button,body.in-game .friend-request-actions button,body.in-game .battle-library-actions button,
  body.in-game .galaxy-player-social button,body.in-game .gov-row-actions button{min-height:44px!important;font-size:15px!important}
}

@media(max-width:520px){
  body.in-game .facility-island-stage,body.in-game .shipyard-harbor-stage,body.in-game .defense-sea-stage{grid-template-columns:1fr!important}
  body.in-game .facility-spot,body.in-game .shipyard-berth,body.in-game .defense-emplacement{min-height:96px!important;grid-template-columns:58px minmax(0,1fr)!important}
  body.in-game .facility-art-wrap,body.in-game .shipyard-ship-art-wrap,body.in-game .defense-art-wrap,
  body.in-game .empty-berth-mark,body.in-game .mystery-berth-mark,
  body.in-game .facility-art-wrap img,body.in-game .shipyard-ship-art-wrap img,body.in-game .defense-art-wrap img{width:58px!important;height:58px!important}
  body.in-game .overview-action-grid{grid-template-columns:1fr!important}
  body.in-game .overview-action{min-height:76px!important;padding:8px!important}
  body.in-game .account-actions .account-rename-btn{display:none!important}
}

@media(max-width:380px){
  body.in-game .game-brand small{font-size:16px!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn,body.in-game .event-drawer-toggle.event-toggle-inline{padding-left:6px!important;padding-right:6px!important;font-size:15px!important}
  body.in-game .resource-cell{flex-basis:116px!important;width:116px!important;min-width:116px!important}
}


/* ========================================================================
   v2026.08.27.06 — 手機／平板設施場景實機修正
   - 真正使用 app.js 的 facility-art-wrap；舊 mobile CSS 誤寫 facility-spot-art，
     導致設施圖仍套桌機 absolute 尺寸，文字卡也保留 translateX(-50%) 而被裁切。
   - <=1100px 的設施／港灣整備／海防都改成觸控卡片，不再要求平板精準點場景。
   ======================================================================== */
@media(max-width:1100px){
  body.in-game .facility-scene-scroll,
  body.in-game .shipyard-scene-scroll,
  body.in-game .defense-scene-scroll{
    overflow:visible!important;
    width:100%!important;
    padding:8px!important;
  }

  body.in-game .facility-island-stage,
  body.in-game .shipyard-harbor-stage,
  body.in-game .defense-sea-stage{
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;
    gap:10px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  body.in-game .facility-island-stage>*:not(.facility-spot),
  body.in-game .shipyard-harbor-stage>*:not(.shipyard-berth),
  body.in-game .defense-sea-stage>*:not(.defense-emplacement){display:none!important}

  body.in-game .facility-spot,
  body.in-game .shipyard-berth,
  body.in-game .defense-emplacement{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:116px!important;
    margin:0!important;
    padding:10px 11px!important;
    display:grid!important;
    grid-template-columns:82px minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    gap:10px!important;
    align-items:center!important;
    overflow:hidden!important;
    text-align:left!important;
    touch-action:manipulation!important;
    border:1px solid rgba(112,190,199,.34)!important;
    border-radius:12px!important;
    background:linear-gradient(160deg,rgba(8,35,44,.96),rgba(4,23,30,.99))!important;
    box-shadow:0 5px 15px rgba(0,0,0,.18)!important;
  }
  body.in-game .facility-spot:hover,
  body.in-game .facility-spot:focus-visible,
  body.in-game .shipyard-berth:hover,
  body.in-game .shipyard-berth:focus-visible,
  body.in-game .defense-emplacement:hover,
  body.in-game .defense-emplacement:focus-visible{
    transform:none!important;
    filter:none!important;
    outline:2px solid rgba(90,224,207,.35)!important;
    outline-offset:-2px!important;
  }

  /* 手機／平板卡片不顯示桌機場景裝飾。 */
  body.in-game .facility-pad,
  body.in-game .shipyard-wake,
  body.in-game .defense-water-ring{display:none!important}

  /* app.js 正式 class 是 facility-art-wrap，不是 facility-spot-art。 */
  body.in-game .facility-art-wrap,
  body.in-game .shipyard-ship-art-wrap,
  body.in-game .defense-art-wrap,
  body.in-game .empty-berth-mark,
  body.in-game .mystery-berth-mark{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
    width:82px!important;
    height:78px!important;
    min-width:82px!important;
    min-height:78px!important;
    grid-column:1!important;
    grid-row:1!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
    border-radius:10px!important;
    background:rgba(7,37,44,.46)!important;
  }
  body.in-game .facility-art-wrap img,
  body.in-game .shipyard-ship-art-wrap img,
  body.in-game .defense-art-wrap img{
    width:78px!important;
    height:72px!important;
    max-width:78px!important;
    max-height:72px!important;
    object-fit:contain!important;
    display:block!important;
    transform:none!important;
    filter:drop-shadow(0 4px 5px rgba(0,0,0,.34))!important;
  }

  body.in-game .facility-spot-copy,
  body.in-game .shipyard-berth-copy,
  body.in-game .defense-emplacement-copy{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    grid-column:2!important;
    grid-row:1!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    text-align:left!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"name level" "metric metric"!important;
    align-items:start!important;
    align-content:center!important;
    gap:5px 8px!important;
  }
  body.in-game .facility-spot-copy b,
  body.in-game .shipyard-berth-copy b,
  body.in-game .defense-emplacement-copy b{
    grid-area:name!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    font-size:17px!important;
    line-height:1.25!important;
    color:#ecfbf8!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    text-align:left!important;
  }
  body.in-game .facility-spot-copy em,
  body.in-game .shipyard-berth-copy em,
  body.in-game .defense-emplacement-copy em{
    grid-area:level!important;
    margin:1px 0 0!important;
    font-size:15px!important;
    line-height:1.2!important;
    font-style:normal!important;
    color:#83dfc8!important;
    white-space:nowrap!important;
    text-align:right!important;
  }
  body.in-game .facility-spot-copy small,
  body.in-game .shipyard-berth-copy small,
  body.in-game .defense-emplacement-copy small{
    grid-area:metric!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    font-size:14px!important;
    line-height:1.35!important;
    color:#a9c4c9!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    text-align:left!important;
  }

  body.in-game .facility-spot.unbuilt .facility-art-wrap{opacity:.44!important;filter:grayscale(.58)!important}
  body.in-game .facility-spot.unbuilt .facility-spot-copy{opacity:1!important}
}

@media(max-width:520px){
  body.in-game .facility-island-stage,
  body.in-game .shipyard-harbor-stage,
  body.in-game .defense-sea-stage{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  body.in-game .facility-spot,
  body.in-game .shipyard-berth,
  body.in-game .defense-emplacement{
    min-height:108px!important;
    grid-template-columns:76px minmax(0,1fr)!important;
    padding:9px 10px!important;
    gap:9px!important;
  }
  body.in-game .facility-art-wrap,
  body.in-game .shipyard-ship-art-wrap,
  body.in-game .defense-art-wrap,
  body.in-game .empty-berth-mark,
  body.in-game .mystery-berth-mark{
    width:76px!important;height:72px!important;min-width:76px!important;min-height:72px!important;
  }
  body.in-game .facility-art-wrap img,
  body.in-game .shipyard-ship-art-wrap img,
  body.in-game .defense-art-wrap img{width:72px!important;height:68px!important;max-width:72px!important;max-height:68px!important}
}

/* v2026.08.27.07：港灣整備場內未部署但已知的海洋單位也顯示主體預覽；只有尚未發現的遠洋限定單位維持「?」。 */
body.in-game .shipyard-ship-art-wrap.preview{opacity:.42!important;filter:saturate(.38) brightness(.92)!important}
body.in-game .shipyard-berth.empty:hover .shipyard-ship-art-wrap.preview,
body.in-game .shipyard-berth.empty:focus-visible .shipyard-ship-art-wrap.preview{opacity:.72!important;filter:saturate(.68) brightness(1.04)!important}


/* ========================================================================
   v2026.08.27.12 — 海洋單位統一視覺尺寸規則
   - 圖片畫布保持一致，實際體型由 app.js 的 UNIT_VISUAL_SIZE_TIER 統一控制。
   - 港灣整備場差距較明顯；戰鬥場景差距稍收斂，避免大型單位擠壞戰場。
   - 純視覺規則，不影響任何遊戲數值。
   ======================================================================== */
body.in-game .shipyard-ship-art{
  transform:scale(var(--unit-harbor-scale,1))!important;
  transform-origin:center center!important;
}
body.in-game .unit-visual-thumb,
body.in-game .battle-unit-thumb{
  transform:scale(var(--unit-thumb-scale,1))!important;
  transform-origin:center center!important;
}
/* 桌機港灣預留足夠主體空間，超大型鯨類可比海豚明顯更大但不壓住文字牌。 */
@media(min-width:1101px){
  body.in-game .shipyard-ship-art-wrap{overflow:visible!important}
}
/* 平板／手機的單位圖片欄位獨立加寬，讓大型魚類放大後仍不會蓋到文字。 */
@media(max-width:1100px){
  body.in-game .shipyard-berth{grid-template-columns:104px minmax(0,1fr)!important;min-height:120px!important}
  body.in-game .shipyard-ship-art-wrap{width:98px!important;height:82px!important;min-width:98px!important;min-height:82px!important;overflow:visible!important;background:rgba(7,37,44,.32)!important}
  body.in-game .shipyard-ship-art-wrap img.shipyard-ship-art{width:78px!important;height:72px!important;max-width:78px!important;max-height:72px!important}
}
@media(max-width:520px){
  body.in-game .shipyard-berth{grid-template-columns:96px minmax(0,1fr)!important;min-height:112px!important}
  body.in-game .shipyard-ship-art-wrap{width:90px!important;height:76px!important;min-width:90px!important;min-height:76px!important}
  body.in-game .shipyard-ship-art-wrap img.shipyard-ship-art{width:72px!important;height:66px!important;max-width:72px!important;max-height:66px!important}
}
\n\n/* ========================================================================
   v2026.08.27.13 — 設施正式主圖同步 + 動能海面場景
   - 四個設施分類統一直接顯示 building_* 正式主圖，不再使用舊 scene_building_*。
   - 動能分類現行三座發電設施全部置於海上背景；桌機為海面地圖，手機／平板則以海面色調卡片呈現。
   ======================================================================== */
body.in-game .facility-island-stage.energy-sea-stage{
  border:1px solid rgba(67,151,176,.78)!important;
  background:
    radial-gradient(ellipse at 18% 20%,rgba(108,221,221,.18),transparent 29%),
    radial-gradient(ellipse at 80% 72%,rgba(39,142,176,.22),transparent 34%),
    linear-gradient(180deg,#1d8098 0%,#116e8a 28%,#0b5b78 58%,#07455f 100%)!important;
  box-shadow:inset 0 0 95px rgba(0,24,38,.46),0 18px 42px rgba(0,0,0,.22)!important;
}
body.in-game .facility-island-stage.energy-sea-stage:before{
  content:"";position:absolute;z-index:0;inset:0;pointer-events:none;
  background:
    repeating-radial-gradient(ellipse at 50% 36%,transparent 0 52px,rgba(189,247,242,.08) 54px 57px,transparent 60px 104px),
    linear-gradient(180deg,rgba(172,236,231,.08),transparent 35%,rgba(0,23,39,.12));
}
body.in-game .facility-sea-sheen{position:absolute;z-index:1;inset:0;pointer-events:none;background:linear-gradient(102deg,transparent 0 35%,rgba(210,249,245,.06) 48%,rgba(234,255,250,.10) 51%,rgba(210,249,245,.05) 55%,transparent 68%)}
body.in-game .energy-sea-stage .facility-pad{background:radial-gradient(ellipse,rgba(1,24,34,.44),rgba(5,58,72,.16) 66%,transparent 73%)}
body.in-game .energy-sea-stage .facility-spot-copy{border-color:rgba(99,196,203,.58)!important;background:linear-gradient(160deg,rgba(2,33,45,.90),rgba(2,55,66,.86))!important}
body.in-game .energy-sea-stage .facility-art-wrap img{filter:drop-shadow(0 9px 8px rgba(0,22,34,.48)) saturate(1.06)!important}

@media(max-width:1100px){
  /* 手機／平板使用卡片模式時，背景場景本身被收合，但動能卡片仍維持海面辨識色調。 */
  body.in-game .facility-category-energy .facility-spot{
    border-color:rgba(75,170,190,.48)!important;
    background:linear-gradient(160deg,rgba(5,52,68,.97),rgba(3,32,46,.99))!important;
  }
  body.in-game .facility-category-energy .facility-art-wrap{background:linear-gradient(180deg,rgba(25,116,139,.34),rgba(4,53,70,.50))!important}
}

/* ========================================================================
   v2026.08.28.02 — 謎霧島（獨立於既有「迷霧海」）
   ======================================================================== */
body.in-game .mystery-occupation-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:10px 12px;border:1px solid rgba(103,191,184,.32);border-radius:12px;background:rgba(5,49,59,.42)}
body.in-game .mystery-occupation-line b{font-size:1.08em}
body.in-game .mystery-status{display:grid;gap:7px}
body.in-game .mystery-status strong{font-weight:800;line-height:1.45}
body.in-game .mystery-residual{padding:7px 9px;border-radius:8px;background:rgba(125,99,36,.24);border:1px solid rgba(201,163,72,.32)}
body.in-game .mystery-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}
body.in-game .mystery-action-shell{display:grid;gap:15px;min-width:0}
body.in-game .mystery-action-summary{display:grid;gap:5px;padding:13px 14px;border-radius:12px;background:rgba(4,45,57,.58);border:1px solid rgba(80,173,183,.32)}
body.in-game .mystery-action-summary b{font-size:1.1em}
body.in-game .mystery-action-summary span,body.in-game .mystery-action-summary small{line-height:1.5}
body.in-game .mystery-source-label{display:grid;gap:7px;font-weight:700}
body.in-game .mystery-source-label select,body.in-game .mystery-source-label input{width:100%;min-height:44px}
body.in-game .mystery-grid-section{display:grid;gap:9px;padding:12px;border-radius:12px;background:rgba(3,39,50,.4);border:1px solid rgba(83,161,171,.24)}
body.in-game .mystery-grid-section h3{margin:0 0 2px}
body.in-game .mystery-unit-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(88px,130px);align-items:center;gap:12px;padding:9px 10px;border-radius:10px;background:rgba(9,61,71,.4)}
body.in-game .mystery-unit-row span{display:grid;gap:3px;min-width:0}
body.in-game .mystery-unit-row small{opacity:.8}
body.in-game .mystery-unit-row input{width:100%;min-height:42px}
body.in-game .mystery-quick-toggle{display:flex;align-items:flex-start;gap:9px;line-height:1.5;padding:11px 12px;border-radius:10px;background:rgba(9,70,74,.35)}
body.in-game .mystery-quick-toggle input{margin-top:4px;flex:0 0 auto}
@media(max-width:700px){
  body.in-game .mystery-unit-row{grid-template-columns:minmax(0,1fr) 92px;gap:8px}
  body.in-game .mystery-action-shell,body.in-game .mystery-action-shell button,body.in-game .mystery-action-shell input,body.in-game .mystery-action-shell select,body.in-game .mystery-status,body.in-game .mystery-occupation-line{font-size:max(14px,1em)}
  body.in-game .mystery-actions .gal-act{min-height:44px;padding:10px 13px}
}

/* v2026.08.28.03：航隊派遣 UX / 己方島嶼海防運輸 */
.fleet-unit-info-trigger{border:0;background:transparent;color:inherit;padding:0;font:inherit;cursor:pointer;text-align:left}
.fleet-unit-art-trigger{display:flex;align-items:center;justify-content:center;align-self:stretch;min-width:104px;border-radius:14px;transition:transform .16s ease,background .16s ease}
.fleet-unit-art-trigger:hover,.fleet-unit-art-trigger:focus-visible{transform:translateY(-2px);background:rgba(255,255,255,.07);outline:2px solid rgba(115,210,255,.45);outline-offset:2px}
.fleet-unit-art-trigger img{display:block;width:100%;height:100%;max-height:108px;object-fit:contain}
.fleet-unit-name-trigger{font-weight:800;color:var(--text,#eef8ff);text-decoration:underline;text-decoration-color:rgba(140,220,255,.35);text-underline-offset:4px}
.fleet-unit-name-trigger:hover,.fleet-unit-name-trigger:focus-visible{color:#fff;text-decoration-color:currentColor;outline:none}
.fleet-pick-info small+small{margin-top:3px;opacity:.86}
.fleet-mission-tip{margin:0 0 12px;padding:10px 12px;border-radius:12px;background:rgba(74,160,190,.10);border:1px solid rgba(105,195,220,.18);line-height:1.55}
.fleet-mission-tip:empty{display:none}
.fleet-defense-transport{margin-top:16px;padding:16px;border-radius:16px;background:rgba(6,28,40,.34);border:1px solid rgba(112,205,222,.22)}
.fleet-defense-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.fleet-defense-head h4{margin:0 0 4px;font-size:1.04em}.fleet-defense-head p{margin:0;opacity:.8}
.fleet-defense-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.fleet-defense-pick{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border-radius:12px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08)}
.fleet-defense-pick span{display:flex;flex-direction:column;gap:2px}.fleet-defense-pick small{opacity:.75}.fleet-defense-pick input{width:104px;min-height:42px;text-align:right}
.fleet-defense-capacity{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.05)}
.fleet-defense-capacity em{color:#ffb6ad;font-style:normal;font-weight:800}.fleet-defense-capacity span{opacity:.82}
#fleetCargoStep.mission-disabled .fleet-cargo{opacity:.42;pointer-events:none}
#fleetCargoStep.mission-disabled .fleet-cargo input{background:rgba(255,255,255,.03)}
#fleetCargoStep.mission-disabled #fleetClearCargo{display:none}
.fleet-unit-info-modal{display:grid;gap:16px}.fleet-unit-info-top{display:flex;align-items:center;gap:18px}.fleet-unit-info-top img{width:150px;height:120px;object-fit:contain;border-radius:14px;background:rgba(255,255,255,.04)}
.fleet-unit-info-top>div{display:flex;flex-direction:column;gap:6px}.fleet-unit-info-top b{font-size:1.18em}.fleet-unit-info-top span{opacity:.8}
.fleet-unit-info-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.fleet-unit-info-stats span{display:flex;justify-content:space-between;gap:12px;padding:11px 12px;border-radius:10px;background:rgba(255,255,255,.05)}
@media(max-width:760px){.fleet-defense-head{align-items:stretch;flex-direction:column}.fleet-defense-head .soft-btn{width:100%}.fleet-defense-grid{grid-template-columns:1fr}.fleet-defense-pick input{width:92px}.fleet-unit-info-top{align-items:flex-start}.fleet-unit-info-top img{width:112px;height:96px}.fleet-unit-info-stats{grid-template-columns:1fr}.fleet-unit-art-trigger{min-width:84px}}
#fleetCargoStep.mission-disabled .fleet-cargo{display:none}

/* v2026.08.28.04：一般島嶼 X / Y 權威容量提示 */
.island-list-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.territory-capacity{display:inline-flex;align-items:center;gap:9px;flex-wrap:wrap;padding:8px 12px;border:1px solid rgba(115,165,181,.32);border-radius:12px;background:rgba(15,64,78,.35)}
.territory-capacity>span{font-weight:700}.territory-capacity>b{font-size:1.06em}.territory-capacity>small{opacity:.82}
.territory-capacity.at-limit{border-color:rgba(217,130,91,.5);background:rgba(105,49,37,.28)}
.territory-capacity.compact{padding:5px 8px;gap:6px}.territory-capacity.compact>span{display:none}.territory-capacity.compact>small{font-size:.9em}
.galaxy-territory-capacity{margin-top:12px}.galaxy-territory-capacity .territory-capacity{max-width:100%}
.gal-act:disabled{opacity:.55;cursor:not-allowed;filter:saturate(.55)}
@media(max-width:900px){.territory-capacity{width:100%;justify-content:space-between}.territory-capacity.compact{width:auto}.fleet-slots span{white-space:normal}}
@media(max-width:560px){.island-list-title{align-items:stretch}.territory-capacity.compact{width:100%;justify-content:space-between}.territory-capacity.compact>span{display:inline}.galaxy-territory-capacity .territory-capacity{display:grid;grid-template-columns:1fr auto}.galaxy-territory-capacity .territory-capacity small{grid-column:1/-1}}

.islands-capacity-strip{margin:0 0 12px}.islands-capacity-strip .territory-capacity{width:auto}


/* v2026.08.28.05：航隊資源裝載、偵查快捷與戰後回收 UX */
body.in-game .fleet-cargo-quick{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:12px 14px;border:1px solid rgba(111,194,207,.24);border-radius:14px;background:rgba(8,35,45,.55)}
body.in-game .fleet-cargo-quick>div{display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-width:0}
body.in-game .fleet-cargo-quick span{color:var(--muted,#9fb5bb)}
body.in-game .fleet-cargo-quick strong{color:#d9fff5}
body.in-game .fleet-cargo-cards{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
body.in-game .fleet-cargo-card{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;align-content:start;padding:12px!important;border:1px solid rgba(108,180,195,.24);border-radius:14px;background:rgba(4,25,34,.58)}
body.in-game .fleet-cargo-card .fleet-cargo-label{font-weight:800;color:#e8fbff}
body.in-game .fleet-cargo-card small{display:block;color:var(--muted,#9fb5bb);line-height:1.35}
body.in-game .fleet-cargo-card input{width:100%!important;min-width:0!important}
body.in-game .fleet-cargo-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
body.in-game .fleet-cargo-card-foot .soft-btn{min-height:42px;padding:7px 10px}
body.in-game .battle-recovery-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:12px;padding:12px;border:1px solid rgba(91,190,161,.26);border-radius:13px;background:rgba(5,40,35,.42)}
body.in-game .battle-recovery-actions.compact{display:contents;margin:0;padding:0;border:0;background:transparent}
body.in-game .battle-recovery-actions button{min-height:44px}
body.in-game .intel-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
@media(max-width:1100px){body.in-game .fleet-cargo-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){body.in-game .fleet-cargo-quick{align-items:stretch;flex-direction:column}body.in-game .fleet-cargo-quick .soft-btn{width:100%}body.in-game .fleet-cargo-cards{grid-template-columns:1fr!important}body.in-game .fleet-cargo-card{padding:10px!important}body.in-game .fleet-cargo-card-foot .soft-btn{min-height:48px}body.in-game .battle-recovery-actions{display:grid;grid-template-columns:1fr}body.in-game .battle-recovery-actions.compact{display:grid;grid-template-columns:1fr;width:100%}body.in-game .battle-recovery-actions button,body.in-game .intel-actions button{width:100%;min-height:50px}}
@media(max-width:430px){body.in-game .fleet-cargo-quick,body.in-game .fleet-cargo-card{border-radius:11px}body.in-game .fleet-cargo-card-foot{display:grid;grid-template-columns:1fr}body.in-game .fleet-cargo-card-foot .soft-btn{width:100%}}


/* v2026.08.28.07：訊息中心大量紀錄 UX。預設摘要、分頁、手機不產生超長頁面。 */
.message-center-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:8px}.message-center-head h2{margin-bottom:4px}.message-center-head p{margin:0;color:#78939f;font-size:16px}.message-compact-list{display:grid;gap:8px}.message-card.compact{margin:0;border-radius:8px;overflow:hidden}.message-card.compact .message-head{padding:9px 11px}.message-card.compact .message-head strong{min-width:0;overflow-wrap:anywhere}.message-preview{padding:9px 11px;color:#91a9b4;line-height:1.55;border-bottom:1px solid rgba(255,255,255,.04)}.message-full{white-space:pre-wrap;padding:10px 11px;color:#a9bec7;line-height:1.62;border-bottom:1px solid rgba(255,255,255,.04)}.message-pager{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 4px;color:#7f99a5}.message-pager>div{display:flex;gap:7px}.message-pager button:disabled{opacity:.4;cursor:not-allowed}.message-card.compact .message-actions{padding:8px 10px;gap:6px}.hidden{display:none!important}
@media(max-width:900px){.message-center-head{display:block}.message-center-head p{font-size:15px}.message-pager{align-items:stretch}.message-card.compact .message-head time{width:100%;margin-left:0}.message-card.compact .message-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.message-card.compact .message-actions button{width:100%;min-height:44px}}
@media(max-width:560px){.message-tabs{gap:6px}.message-pager{flex-direction:column}.message-pager>div{display:grid;grid-template-columns:1fr 1fr;width:100%}.message-card.compact .message-actions{grid-template-columns:1fr}.message-card.compact .message-head{align-items:flex-start}.message-card.compact .message-head strong{width:100%}.message-preview,.message-full{font-size:15px}}

/* v2026.08.28.09：通用物品庫。 */
.inventory-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.inventory-title-row h2{margin-bottom:4px}.inventory-title-row p{margin:0;color:#78949f}.inventory-count{border:1px solid #31505b;background:#09202a;padding:8px 12px;color:#b8dce5;font-weight:700}.inventory-section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:18px 0 9px;flex-wrap:wrap}.inventory-section-head h3{margin:0}.inventory-section-head span{color:#78949f}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}.inventory-card{display:flex;align-items:flex-start;gap:12px;border:1px solid #304b57;background:#081922;padding:13px;min-width:0}.inventory-card.material-card{border-color:#42634e;background:#0a1d18}.inventory-item-icon{width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center;border:1px solid #355461;background:#0b2530;font-size:28px}.material-card .inventory-item-icon{border-color:#476a53;background:#10271e}.inventory-item-main{min-width:0;flex:1}.inventory-item-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.inventory-item-head b{color:#cce3e8}.inventory-item-head strong{font-size:28px;color:#d8eddd}.inventory-item-main p{margin:7px 0 0;color:#90a8b0;line-height:1.55}.inventory-item-main small{display:block;margin-top:3px;color:#6f8e98}.inventory-drop-rule{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.inventory-drop-rule span{border:1px solid #3e5e4a;background:#0d281d;padding:5px 8px;color:#a8cfb1}.inventory-exchange{display:flex;flex-direction:column;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #355945}.inventory-exchange>b{color:#d6ebdc}.inventory-exchange>span{color:#8fb39a}.inventory-exchange-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.inventory-exchange-actions input{width:120px;min-width:0}.inventory-exchange-actions button{white-space:nowrap}.battle-item-reward{border-color:#52705b!important;background:#10261b!important}.battle-item-reward b{color:#c8e6cf!important}
@media(max-width:900px){.inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.inventory-grid{grid-template-columns:1fr}.inventory-card{padding:11px}.inventory-item-icon{width:44px;height:44px;flex-basis:44px}.inventory-item-head strong{font-size:24px}.inventory-section-head{align-items:flex-start;flex-direction:column;gap:4px}.inventory-exchange-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto}.inventory-exchange-actions input{width:100%}}

/* v2026.08.28.11：海洋單位／海防生產隊列可取消未完成部分。 */
.unit-queue-cancel-btn{margin-top:6px;justify-self:end}
@media(max-width:720px){.unit-queue-cancel-btn{width:100%;min-height:44px;justify-self:stretch}}


/* ========================================================================
   v2026.08.28.13 — 航海事件抽屜：大量事件可獨立垂直捲動
   標題列固定，事件清單成為真正的 flex scroll child；避免大量事件撐出視窗。
   ======================================================================== */
body.in-game .event-drawer{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  min-height:0!important;
}
body.in-game .event-drawer-head{
  flex:0 0 auto!important;
  min-height:0!important;
}
body.in-game .event-drawer-list{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  align-content:start!important;
}
body.in-game .event-drawer-list::-webkit-scrollbar{width:12px}
body.in-game .event-drawer-list::-webkit-scrollbar-thumb{
  background:#456f78;
  border:3px solid #071b23;
  border-radius:999px;
}
body.in-game .event-drawer-list::-webkit-scrollbar-track{background:#071b23}
@media(min-width:761px){
  body.in-game .event-drawer{
    top:20%!important;
    bottom:auto!important;
    height:min(68vh,calc(100dvh - 24px))!important;
    max-height:min(68vh,calc(100dvh - 24px))!important;
  }
}
@media(max-width:760px){
  body.in-game .event-drawer{
    top:auto!important;
    bottom:0!important;
    height:min(72dvh,calc(100dvh - 12px))!important;
    max-height:min(72dvh,calc(100dvh - 12px))!important;
  }
}
@media(max-height:700px) and (min-width:761px){
  body.in-game .event-drawer{
    top:8px!important;
    height:calc(100dvh - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
  }
}

/* ========================================================================
   v2026.08.29.13 — UI Consistency Deep Fix
   基底：v2026.08.28.13。只統一全站內距、上下節奏、字級、控制項、配色與 RWD 防破版。
   不改任何遊戲規則、資料流程或主要頁面骨架。
   ======================================================================== */

/* ---------- 0. 全站固定設計 Token：後續頁面不得各自再發明一套 ---------- */
:root{
  --ti-bg:#06141c;
  --ti-surface:#081a22;
  --ti-surface-2:#0b232d;
  --ti-surface-3:#102d38;
  --ti-surface-soft:#0d2731;
  --ti-line:#315461;
  --ti-line-soft:#203e49;
  --ti-line-strong:#4f7583;
  --ti-text:#dcebf0;
  --ti-text-soft:#b7ccd4;
  --ti-muted:#88a3ad;
  --ti-accent:#72b8cc;
  --ti-accent-strong:#9fd7e4;
  --ti-gold:#cdb06f;
  --ti-success:#7fd0a3;
  --ti-warning:#d6b16b;
  --ti-danger:#dc7e76;
  --ti-danger-bg:#281718;
  --ti-page-x:18px;
  --ti-page-y:16px;
  --ti-section-gap:16px;
  --ti-panel-x:18px;
  --ti-panel-y:16px;
  --ti-card-pad:14px;
  --ti-gap:12px;
  --ti-gap-sm:8px;
  --ti-control-h:44px;
  --ti-radius:7px;
}

/* ---------- 1. 字型、字級與文字節奏 ---------- */
body.in-game,
body.in-game button,
body.in-game input,
body.in-game select,
body.in-game textarea,
body.in-game label,
body.in-game table{
  font-family:"Microsoft JhengHei","微軟正黑體",Arial,sans-serif!important;
  color:var(--ti-text);
}
body.in-game{font-size:20px!important;line-height:1.55!important}
body.in-game button,
body.in-game input,
body.in-game select,
body.in-game textarea,
body.in-game label,
body.in-game table,
body.in-game td,
body.in-game th,
body.in-game p,
body.in-game span,
body.in-game b,
body.in-game strong,
body.in-game em,
body.in-game small{font-size:20px!important;line-height:1.45}
body.in-game h1{font-size:28px!important;line-height:1.28!important}
body.in-game h2{font-size:24px!important;line-height:1.32!important}
body.in-game h3{font-size:22px!important;line-height:1.34!important}
body.in-game h4{font-size:20px!important;line-height:1.38!important}
body.in-game h1,body.in-game h2,body.in-game h3,body.in-game h4{margin:0;color:var(--ti-text)}
body.in-game p{margin:0;color:var(--ti-text-soft)}
body.in-game small{color:var(--ti-muted)}
body.in-game .section-kicker,
body.in-game .friends-kicker,
body.in-game .catalog-eyebrow,
body.in-game .overview-eyebrow{display:block;margin:0 0 5px!important;color:var(--ti-muted)!important;line-height:1.35!important}
body.in-game .muted{color:var(--ti-muted)!important}
body.in-game .subheading{margin:18px 0 10px!important;color:var(--ti-text)!important}
body.in-game .empty-state,
body.in-game .loading-line{padding:16px 18px!important;color:var(--ti-muted)!important;line-height:1.55!important}

/* 所有 grid/flex 子項先允許縮小，避免小數字/長名稱把欄位撐破。 */
body.in-game #content *,
body.in-game .topbar *,
body.in-game .sidebar *,
body.in-game .rightbar *{box-sizing:border-box;min-width:0}
body.in-game #content p,
body.in-game #content span,
body.in-game #content b,
body.in-game #content strong,
body.in-game #content small,
body.in-game #content em,
body.in-game #content td,
body.in-game #content th{overflow-wrap:anywhere;word-break:normal;text-overflow:clip}

/* ---------- 2. 頁面容器、Panel、區塊內距 ---------- */
body.in-game #content{
  padding:var(--ti-page-y) var(--ti-page-x) 30px!important;
  background:var(--ti-bg);
}
body.in-game #content>.panel{margin:0 0 var(--ti-section-gap)!important}
body.in-game #content>.panel:last-child{margin-bottom:0!important}
body.in-game .panel{
  border:1px solid var(--ti-line)!important;
  background:linear-gradient(180deg,var(--ti-surface-2),var(--ti-surface))!important;
  color:var(--ti-text)!important;
  border-radius:var(--ti-radius)!important;
  overflow:visible;
}
body.in-game .panel>h2,
body.in-game .panel>h3,
body.in-game .panel>h4{
  margin:0!important;
  padding:15px var(--ti-panel-x)!important;
  background:var(--ti-surface-3)!important;
  border:0!important;
  border-bottom:1px solid var(--ti-line-soft)!important;
  color:var(--ti-text)!important;
}
body.in-game .panel-body{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .panel-body.compact-body{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .panel-subline{
  margin:0!important;
  padding:11px var(--ti-panel-x)!important;
  border:0!important;
  border-bottom:1px solid var(--ti-line-soft)!important;
  background:rgba(9,31,40,.72)!important;
  color:var(--ti-muted)!important;
}

/* 18 個主要頁面的「自訂頁首」全部使用相同內距與同一背景。 */
body.in-game .resource-overview-title,
body.in-game .resource-capacity-title,
body.in-game .production-panel-head,
body.in-game .scene-panel-head,
body.in-game .governance-hero,
body.in-game .governance-section-head,
body.in-game .islands-overview-head,
body.in-game .map-head,
body.in-game .fleet-dispatch-head,
body.in-game .friends-hero,
body.in-game .message-center-head,
body.in-game .intel-library-head,
body.in-game .inventory-title-row,
body.in-game .pearl-section-title{
  margin:0!important;
  padding:var(--ti-panel-y) var(--ti-panel-x)!important;
  gap:var(--ti-gap)!important;
  border:0!important;
  border-bottom:1px solid var(--ti-line-soft)!important;
  background:linear-gradient(180deg,var(--ti-surface-3),var(--ti-surface-2))!important;
  color:var(--ti-text)!important;
}
body.in-game .resource-overview-title h2,
body.in-game .resource-capacity-title h3,
body.in-game .production-panel-head h3,
body.in-game .scene-panel-head h2,
body.in-game .governance-hero h2,
body.in-game .governance-section-head h3,
body.in-game .islands-overview-head h2,
body.in-game .map-head h2,
body.in-game .fleet-dispatch-head h2,
body.in-game .friends-hero h2,
body.in-game .message-center-head h2,
body.in-game .intel-library-head h2,
body.in-game .inventory-title-row h2,
body.in-game .pearl-section-title h2{margin:0!important;color:var(--ti-text)!important}
body.in-game .resource-overview-title p,
body.in-game .resource-capacity-title p,
body.in-game .resource-capacity-title span,
body.in-game .production-panel-head span,
body.in-game .scene-panel-head p,
body.in-game .governance-hero p,
body.in-game .governance-section-head p,
body.in-game .islands-overview-head p,
body.in-game .map-head p,
body.in-game .fleet-dispatch-head p,
body.in-game .friends-hero p,
body.in-game .message-center-head p,
body.in-game .intel-library-head p,
body.in-game .inventory-title-row p,
body.in-game .pearl-section-title p{margin:6px 0 0!important;color:var(--ti-muted)!important}

/* ---------- 3. 共用卡片／資訊區塊配色與內距 ---------- */
body.in-game .card,
body.in-game .item-card,
body.in-game .catalog-card,
body.in-game .operation-card,
body.in-game .fleet-step-card,
body.in-game .message-card,
body.in-game .battle-library-card,
body.in-game .intel-card,
body.in-game .inventory-card,
body.in-game .governance-system-card,
body.in-game .production-power-card,
body.in-game .friend-section,
body.in-game .market-card,
body.in-game .admin-box,
body.in-game .research-grid-card,
body.in-game .islands-overview-card,
body.in-game .advisor-card,
body.in-game .pause-active-card,
body.in-game .pause-explain,
body.in-game .market-trend-block{
  background:linear-gradient(180deg,#0a2029,#071820)!important;
  border:1px solid var(--ti-line-soft)!important;
  color:var(--ti-text)!important;
  border-radius:var(--ti-radius)!important;
}
body.in-game .item-card,
body.in-game .catalog-card,
body.in-game .operation-card,
body.in-game .fleet-step-card,
body.in-game .message-card,
body.in-game .battle-library-card,
body.in-game .intel-card,
body.in-game .inventory-card,
body.in-game .governance-system-card,
body.in-game .production-power-card,
body.in-game .friend-section,
body.in-game .market-card,
body.in-game .admin-box,
body.in-game .research-grid-card,
body.in-game .islands-overview-card,
body.in-game .advisor-card,
body.in-game .pause-active-card,
body.in-game .pause-explain{padding:var(--ti-card-pad)!important}

/* 卡片內的標題/說明固定節奏，不再每頁一種 margin。 */
body.in-game .card h2,body.in-game .card h3,body.in-game .card h4,
body.in-game .item-card h2,body.in-game .item-card h3,body.in-game .item-card h4,
body.in-game .catalog-card h3,
body.in-game .research-grid-card h3,
body.in-game .admin-box h3,
body.in-game .friend-section h3,
body.in-game .market-card h3,
body.in-game .advisor-card h3{margin:0 0 7px!important}
body.in-game .card p,
body.in-game .item-card p,
body.in-game .catalog-card p,
body.in-game .research-grid-card p,
body.in-game .admin-box p,
body.in-game .friend-section p,
body.in-game .market-card p,
body.in-game .advisor-card p{margin:0!important;color:var(--ti-text-soft)!important}

/* ---------- 4. Tab / 分類 / 篩選列 ---------- */
body.in-game .tabs,
body.in-game .message-tabs,
body.in-game .market-tabs,
body.in-game .facility-category-tabs,
body.in-game .shipyard-category-tabs,
body.in-game .research-branch-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:var(--ti-gap-sm)!important;
  margin:0!important;
  padding:12px var(--ti-panel-x)!important;
  border-bottom:1px solid var(--ti-line-soft)!important;
  background:rgba(8,28,36,.78)!important;
}
body.in-game .tab,
body.in-game .message-tabs button,
body.in-game .market-tabs button,
body.in-game .facility-category-tabs button,
body.in-game .shipyard-category-tabs button,
body.in-game .research-branch-tabs button{
  min-height:var(--ti-control-h)!important;
  padding:8px 14px!important;
  border:1px solid var(--ti-line)!important;
  border-radius:5px!important;
  background:#0a1c24!important;
  color:var(--ti-text-soft)!important;
  white-space:nowrap!important;
}
body.in-game .tab:hover,
body.in-game .message-tabs button:hover,
body.in-game .market-tabs button:hover,
body.in-game .facility-category-tabs button:hover,
body.in-game .shipyard-category-tabs button:hover,
body.in-game .research-branch-tabs button:hover{
  background:#12313d!important;color:#fff!important;border-color:var(--ti-line-strong)!important;
}
body.in-game .tab.active,
body.in-game .message-tabs button.active,
body.in-game .market-tabs button.active,
body.in-game .facility-category-tabs button.active,
body.in-game .shipyard-category-tabs button.active,
body.in-game .research-branch-tabs button.active{
  background:linear-gradient(180deg,#245466,#183b49)!important;
  border-color:#699daf!important;
  color:#fff!important;
}

/* ---------- 5. 表單與按鈕 ---------- */
body.in-game input:not([type="checkbox"]):not([type="radio"]),
body.in-game select,
body.in-game textarea{
  min-height:var(--ti-control-h)!important;
  padding:8px 11px!important;
  border:1px solid var(--ti-line)!important;
  border-radius:5px!important;
  background:#051219!important;
  color:var(--ti-text)!important;
  max-width:100%!important;
}
body.in-game textarea{padding:10px 12px!important}
body.in-game input:focus,body.in-game select:focus,body.in-game textarea:focus{
  outline:none!important;border-color:#6ba3b5!important;box-shadow:0 0 0 2px rgba(107,163,181,.16)!important;
}
body.in-game button{max-width:100%}
body.in-game .primary,
body.in-game .soft-btn,
body.in-game .big-action,
body.in-game .gal-act,
body.in-game .research-action-btn,
body.in-game .info-btn,
body.in-game .mini-btn,
body.in-game .table-manage-btn,
body.in-game .friend-add-btn,
body.in-game .accept-btn,
body.in-game .advisor-footer button,
body.in-game .item-shop-actions button,
body.in-game .boss-pack-open button{
  min-height:var(--ti-control-h)!important;
  padding:8px 13px!important;
  border:1px solid #456d7d!important;
  border-radius:5px!important;
  background:linear-gradient(180deg,#24556a,#173847)!important;
  color:#eaf6f9!important;
  white-space:normal!important;
  line-height:1.35!important;
}
body.in-game .primary:hover,
body.in-game .soft-btn:hover,
body.in-game .big-action:hover,
body.in-game .gal-act:hover,
body.in-game .research-action-btn:hover,
body.in-game .info-btn:hover,
body.in-game .mini-btn:hover{background:linear-gradient(180deg,#2d667d,#1b4353)!important;color:#fff!important}
body.in-game .danger-act,
body.in-game .danger-action,
body.in-game .danger-soft-btn,
body.in-game .unit-scrap-btn,
body.in-game .queue-cancel-btn,
body.in-game .unit-queue-cancel-btn,
body.in-game .admin-ban-btn{
  border-color:#7a4b47!important;background:var(--ti-danger-bg)!important;color:#efb3ad!important;
}
body.in-game .good,body.in-game .requirement-ok,body.in-game .effect-good{color:var(--ti-success)!important}
body.in-game .bad,body.in-game .requirement-missing{color:var(--ti-danger)!important}
body.in-game .warn{color:var(--ti-warning)!important}

/* ---------- 6. 表格與寬內容：只讓自己的容器橫捲，不讓整頁破版 ---------- */
body.in-game .table-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
body.in-game .table,
body.in-game .score-table,
body.in-game .market-table,
body.in-game .alliance-table,
body.in-game .governance-animal-table,
body.in-game .governance-market-table,
body.in-game .fleet-history-table{
  width:100%!important;
  border-collapse:collapse!important;
  color:var(--ti-text)!important;
}
body.in-game .table th,body.in-game .table td,
body.in-game .score-table th,body.in-game .score-table td,
body.in-game .market-table th,body.in-game .market-table td,
body.in-game .alliance-table th,body.in-game .alliance-table td,
body.in-game .governance-animal-table th,body.in-game .governance-animal-table td,
body.in-game .governance-market-table th,body.in-game .governance-market-table td,
body.in-game .fleet-history-table th,body.in-game .fleet-history-table td{
  padding:11px 12px!important;
  border:1px solid var(--ti-line-soft)!important;
  vertical-align:top!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  background:#071820!important;
}
body.in-game .table th,
body.in-game .score-table th,
body.in-game .market-table th,
body.in-game .alliance-table th,
body.in-game .governance-animal-table th,
body.in-game .governance-market-table th,
body.in-game .fleet-history-table th{background:#102b36!important;color:#c1d7df!important}

/* ---------- 7. 隊列：修正「可使用」與小數字/長名稱被擠成直排 ---------- */
body.in-game .queue-lanes{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:var(--ti-gap)!important;
  padding:12px var(--ti-panel-x)!important;
  border-bottom:1px solid var(--ti-line-soft)!important;
  background:#071820!important;
}
body.in-game .queue-lane{
  min-width:0!important;
  min-height:68px!important;
  padding:11px 13px!important;
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  align-content:center!important;
  gap:6px 12px!important;
  border:1px solid var(--ti-line-soft)!important;
  background:#091d26!important;
}
body.in-game .queue-lane>span{flex:1 1 190px!important;min-width:0!important;white-space:normal!important}
body.in-game .queue-lane>b{flex:0 0 auto!important;white-space:nowrap!important;color:var(--ti-success)!important}
body.in-game .queue-lane>small{flex:1 1 100%!important;white-space:normal!important;color:var(--ti-muted)!important}
body.in-game .queue,
body.in-game .unit-queue-row{
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px 14px!important;
  padding:11px var(--ti-panel-x)!important;border-bottom:1px solid var(--ti-line-soft)!important;background:#081b23!important;
}
body.in-game .queue>span:first-child,body.in-game .unit-queue-main{flex:1 1 360px!important;min-width:0!important}
body.in-game .queue-end,body.in-game .unit-queue-end{flex:0 1 auto!important;min-width:0!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px 10px!important;margin-left:auto!important}
body.in-game .queue-end>*{white-space:normal!important}
body.in-game .unit-queue-summary{display:flex!important;flex-wrap:wrap!important;gap:8px 12px!important;padding:12px var(--ti-panel-x)!important;background:#0a2029!important;border-bottom:1px solid var(--ti-line-soft)!important}
body.in-game .unit-queue-summary>span{flex:1 1 200px!important;min-width:0!important}

/* ---------- 8. 資源總覽 ---------- */
body.in-game .resource-control-hints,
body.in-game .slot-bonus-strip,
body.in-game .production-apply-bar,
body.in-game .production-apply-cardbar{
  margin:0!important;padding:12px var(--ti-panel-x)!important;gap:var(--ti-gap)!important;border-color:var(--ti-line-soft)!important;background:#091d26!important;
}
body.in-game .resource-control-hints,
body.in-game .slot-bonus-strip{display:flex!important;flex-wrap:wrap!important}
body.in-game .resource-control-hints>*,body.in-game .slot-bonus-strip>*{flex:1 1 180px!important;min-width:0!important}
body.in-game .production-factor-box{margin:0!important;padding:14px!important;border-color:var(--ti-line-soft)!important;background:#091d26!important}
body.in-game .factor-head{display:flex!important;flex-wrap:wrap!important;gap:10px 18px!important;align-items:flex-start!important}
body.in-game .factor-head>div{flex:1 1 260px!important}
body.in-game .resource-capacity-grid{padding:var(--ti-panel-y) var(--ti-panel-x)!important;gap:var(--ti-gap)!important}
body.in-game .production-group{padding:var(--ti-panel-y) var(--ti-panel-x)!important;margin:0!important;border-top:1px solid var(--ti-line-soft)!important}
body.in-game .production-group-title{margin:0 0 12px!important;padding:0!important;display:flex!important;flex-wrap:wrap!important;gap:6px 14px!important;align-items:baseline!important}
body.in-game .resource-production-grid,body.in-game .power-production-grid{gap:var(--ti-gap)!important}
body.in-game .production-resource-card,body.in-game .production-power-card{padding:var(--ti-card-pad)!important;border-color:var(--ti-line-soft)!important;background:#081b23!important}
body.in-game .production-card-head,body.in-game .power-card-bottom,body.in-game .production-card-controls,body.in-game .production-card-facts{gap:var(--ti-gap-sm)!important}
body.in-game .production-stat{min-width:0!important;gap:8px!important}
body.in-game .production-stat b{white-space:normal!important;text-align:right!important}

/* ---------- 9. 設施 / 研究 / 港灣整備場 / 海防工事 ---------- */
body.in-game .scene-panel-head{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;justify-content:space-between!important}
body.in-game .scene-panel-head>div:first-child{flex:1 1 520px!important;min-width:0!important}
body.in-game .scene-island-chip,body.in-game .research-lab-chip,body.in-game .shipyard-summary-chip{flex:0 1 320px!important;min-width:220px!important;max-width:100%!important}
body.in-game .facility-category-tabs,body.in-game .shipyard-category-tabs,body.in-game .research-branch-tabs{padding-left:var(--ti-panel-x)!important;padding-right:var(--ti-panel-x)!important}
body.in-game .research-current-strip{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:var(--ti-gap)!important;padding:12px var(--ti-panel-x)!important;background:#081b23!important;border-bottom:1px solid var(--ti-line-soft)!important}
body.in-game .research-current-strip>div{padding:11px 13px!important;border:1px solid var(--ti-line-soft)!important;background:#091d26!important;min-width:0!important}
body.in-game .research-current-strip span,body.in-game .research-current-strip b,body.in-game .research-current-strip small{display:block!important;white-space:normal!important}
body.in-game .research-grid{gap:var(--ti-gap)!important;padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .research-grid-card{gap:11px!important}
body.in-game .research-grid-actions{gap:var(--ti-gap-sm)!important}
body.in-game .catalog-cards{gap:var(--ti-gap)!important;padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .catalog-card-head{gap:14px!important;padding:0 0 12px!important}
body.in-game .catalog-card-body{padding:12px 0!important;gap:10px!important;border-top:1px solid var(--ti-line-soft)!important}
body.in-game .catalog-actions{padding:12px 0 0!important;gap:var(--ti-gap-sm)!important;border-top:1px solid var(--ti-line-soft)!important}
body.in-game .catalog-actions>*{min-width:0!important}
body.in-game .facility-scene-scroll,body.in-game .shipyard-scene-scroll,body.in-game .defense-scene-scroll{max-width:100%!important;overflow:auto!important;overscroll-behavior:contain!important}

/* ---------- 10. 島政 ---------- */
body.in-game .governance-hero{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;justify-content:space-between!important}
body.in-game .governance-hero>div:first-child{flex:1 1 520px!important}
body.in-game .governance-quick-links{display:flex!important;flex:0 1 auto!important;flex-wrap:wrap!important;gap:var(--ti-gap-sm)!important;justify-content:flex-end!important}
body.in-game .governance-quick-links button{min-height:var(--ti-control-h)!important;padding:8px 13px!important}
body.in-game .governance-role-grid{padding:var(--ti-panel-y) var(--ti-panel-x)!important;gap:var(--ti-gap)!important}
body.in-game .governance-role-card{padding:var(--ti-card-pad)!important;background:#081b23!important;border-color:var(--ti-line-soft)!important}
body.in-game .governance-role-controls{gap:var(--ti-gap-sm)!important}
body.in-game .governance-list-head{margin:0!important;padding:14px var(--ti-panel-x)!important;gap:var(--ti-gap)!important;border-top:1px solid var(--ti-line-soft)!important;border-bottom:1px solid var(--ti-line-soft)!important;background:#091d26!important}
body.in-game .governance-sort-controls{gap:var(--ti-gap-sm)!important;flex-wrap:wrap!important}

/* ---------- 11. 航隊派遣 ---------- */
body.in-game .fleet-slots{padding:12px var(--ti-panel-x)!important;gap:var(--ti-gap-sm)!important;border-bottom-color:var(--ti-line-soft)!important;background:#071820!important}
body.in-game .fleet-flow{padding:var(--ti-panel-y) var(--ti-panel-x)!important;gap:var(--ti-gap)!important}
body.in-game .fleet-step-card{margin:0!important;overflow:hidden!important}
body.in-game .fleet-step-head{margin:0 0 12px!important;padding:0 0 10px!important;border-bottom:1px solid var(--ti-line-soft)!important}
body.in-game .fleet-target,body.in-game .fleet-cargo,body.in-game .galaxy-tools{padding:0!important;gap:var(--ti-gap)!important;align-items:end!important}
body.in-game .fleet-grid{gap:var(--ti-gap)!important;padding:12px 0!important}
body.in-game .fleet-pick{min-width:0!important}
body.in-game .fleet-pick-title,body.in-game .fleet-pick-info,body.in-game .fleet-pick-controls{min-width:0!important}
body.in-game .fleet-cargo-cards{gap:var(--ti-gap)!important}
body.in-game .fleet-cargo-card{padding:var(--ti-card-pad)!important;border-color:var(--ti-line-soft)!important;background:#081b23!important}
body.in-game .fleet-dispatch-summary,body.in-game .fleet-route-help,body.in-game .fleet-hint{margin:0!important;padding:12px var(--ti-panel-x)!important;color:var(--ti-muted)!important}
body.in-game .fleet-live-panel,body.in-game .fleet-history-panel{margin-top:var(--ti-section-gap)!important}
body.in-game .fleet-panel-title{padding:14px var(--ti-panel-x)!important;margin:0!important;border-bottom:1px solid var(--ti-line-soft)!important;background:var(--ti-surface-3)!important}

/* ---------- 12. 海域航圖 ---------- */
body.in-game .map-head{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;justify-content:space-between!important}
body.in-game .map-head-copy{flex:1 1 480px!important}
body.in-game .galaxy-tools{flex:1 1 420px!important;justify-content:flex-end!important}
body.in-game .galaxy-coordinate-tools{display:flex!important;flex-wrap:wrap!important;gap:var(--ti-gap-sm)!important;align-items:end!important;justify-content:flex-end!important}
body.in-game .galaxy-coordinate-group{flex:1 1 150px!important;max-width:230px!important}
body.in-game .galaxy-number-stepper{display:grid!important;grid-template-columns:var(--ti-control-h) minmax(0,1fr) var(--ti-control-h)!important;gap:5px!important}
body.in-game .galaxy-number-stepper input{width:100%!important}
body.in-game .archipelago-scroll{max-width:100%!important;overflow:auto!important}
body.in-game .map-selection-panel{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .special-zones-section{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .special-zones-head{margin:0 0 12px!important;display:flex!important;flex-wrap:wrap!important;gap:6px 14px!important}
body.in-game .special-zone-grid{gap:var(--ti-gap)!important}

/* ---------- 13. 我的群島 ---------- */
body.in-game .islands-overview-head{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;justify-content:space-between!important}
body.in-game .islands-overview-head>div{flex:1 1 520px!important}
body.in-game .islands-capacity-strip,body.in-game .common-research-strip{margin:0!important;padding:12px var(--ti-panel-x)!important;gap:var(--ti-gap)!important;border-bottom:1px solid var(--ti-line-soft)!important;background:#091d26!important;display:flex!important;flex-wrap:wrap!important}
body.in-game .islands-overview-grid{padding:var(--ti-panel-y) var(--ti-panel-x)!important;gap:var(--ti-gap)!important}
body.in-game .island-resource-mini,body.in-game .island-overview-facts,body.in-game .island-work-summary{gap:var(--ti-gap-sm)!important}
body.in-game .island-overview-actions{gap:var(--ti-gap-sm)!important;flex-wrap:wrap!important}

/* ---------- 14. 玩家交易市場 ---------- */
body.in-game .market-page>h2{padding-left:var(--ti-panel-x)!important;padding-right:var(--ti-panel-x)!important}
body.in-game #marketBody{padding:0 var(--ti-panel-x) var(--ti-panel-y)!important}
body.in-game #marketBody>.market-tabs{margin-left:calc(-1 * var(--ti-panel-x))!important;margin-right:calc(-1 * var(--ti-panel-x))!important}
body.in-game .market-value-guide,body.in-game .market-card,body.in-game .market-note{margin:var(--ti-section-gap) 0 0!important;padding:var(--ti-card-pad)!important}
body.in-game .market-orders-head,body.in-game .animal-owned-head{margin:var(--ti-section-gap) 0 10px!important;display:flex!important;flex-wrap:wrap!important;gap:8px 14px!important;align-items:baseline!important;justify-content:space-between!important}
body.in-game .market-form{gap:var(--ti-gap)!important}
body.in-game .market-trend-block{margin-top:var(--ti-section-gap)!important;padding:var(--ti-card-pad)!important}
body.in-game .market-trend-block h3{margin:0 0 10px!important}

/* ---------- 15. 聯盟 / 好友 ---------- */
body.in-game .alliance-head,body.in-game .alliance-create,body.in-game .alliance-supply-card,body.in-game .alliance-text-view,body.in-game .alliance-text-editor{margin:0!important;padding:var(--ti-card-pad)!important}
body.in-game .alliance-head{display:flex!important;flex-wrap:wrap!important;gap:var(--ti-gap)!important;justify-content:space-between!important;align-items:flex-start!important}
body.in-game .alliance-create.row{padding:var(--ti-card-pad)!important;gap:var(--ti-gap)!important}
body.in-game .alliance-supply-card{margin-top:var(--ti-section-gap)!important}
body.in-game .friends-hero{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr)!important;gap:var(--ti-gap)!important}
body.in-game .friends-search-card{padding:var(--ti-card-pad)!important;background:#081b23!important;border-color:var(--ti-line-soft)!important}
body.in-game .friend-search{gap:var(--ti-gap-sm)!important;margin:8px 0 0!important}
body.in-game .friends-overview,body.in-game .friend-grid,body.in-game .friend-search-results{margin-top:var(--ti-section-gap)!important}
body.in-game .friend-grid{gap:var(--ti-gap)!important}
body.in-game .friend-section{margin:0!important}
body.in-game .friend-person,body.in-game .friend-row,body.in-game .friend-request{padding:10px 0!important;gap:var(--ti-gap-sm)!important}

/* ---------- 16. 訊息 / 排行榜 ---------- */
body.in-game .message-center-head{display:flex!important;flex-wrap:wrap!important;justify-content:space-between!important;align-items:flex-start!important}
body.in-game .message-retention{margin-left:auto!important;color:var(--ti-muted)!important}
body.in-game .message-compact-list{padding:var(--ti-panel-y) var(--ti-panel-x)!important;display:grid!important;gap:var(--ti-gap)!important}
body.in-game .message-card{margin:0!important;padding:0!important;overflow:hidden!important}
body.in-game .message-head{padding:12px 14px!important;gap:8px 12px!important;border-bottom:1px solid var(--ti-line-soft)!important;background:#0a2029!important}
body.in-game .message-head time{margin-left:auto!important;white-space:normal!important;color:var(--ti-muted)!important}
body.in-game .message-preview,body.in-game .message-full{padding:12px 14px!important;color:var(--ti-text-soft)!important}
body.in-game .message-actions{padding:0 14px 14px!important;display:flex!important;flex-wrap:wrap!important;gap:var(--ti-gap-sm)!important}
body.in-game .message-pager{padding:12px var(--ti-panel-x)!important;display:flex!important;flex-wrap:wrap!important;gap:var(--ti-gap-sm)!important;align-items:center!important}
body.in-game .score-table{min-width:920px!important}

/* ---------- 17. 群島動物顧問 / 珍珠 / 物品庫 ---------- */
body.in-game .pearl-hero{margin:0!important;padding:var(--ti-panel-y) var(--ti-panel-x)!important;gap:18px!important;border:0!important;border-bottom:1px solid var(--ti-line-soft)!important;border-radius:0!important;background:linear-gradient(180deg,var(--ti-surface-3),var(--ti-surface-2))!important}
body.in-game .pearl-section-title{margin:0!important}
body.in-game .advisor-grid{padding:var(--ti-panel-y) var(--ti-panel-x)!important;gap:var(--ti-gap)!important}
body.in-game .advisor-card{gap:var(--ti-gap)!important}
body.in-game .advisor-title,body.in-game .advisor-footer{gap:var(--ti-gap-sm)!important;flex-wrap:wrap!important}
body.in-game .item-effect-bar,body.in-game .speedup-shop-head{padding:12px 14px!important;gap:var(--ti-gap-sm)!important;background:#091d26!important;border:1px solid var(--ti-line-soft)!important}
body.in-game .item-shop-grid{gap:var(--ti-gap)!important}
body.in-game .item-shop-card{padding:var(--ti-card-pad)!important;border-color:var(--ti-line-soft)!important;background:#081b23!important}
body.in-game .inventory-title-row{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;justify-content:space-between!important}
body.in-game .inventory-count{flex:0 0 auto!important;white-space:nowrap!important;padding:8px 12px!important;border:1px solid var(--ti-line)!important;background:#0a2029!important;color:var(--ti-text-soft)!important}
body.in-game #inventoryBody{padding:0 var(--ti-panel-x) var(--ti-panel-y)!important}
body.in-game .inventory-section-head{margin:var(--ti-section-gap) 0 10px!important;display:flex!important;flex-wrap:wrap!important;gap:6px 14px!important;align-items:baseline!important}
body.in-game .inventory-grid{gap:var(--ti-gap)!important}
body.in-game .inventory-item-head{display:flex!important;flex-wrap:wrap!important;gap:6px 10px!important;align-items:baseline!important}
body.in-game .inventory-item-head strong{margin-left:auto!important;white-space:nowrap!important}

/* ---------- 18. 離港休整 / 伺服器參數 ---------- */
body.in-game .pause-panel>h2{padding:15px var(--ti-panel-x)!important}
body.in-game #timePauseBody{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
body.in-game .pause-active-card,body.in-game .pause-explain{margin:0 0 var(--ti-section-gap)!important}
body.in-game .pause-checks{display:grid!important;gap:var(--ti-gap-sm)!important;margin:var(--ti-section-gap) 0!important}
body.in-game .admin-box{margin:var(--ti-section-gap) var(--ti-panel-x) 0!important}
body.in-game .admin-box:last-child{margin-bottom:var(--ti-panel-y)!important}
body.in-game .admin-form{display:flex!important;flex-wrap:wrap!important;gap:var(--ti-gap)!important;align-items:end!important;margin-top:12px!important}
body.in-game .admin-form label{flex:1 1 220px!important;display:grid!important;gap:6px!important}
body.in-game .admin-note{margin-top:10px!important;padding:10px 12px!important;background:#091d26!important;border-left:3px solid var(--ti-line-strong)!important;color:var(--ti-muted)!important}
body.in-game .admin-stat-grid{gap:var(--ti-gap)!important;margin:12px 0 0!important}
body.in-game .admin-stat-grid>div{padding:11px 12px!important;background:#091d26!important;border-color:var(--ti-line-soft)!important;min-width:0!important;flex-wrap:wrap!important}
body.in-game .admin-ban-control{display:flex!important;flex-wrap:wrap!important;gap:var(--ti-gap-sm)!important}
body.in-game .admin-ban-control input{flex:1 1 220px!important}

/* ---------- 19. 頂端/左右欄只做一致性，不改 v28.13 骨架 ---------- */
body.in-game .topbar{background:linear-gradient(180deg,#0b3442,#08242e)!important;border-bottom-color:var(--ti-line)!important}
body.in-game .resource-cell{background:linear-gradient(180deg,#102b36,#091e27)!important;border-color:var(--ti-line)!important}
body.in-game .resource-cell span{color:var(--ti-muted)!important}
body.in-game .resource-cell b{color:var(--ti-text)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.in-game .sidebar,body.in-game .rightbar{background:linear-gradient(180deg,#08212a,#06171e)!important;border-color:var(--ti-line-soft)!important}
body.in-game .sidebar .nav{background:#091b23!important;border-color:#183541!important;color:#a9bdc5!important}
body.in-game .sidebar .nav:hover,body.in-game .sidebar .nav.active{background:linear-gradient(90deg,#1b4655,#0b2732)!important;color:#fff!important}
body.in-game .island-card,body.in-game .planet-card,body.in-game .island-list,body.in-game .planet-list{border-color:var(--ti-line-soft)!important}
body.in-game .island-title,body.in-game .planet-title,body.in-game .island-list-title,body.in-game .planet-list-title{background:#102a35!important;border-color:var(--ti-line)!important;color:var(--ti-text-soft)!important}

/* ---------- 20. Desktop / Tablet / Mobile 響應式 ---------- */
@media(min-width:701px){
  body.in-game,body.in-game button,body.in-game input,body.in-game select,body.in-game textarea,body.in-game label,body.in-game table,
  body.in-game td,body.in-game th,body.in-game p,body.in-game span,body.in-game b,body.in-game strong,body.in-game em,body.in-game small{font-size:20px!important}
}

@media(max-width:1180px){
  :root{--ti-page-x:16px;--ti-panel-x:16px;--ti-section-gap:14px;--ti-card-pad:13px;--ti-gap:10px}
  body.in-game .queue-lanes{grid-template-columns:1fr!important}
  body.in-game .scene-panel-head>div:first-child,body.in-game .map-head-copy{flex-basis:100%!important}
  body.in-game .scene-island-chip,body.in-game .research-lab-chip,body.in-game .shipyard-summary-chip{flex:1 1 100%!important;min-width:0!important}
  body.in-game .galaxy-tools{flex-basis:100%!important;justify-content:flex-start!important}
  body.in-game .galaxy-coordinate-tools{justify-content:flex-start!important}
  body.in-game .research-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .resource-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .resource-production-grid,body.in-game .power-production-grid{grid-template-columns:1fr!important}
  body.in-game .governance-role-grid{grid-template-columns:1fr!important}
  body.in-game .friends-hero{grid-template-columns:1fr!important}
  body.in-game .advisor-grid{grid-template-columns:1fr!important}
  body.in-game .market-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:900px){
  :root{--ti-page-x:12px;--ti-page-y:12px;--ti-panel-x:14px;--ti-panel-y:13px;--ti-section-gap:12px;--ti-card-pad:12px;--ti-gap:10px}
  body.in-game #content{padding-bottom:24px!important}
  body.in-game .governance-quick-links{justify-content:flex-start!important}
  body.in-game .research-current-strip{grid-template-columns:1fr!important}
  body.in-game .islands-overview-grid{grid-template-columns:1fr!important}
  body.in-game .fleet-flow{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
  body.in-game .fleet-step-card{width:100%!important}
  body.in-game .fleet-target label,body.in-game .fleet-cargo label,body.in-game .galaxy-coordinate-group{flex:1 1 210px!important;max-width:none!important}
  body.in-game .market-form{grid-template-columns:1fr 1fr!important}
  body.in-game .message-retention{width:100%!important;margin-left:0!important}
  body.in-game .message-head time{width:100%!important;margin-left:0!important}
  body.in-game .admin-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:700px){
  :root{--ti-page-x:9px;--ti-page-y:9px;--ti-panel-x:11px;--ti-panel-y:11px;--ti-section-gap:10px;--ti-card-pad:10px;--ti-gap:8px;--ti-gap-sm:6px;--ti-control-h:42px}
  body.in-game{font-size:14px!important;line-height:1.5!important}
  body.in-game button,body.in-game input,body.in-game select,body.in-game textarea,body.in-game label,body.in-game table,
  body.in-game td,body.in-game th,body.in-game p,body.in-game span,body.in-game b,body.in-game strong,body.in-game em,body.in-game small{font-size:14px!important;line-height:1.45!important}
  body.in-game h1{font-size:22px!important}
  body.in-game h2{font-size:20px!important}
  body.in-game h3{font-size:18px!important}
  body.in-game h4{font-size:16px!important}
  body.in-game .panel>h2,body.in-game .panel>h3,body.in-game .panel>h4{padding:11px var(--ti-panel-x)!important}
  body.in-game .resource-overview-title,body.in-game .resource-capacity-title,body.in-game .production-panel-head,
  body.in-game .scene-panel-head,body.in-game .governance-hero,body.in-game .governance-section-head,
  body.in-game .islands-overview-head,body.in-game .map-head,body.in-game .fleet-dispatch-head,
  body.in-game .friends-hero,body.in-game .message-center-head,body.in-game .inventory-title-row,body.in-game .pearl-section-title{padding:11px var(--ti-panel-x)!important}
  body.in-game .tabs,body.in-game .message-tabs,body.in-game .market-tabs,body.in-game .facility-category-tabs,body.in-game .shipyard-category-tabs,body.in-game .research-branch-tabs{padding:9px var(--ti-panel-x)!important}
  body.in-game .tabs>* ,body.in-game .message-tabs button,body.in-game .market-tabs button,body.in-game .facility-category-tabs button,body.in-game .shipyard-category-tabs button,body.in-game .research-branch-tabs button{flex:1 1 calc(50% - 6px)!important;white-space:normal!important}
  body.in-game .resource-capacity-grid,body.in-game .research-grid,body.in-game .inventory-grid,body.in-game .advisor-grid{grid-template-columns:1fr!important}
  body.in-game .catalog-cards{grid-template-columns:1fr!important;padding:var(--ti-panel-y) var(--ti-panel-x)!important}
  body.in-game .catalog-card-head{grid-template-columns:92px minmax(0,1fr)!important;gap:10px!important}
  body.in-game .catalog-card .catalog-art,body.in-game .catalog-card .item-image{width:92px!important;height:92px!important}
  body.in-game .catalog-stats .unit-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .catalog-actions{display:flex!important;flex-wrap:wrap!important}
  body.in-game .catalog-actions>*{flex:1 1 120px!important}
  body.in-game .research-grid-card{padding:var(--ti-card-pad)!important}
  body.in-game .research-grid-card-head{grid-template-columns:68px minmax(0,1fr)!important;gap:9px!important}
  body.in-game .research-grid-card-head img{width:68px!important;height:68px!important}
  body.in-game .research-grid-actions{grid-template-columns:1fr!important}
  body.in-game .governance-role-controls{grid-template-columns:1fr!important}
  body.in-game .governance-role-controls select{grid-column:auto!important}
  body.in-game .governance-quick-links>*{flex:1 1 140px!important}
  body.in-game .fleet-grid{grid-template-columns:1fr!important;padding:10px 0!important}
  body.in-game .fleet-pick{grid-template-columns:62px minmax(0,1fr)!important}
  body.in-game .fleet-pick img{width:62px!important;height:50px!important}
  body.in-game .fleet-pick-controls{grid-column:1/-1!important;width:100%!important;padding:8px!important}
  body.in-game .fleet-target label,body.in-game .fleet-cargo label,body.in-game .galaxy-coordinate-group{flex:1 1 100%!important}
  body.in-game .galaxy-coordinate-tools>.big-action,body.in-game .galaxy-coordinate-tools>.soft-btn{flex:1 1 140px!important}
  body.in-game .market-form,body.in-game .market-value-guide,body.in-game .market-range{grid-template-columns:1fr!important}
  body.in-game .market-arrow{display:none!important}
  body.in-game #marketBody{padding-left:var(--ti-panel-x)!important;padding-right:var(--ti-panel-x)!important}
  body.in-game .friends-search-card{padding:10px!important}
  body.in-game .friend-search{flex-direction:column!important}
  body.in-game .friend-search button{width:100%!important}
  body.in-game .message-compact-list{padding:var(--ti-panel-y) var(--ti-panel-x)!important}
  body.in-game .message-actions>*{flex:1 1 110px!important}
  body.in-game .pearl-hero{grid-template-columns:82px minmax(0,1fr)!important;gap:10px!important}
  body.in-game .pearl-hero img{width:82px!important;height:82px!important}
  body.in-game .advisor-card{grid-template-columns:1fr!important}
  body.in-game .inventory-item-head strong{margin-left:0!important}
  body.in-game .inventory-count{white-space:normal!important}
  body.in-game .admin-form{display:grid!important;grid-template-columns:1fr!important}
  body.in-game .admin-form label,body.in-game .admin-form button{width:100%!important}
  body.in-game .admin-stat-grid{grid-template-columns:1fr!important}
  body.in-game .queue-end,body.in-game .unit-queue-end{width:100%!important;margin-left:0!important;justify-content:flex-start!important}
  body.in-game .queue-end>button,body.in-game .unit-queue-end>button{width:100%!important}
  body.in-game .score-table{min-width:760px!important}
}

@media(max-width:430px){
  body.in-game .tabs>* ,body.in-game .message-tabs button,body.in-game .market-tabs button,body.in-game .facility-category-tabs button,body.in-game .shipyard-category-tabs button,body.in-game .research-branch-tabs button{flex-basis:100%!important}
  body.in-game .catalog-card-head{grid-template-columns:1fr!important}
  body.in-game .catalog-card .catalog-art,body.in-game .catalog-card .item-image{width:min(100%,240px)!important;height:auto!important;justify-self:center!important}
  body.in-game .catalog-stats .unit-stat-grid{grid-template-columns:1fr!important}
  body.in-game .pearl-hero{grid-template-columns:1fr!important}
  body.in-game .pearl-hero img{width:74px!important;height:74px!important}
}


/* ---------- 17. 字級硬下限：壓過 v28.13 歷史 RWD 的高 specificity 小字 ----------
   舊版在部分 breakpoint 對 resource / table / button 等使用 14~17px !important。
   本段刻意放在檔案最後並加上 #game specificity，確保桌機/平板 >=701px 真正最低 20px；
   手機 <=700px 才允許 14px。禁止再用縮小字體解決版面不足。 ---------- */
html body.in-game #game :is(p,span,b,strong,em,small,label,button,input,select,textarea,td,th,a){
  font-size:20px!important;
  line-height:1.45!important;
}
html body.in-game #game h1{font-size:28px!important;line-height:1.28!important}
html body.in-game #game h2{font-size:24px!important;line-height:1.32!important}
html body.in-game #game h3{font-size:22px!important;line-height:1.34!important}
html body.in-game #game h4{font-size:20px!important;line-height:1.38!important}

@media(max-width:700px){
  html body.in-game #game :is(p,span,b,strong,em,small,label,button,input,select,textarea,td,th,a){
    font-size:14px!important;
    line-height:1.45!important;
  }
  html body.in-game #game h1{font-size:22px!important}
  html body.in-game #game h2{font-size:20px!important}
  html body.in-game #game h3{font-size:18px!important}
  html body.in-game #game h4{font-size:16px!important}
}

/* ========================================================================
   v2026.08.29.14 — 地圖／場景背景簡化
   目的：所有海面型場景回歸「單純的海」，移除無功能意義的雷達圈、
         水波圈、洋流線、光帶與背景漂移；海域航圖不再左右晃動。
   注意：只改視覺，不改任何遊戲數值、座標、單位或互動功能。
   ======================================================================== */

/* 共用海面：只保留靜態深淺海色，不再做任何背景位移。 */
body.in-game .ocean-motion-surface,
body.in-game .fleet-ocean-panel,
body.in-game .ocean-chart-stage,
body.in-game .shipyard-harbor-stage,
body.in-game .defense-sea-stage,
body.in-game .facility-island-stage.energy-sea-stage,
body.in-game .facility-island-stage.moon-stage{
  background:#07556b!important;
  background-image:linear-gradient(180deg,#0b6f86 0%,#075b72 46%,#04485f 100%)!important;
  background-position:0 0!important;
  background-size:100% 100%!important;
  animation:none!important;
}

/* 海域航圖：移除波紋、閃光、網格、羅盤與偽元素；畫面只剩海與實際島位。 */
body.in-game .ocean-motion-surface::before,
body.in-game .ocean-motion-surface::after,
body.in-game .archipelago-scroll::before,
body.in-game .archipelago-scroll::after,
body.in-game .ocean-chart-stage::before,
body.in-game .ocean-chart-stage::after,
body.in-game .ocean-motion-sheen,
body.in-game .ocean-chart-grid-lines,
body.in-game .ocean-chart-compass{
  display:none!important;
  content:none!important;
  animation:none!important;
}

/* 海域航圖島位固定於正式 5x5 座標，不採用視覺偏移。 */
body.in-game .map-island-node,
body.in-game .map-island-node.selected{
  transform:translate(-50%,-50%)!important;
}
body.in-game .map-island-node:hover,
body.in-game .map-island-node:focus-visible{
  transform:translate(-50%,-50%) scale(1.035)!important;
}

/* 港灣整備場：海面保持靜態；移除船後水痕與未部署圓圈提示。 */
body.in-game .shipyard-harbor-stage::before,
body.in-game .harbor-water-sheen,
body.in-game .open-sea-swell,
body.in-game .scene-ocean-current,
body.in-game .harbor-wave-line,
body.in-game .open-sea-foam,
body.in-game .shipyard-wake,
body.in-game .empty-berth-mark{
  display:none!important;
  content:none!important;
  animation:none!important;
}
body.in-game .shipyard-ship-art-wrap{
  animation:none!important;
}

/* 海防工事：移除雷達、聲納、水波圈與全場海面掃光，只保留海與海防本體。 */
body.in-game .defense-sea-stage::before,
body.in-game .defense-sea-sheen,
body.in-game .defense-command-ring,
body.in-game .defense-sonar-pulse,
body.in-game .defense-water-ring,
body.in-game .defense-holo-mark{
  display:none!important;
  content:none!important;
  animation:none!important;
}
body.in-game .defense-art-wrap{
  animation:none!important;
}

/* 設施動能海面／外海前哨：移除水波、洋流、海面掃光與羅盤。 */
body.in-game .facility-island-stage.energy-sea-stage::before,
body.in-game .facility-island-stage.moon-stage::before,
body.in-game .facility-sea-sheen,
body.in-game .scene-wave-ring,
body.in-game .scene-compass{
  display:none!important;
  content:none!important;
  animation:none!important;
}

/* 一般島設施仍保留陸地語意，但背景改為單純靜態陸地，不再漂移或掃光。 */
body.in-game .facility-island-stage.land-stage{
  background:#4c8250!important;
  background-image:linear-gradient(180deg,#5b955d 0%,#4d8553 52%,#417548 100%)!important;
  background-position:0 0!important;
  background-size:100% 100%!important;
  animation:none!important;
}
body.in-game .facility-island-stage.land-stage::before,
body.in-game .facility-land-texture,
body.in-game .facility-land-path,
body.in-game .facility-land-breeze,
body.in-game .facility-sun-sweep,
body.in-game .scene-cloud-shadow{
  display:none!important;
  content:none!important;
  animation:none!important;
}

/* 場景頁面本身不做自動漂移；只保留玩家主動 hover 的輕微縮放回饋。 */
body.in-game .facility-island-stage,
body.in-game .shipyard-harbor-stage,
body.in-game .defense-sea-stage,
body.in-game .ocean-chart-stage,
body.in-game .ocean-chart-scroll{
  animation:none!important;
}

/* v2026.09.04.24 — 可替換背景圖：海域航圖／港灣整備場／海防工事。
   背景檔已獨立成 public/assets，可直接用同檔名覆蓋替換。 */
:root{
  --ti-scene-bg-ocean-chart:url('/assets/scene_bg_ocean_chart.png?v=2026090610');
  --ti-scene-bg-harbor:url('/assets/scene_bg_harbor_outfitting.png?v=2026090501');
  --ti-scene-bg-defense:url('/assets/scene_bg_defense_stage.png?v=2026090610');
}
body.in-game .ocean-chart-stage{
  background:#07556b!important;
  background-image:var(--ti-scene-bg-ocean-chart)!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:cover!important;
}
body.in-game .shipyard-harbor-stage{
  background:#07556b!important;
  background-image:var(--ti-scene-bg-harbor)!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:cover!important;
}
body.in-game .defense-sea-stage{
  background:#07556b!important;
  background-image:var(--ti-scene-bg-defense)!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:cover!important;
}

/* v2026.08.29.16：聯盟階級權限、好友島嶼／私訊、戰報收藏與戰績明細 */
body.in-game .battle-library-panel .battle-library-head{
  margin:0!important;
  padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important;
  border-bottom:1px solid rgba(86,151,166,.24)!important;
}
body.in-game .battle-library-panel .battle-library-head h2{margin:0!important}
body.in-game .battle-library-panel #battleLibraryBody{
  padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important;
}
body.in-game .battle-library-panel .battle-library-grid{gap:var(--ti-gap,12px)!important}
body.in-game .battle-library-panel .battle-library-card{
  padding:var(--ti-card-pad,14px)!important;
}
body.in-game .battle-library-title>div,
body.in-game .battle-library-meta,
body.in-game .battle-library-actions{min-width:0}
body.in-game .battle-library-title b,
body.in-game .battle-library-meta span{overflow-wrap:anywhere}

body.in-game .alliance-panel #allianceBody{padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important}
body.in-game .alliance-my-role{margin:8px 0 12px;color:#91b3bf}
body.in-game .alliance-my-role b{color:#d9f7f3}
body.in-game .alliance-permission-card{
  margin-top:var(--ti-section-gap,16px);
  padding:var(--ti-card-pad,14px);
  border:1px solid rgba(80,164,170,.35);
  background:rgba(5,28,35,.78);
}
body.in-game .alliance-permission-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}
body.in-game .alliance-permission-head h3{margin:0 0 6px}
body.in-game .alliance-permission-head p{margin:0;color:#87a9b4;line-height:1.55}
body.in-game .alliance-permission-table{min-width:940px}
body.in-game .alliance-permission-table th,
body.in-game .alliance-permission-table td{text-align:center;vertical-align:middle}
body.in-game .alliance-permission-table th:first-child,
body.in-game .alliance-permission-table td:first-child{text-align:left;white-space:nowrap}
body.in-game .permission-check{display:inline-flex;align-items:center;gap:8px;justify-content:center;cursor:pointer;white-space:nowrap}
body.in-game .permission-check input{width:22px;height:22px;accent-color:#67d4c1}
body.in-game .permission-check input:disabled{cursor:not-allowed;opacity:.75}
body.in-game .alliance-member-role-edit{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body.in-game .alliance-member-role-edit select{min-width:150px}
body.in-game .alliance-role-badge{display:inline-flex;align-items:center;padding:6px 10px;border:1px solid #365e69;background:#0c2831;border-radius:999px;white-space:nowrap}
body.in-game .alliance-role-badge.role-founder{border-color:#b69042;color:#f1d78d;background:#302814}
body.in-game .alliance-role-badge.role-deputy{border-color:#6c62a6;color:#d7cfff;background:#211d3b}
body.in-game .alliance-role-badge.role-senior{border-color:#477799;color:#b9ddf3;background:#14293a}

body.in-game .friend-grid.refined{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.in-game .friend-section-main{grid-column:1/-1}
body.in-game .friend-person-detailed{grid-template-columns:42px minmax(0,1fr) auto;align-items:start}
body.in-game .friend-person-detailed>.relationship-badge{align-self:start}
body.in-game .friend-direct-actions{grid-column:3;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
body.in-game .friend-islands{margin-top:10px;display:grid;gap:7px}
body.in-game .friend-islands-label{color:#83a8b4;font-weight:700}
body.in-game .friend-islands>div{display:flex;gap:8px;flex-wrap:wrap}
body.in-game .friend-island-chip{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:"kind name" "coord coord";
  gap:3px 8px;
  align-items:center;
  min-width:240px;
  padding:9px 11px;
  text-align:left;
  border:1px solid #315866;
  background:#071b22;
  color:#c3dde5;
}
body.in-game .friend-island-chip b{grid-area:kind;color:#8fc7d2}
body.in-game .friend-island-chip span{grid-area:name;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.in-game .friend-island-chip small{grid-area:coord;color:#78a4b1}
body.in-game .friend-island-chip.home{border-color:#4f8f80;background:#0a2928}
body.in-game .friend-island-chip:hover,
body.in-game .friend-island-chip:focus-visible{border-color:#69bfc0;box-shadow:0 0 0 2px rgba(105,191,192,.16)}
body.in-game .friend-islands.empty{color:#7896a0}
body.in-game .friend-message-dialog input{width:100%;box-sizing:border-box}

body.in-game .stats-salvage-list{display:grid;gap:10px;margin:10px 0 18px}
body.in-game .stats-salvage-list article{padding:12px 14px;border:1px solid #315360;background:#071920}
body.in-game .stats-salvage-list article>div{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
body.in-game .stats-salvage-list article>div span{color:#8eb1bc}
body.in-game .stats-salvage-list p{margin:8px 0;color:#c2dbe2;line-height:1.5}
body.in-game .stats-salvage-list small{color:#7899a4}

body.in-game .pearl-resource{cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
body.in-game .pearl-resource:hover,
body.in-game .pearl-resource:focus-visible{border-color:rgba(219,194,255,.78)!important;box-shadow:0 0 0 2px rgba(206,179,255,.18),0 0 18px rgba(184,141,240,.13);outline:none}
body.in-game .pearl-resource:active{transform:translateY(1px)}

@media(max-width:900px){
  body.in-game .alliance-permission-head{flex-direction:column}
  body.in-game .alliance-permission-head>button{width:100%}
}
@media(max-width:720px){
  body.in-game .friend-grid.refined{grid-template-columns:1fr!important}
  body.in-game .friend-section-main{grid-column:auto}
  body.in-game .friend-person-detailed{grid-template-columns:38px minmax(0,1fr)}
  body.in-game .friend-person-detailed>.relationship-badge{grid-column:2;justify-self:start}
  body.in-game .friend-direct-actions{grid-column:2;justify-content:flex-start}
  body.in-game .friend-island-chip{min-width:100%;width:100%}
}

/* v2026.08.29.16：戰爭紀錄顯示完整摘要，仍沿用全站卡片內距與 20px 文字下限。 */
body.in-game .stats-battle-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;}
body.in-game .stats-battle-main{display:flex;flex:1;min-width:0;flex-wrap:wrap;align-items:center;gap:8px 12px;}
body.in-game .stats-battle-main>b{min-width:180px;}
body.in-game .stats-battle-main>small{flex-basis:100%;font-size:20px;line-height:1.55;}
@media (max-width:760px){body.in-game .stats-battle-row{align-items:stretch;flex-direction:column;}body.in-game .stats-battle-row>button{width:100%;}}

/* v2026.08.29.17 — 物品庫零數量隱藏、專業排行榜、外海特殊區域藏寶航圖 */

/* ---------- 排行榜：固定排序入口、個人摘要、前三名與資料表層級 ---------- */
body.in-game .leaderboard-panel{overflow:hidden}
body.in-game .leaderboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:var(--ti-panel-y) var(--ti-panel-x);border-bottom:1px solid var(--ti-line-soft);background:linear-gradient(135deg,rgba(10,42,52,.96),rgba(5,24,32,.98))}
body.in-game .leaderboard-head>div:first-child{min-width:0}
body.in-game .leaderboard-head h2{margin:4px 0 6px!important}
body.in-game .leaderboard-head p{margin:0;color:var(--ti-muted);line-height:1.55}
body.in-game .leaderboard-sort{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
body.in-game .leaderboard-sort button{min-height:44px;padding:8px 14px;border:1px solid #315665;border-radius:10px;background:#091d26;color:#a9c3cc;font-size:20px;font-weight:800;cursor:pointer;transition:border-color .15s ease,background .15s ease,color .15s ease,transform .15s ease}
body.in-game .leaderboard-sort button:hover{border-color:#588a99;color:#e2f4f7;transform:translateY(-1px)}
body.in-game .leaderboard-sort button.active{border-color:#6ac8c2;background:linear-gradient(180deg,#174b52,#0d333a);color:#eafffb;box-shadow:inset 0 0 0 1px rgba(126,237,224,.14),0 6px 18px rgba(0,0,0,.18)}
body.in-game .leaderboard-my-summary{margin:var(--ti-panel-y) var(--ti-panel-x) 0;border:1px solid #315563;border-radius:14px;background:linear-gradient(150deg,#0d2b35,#081d25);overflow:hidden}
body.in-game .leaderboard-my-title{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border-bottom:1px solid #294852;background:rgba(19,63,72,.4)}
body.in-game .leaderboard-my-title span{color:#9ab5bf}
body.in-game .leaderboard-my-title b{color:#bdf3e7;font-size:22px}
body.in-game .leaderboard-my-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
body.in-game .leaderboard-my-grid>div{min-width:0;padding:13px 14px;border-right:1px solid #203d47;display:grid;gap:4px}
body.in-game .leaderboard-my-grid>div:last-child{border-right:0}
body.in-game .leaderboard-my-grid>div.active{background:linear-gradient(180deg,rgba(33,95,94,.35),rgba(13,47,53,.28));box-shadow:inset 0 3px 0 #6ed4c8}
body.in-game .leaderboard-my-grid span,body.in-game .leaderboard-my-grid small{color:#849fa9}
body.in-game .leaderboard-my-grid b{font-size:26px;color:#eefafa}
body.in-game .leaderboard-my-grid>div.active b{color:#bff9ea}
body.in-game .leaderboard-section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:18px var(--ti-panel-x) 10px}
body.in-game .leaderboard-section-title h3{margin:2px 0 0!important;padding:0!important}
body.in-game .leaderboard-section-title small{max-width:680px;color:#78939d;text-align:right;line-height:1.45}
body.in-game .leaderboard-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 var(--ti-panel-x) 14px}
body.in-game .leaderboard-podium-card{min-width:0;display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;align-items:center;padding:14px;border:1px solid #31505b;border-radius:13px;background:linear-gradient(145deg,#0d2932,#071b22);box-shadow:0 8px 24px rgba(0,0,0,.14)}
body.in-game .leaderboard-podium-card.place-1{border-color:#a88b4d;background:linear-gradient(145deg,rgba(75,59,25,.72),#0b242b)}
body.in-game .leaderboard-podium-card.place-2{border-color:#6f8990;background:linear-gradient(145deg,rgba(62,76,80,.55),#0b242b)}
body.in-game .leaderboard-podium-card.place-3{border-color:#8a6549;background:linear-gradient(145deg,rgba(73,48,32,.58),#0b242b)}
body.in-game .leaderboard-podium-card.is-me{box-shadow:inset 0 0 0 2px rgba(111,221,205,.34),0 8px 24px rgba(0,0,0,.14)}
body.in-game .leaderboard-medal{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;border:2px solid currentColor;background:rgba(4,20,26,.55);font-size:28px;font-weight:900;color:#d8c27d}
body.in-game .place-2 .leaderboard-medal{color:#b7c7cb}
body.in-game .place-3 .leaderboard-medal{color:#bd8865}
body.in-game .leaderboard-podium-copy{min-width:0;display:grid;gap:2px}
body.in-game .leaderboard-podium-copy b{color:#edf8fa;font-size:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.in-game .leaderboard-podium-copy span{color:#7f9da7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.in-game .leaderboard-podium-copy strong{margin-top:4px;color:#b9e9e1;font-size:22px}
body.in-game .leaderboard-table-scroll{margin:0 var(--ti-panel-x) var(--ti-panel-y);border:1px solid #294752;border-radius:12px;background:#061920}
body.in-game .leaderboard-table{margin:0!important;min-width:1040px!important;border-collapse:separate!important;border-spacing:0!important}

/* v2026.09.13.11：虛擬盟友直接沿用聯盟成員表格，不再使用獨立 chip 版型。 */
body.in-game .alliance-virtual-member-row td:first-child>small{display:block;margin-top:4px;color:#86aab2;line-height:1.35}
body.in-game .alliance-virtual-member-name{appearance:none;border:0!important;padding:0!important;margin:0!important;background:transparent!important;box-shadow:none!important;color:#63d7ff!important;font:inherit;font-weight:900;min-height:0!important;cursor:pointer;text-align:left}
body.in-game .alliance-virtual-member-name:hover{text-decoration:underline}
body.in-game .alliance-role-badge.role-virtual{border-color:rgba(99,215,255,.45);background:rgba(41,108,126,.22);color:#b9efff}
body.in-game .alliance-virtual-invite{margin-top:18px;padding-top:16px;border-top:1px solid rgba(68,115,126,.45)}
body.in-game .alliance-virtual-invite h4{margin:0 0 10px;color:#b8d8df}
/* 排行榜今日淨變動：正值、負值、持平需一眼可辨識。 */
body.in-game .score-daily-delta{display:inline-block;min-width:74px;white-space:nowrap;font-weight:900;text-align:right}
body.in-game .score-daily-delta.up{color:#78dba5}
body.in-game .score-daily-delta.down{color:#ff8a84}
body.in-game .score-daily-delta.flat{color:#87a1a8}

body.in-game .leaderboard-table thead th{position:sticky;top:0;z-index:2;background:#102e38!important;color:#b9d1d8!important;border-bottom:1px solid #40606b!important;font-weight:900;text-align:left}
body.in-game .leaderboard-table tbody tr:nth-child(even){background:rgba(13,39,47,.42)}
body.in-game .leaderboard-table tbody tr:hover{background:rgba(31,75,82,.45)}
body.in-game .leaderboard-table tbody tr.my-score{background:linear-gradient(90deg,rgba(18,88,82,.45),rgba(13,48,55,.55))!important;box-shadow:inset 4px 0 0 #65d1c2}
body.in-game .leaderboard-table th,body.in-game .leaderboard-table td{padding:12px 13px!important;vertical-align:middle;border-right:0!important}
body.in-game .leaderboard-table .score-active-metric{background:rgba(53,123,117,.22)!important;color:#d7fff6!important;font-weight:900}
body.in-game .score-rank-badge{display:inline-grid;place-items:center;min-width:58px;min-height:38px;padding:4px 8px;border:1px solid #355866;border-radius:999px;background:#0b2630;color:#bbd8df;font-weight:900}
body.in-game .score-rank-badge.rank-1{border-color:#a78d4c;color:#f1d88d;background:rgba(80,61,24,.36)}
body.in-game .score-rank-badge.rank-2{border-color:#718b92;color:#d2dfe2;background:rgba(70,87,91,.28)}
body.in-game .score-rank-badge.rank-3{border-color:#8b664a;color:#d8a17a;background:rgba(83,51,30,.3)}
body.in-game .score-player-cell{display:flex;align-items:center;gap:8px;min-width:0}
body.in-game .score-player-cell b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e6f4f7}
body.in-game .score-player-cell span{padding:2px 8px;border-radius:999px;background:#16554f;color:#c7fff4;font-weight:800}
body.in-game .score-muted{color:#5f7d87}

/* ---------- 外海特殊區域：固定藏寶航圖，不再用五／六欄表格式卡片 ---------- */
body.in-game .special-zone-chart-section{padding:var(--ti-panel-y) var(--ti-panel-x)!important;overflow:hidden}
body.in-game .special-zone-chart-section .special-zones-head{padding:0!important;margin:0 0 12px!important}
body.in-game .special-zone-chart-section .special-zones-head p{margin:5px 0 0;color:#829ca5;line-height:1.45}
body.in-game .special-zone-map-scroll{overflow-x:auto;overflow-y:hidden;padding:2px 0 10px;scrollbar-gutter:stable}
body.in-game .special-zone-treasure-map{position:relative;min-width:1080px;height:590px;border:2px solid #705f3b;border-radius:16px;overflow:hidden;background:
  radial-gradient(circle at 18% 22%,rgba(255,245,199,.55) 0 8%,transparent 8.5%),
  radial-gradient(circle at 72% 68%,rgba(128,100,52,.13) 0 12%,transparent 12.5%),
  radial-gradient(circle at 46% 45%,rgba(255,255,223,.22),transparent 28%),
  linear-gradient(128deg,#d7c48e 0%,#cdb47a 48%,#bfa26a 100%);
  box-shadow:inset 0 0 42px rgba(76,52,22,.35),0 12px 28px rgba(0,0,0,.25)}
body.in-game .special-zone-treasure-map:before{content:"";position:absolute;inset:18px;border:1px solid rgba(78,56,28,.42);border-radius:12px;pointer-events:none;background:
  linear-gradient(24deg,transparent 0 46%,rgba(80,60,32,.09) 47% 48%,transparent 49% 100%),
  linear-gradient(151deg,transparent 0 56%,rgba(80,60,32,.08) 57% 58%,transparent 59% 100%)}
body.in-game .special-zone-treasure-map:after{content:"萬潮外海航圖";position:absolute;left:34px;top:26px;padding:7px 12px;border-bottom:2px solid rgba(72,50,26,.5);color:#4c3a22;font-size:24px;font-weight:900;letter-spacing:.08em;pointer-events:none}
body.in-game .special-zone-compass{position:absolute;right:42px;bottom:34px;width:92px;height:92px;border:2px solid rgba(72,52,28,.62);border-radius:50%;color:#4b3821;pointer-events:none}
body.in-game .special-zone-compass:before,body.in-game .special-zone-compass:after{content:"";position:absolute;left:50%;top:50%;background:rgba(72,52,28,.58);transform:translate(-50%,-50%)}
body.in-game .special-zone-compass:before{width:2px;height:72px}
body.in-game .special-zone-compass:after{width:72px;height:2px}
body.in-game .special-zone-compass i{position:absolute;left:50%;top:-28px;transform:translateX(-50%);font-style:normal;font-size:20px;font-weight:900}
body.in-game .special-zone-compass span{position:absolute;left:50%;top:50%;width:18px;height:18px;border:2px solid #4b3821;background:#d9c792;transform:translate(-50%,-50%) rotate(45deg)}
body.in-game .special-zone-route{position:absolute;left:17%;top:38%;width:62%;height:36%;border-top:3px dashed rgba(80,56,28,.32);border-radius:50%;transform:rotate(-8deg);pointer-events:none}
body.in-game .special-zone-pin{position:absolute;left:var(--zone-x);top:var(--zone-y);transform:translate(-50%,-50%);width:238px;min-height:142px;padding:8px;display:grid;grid-template-rows:auto auto auto;align-content:start;gap:7px;border:2px solid rgba(73,53,29,.62);border-radius:13px;background:rgba(226,207,154,.94);color:#3f301e;text-align:left;box-shadow:0 5px 13px rgba(67,45,22,.22);transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,background .15s ease;z-index:3}
body.in-game .special-zone-pin:hover{transform:translate(-50%,-50%) scale(1.02);border-color:#3e6a63;box-shadow:0 8px 18px rgba(51,37,20,.3)}
body.in-game .special-zone-pin.active{border-color:#87622f;background:rgba(238,214,151,.97)}
body.in-game .special-zone-pin.selected{border-color:#1d665f;background:#d7ead8;box-shadow:0 0 0 4px rgba(31,105,96,.2),0 8px 18px rgba(51,37,20,.28)}
body.in-game .special-zone-pin-select{width:100%;min-height:54px;padding:0;display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:8px;border:0!important;background:transparent!important;color:inherit!important;text-align:left;cursor:pointer;box-shadow:none!important}
body.in-game .special-zone-pin-select:focus-visible{outline:3px solid rgba(26,103,94,.52);outline-offset:3px;border-radius:9px}
body.in-game .special-zone-pin-mark{width:46px;height:46px;border:2px solid rgba(67,49,28,.62);border-radius:50%;display:grid;place-items:center;background:rgba(248,233,190,.58);font-size:25px;font-weight:900;color:#4f3a21}
body.in-game .special-zone-pin.selected .special-zone-pin-mark{border-color:#286b63;color:#154e49;background:#c6e4d2}
body.in-game .special-zone-pin-copy{min-width:0;display:grid;gap:2px}
body.in-game .special-zone-pin-copy b{font-size:20px;line-height:1.18;overflow-wrap:anywhere}
body.in-game .special-zone-pin-copy small{font-size:20px;line-height:1.18;color:#665038;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.in-game .special-zone-pin.selected .special-zone-pin-copy small{color:#315f59}
body.in-game .special-zone-pin-facts{display:grid;gap:3px;padding:6px 7px;border-top:1px solid rgba(78,56,28,.22);border-bottom:1px solid rgba(78,56,28,.22);background:rgba(255,248,217,.2);border-radius:7px}
body.in-game .special-zone-pin-facts span{display:block;min-width:0;font-size:20px;line-height:1.18;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#5d482e}
body.in-game .special-zone-pin-facts .has-debris{color:#744516;white-space:normal;overflow:visible;text-overflow:clip}
body.in-game .special-zone-pin-facts .no-debris{color:#796b51;font-weight:700}
body.in-game .special-zone-pin-actions{display:flex;flex-wrap:wrap;gap:6px}
body.in-game .special-zone-map-action{flex:1 1 0;min-width:0;min-height:42px;padding:6px 8px;border:1px solid rgba(73,53,29,.65);border-radius:8px;background:rgba(247,232,184,.68);color:#49361f;font-size:20px;font-weight:900;line-height:1.1;cursor:pointer;white-space:nowrap}
body.in-game .special-zone-map-action:hover:not(:disabled){background:#f3dfaa;border-color:#4f765f;color:#24483b}
body.in-game .special-zone-map-action.salvage{background:rgba(211,232,211,.78);border-color:#56795f;color:#31533b}
body.in-game .special-zone-map-action.danger{background:rgba(230,199,184,.82);border-color:#8a5744;color:#6d2f26}
body.in-game .special-zone-map-action:disabled{opacity:.48;cursor:not-allowed;filter:saturate(.65)}
body.in-game .special-zone-detail-panel{margin-top:12px;padding:14px;border:1px solid #365663;border-radius:13px;background:linear-gradient(150deg,#0d2a34,#071b22);min-height:120px}
body.in-game .special-zone-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid #294852}
body.in-game .special-zone-detail-head>div{min-width:0}
body.in-game .special-zone-detail-head span{color:#7798a2;font-weight:800}
body.in-game .special-zone-detail-head h4{margin:2px 0 4px;font-size:24px;color:#eaf8f8}
body.in-game .special-zone-detail-head p{margin:0;color:#8ca7b0;line-height:1.45}
body.in-game .special-zone-detail-head>b{flex:0 0 auto;padding:6px 10px;border:1px solid #42636e;border-radius:9px;background:#0a222b;color:#bdd8df}
body.in-game .special-zone-detail-panel .special-zone-status{margin-top:0;background:#081d24;border:1px solid #274650}
body.in-game .special-zone-detail-panel .map-actions{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}
body.in-game .special-zone-detail-panel .map-debris{margin-top:10px}
body.in-game .special-zone-pin.coordinate-focus{outline:4px solid #6bd9cb;outline-offset:5px;box-shadow:0 0 0 8px rgba(74,203,190,.22),0 0 26px rgba(70,210,196,.34)}

@media(max-width:1100px){
  body.in-game .leaderboard-head{align-items:flex-start;flex-direction:column}
  body.in-game .leaderboard-sort{justify-content:flex-start}
  body.in-game .leaderboard-my-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.in-game .leaderboard-my-grid>div{border-bottom:1px solid #203d47}
  body.in-game .leaderboard-podium{grid-template-columns:1fr}
}
@media(max-width:700px){
  body.in-game .leaderboard-head{padding:12px 10px}
  body.in-game .leaderboard-sort{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  body.in-game .leaderboard-sort button{width:100%}
  body.in-game .leaderboard-my-summary{margin:10px}
  body.in-game .leaderboard-my-title{align-items:flex-start;flex-direction:column}
  body.in-game .leaderboard-my-grid{grid-template-columns:1fr 1fr}
  body.in-game .leaderboard-section-title{align-items:flex-start;flex-direction:column;margin:14px 10px 8px}
  body.in-game .leaderboard-section-title small{text-align:left}
  body.in-game .leaderboard-podium{margin:0 10px 10px}
  body.in-game .leaderboard-table-scroll{margin:0 10px 12px}
  body.in-game .special-zone-chart-section{padding:12px 8px!important}
  body.in-game .special-zone-treasure-map{min-width:980px;height:570px}
  body.in-game .special-zone-detail-head{flex-direction:column}
}

/* v2026.08.29.18 — 訊息展開去重、排行榜新統計欄位、豐潮印記暫用圖 */
body.in-game .message-full.message-full-static{display:block!important;padding:12px 14px!important;border-bottom:1px solid var(--ti-line-soft);color:var(--ti-text-soft)!important;font-size:20px;line-height:1.62}
body.in-game .message-full.message-full-static + .message-actions{border-top:0}

body.in-game .leaderboard-my-grid{grid-template-columns:repeat(7,minmax(0,1fr))}
body.in-game .leaderboard-table{min-width:1760px!important}
body.in-game .leaderboard-table td:nth-child(n+4),body.in-game .leaderboard-table th:nth-child(n+4){text-align:right}
body.in-game .leaderboard-table td:first-child,body.in-game .leaderboard-table th:first-child,
body.in-game .leaderboard-table td:nth-child(2),body.in-game .leaderboard-table th:nth-child(2),
body.in-game .leaderboard-table td:nth-child(3),body.in-game .leaderboard-table th:nth-child(3){text-align:left}
body.in-game .huge-number{display:inline-block;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:900;letter-spacing:.01em;cursor:help}
body.in-game .leaderboard-podium-copy .huge-number{color:inherit}
body.in-game .leaderboard-my-grid small .huge-number{font-size:20px}
body.in-game .stats-rank .huge-number{font-size:inherit}

body.in-game .imprint-shop-card{display:grid!important;grid-template-columns:104px minmax(0,1fr);gap:14px!important;align-items:center}
body.in-game .imprint-shop-art{width:104px;height:104px;border:1px solid #355865;border-radius:14px;background:radial-gradient(circle,#173a43,#071b23);display:grid!important;place-items:center!important;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)}
body.in-game .imprint-shop-copy{min-width:0;display:grid;gap:8px}
body.in-game .imprint-shop-copy>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
body.in-game .imprint-item-art{width:92px;height:92px;object-fit:contain;display:block}
body.in-game .inventory-item-image{width:76px;height:76px;flex:0 0 76px;border:1px solid #355865;border-radius:12px;background:radial-gradient(circle,#173a43,#071b23);display:grid;place-items:center;overflow:hidden}
body.in-game .inventory-item-image .imprint-item-art{width:70px;height:70px}
body.in-game .imprint-inventory-card{align-items:center}

@media(max-width:1250px){body.in-game .leaderboard-my-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:820px){
  body.in-game .leaderboard-my-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .imprint-shop-card{grid-template-columns:84px minmax(0,1fr)}
  body.in-game .imprint-shop-art{width:84px;height:84px}
  body.in-game .imprint-item-art{width:74px;height:74px}
}
@media(max-width:560px){
  body.in-game .message-preview,body.in-game .message-full,body.in-game .message-full.message-full-static{font-size:20px!important}
  body.in-game .leaderboard-my-grid{grid-template-columns:1fr}
  body.in-game .imprint-shop-card{grid-template-columns:1fr}
  body.in-game .imprint-shop-art{width:100%;height:120px}
}

/* v2026.08.29.19：所有「詳細說明」按鈕不得比同一操作列其他主按鈕更小。
   建築、研究、海洋單位卡片與詳細操作視窗共用等高／等寬節奏；手機仍允許自然換行。 */
body.in-game .catalog-actions > button,
body.in-game .catalog-actions > .info-btn{
  min-height:52px!important;
  min-width:138px!important;
  padding:10px 16px!important;
  font-size:20px!important;
  font-weight:700!important;
  line-height:1.35!important;
  flex:1 1 138px!important;
}
body.in-game .catalog-actions > .info-btn{justify-content:center!important;text-align:center!important;}
@media(max-width:700px){
  body.in-game .catalog-actions > button,
  body.in-game .catalog-actions > .info-btn{min-height:50px!important;min-width:0!important;flex:1 1 100%!important;width:100%!important;}
}


/* ========================================================================
   v2026.08.29.22 — 航隊派遣海洋單位性能檔案
   ======================================================================== */
body.in-game #helpModalBody .fleet-unit-dossier{
  display:grid!important;
  gap:18px!important;
  width:100%!important;
  min-width:0!important;
  color:#d7e6eb!important;
}
body.in-game #helpModalBody .fleet-dossier-hero{
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr)!important;
  gap:22px!important;
  align-items:stretch!important;
  padding:18px!important;
  border:1px solid rgba(97,188,205,.32)!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,rgba(13,52,64,.92),rgba(5,23,31,.96))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 12px 34px rgba(0,0,0,.18)!important;
}
body.in-game #helpModalBody .fleet-dossier-art{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:190px!important;
  padding:14px!important;
  border:1px solid rgba(124,205,219,.24)!important;
  border-radius:16px!important;
  background:radial-gradient(circle at 50% 42%,rgba(62,142,164,.22),rgba(2,16,23,.78) 72%)!important;
}
body.in-game #helpModalBody .fleet-dossier-art img{
  display:block!important;
  width:100%!important;
  height:170px!important;
  object-fit:contain!important;
  filter:drop-shadow(0 12px 14px rgba(0,0,0,.32))!important;
}
body.in-game #helpModalBody .fleet-dossier-identity{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:10px!important;
  min-width:0!important;
}
body.in-game #helpModalBody .fleet-dossier-kicker{
  color:#79d5d5!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
}
body.in-game #helpModalBody .fleet-dossier-name-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  min-width:0!important;
}
body.in-game #helpModalBody .fleet-dossier-name-row h3{
  margin:0!important;
  color:#f0fbff!important;
  font-size:32px!important;
}
body.in-game #helpModalBody .fleet-dossier-stock{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex:0 0 auto!important;
  padding:9px 12px!important;
  border:1px solid rgba(96,213,180,.30)!important;
  border-radius:12px!important;
  background:rgba(10,75,66,.36)!important;
}
body.in-game #helpModalBody .fleet-dossier-stock span{color:#9ab8bd!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
body.in-game #helpModalBody .fleet-dossier-stock b{color:#a8f0d7!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-variant-numeric:tabular-nums!important}
body.in-game #helpModalBody .fleet-dossier-identity p{
  margin:0!important;
  color:#b7cbd1!important;
  line-height:1.65!important;
}
body.in-game #helpModalBody .fleet-dossier-tags{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
body.in-game #helpModalBody .fleet-dossier-tags span{
  display:inline-flex!important;
  align-items:center!important;
  min-height:42px!important;
  padding:6px 12px!important;
  border:1px solid rgba(123,180,194,.25)!important;
  border-radius:999px!important;
  background:rgba(8,35,45,.76)!important;
  color:#bfd7dd!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
body.in-game #helpModalBody .fleet-dossier-section-head{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:0 2px 8px!important;
  border-bottom:1px solid rgba(98,172,187,.24)!important;
}
body.in-game #helpModalBody .fleet-dossier-section-head b{color:#bce9ed!important;font-size:28px!important}
body.in-game #helpModalBody .fleet-dossier-section-head span{color:#8fa8ae!important;text-align:right!important}
body.in-game #helpModalBody .fleet-dossier-section-head.combat b{color:#f0cfaa!important}
body.in-game #helpModalBody .fleet-dossier-metrics{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
body.in-game #helpModalBody .fleet-dossier-metric{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"label value" "sub sub"!important;
  gap:8px 12px!important;
  min-width:0!important;
  min-height:126px!important;
  padding:15px 16px 14px 18px!important;
  border:1px solid rgba(105,173,186,.23)!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,rgba(9,39,49,.88),rgba(4,20,27,.94))!important;
  overflow:hidden!important;
}
body.in-game #helpModalBody .fleet-dossier-metric::before{
  content:""!important;
  position:absolute!important;
  inset:0 auto 0 0!important;
  width:4px!important;
  background:#5fb9c7!important;
}
body.in-game #helpModalBody .fleet-dossier-metric.cargo::before{background:#67c9a2!important}
body.in-game #helpModalBody .fleet-dossier-metric.fuel::before{background:#d6bb6d!important}
body.in-game #helpModalBody .fleet-dossier-metric.carrier::before{background:#b993df!important}
body.in-game #helpModalBody .fleet-dossier-metric.structure::before{background:#79b8d9!important}
body.in-game #helpModalBody .fleet-dossier-metric.shield::before{background:#7fd2b1!important}
body.in-game #helpModalBody .fleet-dossier-metric.attack::before{background:#df9b86!important}
body.in-game #helpModalBody .fleet-dossier-metric>span{
  grid-area:label!important;
  align-self:center!important;
  color:#9eb5bb!important;
  font-weight:700!important;
}
body.in-game #helpModalBody .fleet-dossier-metric>b{
  grid-area:value!important;
  align-self:center!important;
  color:#f2fbff!important;
  font-size:32px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  font-variant-numeric:tabular-nums!important;
}
body.in-game #helpModalBody .fleet-dossier-metric>small{
  grid-area:sub!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding-top:8px!important;
  border-top:1px dashed rgba(124,177,188,.18)!important;
  color:#819ba2!important;
}
body.in-game #helpModalBody .fleet-dossier-metric>small em{
  flex:0 0 auto!important;
  color:#8bd9bd!important;
  font-style:normal!important;
  font-weight:800!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
body.in-game #helpModalBody .fleet-dossier-research{
  display:grid!important;
  gap:12px!important;
  padding:15px 16px!important;
  border:1px solid rgba(101,159,176,.22)!important;
  border-radius:14px!important;
  background:rgba(6,28,37,.72)!important;
}
body.in-game #helpModalBody .fleet-dossier-research-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
}
body.in-game #helpModalBody .fleet-dossier-research-title b{color:#d6e9ee!important}
body.in-game #helpModalBody .fleet-dossier-research-title span{color:#829da4!important;text-align:right!important}
body.in-game #helpModalBody .fleet-dossier-research-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px!important;
}
body.in-game #helpModalBody .fleet-dossier-research-grid>div{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  min-width:0!important;
  padding:10px 12px!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.035)!important;
}
body.in-game #helpModalBody .fleet-dossier-research-grid span{color:#8fa8ae!important}
body.in-game #helpModalBody .fleet-dossier-research-grid b{color:#cde8ed!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-variant-numeric:tabular-nums!important}
body.in-game #helpModalBody .fleet-dossier-selection{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px!important;
  padding:14px!important;
  border:1px solid rgba(102,205,169,.29)!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,rgba(8,61,52,.58),rgba(5,31,37,.78))!important;
}
body.in-game #helpModalBody .fleet-dossier-selection>div{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important}
body.in-game #helpModalBody .fleet-dossier-selection span{color:#8faea9!important}
body.in-game #helpModalBody .fleet-dossier-selection b{color:#b9f0db!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-variant-numeric:tabular-nums!important}
body.in-game #helpModalBody .fleet-dossier-footnote{
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
  padding:12px 14px!important;
  border-left:4px solid rgba(99,182,197,.62)!important;
  background:rgba(9,40,50,.48)!important;
}
body.in-game #helpModalBody .fleet-dossier-footnote b{flex:0 0 auto!important;color:#bfe4ea!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
body.in-game #helpModalBody .fleet-dossier-footnote span{color:#91aab0!important}

@media(max-width:900px){
  body.in-game #helpModalBody .fleet-dossier-hero{grid-template-columns:180px minmax(0,1fr)!important}
  body.in-game #helpModalBody .fleet-dossier-art{min-height:165px!important}
  body.in-game #helpModalBody .fleet-dossier-art img{height:145px!important}
  body.in-game #helpModalBody .fleet-dossier-name-row{align-items:flex-start!important;flex-direction:column!important}
  body.in-game #helpModalBody .fleet-dossier-stock{width:100%!important;justify-content:space-between!important}
  body.in-game #helpModalBody .fleet-dossier-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game #helpModalBody .fleet-dossier-research-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game #helpModalBody .fleet-dossier-selection{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  body.in-game #helpModalBody .fleet-unit-dossier{gap:14px!important}
  body.in-game #helpModalBody .fleet-dossier-hero{grid-template-columns:1fr!important;padding:14px!important}
  body.in-game #helpModalBody .fleet-dossier-art{min-height:150px!important}
  body.in-game #helpModalBody .fleet-dossier-art img{height:135px!important}
  body.in-game #helpModalBody .fleet-dossier-section-head,body.in-game #helpModalBody .fleet-dossier-research-title{align-items:flex-start!important;flex-direction:column!important}
  body.in-game #helpModalBody .fleet-dossier-section-head span,body.in-game #helpModalBody .fleet-dossier-research-title span{text-align:left!important}
  body.in-game #helpModalBody .fleet-dossier-metrics{grid-template-columns:1fr!important}
  body.in-game #helpModalBody .fleet-dossier-metric{min-height:116px!important}
  body.in-game #helpModalBody .fleet-dossier-research-grid{grid-template-columns:1fr!important}
  body.in-game #helpModalBody .fleet-dossier-selection{grid-template-columns:1fr!important}
  body.in-game #helpModalBody .fleet-dossier-footnote{flex-direction:column!important}
}

/* =========================================================
   v2026.08.29.25 — 單一建築施工序列＋嚴格 FIFO
   每座島同一時間只允許一項建築 active；核心工造可排隊但不得插隊。
   海洋單位／魚群／海防生產仍與建築施工互不鎖定。
   ========================================================= */
body.in-game .queue-lanes{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body.in-game .building-single-lane{border-color:#3b6970!important;background:linear-gradient(145deg,#0a2630,#0a2028)!important}
body.in-game .building-single-lane.busy{border-color:#66806d!important;background:linear-gradient(145deg,#102b2b,#0a2025)!important}
body.in-game .core-upgrade-lane{border-color:#66806d!important}
body.in-game .core-upgrade-note{
  margin:8px 0 4px!important;padding:10px 12px!important;display:flex!important;flex-wrap:wrap!important;gap:6px 12px!important;
  border:1px solid #356d72!important;border-radius:8px!important;background:#0a222b!important;color:#a9c7cc!important;line-height:1.45!important
}
body.in-game .core-upgrade-note>b{color:#7ee0d1!important;white-space:nowrap!important}
body.in-game .core-upgrade-note>span{flex:1 1 320px!important;min-width:0!important}
body.in-game .core-upgrade-card{border-color:#315e68!important}
body.in-game .core-upgrade-card .catalog-eyebrow{color:#74cfc2!important}
@media(max-width:1180px){body.in-game .queue-lanes{grid-template-columns:1fr!important}}


/* v2026.08.29.25：戰報海防損失／整修復原區。一般島嶼與謎霧島共用。 */
.battle-defense-recovery{border:1px solid #315762;background:linear-gradient(180deg,#08212a,#06171d);border-radius:9px;overflow:hidden;margin-top:10px}
.battle-defense-recovery>header{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:13px 15px;border-bottom:1px solid #274852;background:linear-gradient(180deg,#10313b,#0a252e)}
.battle-defense-recovery>header>div{display:grid;gap:2px}.battle-defense-recovery>header span{font-size:20px;color:#82a3ad}.battle-defense-recovery>header h3{font-size:23px;margin:0;color:#d8e8ed}.battle-defense-recovery>header>small{max-width:620px;font-size:20px;line-height:1.45;color:#8da7b0;text-align:right}
.battle-defense-recovery-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:#274852;border-bottom:1px solid #274852}
.battle-defense-recovery-totals>div{background:#081c23;padding:11px 12px;display:grid;gap:4px}.battle-defense-recovery-totals span{font-size:20px;color:#7897a1}.battle-defense-recovery-totals b{font-size:23px;color:#d7e8ed;font-variant-numeric:tabular-nums}.battle-defense-recovery .repaired b{color:#8fd6b6}.battle-defense-recovery .lost b{color:#ef9f90}
.battle-defense-recovery-list{display:grid}.battle-defense-recovery-row{display:grid;grid-template-columns:minmax(210px,1.35fr) repeat(5,minmax(110px,.75fr));align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #173640}.battle-defense-recovery-row:last-child{border-bottom:0}.battle-defense-recovery-name{display:flex;align-items:center;gap:10px;min-width:0}.battle-defense-recovery-name img{width:52px;height:52px;object-fit:contain;flex:0 0 52px}.battle-defense-recovery-name b{font-size:20px;color:#cfe2e8;overflow-wrap:anywhere}.battle-defense-recovery-row>span{display:grid;gap:2px;min-width:0}.battle-defense-recovery-row small{font-size:20px;color:#7897a1}.battle-defense-recovery-row>span>b{font-size:21px;font-variant-numeric:tabular-nums;white-space:nowrap}
.spy-locate-btn{font-weight:700}
@media(max-width:980px){.battle-defense-recovery>header{align-items:flex-start;flex-direction:column}.battle-defense-recovery>header>small{text-align:left}.battle-defense-recovery-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-defense-recovery-row{grid-template-columns:minmax(180px,1.2fr) repeat(2,minmax(120px,1fr))}.battle-defense-recovery-row>span:nth-of-type(n+3){margin-top:4px}}
@media(max-width:620px){.battle-defense-recovery-totals{grid-template-columns:1fr}.battle-defense-recovery-row{grid-template-columns:1fr 1fr}.battle-defense-recovery-name{grid-column:1/-1}.battle-defense-recovery-row>span{padding:4px 0}.battle-defense-recovery>header h3{font-size:22px}}


/* ========================================================================
   v2026.08.29.26 — 動能卡資訊列防重疊＋整備操作列等高
   ======================================================================== */
/*
   雷鰻卡同時有「單群供給」與「平時補食」兩筆資訊。
   舊版兩個 .power-card-fuel 都指定同一個 grid-area，會疊在同一列。
   v26 改由 .power-card-fuels 統一承接資訊區，內部每一列依序排列。
*/
body.in-game .production-power-card{
  grid-template-areas:'head output' 'details details' 'bottom bottom'!important;
}
body.in-game .power-card-fuels{
  grid-area:details!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:8px!important;
  min-width:0!important;
  margin:10px 14px 0!important;
}
body.in-game .power-card-fuels .power-card-fuel{
  grid-area:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,auto)!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0!important;
  margin:0!important;
  padding:9px 10px!important;
}
body.in-game .power-card-fuels .power-card-fuel>span{
  min-width:0!important;
  overflow-wrap:anywhere!important;
}
body.in-game .power-card-fuels .power-card-fuel>b{
  min-width:0!important;
  max-width:100%!important;
  text-align:right!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.45!important;
}
body.in-game .power-card-fuels .power-card-warning{
  margin:0!important;
  padding:9px 10px!important;
  border-radius:9px!important;
}

/* 海洋單位／海防整備：數量輸入、全部、加入整備、詳細說明必須有一致的操作高度。 */
body.in-game .unit-build-actions{
  align-items:flex-end!important;
  column-gap:8px!important;
  row-gap:8px!important;
}
body.in-game .unit-build-actions .catalog-amount{
  align-items:flex-end!important;
  gap:8px!important;
  margin-right:auto!important;
}
body.in-game .unit-build-actions .catalog-amount input,
body.in-game .unit-build-actions .catalog-amount .unit-all-btn,
body.in-game .unit-build-actions>button{
  box-sizing:border-box!important;
  height:52px!important;
  min-height:52px!important;
  line-height:1.3!important;
}
body.in-game .unit-build-actions .catalog-amount input{
  width:92px!important;
  min-width:92px!important;
  padding:10px 10px!important;
}
body.in-game .unit-build-actions .catalog-amount .unit-all-btn{
  min-width:88px!important;
  padding:10px 14px!important;
  font-size:20px!important;
  font-weight:700!important;
}
body.in-game .unit-build-actions>button{
  padding:10px 16px!important;
  font-size:20px!important;
  font-weight:700!important;
}

@media(max-width:760px){
  body.in-game .production-power-card{
    grid-template-columns:1fr!important;
    grid-template-areas:'head' 'output' 'details' 'bottom'!important;
  }
  body.in-game .power-card-fuels{
    margin:9px 12px 0!important;
    gap:7px!important;
  }
  body.in-game .power-card-fuels .power-card-fuel{
    grid-template-columns:minmax(0,1fr)!important;
    gap:4px!important;
    align-items:start!important;
  }
  body.in-game .power-card-fuels .power-card-fuel>b{
    text-align:left!important;
  }
}

@media(max-width:700px){
  body.in-game .unit-build-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
    width:100%!important;
  }
  body.in-game .unit-build-actions .catalog-amount{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:end!important;
    width:100%!important;
    margin:0!important;
  }
  body.in-game .unit-build-actions .catalog-amount label{
    min-width:0!important;
    width:100%!important;
  }
  body.in-game .unit-build-actions .catalog-amount input{
    width:100%!important;
    min-width:0!important;
  }
  body.in-game .unit-build-actions .catalog-amount .unit-all-btn{
    min-width:96px!important;
  }
  body.in-game .unit-build-actions>button{
    width:100%!important;
    min-width:0!important;
  }
}


/* v2026.08.29.28：戰報操作按鈕、登入錨點、我的群島快速管理 */
body.in-game .battle-library-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px!important;
  margin-top:10px;
}
body.in-game .battle-library-actions button{
  min-height:48px!important;
  width:100%;
  padding:9px 12px!important;
  border:1px solid rgba(96,181,194,.58)!important;
  border-radius:8px!important;
  background:linear-gradient(180deg,rgba(24,83,99,.98),rgba(12,53,67,.98))!important;
  color:#eefcff!important;
  font-size:20px!important;
  font-weight:700!important;
  line-height:1.25!important;
  text-shadow:0 1px 1px rgba(0,0,0,.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  opacity:1!important;
}
body.in-game .battle-library-actions button:hover:not(:disabled){
  border-color:#78eadc!important;
  background:linear-gradient(180deg,rgba(34,111,124,.98),rgba(16,70,82,.98))!important;
  color:#fff!important;
}
body.in-game .battle-library-actions button:focus-visible{
  outline:3px solid rgba(119,238,220,.42)!important;
  outline-offset:2px;
}
body.in-game .battle-library-actions button:disabled{
  background:rgba(21,42,49,.72)!important;
  border-color:rgba(92,119,126,.35)!important;
  color:#b7cbd0!important;
  text-shadow:none!important;
  cursor:not-allowed;
}
body.in-game .battle-library-actions .danger-act{
  background:linear-gradient(180deg,rgba(101,43,45,.96),rgba(66,27,30,.98))!important;
  border-color:rgba(203,101,101,.58)!important;
  color:#ffdede!important;
}
body.in-game .battle-library-actions .danger-act:hover:not(:disabled){
  background:linear-gradient(180deg,rgba(132,50,52,.98),rgba(84,30,33,.98))!important;
  border-color:#ef9696!important;
}

/* 登入錨點只決定「沒有明確 planetId 的首次進站島嶼」，不會強制玩家操作途中跳島。 */
body.in-game .islands-overview-card.landing-anchor{
  box-shadow:inset 0 0 0 1px rgba(238,196,104,.32),0 0 18px rgba(210,167,70,.08);
}
body.in-game .islands-overview-card.landing-anchor header>div>span{
  color:#f1d38b!important;
  font-weight:800;
}
body.in-game .island-overview-actions .is-anchor{
  border-color:rgba(230,192,101,.55)!important;
  background:rgba(91,69,27,.72)!important;
  color:#f3d999!important;
  opacity:1!important;
}

/* 每張島嶼卡提供建築／研究／魚群／防禦四個快速入口；詳細項目放在共用 Modal。 */
body.in-game .island-quick-entry{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(65,131,142,.38);
  border-radius:10px;
  background:rgba(3,27,34,.62);
}
body.in-game .island-quick-entry>span{
  color:#8fb8c0;
  font-weight:700;
  white-space:nowrap;
}
body.in-game .island-quick-entry>div{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
body.in-game .island-quick-entry button{
  min-height:44px;
  padding:7px 10px;
  border:1px solid rgba(82,158,170,.46);
  border-radius:8px;
  background:rgba(12,55,66,.82);
  color:#d7f2f2;
  font-size:20px;
  font-weight:700;
}
body.in-game .island-quick-entry button:hover{
  border-color:#6fdaca;
  background:rgba(18,79,88,.92);
}

body.in-game .island-quick-shell{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}
body.in-game .island-quick-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:start;
  padding:14px;
  border:1px solid rgba(86,160,171,.42);
  border-radius:11px;
  background:linear-gradient(135deg,rgba(8,50,59,.9),rgba(4,31,38,.94));
}
body.in-game .island-quick-head h3{
  margin:3px 0 5px;
  font-size:26px;
}
body.in-game .island-quick-head small{color:#91b3bc}
body.in-game .island-quick-queue{
  min-width:190px;
  padding:10px 12px;
  border:1px solid rgba(91,147,156,.34);
  border-radius:9px;
  background:rgba(2,24,30,.7);
  display:flex;
  flex-direction:column;
  gap:3px;
}
body.in-game .island-quick-queue b{font-size:24px;color:#8ce6d5}
body.in-game .island-quick-queue small{font-size:20px;color:#86a6ad}

body.in-game .island-quick-resources{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
body.in-game .island-quick-resources span{
  min-width:0;
  padding:9px 11px;
  border:1px solid rgba(74,127,137,.38);
  border-radius:8px;
  background:rgba(4,31,38,.74);
  color:#91b6bd;
  overflow-wrap:anywhere;
}
body.in-game .island-quick-resources b{
  display:block;
  margin-top:3px;
  color:#e1f5f2;
}

body.in-game .island-quick-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
body.in-game .island-quick-tabs button{
  min-height:48px;
  border:1px solid rgba(68,136,148,.5);
  border-radius:8px;
  background:rgba(4,34,42,.82);
  color:#9fbfc5;
  font-size:20px;
  font-weight:800;
}
body.in-game .island-quick-tabs button b{
  display:inline-flex;
  min-width:28px;
  justify-content:center;
  margin-left:5px;
  padding:1px 6px;
  border-radius:999px;
  background:rgba(255,255,255,.07);
}
body.in-game .island-quick-tabs button.active{
  border-color:#69d9cb;
  background:linear-gradient(180deg,rgba(20,93,97,.96),rgba(9,60,68,.96));
  color:#f0fffc;
}
body.in-game .island-quick-note{
  padding:9px 11px;
  border-left:3px solid rgba(95,202,187,.66);
  background:rgba(9,48,54,.5);
  color:#9fc2c6;
}
body.in-game .island-quick-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
body.in-game .island-quick-action-card{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "main action"
    "cost action";
  gap:9px 12px;
  align-items:center;
  padding:12px;
  border:1px solid rgba(64,112,121,.36);
  border-radius:10px;
  background:rgba(3,25,31,.76);
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
body.in-game .island-quick-action-card.can-act{
  border-color:rgba(83,201,184,.58);
  background:linear-gradient(135deg,rgba(8,56,61,.88),rgba(3,31,38,.82));
  box-shadow:inset 3px 0 0 rgba(91,221,201,.62);
}
body.in-game .island-quick-action-card.locked{opacity:.72}
body.in-game .island-quick-action-main{
  grid-area:main;
  min-width:0;
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  gap:10px;
  align-items:center;
}
body.in-game .island-quick-action-main img{
  width:64px;
  height:64px;
  object-fit:contain;
  border-radius:9px;
  background:rgba(3,25,30,.78);
}
body.in-game .island-quick-action-main>div{min-width:0}
body.in-game .island-quick-action-main b{
  display:block;
  color:#e8f8f5;
  overflow-wrap:anywhere;
}
body.in-game .island-quick-action-main span{
  display:block;
  margin-top:3px;
  color:#8fb1b8;
}
body.in-game .quick-ready,
body.in-game .quick-locked{
  display:block;
  margin-top:5px;
  font-size:20px;
  line-height:1.35;
}
body.in-game .quick-ready{color:#79d8a9}
body.in-game .quick-locked{color:#a79e89}
body.in-game .island-quick-cost{
  grid-area:cost;
  min-width:0;
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}
body.in-game .island-quick-cost>span{
  padding:4px 7px;
  border-radius:6px;
  background:rgba(255,255,255,.045);
  color:#9db8bd;
}
body.in-game .island-quick-cost>span b{color:#d9ece8}
body.in-game .island-quick-cost>small{
  width:100%;
  color:#82aaaF;
  font-size:20px;
}
body.in-game .island-quick-do{
  grid-area:action;
  min-width:112px;
  min-height:48px;
  padding:9px 13px;
  border:1px solid #62ccb9;
  border-radius:8px;
  background:linear-gradient(180deg,rgba(30,132,119,.98),rgba(16,88,84,.98));
  color:#fff;
  font-size:20px;
  font-weight:800;
}
body.in-game .island-quick-do:disabled{
  border-color:rgba(78,105,111,.34);
  background:rgba(28,45,49,.72);
  color:#71888d;
  opacity:1;
  cursor:not-allowed;
}
body.in-game .island-quick-unit-actions{
  grid-area:action;
  align-self:stretch;
  min-width:164px;
  display:grid;
  grid-template-columns:minmax(68px,90px) minmax(92px,1fr);
  gap:6px;
  align-items:center;
}
body.in-game .island-quick-unit-actions input{
  width:100%;
  min-width:0;
  min-height:48px;
  padding:8px;
  border:1px solid rgba(92,155,165,.48);
  border-radius:8px;
  background:#061c23;
  color:#efffff;
  font-size:20px;
  text-align:center;
}
body.in-game .island-quick-unit-actions .island-quick-do{min-width:0;width:100%}

@media(max-width:900px){
  body.in-game .battle-library-actions{grid-template-columns:1fr 1fr}
  body.in-game .island-quick-grid{grid-template-columns:1fr}
  body.in-game .island-quick-resources{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  body.in-game .battle-library-actions{grid-template-columns:1fr}
  body.in-game .island-quick-entry{grid-template-columns:1fr}
  body.in-game .island-quick-entry>div{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .island-quick-head{grid-template-columns:1fr}
  body.in-game .island-quick-queue{min-width:0}
  body.in-game .island-quick-tabs{grid-template-columns:1fr}
  body.in-game .island-quick-action-card{
    grid-template-columns:1fr;
    grid-template-areas:"main" "cost" "action";
    align-items:stretch;
  }
  body.in-game .island-quick-do{width:100%;min-width:0}
  body.in-game .island-quick-unit-actions{min-width:0;width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}
}
@media(max-width:430px){
  body.in-game .island-quick-resources{grid-template-columns:1fr}
  body.in-game .island-quick-entry>div{grid-template-columns:1fr}
  body.in-game .island-quick-action-main{grid-template-columns:54px minmax(0,1fr)}
  body.in-game .island-quick-action-main img{width:54px;height:54px}
}

/* v2026.08.29.30：遊戲說明與資源場超載 */
.game-help-panel{padding:20px;}
.game-help-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;padding:18px 20px;border:1px solid rgba(93,207,211,.28);border-radius:12px;background:linear-gradient(135deg,rgba(10,54,66,.72),rgba(5,29,38,.78));}
.game-help-hero h2{margin:4px 0 8px;font-size:28px;line-height:1.2;}
.game-help-hero p{margin:0;color:var(--muted);font-size:20px;line-height:1.55;}
.game-help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.game-help-card{display:flex;flex-direction:column;gap:12px;min-width:0;padding:18px;border:1px solid rgba(110,185,196,.28);border-radius:12px;background:rgba(5,30,39,.76);}
.game-help-card.featured{border-color:rgba(80,220,202,.48);background:linear-gradient(145deg,rgba(7,54,60,.86),rgba(5,31,42,.82));}
.game-help-card h3{margin:0;font-size:22px;line-height:1.3;}
.game-help-card p,.game-help-card small{margin:0;color:var(--muted);font-size:20px;line-height:1.55;}
.game-help-card .soft-btn{align-self:flex-start;min-height:48px;padding:10px 18px;font-size:20px;}
.game-help-overload-table{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.game-help-overload-table span{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;min-height:72px;padding:8px;border:1px solid rgba(91,189,192,.25);border-radius:9px;background:rgba(0,15,22,.38);font-size:20px;}
.game-help-overload-table b{font-size:20px;color:var(--good);}
.resource-overload-select option:disabled{color:#8c969a;}
@media (max-width:900px){
  .game-help-grid{grid-template-columns:1fr;}
  .game-help-card .soft-btn{width:100%;}
}
@media (max-width:560px){
  .game-help-panel{padding:14px;}
  .game-help-hero{padding:16px;}
  .game-help-overload-table{grid-template-columns:repeat(2,minmax(0,1fr));}
}


/* ========================================================================
   v2026.08.29.32 — 滑鼠滾輪垂直捲頁一致性
   橫向表格、場景、航圖、訊息分頁與資源列只限制水平 overscroll；
   不得再用 overscroll-behavior:contain 把一般 deltaY 鎖死在橫向容器內。
   JS 另有通用 fallback，處理瀏覽器在 overflow:auto 邊界不往父層傳遞的情況。
   ======================================================================== */
body.in-game .table-scroll,
body.in-game .facility-scene-scroll,
body.in-game .shipyard-scene-scroll,
body.in-game .defense-scene-scroll,
body.in-game .research-lab-scroll,
body.in-game .galaxy-map-scroll,
body.in-game .archipelago-scroll,
body.in-game .ocean-chart-scroll,
body.in-game .special-zone-map-scroll,
body.in-game .resource-production-scroll,
body.in-game .resource-bar,
body.in-game .rightbar .island-list,
body.in-game .message-tabs,
body.in-game .message-hub-nav,
body.in-game .queue-lanes{
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-x pan-y!important;
}
body.in-game #content{overscroll-behavior-y:auto!important;}
body.in-game:not(.nav-open) .sidebar,
body.in-game .rightbar{
  overscroll-behavior-y:auto!important;
}

/* ========================================================================
   v2026.08.30.01 — 主要排程狀態提高辨識度
   建築排程／研究隊列／海洋整備使用暖金標題、白色主要內容、青色倒數。
   不用紅色避免與錯誤／不足狀態混淆。
   ======================================================================== */
body.in-game .queue-lane{
  border-color:#345361!important;
  background:linear-gradient(180deg,#0a1d26 0%,#081820 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
body.in-game .queue-lane>span{
  color:#f0cf72!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
}
body.in-game .queue-lane>b{
  color:#f4fbff!important;
  font-weight:800!important;
  text-shadow:0 1px 0 rgba(0,0,0,.35)!important;
}
body.in-game .queue-lane>small{
  color:#9bd9e7!important;
  font-weight:700!important;
}
body.in-game .queue-lane.free{
  border-color:#315363!important;
}
body.in-game .queue-lane.free>b{
  color:#9ee3b4!important;
}
body.in-game .queue-lane.busy{
  border-color:#6a5830!important;
  background:linear-gradient(180deg,#1b1b12 0%,#121710 100%)!important;
}
body.in-game .queue-lane.busy>span{color:#ffd978!important;}
body.in-game .queue-lane.busy>b{color:#fff6d7!important;}
body.in-game .queue-lane.busy>small{color:#bceaf1!important;}

/* 外海特殊戰鬥航區每日擊破額度 */
body.in-game .special-zone-daily-limit{
  display:grid;
  grid-template-columns:auto auto 1fr;
  gap:10px;
  align-items:center;
  margin:10px 0;
  padding:10px 12px;
  border:1px solid #5f5131;
  background:#17170f;
  border-radius:8px;
}
body.in-game .special-zone-daily-limit>span{color:#f0cf72;font-weight:800;}
body.in-game .special-zone-daily-limit>b{color:#fff7d9;font-weight:900;}
body.in-game .special-zone-daily-limit>small{color:#a9c3cd;font-weight:700;}
body.in-game .special-zone-map-action:disabled,
body.in-game .gal-act:disabled{opacity:.48;cursor:not-allowed;filter:saturate(.55);}
@media(max-width:700px){
  body.in-game .special-zone-daily-limit{grid-template-columns:1fr auto;}
  body.in-game .special-zone-daily-limit>small{grid-column:1/-1;}
}

/* ========================================================================
   v2026.08.30.03 — 謎霧島／迷霧海佔領前首波威脅預估
   使用暖琥珀作為「需要評估風險」而不是錯誤紅色；玩家佔領前即可看到約略編成。
   ======================================================================== */
body.in-game .occupation-threat-preview{
  margin:12px 0;
  padding:13px 14px;
  display:grid;
  gap:10px;
  border:1px solid rgba(221,177,78,.58);
  border-left:4px solid #dcb45e;
  border-radius:10px;
  background:linear-gradient(180deg,rgba(64,47,18,.48),rgba(28,31,24,.6));
  box-shadow:inset 0 1px 0 rgba(255,244,204,.05);
}
body.in-game .occupation-threat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}
body.in-game .occupation-threat-head>span{
  color:#f1d485;
  font-size:20px;
  line-height:1.25;
  font-weight:900;
}
body.in-game .occupation-threat-head>b{
  color:#fff4c8;
  font-size:20px;
  line-height:1.25;
  font-weight:900;
  white-space:nowrap;
}
body.in-game .threat-quality{
  display:block;
  color:#ffe39a;
  font-size:20px;
  line-height:1.35;
  font-weight:900;
}
body.in-game .occupation-threat-units{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
body.in-game .occupation-threat-unit{
  min-width:0;
  padding:9px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid rgba(200,174,111,.25);
  border-radius:8px;
  background:rgba(4,26,32,.48);
}
body.in-game .occupation-threat-unit>b,
body.in-game .occupation-threat-unit>em{
  font-size:20px;
  line-height:1.25;
  font-style:normal;
}
body.in-game .occupation-threat-unit>b{color:#edf7f7;font-weight:800;overflow-wrap:anywhere;}
body.in-game .occupation-threat-unit>em{color:#f1cf78;font-weight:800;white-space:nowrap;}
body.in-game .occupation-threat-meta{
  color:#c8d9dc;
  font-size:20px;
  line-height:1.42;
  font-weight:700;
}
@media(max-width:760px){
  body.in-game .occupation-threat-head{align-items:flex-start;flex-direction:column;}
  body.in-game .occupation-threat-units{grid-template-columns:1fr;}
  body.in-game .occupation-threat-unit{align-items:flex-start;flex-direction:column;gap:4px;}
}

/* v2026.08.30.07：島政戰鬥加成要讓玩家在派遣、防守與戰報中明確感受到投資效果。 */
body.in-game .governance-combat-chip{
  margin-top:10px;
  padding:10px 13px;
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px 11px;
  border:1px solid rgba(245,203,92,.58);
  border-radius:10px;
  background:linear-gradient(135deg,rgba(89,65,14,.44),rgba(4,36,44,.72));
  box-shadow:0 0 0 1px rgba(255,238,155,.06) inset,0 5px 18px rgba(0,0,0,.18);
}
body.in-game .governance-combat-chip>span{
  color:#f3cf70;
  font-size:20px;
  line-height:1.25;
  font-weight:900;
}
body.in-game .governance-combat-chip>b{
  color:#fff2b8;
  font-size:21px;
  line-height:1.25;
  font-weight:950;
}
body.in-game .governance-combat-chip>small{
  color:#c8eef2;
  font-size:20px;
  line-height:1.3;
  font-weight:750;
}
body.in-game .governance-combat-chip.defense{background:linear-gradient(135deg,rgba(72,58,17,.46),rgba(7,43,48,.78));}
body.in-game .defense-head-side{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;}
body.in-game .battle-governance-banner{margin:10px 0 14px;}
body.in-game .battle-governance-card{
  padding:12px 15px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:4px 12px;
  align-items:center;
  border:1px solid rgba(245,203,92,.62);
  border-radius:11px;
  background:linear-gradient(120deg,rgba(92,67,14,.50),rgba(5,35,42,.82));
  box-shadow:0 5px 20px rgba(0,0,0,.20),0 0 20px rgba(245,203,92,.05) inset;
}
body.in-game .battle-governance-card>span{
  grid-row:1 / span 2;
  color:#f2cc65;
  font-size:20px;
  line-height:1.3;
  font-weight:900;
  white-space:nowrap;
}
body.in-game .battle-governance-card>b{
  color:#fff1af;
  font-size:23px;
  line-height:1.3;
  font-weight:950;
}
body.in-game .battle-governance-card>small{
  color:#c9eef2;
  font-size:20px;
  line-height:1.35;
  font-weight:750;
}
body.in-game .battle-governance-card.defense{border-color:rgba(117,224,210,.52);background:linear-gradient(120deg,rgba(31,82,73,.50),rgba(6,35,43,.84));}
body.in-game .battle-governance-card.defense>span{color:#9be9db;}
body.in-game .battle-governance-card.defense>b{color:#d8fff7;}
body.in-game .battle-governance-badge{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:5px 9px;
  border:1px solid rgba(245,203,92,.52);
  border-radius:999px;
  background:rgba(91,65,15,.36);
  color:#ffe7a0;
  font-size:20px;
  line-height:1.2;
  font-weight:900;
}
body.in-game .battle-governance-badge.defense{border-color:rgba(117,224,210,.48);background:rgba(19,79,73,.36);color:#c9fff4;}
@media(max-width:760px){
  body.in-game .defense-head-side{width:100%;justify-content:flex-start;}
  body.in-game .governance-combat-chip{display:flex;width:100%;}
  body.in-game .battle-governance-card{grid-template-columns:1fr;}
  body.in-game .battle-governance-card>span{grid-row:auto;white-space:normal;}
}
body.in-game .fleet-governance-inline{color:#ffe49a;font-weight:900;}

/* v2026.08.30.09：迷霧海駐防／增援／攻擊編成可先看單位性能並一鍵選「全部」。 */
body.in-game .mist-sea-unit-row{
  grid-template-columns:minmax(0,1fr) minmax(190px,250px)!important;
  align-items:center!important;
}
body.in-game .mist-sea-unit-name{
  width:max-content!important;
  max-width:100%!important;
  min-height:38px!important;
  font-size:20px!important;
  line-height:1.35!important;
}
body.in-game .mist-sea-unit-controls{
  display:grid!important;
  grid-template-columns:minmax(72px,auto) minmax(96px,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
body.in-game .mist-sea-all-btn{
  min-width:72px!important;
  min-height:42px!important;
  font-size:20px!important;
}
body.in-game .mist-sea-unit-controls input{
  min-width:0!important;
  width:100%!important;
  min-height:42px!important;
  font-size:20px!important;
}
@media(max-width:700px){
  body.in-game .mist-sea-unit-row{
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
  }
  body.in-game .mist-sea-unit-controls{
    grid-template-columns:minmax(76px,96px) minmax(0,1fr)!important;
    width:100%!important;
  }
}


/* v2026.08.30.10：謎霧島海防部署／撤回也提供每列「全部」，並維持玩家可見字級至少 20px。 */
body.in-game .mystery-defense-row{
  grid-template-columns:minmax(0,1fr) minmax(190px,250px)!important;
}
body.in-game .mystery-unit-controls{
  display:grid!important;
  grid-template-columns:minmax(72px,auto) minmax(96px,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
body.in-game .mystery-defense-all-btn{
  min-width:72px!important;
  min-height:42px!important;
  font-size:20px!important;
}
body.in-game .mystery-unit-controls input{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  font-size:20px!important;
}
@media(max-width:700px){
  body.in-game .mystery-defense-row{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;}
  body.in-game .mystery-unit-controls{grid-template-columns:minmax(76px,96px) minmax(0,1fr)!important;width:100%!important;}
}

/* v2026.08.30.17：迷霧海來襲時間與海底金幣獎勵必須清楚可讀。 */
body.in-game .mist-sea-next-wave{
  display:grid;
  gap:8px;
  padding:14px 16px;
  border:1px solid rgba(188,92,92,.5);
  border-radius:14px;
  background:rgba(120,34,34,.10);
}
body.in-game .mist-sea-next-wave strong,
body.in-game .mist-sea-next-wave span,
body.in-game .mist-sea-next-wave small,
body.in-game .mist-sea-incoming small{
  font-size:20px!important;
  line-height:1.45;
}
body.in-game .mist-sea-incoming{
  border-width:2px;
}

/* ========================================================================
   v2026.08.30.18 — 設施 / 港灣整備場 / 海防工事視覺尺寸階級
   目的：
   1. 設施主圖放大，資訊牌固定在主圖下方，不再遮住建築。
   2. 港灣海洋單位依體型形成小 / 中 / 大三個明顯視覺級距。
   3. 海防依小 / 中 / 大型形成明顯視覺級距。
   4. 玩家可見文字仍維持至少 20px；資訊牌與主圖保留安全間距。
   僅改視覺呈現，不改任何 gameplay 數值、碰撞、戰鬥或生產公式。
   ======================================================================== */

/* ---------- 設施：所有建築主圖整體放大，文字永遠留在圖下方 ---------- */
body.in-game .facility-spot{
  width:250px!important;
  min-width:250px!important;
  height:246px!important;
  min-height:246px!important;
}
body.in-game .facility-art-wrap{
  top:0!important;
  width:218px!important;
  height:148px!important;
}
body.in-game .facility-art-wrap img{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
}
body.in-game .facility-pad{top:128px!important;width:132px!important;height:28px!important}
body.in-game .facility-spot.unbuilt .facility-pad{top:118px!important;width:118px!important;height:34px!important}
body.in-game .facility-spot-copy{
  bottom:0!important;
  width:244px!important;
  min-height:88px!important;
  height:auto!important;
  padding:9px 11px!important;
}
body.in-game .facility-spot-copy b,
body.in-game .facility-spot-copy em,
body.in-game .facility-spot-copy small{
  font-size:20px!important;
  line-height:1.18!important;
}

/* ---------- 港灣整備場：以既有 unit tier 收斂為小 / 中 / 大三種視覺尺寸 ---------- */
body.in-game .shipyard-berth{
  height:226px!important;
  min-height:226px!important;
  width:254px!important;
  min-width:254px!important;
}
body.in-game .shipyard-berth-copy{
  bottom:0!important;
  width:246px!important;
  min-height:88px!important;
  height:auto!important;
  z-index:8!important;
}
body.in-game .shipyard-berth-copy b,
body.in-game .shipyard-berth-copy em,
body.in-game .shipyard-berth-copy small{
  font-size:20px!important;
  line-height:1.18!important;
}
/* 小型：xs / s */
body.in-game .shipyard-berth[data-unit-size="xs"] .shipyard-ship-art-wrap,
body.in-game .shipyard-berth[data-unit-size="s"] .shipyard-ship-art-wrap{
  top:18px!important;
  width:150px!important;
  height:92px!important;
}
/* 中型：m / l */
body.in-game .shipyard-berth[data-unit-size="m"] .shipyard-ship-art-wrap,
body.in-game .shipyard-berth[data-unit-size="l"] .shipyard-ship-art-wrap{
  top:9px!important;
  width:196px!important;
  height:114px!important;
}
/* 大型：xl / xxl / giant */
body.in-game .shipyard-berth[data-unit-size="xl"] .shipyard-ship-art-wrap,
body.in-game .shipyard-berth[data-unit-size="xxl"] .shipyard-ship-art-wrap,
body.in-game .shipyard-berth[data-unit-size="giant"] .shipyard-ship-art-wrap{
  top:-4px!important;
  width:248px!important;
  height:142px!important;
}
body.in-game .shipyard-ship-art-wrap img.shipyard-ship-art{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
}

/* ---------- 海防工事：小 / 中 / 大型海防直接用畫面尺寸表現真實體感 ---------- */
body.in-game .defense-emplacement{
  height:252px!important;
  min-height:252px!important;
  width:270px!important;
  min-width:270px!important;
}
body.in-game .defense-emplacement-copy{
  bottom:0!important;
  width:260px!important;
  min-height:88px!important;
  height:auto!important;
  z-index:8!important;
}
body.in-game .defense-emplacement-copy b,
body.in-game .defense-emplacement-copy em,
body.in-game .defense-emplacement-copy small{
  font-size:20px!important;
  line-height:1.18!important;
}
/* 小型海防：目前 m / xs / s 都視為小型 */
body.in-game .defense-emplacement[data-unit-size="xs"] .defense-art-wrap,
body.in-game .defense-emplacement[data-unit-size="s"] .defense-art-wrap,
body.in-game .defense-emplacement[data-unit-size="m"] .defense-art-wrap{
  top:26px!important;
  width:152px!important;
  height:102px!important;
}
/* 中型海防：l */
body.in-game .defense-emplacement[data-unit-size="l"] .defense-art-wrap{
  top:13px!important;
  width:202px!important;
  height:126px!important;
}
/* 大型海防：xl / xxl / giant */
body.in-game .defense-emplacement[data-unit-size="xl"] .defense-art-wrap,
body.in-game .defense-emplacement[data-unit-size="xxl"] .defense-art-wrap,
body.in-game .defense-emplacement[data-unit-size="giant"] .defense-art-wrap{
  top:-2px!important;
  width:266px!important;
  height:154px!important;
}
body.in-game .defense-art-wrap img{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
}

/* ---------- 手機：仍採卡片式，不讓舊版 54 / 58px 規則把圖片縮回去 ---------- */
@media(max-width:760px){
  body.in-game .facility-spot,
  body.in-game .shipyard-berth,
  body.in-game .defense-emplacement{
    min-height:150px!important;
    height:auto!important;
  }
  body.in-game .facility-art-wrap{
    width:118px!important;
    height:96px!important;
    min-width:118px!important;
    min-height:96px!important;
  }
  body.in-game .facility-art-wrap img{width:108px!important;height:90px!important}

  body.in-game .shipyard-berth[data-unit-size="xs"] .shipyard-ship-art-wrap,
  body.in-game .shipyard-berth[data-unit-size="s"] .shipyard-ship-art-wrap{
    width:92px!important;height:72px!important;min-width:92px!important;min-height:72px!important;top:auto!important;
  }
  body.in-game .shipyard-berth[data-unit-size="m"] .shipyard-ship-art-wrap,
  body.in-game .shipyard-berth[data-unit-size="l"] .shipyard-ship-art-wrap{
    width:112px!important;height:82px!important;min-width:112px!important;min-height:82px!important;top:auto!important;
  }
  body.in-game .shipyard-berth[data-unit-size="xl"] .shipyard-ship-art-wrap,
  body.in-game .shipyard-berth[data-unit-size="xxl"] .shipyard-ship-art-wrap,
  body.in-game .shipyard-berth[data-unit-size="giant"] .shipyard-ship-art-wrap{
    width:132px!important;height:94px!important;min-width:132px!important;min-height:94px!important;top:auto!important;
  }

  body.in-game .defense-emplacement[data-unit-size="xs"] .defense-art-wrap,
  body.in-game .defense-emplacement[data-unit-size="s"] .defense-art-wrap,
  body.in-game .defense-emplacement[data-unit-size="m"] .defense-art-wrap{
    width:96px!important;height:72px!important;min-width:96px!important;min-height:72px!important;top:auto!important;
  }
  body.in-game .defense-emplacement[data-unit-size="l"] .defense-art-wrap{
    width:116px!important;height:84px!important;min-width:116px!important;min-height:84px!important;top:auto!important;
  }
  body.in-game .defense-emplacement[data-unit-size="xl"] .defense-art-wrap,
  body.in-game .defense-emplacement[data-unit-size="xxl"] .defense-art-wrap,
  body.in-game .defense-emplacement[data-unit-size="giant"] .defense-art-wrap{
    width:136px!important;height:96px!important;min-width:136px!important;min-height:96px!important;top:auto!important;
  }
  body.in-game .facility-spot-copy,
  body.in-game .shipyard-berth-copy,
  body.in-game .defense-emplacement-copy{
    min-height:96px!important;
  }
  body.in-game .facility-spot-copy b,
  body.in-game .facility-spot-copy em,
  body.in-game .facility-spot-copy small,
  body.in-game .shipyard-berth-copy b,
  body.in-game .shipyard-berth-copy em,
  body.in-game .shipyard-berth-copy small,
  body.in-game .defense-emplacement-copy b,
  body.in-game .defense-emplacement-copy em,
  body.in-game .defense-emplacement-copy small{
    font-size:20px!important;
    line-height:1.2!important;
  }
}

/* v2026.08.31.01 — 外海特殊區域改為清楚固定格位，不再散落重疊 */
body.in-game .special-zone-chart-section{
  overflow:visible;
}
body.in-game .special-zone-chart-section .special-zones-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px!important;
}
body.in-game .special-zone-chart-section .special-zones-head h3{
  margin:2px 0 0;
}
body.in-game .special-zone-chart-section .special-zones-head p{
  max-width:760px;
}
body.in-game .special-zone-map-scroll{
  overflow:visible;
  padding:0;
}
body.in-game .special-zone-treasure-map{
  position:relative;
  min-width:0;
  width:100%;
  height:auto;
  min-height:0;
  padding:18px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  align-items:stretch;
  overflow:visible;
  border:1px solid #31515c;
  border-radius:16px;
  background:
    linear-gradient(180deg,rgba(10,49,62,.92),rgba(6,31,40,.96)),
    linear-gradient(120deg,rgba(58,132,145,.12),transparent 42%,rgba(63,107,119,.08));
  box-shadow:inset 0 0 0 1px rgba(122,189,196,.05),0 10px 24px rgba(0,0,0,.18);
}
body.in-game .special-zone-treasure-map:before,
body.in-game .special-zone-treasure-map:after,
body.in-game .special-zone-compass,
body.in-game .special-zone-route{
  display:none!important;
}
body.in-game .special-zone-pin{
  position:relative;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  width:auto;
  min-width:0;
  min-height:250px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  border:1px solid #365b66;
  border-radius:14px;
  background:linear-gradient(155deg,#0d2f3b 0%,#09242e 100%);
  color:#e5f2f4;
  text-align:left;
  box-shadow:0 8px 18px rgba(0,0,0,.16);
  overflow:hidden;
}
body.in-game .special-zone-pin:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:#4f8d97;
  opacity:.75;
}
body.in-game .special-zone-pin:hover{
  transform:translateY(-2px)!important;
  border-color:#5f8791;
  box-shadow:0 11px 22px rgba(0,0,0,.22);
}
body.in-game .special-zone-pin.active{
  border-color:#548a82;
  background:linear-gradient(155deg,#103942 0%,#0a2931 100%);
}
body.in-game .special-zone-pin.selected{
  border-color:#64c7bb;
  background:linear-gradient(155deg,#123f45 0%,#0c3037 100%);
  box-shadow:0 0 0 3px rgba(72,188,176,.15),0 10px 22px rgba(0,0,0,.22);
}
body.in-game .special-zone-pin.zone-kind-expedition:before{background:#62b7c2}
body.in-game .special-zone-pin.zone-kind-combat:before{background:#c27c66}
body.in-game .special-zone-pin.zone-kind-mystery:before{background:#a995cf}
body.in-game .special-zone-pin.zone-kind-mist:before{background:#6bb7a9}
body.in-game .special-zone-pin-select{
  min-height:64px;
  grid-template-columns:56px minmax(0,1fr);
  gap:12px;
}
body.in-game .special-zone-pin-mark{
  width:56px;
  height:56px;
  border:1px solid #48717b;
  background:#123e49;
  color:#d6edf0;
  font-size:28px;
}
body.in-game .special-zone-pin.selected .special-zone-pin-mark{
  border-color:#65bcb2;
  color:#e5fffb;
  background:#164b4b;
}
body.in-game .special-zone-pin-copy{
  gap:5px;
}
body.in-game .special-zone-pin-copy b{
  font-size:22px;
  line-height:1.2;
  color:#effafb;
}
body.in-game .special-zone-pin-copy small{
  font-size:20px;
  line-height:1.3;
  color:#9db7be;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
body.in-game .special-zone-pin.selected .special-zone-pin-copy small{
  color:#b9d9d4;
}
body.in-game .special-zone-pin-facts{
  flex:1 1 auto;
  align-content:start;
  gap:7px;
  padding:10px 0;
  border-top:1px solid #294b55;
  border-bottom:1px solid #294b55;
  background:transparent;
  border-radius:0;
}
body.in-game .special-zone-pin-facts span{
  font-size:20px;
  line-height:1.35;
  color:#bed0d4;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
body.in-game .special-zone-pin-facts .has-debris{color:#e6c98e}
body.in-game .special-zone-pin-facts .no-debris{color:#7f9aa2}
body.in-game .special-zone-pin-actions{
  margin-top:auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
body.in-game .special-zone-pin-actions:has(> :only-child){grid-template-columns:1fr}
body.in-game .special-zone-map-action{
  min-height:46px;
  padding:8px 10px;
  border:1px solid #416874;
  border-radius:9px;
  background:#153d49;
  color:#e4f1f3;
  font-size:20px;
  font-weight:900;
}
body.in-game .special-zone-map-action:hover:not(:disabled){
  background:#1b4c59;
  border-color:#6b9aa4;
  color:#fff;
}
body.in-game .special-zone-map-action.salvage{
  background:#17453f;
  border-color:#4f7c71;
  color:#d9f1e7;
}
body.in-game .special-zone-map-action.danger{
  background:#4a2f2b;
  border-color:#865f56;
  color:#f3ded8;
}
body.in-game .special-zone-detail-panel{
  margin-top:16px;
}

@media(max-width:1180px){
  body.in-game .special-zone-treasure-map{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.in-game .special-zone-chart-section{padding:12px 8px!important}
  body.in-game .special-zone-chart-section .special-zones-head{align-items:flex-start;flex-direction:column}
  body.in-game .special-zone-treasure-map{grid-template-columns:1fr;padding:10px;gap:10px}
  body.in-game .special-zone-pin{min-height:0;padding:12px}
  body.in-game .special-zone-pin-actions{grid-template-columns:1fr 1fr}
}

/* v2026.08.31.07：港灣魚群資訊與訊息中心辨識。所有玩家可見文字維持 20px 以上。 */
html body.in-game #game :is(p,span,b,strong,em,small,label,button,input,select,textarea,td,th,li,a){font-size:20px!important;line-height:1.45!important}
html body.in-game #game h1{font-size:30px!important;line-height:1.25!important}
html body.in-game #game h2{font-size:27px!important;line-height:1.3!important}
html body.in-game #game h3{font-size:24px!important;line-height:1.32!important}
html body.in-game #game h4{font-size:22px!important;line-height:1.35!important}
body.in-game .unit-fish-size-badge{display:inline-flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;margin:8px 0!important;padding:6px 10px!important;border:1px solid #3f777b!important;border-radius:999px!important;background:#0b3031!important;color:#b8e9e1!important}
body.in-game .unit-fish-size-badge span{color:#9ec8c5!important}
body.in-game .unit-fish-size-badge b{color:#f0fffb!important}

body.in-game .message-center-panel .message-hub-nav,
body.in-game .battle-library-panel .message-hub-nav,
body.in-game .intel-library-panel .message-hub-nav,
body.in-game .stats-panel .message-hub-nav{display:flex!important;flex-wrap:nowrap!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;margin:0!important;padding:12px var(--ti-panel-x,18px)!important;border:0!important;border-bottom:1px solid rgba(86,151,166,.32)!important;border-radius:0!important;background:linear-gradient(180deg,#0a2630,#071a21)!important;scrollbar-width:thin!important;-webkit-overflow-scrolling:touch!important}
body.in-game .message-hub-nav .message-hub-tab{position:relative!important;flex:0 0 auto!important;min-width:116px!important;min-height:52px!important;padding:10px 15px!important;border:1px solid #3a6471!important;border-radius:9px!important;background:#0d2630!important;color:#b7d3d9!important;font-weight:800!important;white-space:nowrap!important}
body.in-game .message-hub-nav .message-hub-tab:hover{border-color:#79b7c0!important;background:#123741!important;color:#f1ffff!important}
body.in-game .message-hub-nav .message-hub-tab.active,
body.in-game .message-hub-nav .message-hub-tab[aria-current="page"]{border-color:#82e4dc!important;background:linear-gradient(180deg,#176a68,#104b52)!important;color:#fff!important;box-shadow:inset 0 -4px 0 #c5ffef,0 0 0 1px rgba(88,218,207,.26)!important}

body.in-game .message-center-head,
body.in-game .battle-library-panel .battle-library-head,
body.in-game .intel-library-panel .intel-library-head,
body.in-game .message-center-panel #intelBody~*,
body.in-game .message-center-panel>h2,
body.in-game .stats-panel>h2{margin:0!important;padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important}
body.in-game .message-center-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;border-bottom:1px solid rgba(86,151,166,.24)!important}
body.in-game .message-center-head h2,body.in-game .battle-library-head h2{margin:0!important}
body.in-game .message-center-head p{margin:7px 0 0!important;color:#b4cbd0!important}
body.in-game .message-center-panel #msgTabs{margin:0!important;padding:12px var(--ti-panel-x,18px)!important;border-bottom:1px solid rgba(86,151,166,.24)!important}
body.in-game .message-tabs{display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:9px!important;overflow-x:auto!important;overflow-y:hidden!important;background:#081f28!important;scrollbar-width:thin!important;-webkit-overflow-scrolling:touch!important}
body.in-game .message-tabs .message-filter,
body.in-game .battle-scope-filters .battle-scope-filter{flex:0 0 auto!important;min-width:max-content!important;min-height:52px!important;padding:10px 15px!important;border:1px solid #3a6471!important;border-radius:9px!important;background:#0d2630!important;color:#c2d7db!important;font-weight:800!important;white-space:nowrap!important}
body.in-game .message-tabs .message-filter.active,
body.in-game .message-tabs .message-filter[aria-current="page"],
body.in-game .battle-scope-filters .battle-scope-filter.active,
body.in-game .battle-scope-filters .battle-scope-filter[aria-current="page"]{border-color:#8deee2!important;background:linear-gradient(180deg,#176a68,#104b52)!important;color:#fff!important;box-shadow:inset 0 -3px 0 #c8fff1!important}
body.in-game .message-tabs .message-filter-favorites{border-color:#8a7652!important;color:#f3dfac!important}
body.in-game .message-retention{flex:0 0 auto!important;align-self:center!important;margin:0 0 0 5px!important;padding:8px 2px!important;color:#a8bfc4!important;white-space:normal!important}
body.in-game .message-center-panel #msgBody,
body.in-game .battle-library-panel #battleLibraryBody,
body.in-game .intel-library-panel #intelBody,
body.in-game .stats-panel #statsBody{padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important}
body.in-game .battle-library-panel .battle-library-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;border-bottom:1px solid rgba(86,151,166,.24)!important}
body.in-game .intel-library-panel .intel-library-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;border-bottom:1px solid rgba(86,151,166,.24)!important;background:linear-gradient(180deg,var(--ti-surface-3),var(--ti-surface-2))!important}
body.in-game .intel-library-panel .intel-tech-summary{margin:var(--ti-panel-y,16px) var(--ti-panel-x,18px) 0!important;padding:12px var(--ti-card-pad,14px)!important;border:1px solid var(--ti-line-soft)!important;border-radius:var(--ti-radius)!important;background:#081b23!important}
body.in-game .intel-library-panel .intel-grid{gap:var(--ti-gap,12px)!important}
body.in-game .intel-library-panel .intel-card{padding:var(--ti-card-pad,14px)!important;border-radius:var(--ti-radius)!important;background:linear-gradient(180deg,#0a2029,#071820)!important;border-color:var(--ti-line-soft)!important}
body.in-game .battle-scope-filters{display:flex!important;flex-wrap:wrap!important;gap:9px!important}
body.in-game .intel-card,.intel-card .intel-head,.intel-card .intel-lines>div{min-width:0!important}
body.in-game .intel-card :is(b,span){overflow:visible!important;text-overflow:clip!important;white-space:normal!important;overflow-wrap:anywhere!important}

@media(max-width:900px){
  body.in-game .message-center-head,body.in-game .battle-library-panel .battle-library-head,body.in-game .intel-library-panel .intel-library-head{align-items:stretch!important;flex-direction:column!important}
  body.in-game .message-center-head .danger-act{align-self:stretch!important}
  body.in-game .battle-scope-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .battle-scope-filters .battle-scope-filter{width:100%!important;min-width:0!important;white-space:normal!important}
  body.in-game .message-hub-nav .message-hub-tab,body.in-game .message-tabs .message-filter{min-width:116px!important;flex:0 0 auto!important;white-space:nowrap!important}
}
@media(max-width:480px){
  body.in-game .message-center-panel .message-hub-nav,body.in-game .battle-library-panel .message-hub-nav,body.in-game .intel-library-panel .message-hub-nav,body.in-game .stats-panel .message-hub-nav{padding-left:12px!important;padding-right:12px!important}
  body.in-game .message-center-head,body.in-game .battle-library-panel .battle-library-head,body.in-game .intel-library-panel .intel-library-head,body.in-game .message-center-panel #msgTabs,body.in-game .message-center-panel #msgBody,body.in-game .battle-library-panel #battleLibraryBody,body.in-game .intel-library-panel #intelBody,body.in-game .stats-panel #statsBody{padding-left:12px!important;padding-right:12px!important}
  body.in-game .intel-library-panel .intel-tech-summary{margin-left:12px!important;margin-right:12px!important}
  body.in-game .battle-scope-filters{grid-template-columns:1fr!important}
}

/* ========================================================================
   v2026.09.01.06 — 聯盟頁面內「盟潮共益學」共同科技
   ======================================================================== */
body.in-game .alliance-tech-section{
  margin-top:var(--ti-section-gap,16px);
  padding:var(--ti-card-pad,14px);
  border:1px solid rgba(88,179,174,.38);
  border-radius:16px;
  background:linear-gradient(145deg,rgba(7,43,47,.88),rgba(5,26,34,.94));
}
body.in-game .alliance-tech-title{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
body.in-game .alliance-tech-title>div:first-child{min-width:0}
body.in-game .alliance-tech-title span{display:block;color:#79bbb5;font-weight:800}
body.in-game .alliance-tech-title h3{margin:4px 0 7px;color:#e6fbf7}
body.in-game .alliance-tech-title p{margin:0;max-width:900px;color:#a6c6ca;line-height:1.55}
body.in-game .alliance-tech-source{flex:0 0 auto;padding:10px 12px;border:1px solid rgba(98,190,179,.25);border-radius:12px;background:rgba(8,34,40,.72);color:#9ebfc5}
body.in-game .alliance-tech-source b{color:#ddf8f2}
body.in-game .alliance-tech-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body.in-game .alliance-tech-card{min-width:0;padding:16px;border:1px solid rgba(89,168,174,.32);border-radius:14px;background:rgba(5,28,36,.82)}
body.in-game .alliance-tech-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
body.in-game .alliance-tech-card-head>div{min-width:0}
body.in-game .alliance-tech-card-head span{color:#7eaab4;font-weight:800}
body.in-game .alliance-tech-card-head h4{margin:4px 0 0;color:#e8fbf8}
body.in-game .alliance-tech-card-head strong{flex:0 0 auto;padding:8px 11px;border-radius:999px;background:rgba(33,115,104,.32);color:#9be3cd;white-space:nowrap}
body.in-game .alliance-tech-card>p{margin:12px 0;color:#9fc0c7;line-height:1.5}
body.in-game .alliance-tech-progress{display:grid;gap:10px;margin-top:12px}
body.in-game .alliance-tech-progress-row>div:first-child{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px;color:#9ebbc1}
body.in-game .alliance-tech-progress-row b{color:#e0f4f0;text-align:right}
body.in-game .alliance-tech-progress-bar{height:12px;border-radius:999px;overflow:hidden;background:rgba(2,16,22,.86);border:1px solid rgba(83,152,159,.28)}
body.in-game .alliance-tech-progress-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#4c9f93,#79d2bc)}
body.in-game .alliance-tech-my{margin-top:13px;padding:10px 12px;border-radius:10px;background:rgba(9,49,54,.54);color:#a8c6cb;overflow-wrap:anywhere}
body.in-game .alliance-tech-invest{margin-top:14px;display:grid;gap:12px}
body.in-game .alliance-tech-invest-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.in-game .alliance-tech-invest-grid label{display:grid;gap:6px;color:#a7c4ca}
body.in-game .alliance-tech-invest-grid input{width:100%;min-width:0;box-sizing:border-box}
body.in-game .alliance-tech-invest>button{justify-self:end;min-width:170px}
body.in-game .alliance-tech-max{padding:14px;border-radius:12px;background:rgba(53,122,100,.22);color:#a6ebcb;font-weight:800;text-align:center}
body.in-game .alliance-tech-recent{margin-top:16px;padding-top:14px;border-top:1px solid rgba(92,162,168,.25)}
body.in-game .alliance-tech-recent h4{margin:0 0 10px;color:#dff7f2}
body.in-game .alliance-tech-recent>div{display:grid;grid-template-columns:minmax(140px,.8fr) minmax(180px,1fr) minmax(0,2fr);gap:12px;padding:9px 0;border-bottom:1px solid rgba(73,126,134,.18);align-items:start}
body.in-game .alliance-tech-recent span{color:#d5ece9;font-weight:800}
body.in-game .alliance-tech-recent b{color:#8fc8c3}
body.in-game .alliance-tech-recent em{font-style:normal;color:#9dbac0;overflow-wrap:anywhere}
@media(max-width:980px){
  body.in-game .alliance-tech-grid{grid-template-columns:1fr}
  body.in-game .alliance-tech-title{flex-direction:column}
  body.in-game .alliance-tech-source{width:100%;box-sizing:border-box}
}
@media(max-width:680px){
  body.in-game .alliance-tech-card-head{flex-direction:column}
  body.in-game .alliance-tech-invest-grid{grid-template-columns:1fr}
  body.in-game .alliance-tech-invest>button{width:100%;justify-self:stretch}
  body.in-game .alliance-tech-recent>div{grid-template-columns:1fr;gap:4px}
}

/* ========================================================================
   v2026.09.01.07 — 聯盟共同科技投入 UX：可用資源與快捷填入
   ======================================================================== */
body.in-game .alliance-tech-source{min-width:min(100%,430px)}
body.in-game .alliance-tech-source>span{display:block}
body.in-game .alliance-tech-source-resources{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;margin-top:10px;padding-top:9px;border-top:1px solid rgba(98,190,179,.18)}
body.in-game .alliance-tech-source-resources span{display:flex;justify-content:space-between;gap:10px;color:#9ebfc5}
body.in-game .alliance-tech-source-resources b{color:#e7fbf7;text-align:right}
body.in-game .alliance-tech-card-actions{display:flex;flex-wrap:wrap;gap:8px}
body.in-game .alliance-tech-card-actions button,
body.in-game .alliance-tech-quick-row button{font-size:20px;min-height:40px;line-height:1.2}
body.in-game .alliance-tech-resource-input{padding:10px;border:1px solid rgba(83,152,159,.24);border-radius:11px;background:rgba(3,20,27,.48)}
body.in-game .alliance-tech-resource-input>span{display:flex;justify-content:space-between;align-items:baseline;gap:10px;min-width:0}
body.in-game .alliance-tech-resource-input>span b{color:#dff5f1}
body.in-game .alliance-tech-resource-input>span em{font-style:normal;color:#8fc7c1;text-align:right;overflow-wrap:anywhere}
body.in-game .alliance-tech-resource-input input{min-height:42px}
body.in-game .alliance-tech-quick-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
body.in-game .alliance-tech-quick-row button{min-width:0;padding:7px 8px}
@media(max-width:680px){
  body.in-game .alliance-tech-source{min-width:0}
  body.in-game .alliance-tech-source-resources{grid-template-columns:1fr}
  body.in-game .alliance-tech-card-actions{display:grid;grid-template-columns:1fr}
  body.in-game .alliance-tech-card-actions button{width:100%}
}

/* ========================================================================
   v2026.09.02.04 — 迷霧海島圖像化資訊 + 海洋單位研究加成拆解
   ======================================================================== */
body.in-game .mystery-status.game-like{gap:12px!important;padding:14px!important}
body.in-game .mist-title-row{display:flex;align-items:stretch;justify-content:space-between;gap:14px;min-width:0}
body.in-game .mist-title-row>div:first-child{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0}
body.in-game .mist-title-row>div:first-child>b{font-size:24px!important;color:#d8f2f0!important}
body.in-game .mist-title-row>div:first-child>small{font-size:20px!important;color:#8fb9bd!important}
body.in-game .mist-reward-card{display:flex;align-items:center;gap:12px;min-width:250px;padding:10px 13px;border:1px solid rgba(211,181,88,.42);border-radius:12px;background:linear-gradient(135deg,rgba(80,61,15,.38),rgba(20,43,41,.66))}
body.in-game .mist-reward-card img,body.in-game .mist-next-reward img{width:54px;height:54px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 5px 8px rgba(0,0,0,.28))}
body.in-game .mist-reward-card>div{display:flex;flex-direction:column;gap:2px;min-width:0}
body.in-game .mist-reward-card span,body.in-game .mist-reward-card small{font-size:20px!important;color:#b7c9c6!important}
body.in-game .mist-reward-card b{font-size:23px!important;color:#ffe19a!important}
body.in-game .mist-defense-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
body.in-game .mist-defense-summary>span{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"icon value" "icon label";gap:2px 10px;align-items:center;padding:10px 12px;border:1px solid rgba(88,169,178,.24);border-radius:10px;background:rgba(5,33,40,.72);font-size:24px!important;min-width:0}
body.in-game .mist-defense-summary>span>b{grid-area:value;color:#e6f4f3!important;font-size:22px!important;overflow-wrap:anywhere}
body.in-game .mist-defense-summary>span>small{grid-area:label;color:#88adb1!important;font-size:20px!important}
body.in-game .mist-rule-chips{display:flex;flex-wrap:wrap;gap:8px}
body.in-game .mist-rule-chips>span{display:inline-flex;align-items:center;min-height:40px;padding:6px 11px;border:1px solid rgba(111,170,175,.24);border-radius:999px;background:rgba(8,43,49,.64);color:#bad5d7!important;font-size:20px!important;font-weight:700}
body.in-game .mist-known-line{display:flex;gap:10px;align-items:flex-start;padding-top:8px;border-top:1px dashed rgba(110,167,171,.18)}
body.in-game .mist-known-line>b{flex:0 0 auto;color:#9fd4d5!important;font-size:20px!important}
body.in-game .mist-known-line>span{color:#c3d4d4!important;font-size:20px!important;line-height:1.45}
body.in-game .mist-next-reward{display:flex;align-items:center;gap:10px;padding-bottom:6px}
body.in-game .mist-next-reward>span{color:#d7c684!important;font-weight:800}
body.in-game .mist-next-reward>b{color:#ffe9a8!important;font-size:22px!important}
body.in-game .mist-sea-next-wave.complete{border-color:rgba(89,190,144,.42);background:rgba(24,102,72,.14)}
body.in-game .occupation-threat-unit{justify-content:flex-start!important}
body.in-game .occupation-threat-unit>img{width:56px;height:56px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 5px 8px rgba(0,0,0,.25))}
body.in-game .occupation-threat-unit>span{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between;gap:10px;min-width:0}
body.in-game .occupation-threat-unit>span>b,body.in-game .occupation-threat-unit>span>em{font-size:20px!important;line-height:1.3;font-style:normal}
body.in-game .occupation-threat-unit>span>b{color:#edf7f7!important;font-weight:800;overflow-wrap:anywhere}
body.in-game .occupation-threat-unit>span>em{color:#f1cf78!important;font-weight:800;white-space:nowrap}
body.in-game .occupation-threat-tech{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.in-game .occupation-threat-tech>span{padding:8px 10px;border:1px solid rgba(202,174,103,.22);border-radius:8px;background:rgba(255,255,255,.035);color:#bbcbcc!important;font-size:20px!important}
body.in-game .occupation-threat-tech b{color:#f3dc9a!important}
body.in-game .occupation-threat-window{color:#c8d9dc!important;font-size:20px!important;font-weight:700}

body.in-game #helpModalBody .unit-research-breakdown{display:grid!important;gap:10px!important;margin:14px 0!important;padding:14px!important;border:1px solid rgba(95,183,192,.28)!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(7,40,49,.78),rgba(5,24,31,.9))!important}
body.in-game #helpModalBody .unit-research-breakdown-head{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:12px!important;padding-bottom:8px!important;border-bottom:1px solid rgba(109,175,184,.2)!important}
body.in-game #helpModalBody .unit-research-breakdown-head>b{color:#d6f0ef!important;font-size:24px!important}
body.in-game #helpModalBody .unit-research-breakdown-head>span{color:#8ea9ad!important;font-size:20px!important;text-align:right!important}
body.in-game #helpModalBody .unit-research-breakdown-grid{display:grid!important;gap:8px!important}
body.in-game #helpModalBody .unit-research-breakdown-row{display:grid!important;grid-template-columns:44px minmax(180px,1.6fr) repeat(3,minmax(105px,.8fr))!important;gap:10px!important;align-items:center!important;padding:10px 12px!important;border:1px solid rgba(119,171,178,.16)!important;border-radius:10px!important;background:rgba(255,255,255,.025)!important;min-width:0!important}
body.in-game #helpModalBody .unit-research-stat-icon{font-size:28px!important;text-align:center!important}
body.in-game #helpModalBody .unit-research-stat-name{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important}
body.in-game #helpModalBody .unit-research-stat-name>b{color:#d8e9eb!important;font-size:21px!important}
body.in-game #helpModalBody .unit-research-stat-name>small{color:#849fa5!important;font-size:20px!important;line-height:1.35!important}
body.in-game #helpModalBody .unit-research-breakdown-row>div:not(.unit-research-stat-name){display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important}
body.in-game #helpModalBody .unit-research-breakdown-row>div:not(.unit-research-stat-name)>span{color:#809ba0!important;font-size:20px!important}
body.in-game #helpModalBody .unit-research-breakdown-row>div:not(.unit-research-stat-name)>b{font-size:22px!important;color:#e5f2f3!important;font-variant-numeric:tabular-nums!important}
@media(max-width:900px){body.in-game .mist-title-row{flex-direction:column}body.in-game .mist-reward-card{min-width:0}body.in-game .occupation-threat-tech{grid-template-columns:1fr}body.in-game #helpModalBody .unit-research-breakdown-row{grid-template-columns:42px minmax(0,1fr) repeat(3,minmax(90px,.7fr))!important}}
@media(max-width:680px){body.in-game .mist-defense-summary{grid-template-columns:1fr}body.in-game .occupation-threat-unit>span{align-items:flex-start;flex-direction:column}body.in-game #helpModalBody .unit-research-breakdown-head{align-items:flex-start!important;flex-direction:column!important}body.in-game #helpModalBody .unit-research-breakdown-head>span{text-align:left!important}body.in-game #helpModalBody .unit-research-breakdown-row{grid-template-columns:38px minmax(0,1fr)!important}body.in-game #helpModalBody .unit-research-breakdown-row>div:not(.unit-research-stat-name){grid-column:2!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}body.in-game #helpModalBody .unit-research-breakdown-row>div:not(.unit-research-stat-name)>b{text-align:right!important}}

/* v2026.09.02.05：魚群／海防詳細資訊補上島政三項戰鬥加成，所有玩家文字維持 >=20px。 */
body.in-game #helpModalBody .unit-governance-breakdown{display:grid!important;gap:10px!important;margin:14px 0!important;padding:14px!important;border:1px solid rgba(222,177,88,.32)!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(44,34,13,.34),rgba(7,27,33,.92))!important}
body.in-game #helpModalBody .unit-governance-scenario{display:grid!important;gap:10px!important;padding:12px!important;border:1px solid rgba(222,177,88,.22)!important;border-radius:12px!important;background:rgba(255,255,255,.025)!important}
body.in-game #helpModalBody .unit-governance-scenario-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important}
body.in-game #helpModalBody .unit-governance-scenario-head>div{display:grid!important;gap:2px!important}
body.in-game #helpModalBody .unit-governance-scenario-head b{font-size:22px!important;color:#f0dfb1!important}
body.in-game #helpModalBody .unit-governance-scenario-head span,body.in-game #helpModalBody .unit-governance-scenario>p{font-size:20px!important;line-height:1.5!important;color:#9eb2b5!important;margin:0!important}
body.in-game #helpModalBody .unit-governance-scenario-head>strong{font-size:24px!important;color:#95ddb4!important}
body.in-game #helpModalBody .unit-governance-stat-grid{display:grid!important;gap:8px!important}
body.in-game #helpModalBody .unit-governance-stat-row{display:grid!important;grid-template-columns:42px minmax(150px,1.2fr) repeat(4,minmax(105px,.72fr))!important;gap:10px!important;align-items:center!important;padding:9px 10px!important;border:1px solid rgba(130,166,171,.14)!important;border-radius:9px!important;background:rgba(1,11,15,.25)!important}
body.in-game #helpModalBody .unit-governance-stat-row>b{font-size:21px!important;color:#dcebed!important}
body.in-game #helpModalBody .unit-governance-stat-row>div{display:grid!important;gap:2px!important;min-width:0!important}
body.in-game #helpModalBody .unit-governance-stat-row>div>span{font-size:20px!important;color:#829ca0!important}
body.in-game #helpModalBody .unit-governance-stat-row>div>strong{font-size:21px!important;color:#e6f1f2!important;font-variant-numeric:tabular-nums!important}
body.in-game #helpModalBody .unit-governance-stat-row>div>strong.good{color:#8ed6ad!important}
body.in-game #helpModalBody .fleet-composition-grid.detailed{grid-template-columns:1fr!important}
body.in-game #helpModalBody .fleet-composition-unit.detailed{display:grid!important;align-items:stretch!important;gap:10px!important}
body.in-game #helpModalBody .fleet-composition-unit-head{display:flex!important;align-items:center!important;gap:12px!important}
body.in-game #helpModalBody .fleet-composition-unit-head>span{display:flex!important;flex:1!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
body.in-game #helpModalBody .fleet-composition-unit.detailed .unit-governance-scenario span{display:inline!important;flex:none!important;min-width:0!important;justify-content:initial!important}
body.in-game #helpModalBody .fleet-composition-unit.detailed .unit-governance-scenario{margin-top:2px!important}
body.in-game #helpModalBody .fleet-locked-governance{display:grid!important;gap:8px!important}
body.in-game #helpModalBody .fleet-locked-governance-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;padding-top:8px!important;border-top:1px solid rgba(105,158,164,.18)!important}
body.in-game #helpModalBody .fleet-locked-governance-head span,body.in-game #helpModalBody .fleet-locked-governance-head b{font-size:20px!important}
body.in-game #helpModalBody .fleet-locked-governance-head b{color:#93dcb0!important}
body.in-game #helpModalBody .fleet-composition-route>strong{font-size:20px!important;line-height:1.5!important;color:#93dcb0!important}
/* v2026.09.19.21：航隊編成先看陣容，個別魚群數值改為可收合。 */
body.in-game #helpModalBody .fleet-unit-disclosure{padding:0!important;overflow:hidden!important;border-radius:10px!important}
body.in-game #helpModalBody .fleet-unit-summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;user-select:none}
body.in-game #helpModalBody .fleet-unit-summary::-webkit-details-marker{display:none}
body.in-game #helpModalBody .fleet-unit-summary .fleet-composition-unit-head{min-width:0}
body.in-game #helpModalBody .fleet-unit-detail-label{display:inline-flex;align-items:center;gap:6px;color:#9fc4cc;font-size:18px;white-space:nowrap}
body.in-game #helpModalBody .fleet-unit-detail-label::before{content:'';width:20px;height:20px;flex:0 0 20px;background:url('/assets/icon_expand.png?v=2026091921') center/contain no-repeat}
body.in-game #helpModalBody .fleet-unit-disclosure[open] .fleet-unit-detail-label::before{background-image:url('/assets/icon_collapse.png?v=2026091921')}
body.in-game #helpModalBody .fleet-unit-detail-body{padding:0 12px 12px;border-top:1px solid rgba(58,92,104,.55)}
body.in-game #helpModalBody .fleet-unit-detail-body>.unit-governance-scenario{margin-top:10px!important}
@media(max-width:620px){body.in-game #helpModalBody .fleet-unit-summary{grid-template-columns:1fr;gap:6px}body.in-game #helpModalBody .fleet-unit-detail-label{justify-self:start;font-size:16px}}
@media(max-width:780px){body.in-game #helpModalBody .unit-governance-stat-row{grid-template-columns:38px minmax(0,1fr)!important}body.in-game #helpModalBody .unit-governance-stat-row>div{grid-column:2!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}body.in-game #helpModalBody .unit-governance-stat-row>div>strong{text-align:right!important}}

/* v2026.09.02.06：管理參數－免費發放珍珠 */
body.in-game .admin-pearl-grant-box .admin-form{align-items:center!important}
body.in-game .admin-pearl-grant-box .admin-form label{min-width:300px!important}
body.in-game .admin-pearl-grant-box select{min-width:300px!important;width:auto!important}
body.in-game .admin-pearl-balance{display:flex;align-items:center;gap:8px;min-height:44px;padding:7px 10px;border:1px solid var(--ti-line-soft);background:#091d26;color:var(--ti-muted);font-size:20px}
body.in-game .admin-pearl-balance img{width:32px;height:32px;object-fit:contain}
body.in-game .admin-pearl-balance b{color:var(--ti-text);font-size:22px}
body.in-game .admin-pearl-actions{display:flex;gap:8px;flex-wrap:wrap}
body.in-game .admin-pearl-actions button{min-width:120px;font-size:20px}
@media(max-width:720px){body.in-game .admin-pearl-grant-box select,body.in-game .admin-pearl-grant-box .admin-form label{min-width:0!important;width:100%!important}body.in-game .admin-pearl-actions{width:100%}body.in-game .admin-pearl-actions button{flex:1 1 140px}}

/* v2026.09.02.08：迷霧海島研究門檻、活動日曆、最新消息。 */
body.in-game .mystery-research-gate{display:grid;gap:6px;margin:10px 0 12px;padding:12px 14px;border:1px solid rgba(232,171,73,.42);border-radius:12px;background:rgba(92,57,8,.18)}
body.in-game .mystery-research-gate>b{font-size:22px!important;color:#ffd98a!important}
body.in-game .mystery-research-gate>span,body.in-game .mystery-research-gate>small{font-size:20px!important;line-height:1.45!important;color:#e4cf9f!important}
body.in-game .mystery-actions button:disabled,body.in-game .special-zone-map-action:disabled{opacity:.45!important;cursor:not-allowed!important;filter:grayscale(.25)}
body.in-game .admin-activity-calendar{display:grid;gap:14px;margin-top:12px}
body.in-game .admin-activity-list{display:grid;gap:8px}
body.in-game .admin-activity-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid var(--ti-line-soft);border-radius:12px;background:#091d26}
body.in-game .admin-activity-row>div:first-child{display:grid;gap:4px;min-width:0}
body.in-game .admin-activity-row>div:last-child{display:flex;gap:8px;flex-wrap:wrap}
body.in-game .admin-activity-row b{font-size:22px!important;color:var(--ti-text)!important}
body.in-game .admin-activity-row small{font-size:20px!important;color:var(--ti-muted)!important}
body.in-game .admin-activity-status{display:inline-flex;width:max-content;min-height:34px;align-items:center;padding:3px 9px;border:1px solid rgba(148,166,175,.28);border-radius:999px;font-size:20px!important;color:#b6c6ca!important}
body.in-game .admin-activity-status.active{border-color:rgba(89,190,144,.5);color:#99dfb7!important;background:rgba(36,108,73,.2)}
body.in-game .admin-activity-editor{display:grid;gap:12px;padding:14px;border:1px solid rgba(88,169,178,.25);border-radius:14px;background:rgba(5,27,35,.72)}
body.in-game .admin-activity-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body.in-game .admin-activity-grid label{display:grid;gap:5px;font-size:20px!important;color:var(--ti-muted)!important}
body.in-game .admin-activity-grid input,body.in-game .admin-activity-grid select{min-height:44px;font-size:20px!important}
body.in-game .admin-activity-grid label small{font-size:20px!important;line-height:1.35!important}
body.in-game .admin-activity-weekdays{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0}
body.in-game .admin-activity-weekdays>span{font-size:20px!important;font-weight:800;color:var(--ti-text)}
body.in-game .admin-activity-weekdays label{display:flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid var(--ti-line-soft);border-radius:9px;font-size:20px!important}
body.in-game .admin-activity-preview{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px;border:1px solid rgba(222,177,88,.24);border-radius:12px;background:rgba(66,49,13,.16)}
body.in-game .admin-activity-preview>b,body.in-game .admin-activity-preview>span,body.in-game .admin-activity-preview>small{font-size:20px!important}
body.in-game .admin-activity-preview>span{display:inline-flex;align-items:center;gap:6px;font-weight:800;color:#f0ddb0}
body.in-game .admin-activity-preview img{width:30px;height:30px;object-fit:contain}
body.in-game .admin-activity-preview>small{flex:1 1 100%;color:var(--ti-muted);line-height:1.45}
body.in-game .admin-activity-actions{display:flex;gap:8px;flex-wrap:wrap}
body.in-game .news-list{display:grid;gap:12px}
body.in-game .news-card{display:grid;gap:8px;padding:14px 16px;border:1px solid var(--ti-line-soft);border-radius:14px;background:linear-gradient(145deg,rgba(8,32,41,.96),rgba(5,23,30,.96))}
body.in-game .news-card.activity{border-color:rgba(70,181,147,.34);background:linear-gradient(145deg,rgba(9,54,46,.55),rgba(5,23,30,.96))}
body.in-game .news-card-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body.in-game .news-card-head strong{font-size:23px!important;color:var(--ti-text)}
body.in-game .news-card-head em{margin-left:auto;font-style:normal;font-size:20px!important;color:#9bd9b8!important;font-weight:800}
body.in-game .news-card time,body.in-game .news-card-body{font-size:20px!important;line-height:1.5!important}
body.in-game .news-card time{color:#8fa8ad!important}.news-card-body{color:#cfdddf!important}
@media(max-width:900px){body.in-game .admin-activity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){body.in-game .admin-activity-grid{grid-template-columns:1fr}body.in-game .admin-activity-row{align-items:flex-start;flex-direction:column}body.in-game .news-card-head em{margin-left:0;width:100%}}

/* v2026.09.02.10：訊息中心重新設計。所有玩家可見文字維持 >=20px。 */
body.in-game .message-center-v10{overflow:hidden!important}
body.in-game .message-center-v10 .message-center-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:18px!important;padding:18px var(--ti-panel-x,18px)!important;background:linear-gradient(145deg,rgba(8,36,46,.98),rgba(5,24,32,.98))!important;border-bottom:1px solid rgba(92,157,172,.28)!important}
body.in-game .message-center-v10 .message-center-title{display:grid!important;gap:5px!important;min-width:0!important}
body.in-game .message-center-v10 .message-center-title .section-kicker{font-size:20px!important;letter-spacing:.08em!important;color:#8fcbd3!important;font-weight:800!important}
body.in-game .message-center-v10 .message-center-title h2{font-size:30px!important;line-height:1.2!important;margin:0!important;color:#edf7f8!important}
body.in-game .message-center-v10 .message-center-title p{font-size:20px!important;line-height:1.55!important;margin:0!important;color:#a9c0c5!important;max-width:880px!important}
body.in-game .message-center-tools{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;flex:0 0 auto!important}
body.in-game .message-current-view{display:inline-flex!important;align-items:center!important;gap:9px!important;min-height:46px!important;padding:8px 13px!important;border:1px solid rgba(111,178,190,.28)!important;border-radius:12px!important;background:rgba(7,28,36,.82)!important;color:#e8f4f5!important}
body.in-game .message-current-view i{display:grid!important;place-items:center!important;width:30px!important;height:30px!important;border-radius:9px!important;background:rgba(68,145,158,.18)!important;font-size:20px!important;font-style:normal!important}
body.in-game .message-current-view b{font-size:20px!important}
body.in-game .message-center-tools .danger-act{min-height:46px!important;font-size:20px!important;padding:8px 14px!important}
body.in-game .message-filter-board{display:grid!important;gap:0!important;background:#071a22!important;border-bottom:1px solid rgba(92,157,172,.24)!important}
body.in-game .message-filter-row{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;padding:10px var(--ti-panel-x,18px)!important}
body.in-game .message-filter-row.primary{background:rgba(13,43,54,.72)!important;border-bottom:1px solid rgba(92,157,172,.17)!important}
body.in-game .message-filter-row>b{font-size:20px!important;color:#8faab0!important;min-width:86px!important}
body.in-game .message-filter{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:44px!important;padding:7px 12px!important;border:1px solid rgba(102,151,162,.22)!important;border-radius:10px!important;background:rgba(4,23,30,.86)!important;color:#bcd0d4!important;font-size:20px!important;line-height:1.2!important;white-space:nowrap!important;cursor:pointer!important;transition:background .15s ease,border-color .15s ease,transform .15s ease!important}
body.in-game .message-filter:hover{background:rgba(18,62,73,.88)!important;border-color:rgba(103,184,196,.48)!important;transform:translateY(-1px)!important}
body.in-game .message-filter.active,body.in-game .message-filter[aria-current="page"]{background:linear-gradient(145deg,rgba(30,106,119,.72),rgba(19,72,85,.82))!important;border-color:rgba(110,210,222,.7)!important;color:#f2fbfc!important;box-shadow:0 0 0 1px rgba(108,200,211,.08) inset!important}
body.in-game .message-filter-favorites{border-color:rgba(193,158,91,.38)!important;color:#f2dca4!important}
body.in-game .message-filter-icon{display:inline-grid!important;place-items:center!important;width:27px!important;height:27px!important;font-size:20px!important;color:inherit!important}
body.in-game .message-retention{margin:0!important;padding:10px var(--ti-panel-x,18px)!important;border-top:1px solid rgba(92,157,172,.15)!important;background:rgba(4,19,25,.86)!important;color:#8ea7ad!important;font-size:20px!important;line-height:1.45!important}
body.in-game .message-center-v10 #msgBody{display:grid!important;gap:14px!important;padding:16px var(--ti-panel-x,18px) 20px!important;background:linear-gradient(180deg,rgba(4,18,24,.98),rgba(4,16,22,.98))!important}
body.in-game .message-feed,body.in-game .news-feed{display:grid!important;gap:12px!important}
body.in-game .message-card-v10{display:grid!important;gap:0!important;border:1px solid rgba(92,145,157,.2)!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(8,31,40,.98),rgba(5,23,30,.98))!important;overflow:hidden!important;box-shadow:0 8px 22px rgba(0,0,0,.12)!important}
body.in-game .message-card-v10.unread{border-color:rgba(86,188,204,.48)!important;box-shadow:0 0 0 1px rgba(77,179,194,.11) inset,0 8px 22px rgba(0,0,0,.12)!important}
body.in-game .message-card-head-v10{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;padding:14px 15px 12px!important;border-bottom:1px solid rgba(95,151,160,.14)!important;background:rgba(7,29,37,.72)!important}
body.in-game .message-identity{display:flex!important;align-items:flex-start!important;gap:12px!important;min-width:0!important;flex:1!important}
body.in-game .message-type-icon{display:grid!important;place-items:center!important;width:44px!important;height:44px!important;flex:0 0 44px!important;border:1px solid rgba(94,168,180,.26)!important;border-radius:12px!important;background:rgba(37,103,117,.2)!important;color:#b9e4e9!important;font-size:23px!important}
body.in-game .message-identity>div{display:grid!important;gap:6px!important;min-width:0!important}
body.in-game .message-card-labels{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
body.in-game .message-card-labels .badge{font-size:20px!important;line-height:1.2!important}
body.in-game .unread-label{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:28px!important;padding:2px 8px!important;border-radius:999px!important;background:#1e8191!important;color:white!important;font-size:20px!important;font-weight:800!important}
body.in-game .message-identity strong{font-size:23px!important;line-height:1.38!important;color:#edf6f7!important;overflow-wrap:anywhere!important}
body.in-game .message-card-head-v10 time{flex:0 0 auto!important;font-size:20px!important;color:#8fa7ad!important;white-space:nowrap!important}
body.in-game .message-card-v10 .message-preview,body.in-game .message-card-v10 .message-full{padding:13px 15px!important;font-size:20px!important;line-height:1.62!important;color:#c9dadd!important;background:rgba(3,16,21,.36)!important;border-bottom:1px solid rgba(95,151,160,.12)!important}
body.in-game .message-card-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:10px 12px!important;background:rgba(5,24,31,.9)!important}
body.in-game .message-context-actions,body.in-game .message-manage-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
body.in-game .message-card-footer button{min-height:42px!important;font-size:20px!important;padding:6px 11px!important}
body.in-game .message-no-action{font-size:20px!important;color:#7f999f!important}
body.in-game .message-pager{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:9px 0!important;margin:0!important;color:#91a9af!important;font-size:20px!important}
body.in-game .message-pager>span{font-size:20px!important}
body.in-game .message-pager>div{display:flex!important;gap:8px!important}
body.in-game .message-pager button{min-height:42px!important;font-size:20px!important}
body.in-game .news-feed{gap:16px!important}
body.in-game .news-section{display:grid!important;gap:10px!important}
body.in-game .news-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:0 2px 7px!important;border-bottom:1px solid rgba(94,157,169,.2)!important}
body.in-game .news-section-head>div{display:flex!important;align-items:baseline!important;gap:10px!important;flex-wrap:wrap!important}
body.in-game .news-section-head b{font-size:23px!important;color:#eaf5f6!important}
body.in-game .news-section-head span{font-size:20px!important;color:#849da3!important}
body.in-game .news-section-head em{display:grid!important;place-items:center!important;min-width:34px!important;height:34px!important;padding:0 8px!important;border-radius:999px!important;background:rgba(47,116,129,.22)!important;color:#a9dbe1!important;font-size:20px!important;font-style:normal!important;font-weight:800!important}
body.in-game .news-list{display:grid!important;gap:10px!important}
body.in-game .news-card{grid-template-columns:52px minmax(0,1fr)!important;gap:13px!important;padding:14px 15px!important;border-radius:14px!important}
body.in-game .news-card-symbol{display:grid!important;place-items:center!important;width:48px!important;height:48px!important;border:1px solid rgba(106,177,188,.25)!important;border-radius:14px!important;background:rgba(40,111,123,.2)!important;font-size:25px!important}
body.in-game .news-card.activity .news-card-symbol{border-color:rgba(76,190,147,.35)!important;background:rgba(47,131,95,.18)!important}
body.in-game .news-card-main{display:grid!important;gap:7px!important;min-width:0!important}
body.in-game .news-card-head{display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important}
body.in-game .news-card-head .badge{font-size:20px!important}
body.in-game .news-card-head strong{font-size:23px!important;line-height:1.35!important}
body.in-game .news-card-head em{font-size:20px!important;margin-left:auto!important}
body.in-game .news-card time{font-size:20px!important;line-height:1.4!important;color:#8ba5aa!important}
body.in-game .news-card-body,body.in-game .news-card-body p,body.in-game .news-card-body li{font-size:20px!important;line-height:1.58!important;color:#cadbdd!important}
body.in-game .news-card-body p{margin:0!important}
body.in-game .news-card-body ul{margin:2px 0 0 1.15em!important;padding:0!important;display:grid!important;gap:4px!important}
body.in-game .news-card.active{border-color:rgba(70,190,143,.5)!important}
body.in-game .news-card.upcoming{border-color:rgba(94,169,204,.42)!important}
body.in-game .news-card.ended{opacity:.82!important}
body.in-game .message-empty{display:grid!important;gap:6px!important;padding:32px 20px!important;text-align:center!important}
body.in-game .message-empty b{font-size:24px!important;color:#e2eef0!important}
body.in-game .message-empty span{font-size:20px!important;color:#8ca4aa!important}
@media(max-width:880px){body.in-game .message-center-v10 .message-center-head{flex-direction:column!important;align-items:stretch!important}body.in-game .message-center-tools{justify-content:space-between!important}body.in-game .message-filter-row>b{flex:1 1 100%!important;min-width:0!important}body.in-game .message-card-head-v10{flex-direction:column!important}body.in-game .message-card-head-v10 time{white-space:normal!important}body.in-game .message-card-footer{align-items:stretch!important;flex-direction:column!important}body.in-game .message-manage-actions{justify-content:flex-end!important}}
@media(max-width:600px){body.in-game .message-filter-row{display:grid!important;grid-template-columns:1fr 1fr!important}body.in-game .message-filter-row>b{grid-column:1/-1!important}body.in-game .message-filter{width:100%!important;white-space:normal!important}body.in-game .message-center-tools{display:grid!important;grid-template-columns:1fr!important}body.in-game .message-current-view{justify-content:center!important}body.in-game .message-center-tools .danger-act{width:100%!important}body.in-game .message-card-footer button{flex:1 1 100%!important;width:100%!important}body.in-game .message-context-actions,body.in-game .message-manage-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}body.in-game .message-pager{align-items:stretch!important;flex-direction:column!important}body.in-game .message-pager>div{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}body.in-game .message-pager button{width:100%!important}body.in-game .news-card{grid-template-columns:42px minmax(0,1fr)!important;padding:12px!important}body.in-game .news-card-symbol{width:40px!important;height:40px!important;font-size:22px!important}body.in-game .news-card-head em{margin-left:0!important;width:100%!important}}

/* v2026.09.02.11：訊息中心改為「清單 + 閱讀區」主從架構，不再以大量卡片與小圖示堆疊資訊。 */
body.in-game .message-center-v11{overflow:hidden!important;padding:0!important}
body.in-game .message-center-v11>.message-hub-nav{margin:0!important;padding:10px var(--ti-panel-x,18px)!important;border-bottom:1px solid rgba(104,156,166,.18)!important;background:rgba(5,22,29,.94)!important}
body.in-game .message-center-v11 .message-hub-tab{min-height:44px!important;font-size:20px!important;padding:7px 16px!important}
body.in-game .message-center-head-v11{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:18px!important;padding:18px var(--ti-panel-x,18px) 16px!important;background:linear-gradient(145deg,rgba(8,35,44,.98),rgba(5,24,31,.98))!important;border-bottom:1px solid rgba(103,157,168,.22)!important}
body.in-game .message-center-head-v11>div{display:grid!important;gap:6px!important;min-width:0!important}
body.in-game .message-center-head-v11 h2{margin:0!important;font-size:30px!important;line-height:1.2!important;color:#edf7f8!important}
body.in-game .message-center-head-v11 p{margin:0!important;max-width:980px!important;font-size:20px!important;line-height:1.5!important;color:#9fb7bc!important}
body.in-game .message-center-head-v11>.danger-act{flex:0 0 auto!important;min-height:44px!important;font-size:20px!important;padding:7px 14px!important}
body.in-game .message-filter-board-v11{display:grid!important;gap:0!important;border-bottom:1px solid rgba(101,154,165,.22)!important;background:rgba(5,23,30,.96)!important}
body.in-game .message-primary-tabs{display:flex!important;align-items:stretch!important;gap:0!important;padding:0 var(--ti-panel-x,18px)!important;border-bottom:1px solid rgba(101,154,165,.14)!important;background:rgba(9,31,39,.82)!important;overflow-x:auto!important;scrollbar-width:thin!important}
body.in-game .message-primary-tab{position:relative!important;flex:0 0 auto!important;min-height:52px!important;padding:10px 18px!important;border:0!important;border-radius:0!important;background:transparent!important;color:#a9bdc1!important;font-size:20px!important;font-weight:800!important;box-shadow:none!important;white-space:nowrap!important}
body.in-game .message-primary-tab:hover{background:rgba(32,79,91,.26)!important;color:#edf8f9!important}
body.in-game .message-primary-tab.active{background:rgba(28,87,99,.24)!important;color:#f2fbfc!important}
body.in-game .message-primary-tab.active:after{content:""!important;position:absolute!important;left:14px!important;right:14px!important;bottom:0!important;height:3px!important;border-radius:3px 3px 0 0!important;background:#70c5cf!important}
body.in-game .message-filter-meta{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding:10px var(--ti-panel-x,18px)!important;min-height:62px!important}
body.in-game .message-filter-meta p{margin:0!important;min-width:0!important;font-size:20px!important;line-height:1.45!important;color:#8fa7ac!important}
body.in-game .message-type-select{display:flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important}
body.in-game .message-type-select>span{font-size:20px!important;font-weight:800!important;color:#a9bec2!important;white-space:nowrap!important}
body.in-game .message-type-select select{min-width:170px!important;min-height:42px!important;font-size:20px!important;padding:6px 34px 6px 10px!important}
body.in-game .message-center-v11 #msgBody{padding:16px var(--ti-panel-x,18px) 20px!important;background:linear-gradient(180deg,rgba(4,18,24,.98),rgba(4,16,22,.98))!important}
body.in-game .message-workspace-v11{display:grid!important;grid-template-columns:minmax(330px,37%) minmax(0,1fr)!important;gap:14px!important;align-items:start!important;min-height:590px!important}
body.in-game .message-list-pane,body.in-game .message-detail-pane{min-width:0!important;border:1px solid rgba(98,151,162,.2)!important;border-radius:14px!important;background:linear-gradient(145deg,rgba(7,29,37,.98),rgba(5,22,29,.98))!important;overflow:hidden!important}
body.in-game .message-list-pane{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;max-height:72vh!important;min-height:590px!important}
body.in-game .message-list-head{display:grid!important;gap:9px!important;padding:13px 14px!important;border-bottom:1px solid rgba(98,151,162,.18)!important;background:rgba(8,33,42,.94)!important}
body.in-game .message-list-head>div:first-child{display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:10px!important}
body.in-game .message-list-head b{font-size:23px!important;color:#edf6f7!important}
body.in-game .message-list-head>div:first-child>span{font-size:20px!important;color:#849ea4!important}
body.in-game .message-pager-v11{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-width:0!important}
body.in-game .message-pager-v11>span{font-size:20px!important;color:#8fa7ac!important}
body.in-game .message-pager-v11>div{display:flex!important;gap:7px!important;flex:0 0 auto!important}
body.in-game .message-pager-v11 button{min-height:40px!important;padding:5px 10px!important;font-size:20px!important}
body.in-game .message-list-scroll{min-height:0!important;overflow:auto!important;overscroll-behavior:contain!important;scrollbar-width:thin!important;background:rgba(3,17,22,.45)!important}
body.in-game .message-list-group{display:grid!important;gap:2px!important;padding:11px 14px 8px!important;border-bottom:1px solid rgba(92,145,156,.12)!important;background:rgba(4,21,27,.94)!important}
body.in-game .message-list-group b{font-size:20px!important;color:#c4d7da!important}
body.in-game .message-list-group span{font-size:20px!important;color:#7f999f!important}
body.in-game .message-list-row{display:grid!important;gap:7px!important;width:100%!important;margin:0!important;padding:13px 14px!important;border:0!important;border-bottom:1px solid rgba(92,145,156,.12)!important;border-radius:0!important;background:transparent!important;color:inherit!important;text-align:left!important;box-shadow:none!important;cursor:pointer!important;transition:background .14s ease,border-color .14s ease!important}
body.in-game .message-list-row:hover{background:rgba(25,67,78,.34)!important}
body.in-game .message-list-row.selected{background:linear-gradient(90deg,rgba(33,101,115,.42),rgba(16,54,65,.34))!important;box-shadow:inset 4px 0 0 #68bac5!important}
body.in-game .message-list-row.unread:not(.selected){background:rgba(16,52,62,.22)!important;box-shadow:inset 3px 0 0 rgba(94,180,193,.62)!important}
body.in-game .message-row-top{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important}
body.in-game .message-row-top>span,body.in-game .message-row-top time{font-size:20px!important;line-height:1.3!important;color:#8fa7ad!important}
body.in-game .message-row-top>span{font-weight:800!important;color:#a9c3c7!important}
body.in-game .message-row-top time{flex:0 0 auto!important;white-space:nowrap!important}
body.in-game .message-list-row>strong{display:block!important;font-size:22px!important;line-height:1.35!important;color:#eef7f8!important;overflow-wrap:anywhere!important}
body.in-game .message-row-preview{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;font-size:20px!important;line-height:1.45!important;color:#a7bdc1!important}
body.in-game .message-row-foot{font-size:20px!important;line-height:1.3!important;color:#d8c995!important;font-weight:800!important}
body.in-game .message-detail-pane{max-height:72vh!important;min-height:590px!important;overflow:auto!important;overscroll-behavior:contain!important;scrollbar-width:thin!important}
body.in-game .message-detail-card{display:grid!important;min-height:100%!important;grid-template-rows:auto minmax(0,1fr) auto auto!important;background:linear-gradient(145deg,rgba(8,31,40,.98),rgba(5,23,30,.98))!important}
body.in-game .message-detail-card>header{display:grid!important;gap:9px!important;padding:18px 20px 16px!important;border-bottom:1px solid rgba(98,151,162,.16)!important;background:rgba(8,34,43,.76)!important}
body.in-game .message-detail-card>header>div{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
body.in-game .message-detail-category,body.in-game .message-detail-status{display:inline-flex!important;align-items:center!important;min-height:32px!important;padding:3px 9px!important;border-radius:8px!important;background:rgba(43,108,120,.22)!important;color:#b9d8dc!important;font-size:20px!important;font-weight:800!important}
body.in-game .message-detail-status{background:rgba(48,129,143,.3)!important;color:#d7f3f6!important}
body.in-game .message-detail-status.favorite{background:rgba(136,110,47,.26)!important;color:#ead69e!important}
body.in-game .message-detail-card h3{margin:0!important;font-size:27px!important;line-height:1.35!important;color:#f0f8f9!important;overflow-wrap:anywhere!important}
body.in-game .message-detail-card time{font-size:20px!important;line-height:1.4!important;color:#8da5aa!important}
body.in-game .message-detail-body{padding:18px 20px 22px!important;font-size:20px!important;line-height:1.72!important;color:#cfdee0!important;overflow-wrap:anywhere!important}
body.in-game .message-detail-body p,body.in-game .message-detail-body li,body.in-game .message-detail-body span,body.in-game .message-detail-body summary{font-size:20px!important;line-height:1.72!important}
body.in-game .message-detail-body p{margin:0 0 12px!important}
body.in-game .message-detail-body ul{display:grid!important;gap:8px!important;margin:0!important;padding-left:1.25em!important}
body.in-game .message-related-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;padding:12px 20px!important;border-top:1px solid rgba(98,151,162,.14)!important;background:rgba(5,24,31,.84)!important}
body.in-game .message-related-actions button,body.in-game .message-detail-manage button{min-height:42px!important;font-size:20px!important;padding:6px 12px!important}
body.in-game .message-detail-manage{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;padding:12px 20px!important;border-top:1px solid rgba(98,151,162,.14)!important;background:rgba(4,20,26,.96)!important}
body.in-game .message-official-note{padding:12px 20px!important;border-top:1px solid rgba(98,151,162,.14)!important;background:rgba(4,20,26,.96)!important;color:#8da5aa!important;font-size:20px!important;line-height:1.45!important}
body.in-game .message-detail-empty{display:grid!important;place-content:center!important;gap:8px!important;min-height:590px!important;padding:28px!important;text-align:center!important}
body.in-game .message-detail-empty b{font-size:24px!important;color:#dcebed!important}
body.in-game .message-detail-empty span{font-size:20px!important;line-height:1.5!important;color:#8da5aa!important}
body.in-game .news-detail-card{grid-template-rows:auto minmax(0,1fr) auto!important}
body.in-game .news-list-row .message-row-foot{color:#9ec9cf!important}
body.in-game .news-list-row.selected .message-row-foot{color:#c7edf1!important}
@media(max-width:1120px){body.in-game .message-workspace-v11{grid-template-columns:minmax(300px,42%) minmax(0,1fr)!important}body.in-game .message-pager-v11{align-items:flex-start!important;flex-direction:column!important}}
@media(max-width:900px){body.in-game .message-center-head-v11{align-items:stretch!important;flex-direction:column!important}body.in-game .message-center-head-v11>.danger-act{align-self:flex-start!important}body.in-game .message-filter-meta{align-items:stretch!important;flex-direction:column!important}body.in-game .message-type-select{justify-content:space-between!important}body.in-game .message-type-select select{flex:1 1 auto!important;min-width:0!important}body.in-game .message-workspace-v11{grid-template-columns:1fr!important;min-height:0!important}body.in-game .message-list-pane,body.in-game .message-detail-pane{min-height:0!important;max-height:none!important}body.in-game .message-list-scroll{max-height:56vh!important}body.in-game .message-detail-empty{min-height:320px!important}}
@media(max-width:600px){body.in-game .message-center-head-v11{padding:15px 14px!important}body.in-game .message-center-head-v11>.danger-act{width:100%!important}body.in-game .message-primary-tabs{padding:0 8px!important}body.in-game .message-primary-tab{padding:9px 14px!important}body.in-game .message-filter-meta{padding:10px 14px!important}body.in-game .message-center-v11 #msgBody{padding:12px 10px 16px!important}body.in-game .message-list-head{padding:12px!important}body.in-game .message-pager-v11>div{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}body.in-game .message-pager-v11 button{width:100%!important}body.in-game .message-list-row{padding:12px!important}body.in-game .message-row-top{align-items:flex-start!important;flex-direction:column!important;gap:3px!important}body.in-game .message-row-top time{white-space:normal!important}body.in-game .message-detail-card>header,body.in-game .message-detail-body{padding-left:15px!important;padding-right:15px!important}body.in-game .message-related-actions,body.in-game .message-detail-manage{display:grid!important;grid-template-columns:1fr!important;padding-left:15px!important;padding-right:15px!important}body.in-game .message-related-actions button,body.in-game .message-detail-manage button{width:100%!important}}

/* v2026.09.02.11：群島動物顧問可同時啟用多位，各自期限獨立。 */
body.in-game .advisor-multi-active-note{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 14px;padding:12px 14px;border:1px solid rgba(105,169,180,.24);border-radius:12px;background:rgba(8,34,43,.74)}
body.in-game .advisor-multi-active-note b{font-size:22px!important;color:#e9f5f6}
body.in-game .advisor-multi-active-note span{font-size:20px!important;line-height:1.5!important;color:#a6bdc1}

/* v2026.09.02.13：版本更新完整內容採分段閱讀，不顯示內部保存規則。 */
body.in-game .release-note-section{display:grid!important;gap:8px!important;margin:0 0 20px!important}
body.in-game .release-note-section:last-child{margin-bottom:0!important}
body.in-game .release-note-section h4{margin:0!important;padding:0 0 7px!important;border-bottom:1px solid rgba(100,154,164,.15)!important;font-size:22px!important;line-height:1.4!important;color:#e5f2f4!important}
body.in-game .release-note-section ul{margin:0!important;padding-left:1.25em!important;display:grid!important;gap:8px!important}

/* v2026.09.03.01：偵查訊息改為圖片與數值卡為主，長篇文字降為輔助資訊。 */
body.in-game .scout-visual-body{padding:16px!important;background:linear-gradient(180deg,rgba(4,21,27,.94),rgba(5,26,33,.98))!important}
body.in-game .scout-report-visual{display:grid;gap:16px}
body.in-game .scout-quick-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body.in-game .scout-quick-strip>div{display:grid;gap:3px;min-width:0;padding:12px 14px;border:1px solid rgba(106,166,181,.22);border-radius:10px;background:rgba(11,42,51,.76)}
body.in-game .scout-quick-strip span{font-size:20px!important;color:#8eb0b8}
body.in-game .scout-quick-strip b{font-size:24px!important;color:#edf8fa;overflow-wrap:anywhere}
body.in-game .scout-visual-section{display:grid;gap:10px;padding-top:2px}
body.in-game .scout-visual-section>h4{margin:0!important;font-size:23px!important;color:#d8ecef}
body.in-game .scout-resource-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
body.in-game .scout-resource-card{display:grid;grid-template-columns:58px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:11px;border:1px solid rgba(106,166,181,.2);border-radius:11px;background:rgba(8,35,44,.82)}
body.in-game .scout-resource-card img{grid-row:1/3;width:58px;height:58px;object-fit:contain}
body.in-game .scout-resource-card span{font-size:20px!important;color:#93b3bb}
body.in-game .scout-resource-card b{font-size:25px!important;color:#f2fafb;line-height:1.2!important}
body.in-game .scout-unit-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:10px}
body.in-game .scout-unit-card{display:grid;grid-template-columns:86px minmax(0,1fr);align-items:center;gap:10px;min-height:104px;padding:9px 11px;border:1px solid rgba(95,157,173,.21);border-radius:11px;background:rgba(7,31,39,.86)}
body.in-game .scout-unit-card.defense{border-color:rgba(170,132,87,.28);background:rgba(38,30,22,.55)}
body.in-game .scout-unit-card img{width:86px;height:86px;object-fit:contain}
body.in-game .scout-unit-card>div{display:grid;gap:2px;min-width:0}
body.in-game .scout-unit-card b{font-size:20px!important;color:#e3f2f4;overflow-wrap:anywhere}
body.in-game .scout-unit-card strong{font-size:27px!important;line-height:1.15;color:#fff}
body.in-game .scout-unit-card small{font-size:20px!important;color:#86a3aa}
body.in-game .scout-unit-placeholder{display:block;width:72px;height:72px;border-radius:50%;background:radial-gradient(circle,rgba(114,158,169,.23),rgba(63,105,116,.05))}
body.in-game .scout-catalog-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
body.in-game .scout-catalog-card{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:10px;padding:10px;border:1px solid rgba(104,158,171,.18);border-radius:10px;background:rgba(8,34,42,.72)}
body.in-game .scout-catalog-card img{width:64px;height:64px;object-fit:contain}
body.in-game .scout-catalog-card>div{display:grid;gap:2px;min-width:0}
body.in-game .scout-catalog-card b{font-size:20px!important;color:#dcecee;overflow-wrap:anywhere}
body.in-game .scout-catalog-card strong{font-size:22px!important;color:#f4fbfc}
body.in-game .scout-compact-note{display:grid;gap:7px;padding:11px 13px;border-radius:10px;background:rgba(84,69,36,.22);border:1px solid rgba(194,166,94,.24)}
body.in-game .scout-compact-note span{font-size:20px!important;color:#d9cda8}
body.in-game .scout-requirements{padding:9px 12px;border:1px solid rgba(99,151,164,.18);border-radius:9px;background:rgba(6,29,36,.6)}
body.in-game .scout-requirements summary{cursor:pointer;color:#a9c5cc;font-size:20px!important}
body.in-game .scout-requirements span{display:block;margin-top:8px;font-size:20px!important;color:#8daab1}
body.in-game .scout-target-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:15px;border:1px solid rgba(100,162,177,.24);border-radius:12px;background:linear-gradient(135deg,rgba(10,48,58,.9),rgba(7,31,39,.9))}
body.in-game .scout-target-hero span{font-size:20px!important;color:#86aab3}
body.in-game .scout-target-hero h4{margin:3px 0!important;font-size:28px!important;color:#effafb}
body.in-game .scout-target-hero b{font-size:21px!important;color:#d6e7ea}
body.in-game .scout-target-tags{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;max-width:52%}
body.in-game .scout-target-tags span{padding:6px 9px;border-radius:8px;background:rgba(255,255,255,.055);color:#b8d0d5;font-size:20px!important}
body.in-game .scout-tech-line{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:rgba(8,35,44,.78);border:1px solid rgba(101,158,172,.18)}
body.in-game .scout-tech-line img{width:58px;height:58px;object-fit:contain}
body.in-game .scout-tech-line span{font-size:20px!important;color:#c4d9dd}
body.in-game .scout-alert-visual{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:18px;min-height:150px;padding:18px;border:1px solid rgba(171,111,90,.3);border-radius:12px;background:linear-gradient(135deg,rgba(58,30,25,.72),rgba(12,35,42,.88))}
body.in-game .scout-alert-visual img{width:110px;height:110px;object-fit:contain}
body.in-game .scout-alert-visual>div{display:grid;gap:5px}
body.in-game .scout-alert-visual b{font-size:27px!important;color:#f2f8f8}
body.in-game .scout-alert-visual span,body.in-game .scout-alert-visual small{font-size:20px!important;color:#a9c0c5}
@media(max-width:900px){body.in-game .scout-quick-strip{grid-template-columns:repeat(2,minmax(0,1fr))}body.in-game .scout-target-hero{flex-direction:column}body.in-game .scout-target-tags{justify-content:flex-start;max-width:none}}
@media(max-width:560px){body.in-game .scout-quick-strip{grid-template-columns:1fr 1fr}body.in-game .scout-resource-grid,body.in-game .scout-unit-grid,body.in-game .scout-catalog-grid{grid-template-columns:1fr}body.in-game .scout-alert-visual{grid-template-columns:82px minmax(0,1fr)}body.in-game .scout-alert-visual img{width:82px;height:82px}}

/* v2026.09.03.02：深海霸主 10 關闖關資訊。玩家在出發前就能看懂難度與通關獎勵。 */
body.in-game .boss-challenge-preview{
  display:grid;gap:12px;margin:12px 0;padding:14px;border:1px solid rgba(115,196,207,.35);border-radius:12px;background:rgba(4,31,38,.72);
}
body.in-game .boss-challenge-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap;}
body.in-game .boss-challenge-head>div{display:grid;gap:4px;min-width:min(100%,360px);}
body.in-game .boss-challenge-head>b,body.in-game .boss-challenge-head strong{font-size:20px;}
body.in-game .boss-challenge-head small{font-size:20px;color:#a9c3cd;line-height:1.45;}
body.in-game .boss-stage-track{display:grid;grid-template-columns:repeat(10,minmax(64px,1fr));gap:6px;overflow-x:auto;padding-bottom:4px;}
body.in-game .boss-stage-chip{display:grid;gap:2px;text-align:center;padding:8px 6px;border:1px solid rgba(130,176,183,.28);border-radius:9px;background:rgba(9,45,53,.82);min-width:64px;}
body.in-game .boss-stage-chip small,body.in-game .boss-stage-chip b{font-size:20px;}
body.in-game .boss-completion-reward{display:grid;grid-template-columns:auto 1fr auto;gap:6px 14px;align-items:center;padding:12px;border-radius:10px;background:rgba(81,66,20,.25);border:1px solid rgba(232,196,88,.35);}
body.in-game .boss-completion-reward>b,body.in-game .boss-completion-reward>span,body.in-game .boss-completion-reward>small,body.in-game .boss-completion-reward>strong{font-size:20px;}
body.in-game .boss-completion-reward>small{grid-column:2/3;color:#bdd0d5;}
body.in-game .boss-completion-reward>strong{color:#f2d778;white-space:nowrap;}
body.in-game .boss-challenge-waiting{display:grid;gap:8px;padding:14px;margin:10px 0;border:1px solid rgba(84,205,175,.42);border-radius:12px;background:rgba(10,63,54,.34);}
body.in-game .boss-challenge-waiting>b,body.in-game .boss-challenge-waiting>span,body.in-game .boss-challenge-waiting>small{font-size:20px;}
body.in-game .boss-waiting-row{border-color:rgba(84,205,175,.45);background:rgba(10,63,54,.18);}
@media(max-width:900px){
  body.in-game .boss-stage-track{grid-template-columns:repeat(10,72px);}
  body.in-game .boss-completion-reward{grid-template-columns:1fr;}
  body.in-game .boss-completion-reward>small{grid-column:auto;}
}

/* v2026.09.03.03：深海霸主同群島占用狀態。只用清楚文字提示，不增加多餘圖示。 */
body.in-game .boss-zone-occupied{
  display:block;
  margin-top:8px;
  font-size:20px;
  line-height:1.45;
  font-weight:700;
  opacity:.92;
}


/* v2026.09.03.04：深海霸主目前關卡敵軍預覽。圖片為主、名稱與約略數量為輔。 */
body.in-game .boss-enemy-intel{display:grid;gap:10px;padding:12px;border:1px solid rgba(106,174,184,.30);border-radius:10px;background:rgba(4,23,29,.62);}
body.in-game .boss-enemy-intel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
body.in-game .boss-enemy-intel-head>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
body.in-game .boss-enemy-intel-head b,body.in-game .boss-enemy-intel-head span,body.in-game .boss-enemy-intel-head small{font-size:20px;}
body.in-game .boss-enemy-intel-head span{color:#d4b96a;}
body.in-game .boss-enemy-intel-head small{color:#9fb5bd;}
body.in-game .boss-enemy-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
body.in-game .boss-enemy-card{display:grid;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:10px;min-width:0;padding:9px;border:1px solid rgba(109,157,165,.24);border-radius:9px;background:rgba(7,37,44,.76);}
body.in-game .boss-enemy-card img{width:82px;height:82px;object-fit:contain;filter:saturate(.9) brightness(.92);}
body.in-game .boss-enemy-card>div{display:grid;gap:4px;min-width:0;}
body.in-game .boss-enemy-card b{font-size:20px;line-height:1.3;overflow-wrap:anywhere;}
body.in-game .boss-enemy-card strong{font-size:23px;color:#e2edf0;line-height:1.2;}
@media(max-width:1050px){body.in-game .boss-enemy-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:620px){body.in-game .boss-enemy-grid{grid-template-columns:1fr;}body.in-game .boss-enemy-card{grid-template-columns:74px minmax(0,1fr);}body.in-game .boss-enemy-card img{width:74px;height:74px;}}

/* ========================================================================
   v2026.09.03.05 — 多島嶼固定順序導覽
   島嶼依海域／群島／島位固定排序；切換島嶼只改目前選取狀態，不重新排列。
   大量島嶼以固定橫向卡列＋快速跳島＋上一島／下一島操作，避免目前島永遠被搬到第一格。
   ======================================================================== */
body.in-game .rightbar{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  gap:9px!important;
  padding:10px 18px 12px!important;
  overflow:visible!important;
}
body.in-game .rightbar .island-card{display:none!important;}
body.in-game .rightbar .island-list-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-width:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  flex-wrap:wrap!important;
}
body.in-game .island-dock-heading{
  min-width:260px!important;
  display:flex!important;
  align-items:baseline!important;
  gap:12px!important;
  flex:1 1 360px!important;
}
body.in-game .island-dock-heading b{
  font-size:24px!important;
  color:#e5f3f5!important;
  white-space:nowrap!important;
}
body.in-game .island-dock-heading span{
  font-size:20px!important;
  color:#91adb5!important;
  min-width:0!important;
  overflow-wrap:anywhere!important;
}
body.in-game .island-dock-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex:1 1 760px!important;
  min-width:0!important;
  flex-wrap:wrap!important;
}
body.in-game .island-dock-controls button{
  min-height:46px!important;
  padding:8px 14px!important;
  font-size:20px!important;
  white-space:nowrap!important;
}
body.in-game .island-dock-controls button:disabled{
  opacity:.42!important;
  cursor:not-allowed!important;
}
body.in-game .island-jump-control{
  min-width:330px!important;
  flex:1 1 430px!important;
  max-width:620px!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
}
body.in-game .island-jump-control>span{
  font-size:20px!important;
  color:#93b0b8!important;
  white-space:nowrap!important;
}
body.in-game .island-jump-control select{
  min-width:0!important;
  width:100%!important;
  min-height:46px!important;
  padding:7px 34px 7px 10px!important;
  font-size:20px!important;
  color:#e1eff1!important;
  border:1px solid #365f69!important;
  border-radius:9px!important;
  background:#082630!important;
}
body.in-game .island-strip-shell{
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr) 48px!important;
  align-items:stretch!important;
  gap:8px!important;
  min-width:0!important;
}
body.in-game .island-strip-scroll{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:48px!important;
  width:48px!important;
  min-height:126px!important;
  height:126px!important;
  padding:0!important;
  border:1px solid #315762!important;
  border-radius:11px!important;
  background:linear-gradient(180deg,rgba(12,50,59,.96),rgba(5,29,36,.98))!important;
  color:#b9d8de!important;
  font-size:36px!important;
  line-height:1!important;
  cursor:pointer!important;
}
body.in-game .island-strip-scroll:hover,
body.in-game .island-strip-scroll:focus-visible{
  border-color:#63c9bd!important;
  color:#efffff!important;
  background:linear-gradient(180deg,rgba(18,74,78,.98),rgba(7,39,46,.98))!important;
}
body.in-game .rightbar .island-list{
  display:flex!important;
  align-items:stretch!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  height:126px!important;
  min-height:126px!important;
  max-height:126px!important;
  padding:0 2px 4px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-behavior:smooth!important;
  scroll-snap-type:x proximity!important;
  scrollbar-gutter:stable!important;
}
body.in-game .rightbar .planet-choice{
  position:relative!important;
  flex:0 0 278px!important;
  width:278px!important;
  height:118px!important;
  min-height:118px!important;
  max-height:118px!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  padding:9px 54px 9px 10px!important;
  border:2px solid #315864!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,rgba(7,39,48,.96),rgba(4,27,34,.98))!important;
  text-align:left!important;
  overflow:hidden!important;
  scroll-snap-align:start!important;
  box-sizing:border-box!important;
}
body.in-game .rightbar .planet-choice:hover,
body.in-game .rightbar .planet-choice:focus-visible{
  border-color:#67c8be!important;
  background:linear-gradient(145deg,rgba(10,59,66,.98),rgba(5,33,41,.98))!important;
  box-shadow:0 0 0 2px rgba(103,200,190,.12)!important;
}
body.in-game .rightbar .planet-choice.current{
  border-color:#78f4df!important;
  background:linear-gradient(145deg,rgba(13,82,80,.94),rgba(5,37,44,.98))!important;
  box-shadow:inset 0 0 0 1px rgba(120,244,223,.16),0 0 16px rgba(57,214,194,.15)!important;
}
body.in-game .rightbar .planet-choice img{
  width:72px!important;
  height:72px!important;
  border-radius:10px!important;
  object-fit:cover!important;
  border:1px solid rgba(143,202,208,.3)!important;
}
body.in-game .rightbar .planet-choice.current img{border-color:rgba(139,245,226,.62)!important;}
body.in-game .rightbar .planet-choice>div{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:2px!important;
}
body.in-game .rightbar .planet-choice b{
  display:block!important;
  margin:0!important;
  font-size:21px!important;
  line-height:1.18!important;
  color:#edf7f8!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.in-game .rightbar .planet-choice span,
body.in-game .rightbar .planet-choice small{
  display:block!important;
  margin:0!important;
  font-size:20px!important;
  line-height:1.16!important;
  color:#8eaab2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.in-game .rightbar .planet-choice .territory-order{
  position:absolute!important;
  top:7px!important;
  left:7px!important;
  min-width:34px!important;
  padding:2px 5px!important;
  border-radius:7px!important;
  background:rgba(2,18,24,.78)!important;
  color:#b6d0d6!important;
  font-size:20px!important;
  line-height:1.15!important;
  text-align:center!important;
  z-index:2!important;
}
body.in-game .rightbar .planet-choice .territory-card-state{
  position:absolute!important;
  top:8px!important;
  right:7px!important;
  width:auto!important;
  max-width:46px!important;
  padding:3px 6px!important;
  border-radius:8px!important;
  background:rgba(28,62,70,.88)!important;
  color:#a8c8cf!important;
  font-size:20px!important;
  line-height:1.12!important;
  text-align:center!important;
  white-space:normal!important;
  overflow:visible!important;
}
body.in-game .rightbar .planet-choice.current .territory-card-state{
  background:#65dfcc!important;
  color:#052e34!important;
  font-weight:800!important;
}
body.in-game .rightbar .planet-choice.current .territory-order{
  background:rgba(5,46,48,.92)!important;
  color:#bff8ee!important;
}
@media(max-width:900px){
  body.in-game .rightbar{padding:9px 10px 10px!important;}
  body.in-game .island-dock-heading{flex-basis:100%!important;}
  body.in-game .island-dock-controls{justify-content:flex-start!important;flex-basis:100%!important;}
  body.in-game .island-jump-control{order:-1;flex-basis:100%!important;max-width:none!important;}
  body.in-game .rightbar .planet-choice{flex-basis:255px!important;width:255px!important;}
}
@media(max-width:560px){
  body.in-game .rightbar .island-list-title{display:grid!important;grid-template-columns:1fr!important;}
  body.in-game .island-dock-heading{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;}
  body.in-game .island-dock-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;}
  body.in-game .island-jump-control{grid-column:1/-1!important;min-width:0!important;grid-template-columns:1fr!important;}
  body.in-game .island-dock-controls button{width:100%!important;}
  body.in-game .island-strip-shell{grid-template-columns:40px minmax(0,1fr) 40px!important;gap:5px!important;}
  body.in-game .island-strip-scroll{display:flex!important;width:40px!important;min-width:40px!important;height:118px!important;min-height:118px!important;font-size:32px!important;}
  body.in-game .rightbar .island-list{display:flex!important;height:118px!important;min-height:118px!important;max-height:118px!important;}
  body.in-game .rightbar .planet-choice{display:grid!important;flex:0 0 232px!important;width:232px!important;height:110px!important;min-height:110px!important;max-height:110px!important;grid-template-columns:64px minmax(0,1fr)!important;padding:8px 48px 8px 8px!important;gap:8px!important;}
  body.in-game .rightbar .planet-choice img{width:64px!important;height:64px!important;}
}


/* v2026.09.04.01 帳號設定與管理員 Email */
.player-settings-panel{max-width:980px;margin:0 auto}.account-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.account-settings-grid label,.admin-email-config-grid label,.admin-email-compose>label{display:flex;flex-direction:column;gap:8px;font-size:20px}.account-settings-grid input,.admin-email-config-grid input,.admin-email-config-grid select,.admin-email-compose input,.admin-email-compose textarea{min-height:46px;font-size:20px}.account-settings-grid small{font-size:20px;opacity:.78}.settings-actions{display:flex;justify-content:flex-end;margin-top:20px}.admin-email-box h4{font-size:22px;margin:14px 0 10px}.admin-email-config-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end}.admin-email-recipient-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0;font-size:20px}.admin-email-recipient-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:320px;overflow:auto;padding:8px;border:1px solid rgba(126,220,226,.18);border-radius:10px}.admin-email-recipient{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid rgba(126,220,226,.18);border-radius:9px;cursor:pointer}.admin-email-recipient.disabled{opacity:.48;cursor:default}.admin-email-recipient input{width:22px;height:22px}.admin-email-recipient span{min-width:0}.admin-email-recipient b,.admin-email-recipient small{display:block;font-size:20px;overflow-wrap:anywhere}.admin-email-compose{margin-top:18px}.admin-email-compose textarea{resize:vertical;min-height:180px}.admin-player-table .muted,.muted{opacity:.65}@media(max-width:1100px){.account-settings-grid,.admin-email-config-grid,.admin-email-recipient-list{grid-template-columns:1fr}}

/* ========================================================================
   v2026.09.04.02 — 島嶼完整文字 + 平板／手機最終響應式防護
   原則：重要資料不使用省略號；島名允許完整換行；整頁不產生水平溢出；
   只有表格、島嶼橫向列等明確的水平內容可在自己的容器內捲動。
   ======================================================================== */

/* --- 全站最終安全邊界：避免任何頁面把整個 viewport 撐寬 --- */
html,body{max-width:100%;overflow-x:hidden}
body.in-game,body.in-game #game,body.in-game .page-frame,body.in-game .game-grid,
body.in-game .topbar,body.in-game .sidebar,body.in-game .rightbar,body.in-game #content{
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
}
body.in-game .page-frame{width:min(1900px,100%)!important;overflow-x:clip!important}
body.in-game #content{width:100%!important;overflow-x:auto!important}
body.in-game #content>*,body.in-game #content .panel,body.in-game #content .card,
body.in-game #content .section,body.in-game #content form,body.in-game #content fieldset{
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
}
body.in-game input,body.in-game select,body.in-game textarea,body.in-game button{
  max-width:100%;box-sizing:border-box;
}
body.in-game .table-scroll,body.in-game .table-wrap,body.in-game .scroll-x,
body.in-game .boss-stage-track,body.in-game .island-list{
  max-width:100%!important;overscroll-behavior-inline:contain;touch-action:pan-x pan-y;
}
body.in-game .table-scroll,body.in-game .table-wrap,body.in-game .scroll-x{
  overflow-x:auto!important;overflow-y:visible;-webkit-overflow-scrolling:touch;
}

/* 玩家可見文字 20px 是硬下限；這一層放在檔案最末端，覆蓋歷史行動版小字規則。 */
body.in-game .page-frame p,body.in-game .page-frame li,body.in-game .page-frame label,
body.in-game .page-frame a,body.in-game .page-frame button,body.in-game .page-frame input,
body.in-game .page-frame select,body.in-game .page-frame textarea,body.in-game .page-frame td,
body.in-game .page-frame th,body.in-game .page-frame small,body.in-game .page-frame time,
body.in-game .page-frame summary{font-size:max(20px,1em)!important}
body.in-game .page-frame span:not(.nav-symbol):not(.icon):not(.fa):not([class^="fa-"]):not([class*=" fa-"]),
body.in-game .page-frame b,body.in-game .page-frame strong,body.in-game .page-frame em{
  font-size:max(20px,1em)!important;
}

/* --- 我的島嶼：禁止以 ... 隱藏島名／座標／島型 --- */
body.in-game .island-dock-heading span{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  overflow-wrap:anywhere!important;word-break:break-word!important;
}
body.in-game .rightbar .island-list{
  height:auto!important;min-height:126px!important;max-height:none!important;
  align-items:stretch!important;overflow-x:auto!important;overflow-y:visible!important;
}
body.in-game .rightbar .planet-choice{
  height:auto!important;min-height:118px!important;max-height:none!important;
  padding:9px 10px!important;overflow:visible!important;align-self:stretch!important;
}
body.in-game .rightbar .planet-choice>div{
  min-width:0!important;align-self:center!important;padding-right:0!important;
}
body.in-game .rightbar .planet-choice b,
body.in-game .rightbar .planet-choice>div>span,
body.in-game .rightbar .planet-choice>div>small{
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  overflow-wrap:anywhere!important;word-break:break-word!important;max-width:none!important;
}
body.in-game .rightbar .planet-choice b{line-height:1.25!important}
body.in-game .rightbar .planet-choice>div>span,
body.in-game .rightbar .planet-choice>div>small{line-height:1.22!important}
body.in-game .page-frame .rightbar .planet-choice>div>b{line-height:1.25!important}
body.in-game .page-frame .rightbar .planet-choice>div>span,
body.in-game .page-frame .rightbar .planet-choice>div>small{line-height:1.22!important}
/* 狀態徽章放回圖片區，不再吃掉右側文字寬度。 */
body.in-game .rightbar .planet-choice .territory-card-state{
  top:auto!important;right:auto!important;left:8px!important;bottom:8px!important;
  width:auto!important;max-width:72px!important;padding:3px 5px!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  overflow-wrap:anywhere!important;z-index:3!important;
}
body.in-game .island-strip-scroll{
  height:auto!important;min-height:126px!important;align-self:stretch!important;
}
/* 單一島嶼在窄畫面仍保留同一套島嶼導覽，不切成另一種隱藏內容的 UI。 */
body.in-game .rightbar.single-territory{display:grid!important}

/* --- Modal / Drawer：窄螢幕保證在 viewport 內，內容自己垂直捲動 --- */
body.in-game .help-modal:not(.hidden),body.in-game .story-modal:not(.hidden),
body.in-game .battle-replay-modal:not(.hidden){padding:9px!important;box-sizing:border-box!important}
body.in-game .modal-card,body.in-game .help-modal-card,body.in-game .story-modal-card,
body.in-game .battle-replay-card,body.in-game [role="dialog"]{
  max-width:calc(100vw - 18px)!important;max-height:calc(100dvh - 18px)!important;
  min-width:0!important;box-sizing:border-box!important;
}
body.in-game .modal-body,body.in-game .help-modal-body,body.in-game .story-modal-body,
body.in-game .battle-replay-body{max-height:calc(100dvh - 110px)!important;overflow-y:auto!important;overflow-x:auto!important}

/* --- 平板：資料完整、觸控舒服，主要內容兩欄為上限 --- */
@media(max-width:1100px){
  body.in-game .page-frame{min-height:100dvh!important;height:auto!important}
  body.in-game .topbar{
    position:relative!important;top:auto!important;grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"brand account" "resources resources"!important;gap:9px 12px!important;
    padding:10px 12px!important;overflow:visible!important;
  }
  body.in-game .resource-bar{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;overflow:visible!important;
  }
  body.in-game .resource-cell{
    width:100%!important;min-width:0!important;height:auto!important;min-height:64px!important;
    grid-template-columns:38px minmax(0,1fr)!important;padding:7px 8px!important;
  }
  body.in-game .resource-cell img{width:38px!important;height:38px!important;min-width:38px!important}
  body.in-game .resource-cell>div{min-width:0!important}
  body.in-game .resource-cell b{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important}
  body.in-game .account-actions{display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;gap:7px!important}
  body.in-game .account-actions button,body.in-game .nav-toggle-btn{min-height:48px!important}
  /* 平板與手機所有一般互動控制至少 48px 高，避免觸控誤按。 */
  html body.in-game .page-frame button,
  html body.in-game .page-frame input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  html body.in-game .page-frame select,html body.in-game .page-frame textarea{min-height:48px!important}

  body.in-game .game-grid{width:100%!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"nav" "territory" "content"!important}
  body.in-game .sidebar{width:100%!important;min-width:0!important}
  body.in-game .sidebar .nav-cluster,body.in-game .sidebar .nav-cluster-unified{min-width:0!important}
  body.in-game .sidebar .nav-cluster-grid,body.in-game .sidebar .nav-section .nav-cluster-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  body.in-game .sidebar .nav{min-width:0!important;min-height:54px!important;height:auto!important;white-space:normal!important}
  body.in-game .sidebar .nav span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important}

  body.in-game .rightbar{width:100%!important;overflow:visible!important;padding:9px 10px 10px!important}
  body.in-game .rightbar .island-list-title{width:100%!important}
  body.in-game .island-dock-heading{min-width:0!important;flex-basis:100%!important}
  body.in-game .island-dock-controls{flex-basis:100%!important;justify-content:flex-start!important}
  body.in-game .island-jump-control{order:-1!important;min-width:0!important;max-width:none!important;flex-basis:100%!important}
  body.in-game .rightbar .planet-choice{flex-basis:255px!important;width:255px!important;min-height:118px!important}

  body.in-game #content{padding:12px!important}
  body.in-game .account-settings-grid,body.in-game .admin-email-config-grid,body.in-game .admin-email-recipient-list,
  body.in-game .game-help-grid,body.in-game .boss-enemy-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .row,body.in-game .toolbar,body.in-game .actions,body.in-game .panel-actions,
  body.in-game .settings-actions,body.in-game .admin-email-recipient-tools{
    max-width:100%!important;flex-wrap:wrap!important;min-width:0!important;
  }
}

/* --- 手機：單欄優先；不縮小文字來塞內容 --- */
@media(max-width:700px){
  body.in-game .topbar{
    grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding:8px!important;
  }
  body.in-game .game-brand{gap:8px!important}
  body.in-game .game-brand .brand-emblem{width:44px!important;height:44px!important;flex-basis:44px!important}
  body.in-game .game-brand b{font-size:22px!important;letter-spacing:.5px!important;white-space:normal!important}
  body.in-game .game-brand small{font-size:20px!important}
  body.in-game .server-line{display:none!important}
  body.in-game .account-area{min-width:0!important}
  body.in-game .account-actions{gap:6px!important}
  body.in-game .account-actions .mini-btn,body.in-game .nav-toggle-btn{
    min-width:48px!important;min-height:48px!important;padding:7px 9px!important;
  }
  body.in-game .resource-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game .resource-cell{
    min-height:68px!important;grid-template-columns:34px minmax(0,1fr)!important;gap:6px!important;padding:7px!important;
  }
  body.in-game .resource-cell img{width:34px!important;height:34px!important;min-width:34px!important}
  body.in-game .resource-cell>div{display:block!important}
  body.in-game .resource-cell span,body.in-game .resource-cell b,body.in-game .resource-cell small{
    display:block!important;text-align:left!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
  }

  /* 行動版抽屜裡仍維持可讀、可點。 */
  body.in-game .sidebar .nav-section .nav-cluster-grid,
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body.in-game .sidebar .nav{min-height:60px!important;padding:8px!important}

  body.in-game .rightbar .island-list-title{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  body.in-game .island-dock-heading{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;min-width:0!important}
  body.in-game .island-dock-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:7px!important}
  body.in-game .island-jump-control{grid-column:1/-1!important;grid-template-columns:1fr!important;min-width:0!important;width:100%!important}
  body.in-game .island-jump-control>span{white-space:normal!important}
  body.in-game .island-dock-controls button{width:100%!important;min-height:48px!important}
  body.in-game .island-strip-shell{grid-template-columns:40px minmax(0,1fr) 40px!important;gap:5px!important}
  body.in-game .island-strip-scroll{width:40px!important;min-width:40px!important;min-height:126px!important}
  body.in-game .rightbar .planet-choice{
    flex:0 0 232px!important;width:232px!important;height:auto!important;min-height:118px!important;max-height:none!important;
    grid-template-columns:64px minmax(0,1fr)!important;padding:8px!important;gap:8px!important;
  }
  body.in-game .rightbar .planet-choice img{width:64px!important;height:64px!important}
  body.in-game .rightbar .planet-choice .territory-card-state{left:7px!important;bottom:7px!important;max-width:64px!important}

  body.in-game #content{padding:9px 7px calc(72px + env(safe-area-inset-bottom))!important}
  body.in-game #content .grid-2,body.in-game #content .grid-3,body.in-game #content .grid-4,
  body.in-game .account-settings-grid,body.in-game .admin-email-config-grid,body.in-game .admin-email-recipient-list,
  body.in-game .game-help-grid,body.in-game .game-help-overload-table,body.in-game .boss-enemy-grid,
  body.in-game .scout-resource-grid,body.in-game .scout-unit-grid,body.in-game .scout-catalog-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  body.in-game .row,body.in-game .toolbar,body.in-game .actions,body.in-game .panel-actions,
  body.in-game .settings-actions,body.in-game .admin-email-recipient-tools{
    width:100%!important;max-width:100%!important;flex-wrap:wrap!important;gap:8px!important;
  }
  body.in-game .settings-actions>*,body.in-game .admin-email-recipient-tools>*{max-width:100%!important}
  body.in-game form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  body.in-game form select,body.in-game form textarea{width:100%;min-width:0}
  body.in-game .modal-card,body.in-game .help-modal-card,body.in-game .story-modal-card,
  body.in-game .battle-replay-card,body.in-game [role="dialog"]{width:calc(100vw - 18px)!important;margin:0 auto!important}
}

@media(max-width:380px){
  body.in-game .resource-bar{grid-template-columns:minmax(0,1fr)!important}
  body.in-game .sidebar .nav-section .nav-cluster-grid,
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:minmax(0,1fr)!important}
  body.in-game .island-dock-controls{grid-template-columns:minmax(0,1fr)!important}
  body.in-game .island-jump-control{grid-column:auto!important}
  body.in-game .rightbar .planet-choice{flex-basis:220px!important;width:220px!important}
}


/* v2026.09.04.04 — 豐潮印記 / 深海霸主資源包：桌面、平板、手機皆完整顯示，不以窄卡硬擠文字。 */
body.in-game .imprint-resource-groups{display:grid;gap:16px;margin-bottom:20px}
body.in-game .imprint-resource-group{min-width:0;padding:14px;border:1px solid rgba(85,155,173,.24);border-radius:12px;background:rgba(4,24,32,.52)}
body.in-game .imprint-resource-head{display:flex;align-items:center;gap:12px;margin-bottom:12px;min-width:0}
body.in-game .imprint-resource-head>img{width:56px;height:56px;flex:0 0 56px;object-fit:contain}
body.in-game .imprint-resource-head>div{min-width:0;display:grid;gap:3px}
body.in-game .imprint-resource-head b{font-size:22px!important;color:#d7edf3}
body.in-game .imprint-resource-head span{font-size:20px!important;color:#87a6b2;white-space:normal;overflow-wrap:anywhere}
body.in-game .imprint-tier-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
body.in-game .imprint-shop-card{height:100%;min-width:0;grid-template-columns:96px minmax(0,1fr)!important;gap:12px!important;align-items:center!important}
body.in-game .imprint-shop-art{width:96px!important;height:108px!important;align-self:center}
body.in-game .imprint-item-art{width:88px!important;height:100px!important;object-fit:contain!important}
body.in-game .imprint-shop-copy{min-width:0;align-self:stretch;align-content:center}
body.in-game .imprint-shop-title{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important;align-items:start!important}
body.in-game .imprint-shop-title b,body.in-game .imprint-shop-title span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:break-word!important}
body.in-game .imprint-shop-title span{font-size:20px!important;text-align:right}
body.in-game .imprint-shop-copy>small{font-size:20px!important;line-height:1.45;white-space:normal!important;overflow-wrap:anywhere!important}
body.in-game .imprint-shop-copy .item-shop-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:2px}
body.in-game .imprint-shop-copy .item-shop-actions button:only-child{grid-column:1/-1}
body.in-game .imprint-shop-copy .item-shop-actions button{width:100%;min-width:0}

body.in-game .boss-pack-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
body.in-game .boss-pack-card{height:100%;min-width:0;grid-template-columns:102px minmax(0,1fr)!important;gap:13px!important;align-items:center!important}
body.in-game .boss-pack-art{width:102px;height:118px;border:1px solid #5d5230;border-radius:12px;background:radial-gradient(circle,rgba(100,79,28,.42),rgba(7,24,31,.96));display:grid!important;place-items:center;overflow:hidden}
body.in-game .boss-pack-item-art{width:94px;height:108px;object-fit:contain;display:block}
body.in-game .boss-pack-copy{min-width:0;display:grid;gap:8px}
body.in-game .boss-pack-title{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important;align-items:start!important}
body.in-game .boss-pack-title b,body.in-game .boss-pack-title span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:break-word!important}
body.in-game .boss-pack-title span{font-size:20px!important;text-align:right}
body.in-game .boss-pack-copy>small{font-size:20px!important;line-height:1.48;white-space:normal!important;overflow-wrap:anywhere!important}
body.in-game .boss-pack-open{display:grid!important;grid-template-columns:minmax(92px,1fr) auto auto!important;gap:8px!important;align-items:stretch!important}
body.in-game .boss-pack-open input,body.in-game .boss-pack-open button{min-height:48px!important}
body.in-game .boss-pack-inventory-card{align-items:center}
body.in-game .boss-pack-inventory-card .inventory-item-image{background:radial-gradient(circle,rgba(100,79,28,.38),rgba(7,24,31,.96));border-color:#5d5230}
body.in-game .boss-pack-inventory-card .boss-pack-item-art{width:70px;height:70px}

@media(max-width:1180px){
  body.in-game .imprint-tier-grid,body.in-game .boss-pack-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .imprint-tier-grid>.imprint-shop-card:nth-child(3):last-child,
  body.in-game .boss-pack-grid>.boss-pack-card:nth-child(3):last-child{grid-column:1/-1}
}
@media(max-width:760px){
  body.in-game .imprint-resource-group{padding:11px}
  body.in-game .imprint-resource-head>img{width:48px;height:48px;flex-basis:48px}
  body.in-game .imprint-tier-grid,body.in-game .boss-pack-grid{grid-template-columns:minmax(0,1fr)}
  body.in-game .imprint-tier-grid>.imprint-shop-card:nth-child(3):last-child,
  body.in-game .boss-pack-grid>.boss-pack-card:nth-child(3):last-child{grid-column:auto}
  body.in-game .imprint-shop-card{grid-template-columns:82px minmax(0,1fr)!important;padding:10px!important}
  body.in-game .imprint-shop-art{width:82px!important;height:96px!important}
  body.in-game .imprint-item-art{width:76px!important;height:88px!important}
  body.in-game .boss-pack-card{grid-template-columns:86px minmax(0,1fr)!important;padding:10px!important}
  body.in-game .boss-pack-art{width:86px;height:100px}
  body.in-game .boss-pack-item-art{width:80px;height:92px}
}
@media(max-width:460px){
  body.in-game .imprint-resource-head{align-items:flex-start}
  body.in-game .imprint-shop-card,body.in-game .boss-pack-card{grid-template-columns:74px minmax(0,1fr)!important;gap:9px!important}
  body.in-game .imprint-shop-art{width:74px!important;height:86px!important}
  body.in-game .imprint-item-art{width:68px!important;height:80px!important}
  body.in-game .boss-pack-art{width:74px;height:88px}
  body.in-game .boss-pack-item-art{width:68px;height:82px}
  body.in-game .imprint-shop-title,body.in-game .boss-pack-title{grid-template-columns:minmax(0,1fr)!important}
  body.in-game .imprint-shop-title span,body.in-game .boss-pack-title span{text-align:left!important}
  body.in-game .imprint-shop-copy .item-shop-actions{grid-template-columns:minmax(0,1fr)}
  body.in-game .boss-pack-open{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  body.in-game .boss-pack-open input{grid-column:1/-1}
  body.in-game .boss-pack-open button{width:100%}
}


/* v2026.09.04.06 — 訊息中心：滑鼠滾輪以整頁閱讀為主，不再被內層清單／閱讀區困住。 */
body.in-game .message-list-scroll{
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
}
body.in-game .message-detail-pane{
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
}
@media(max-width:900px){
  body.in-game .message-list-scroll{max-height:none!important;overflow-y:visible!important}
  body.in-game .message-detail-pane{max-height:none!important;overflow:visible!important}
}

/* v2026.09.04.06 — 發展與航行：功能重新分組後，按鈕文字一律維持單行；寧可調整欄數，不縮字、不折成難看的兩行。 */
body.in-game .sidebar .nav-section .nav-cluster-grid{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
}
body.in-game .sidebar .nav-cluster-unified .nav span{
  flex:1 1 auto!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
  text-overflow:clip!important;
}
@media(max-width:1100px){
  body.in-game .sidebar .nav-section .nav-cluster-grid,
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:390px){
  body.in-game .sidebar .nav-section .nav-cluster-grid,
  body.in-game .sidebar .nav-cluster-grid{grid-template-columns:minmax(0,1fr)!important}
}


/* ========================================================================
   v2026.09.04.09 — 全域聊天抽屜與客服專區
   ======================================================================== */
.chat-launcher{position:fixed;right:22px;bottom:22px;z-index:2450;min-height:54px;padding:10px 16px;border-radius:999px;display:flex;align-items:center;gap:8px;font-size:20px;font-weight:800;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.chat-launcher em{min-width:32px;height:32px;border-radius:16px;display:grid;place-items:center;background:#b94a4a;color:#fff;font-size:20px;font-style:normal;padding:0 7px}.chat-backdrop{position:fixed;inset:0;z-index:2440;background:rgba(0,0,0,.32)}
.chat-drawer{position:fixed;right:0;top:0;bottom:0;z-index:2455;width:min(460px,94vw);background:#071a22;border-left:1px solid rgba(135,214,224,.28);box-shadow:-18px 0 44px rgba(0,0,0,.42);display:flex}.chat-drawer.hidden,.chat-backdrop.hidden,.chat-launcher.hidden{display:none!important}.chat-drawer-body,#chatDrawerBody{width:100%;min-width:0;display:flex;flex-direction:column;height:100%}
.chat-head{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid rgba(135,214,224,.18)}.chat-head>div{display:grid;gap:2px}.chat-head b{font-size:24px}.chat-head span{font-size:20px;color:#a8cbd0}.chat-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:10px}.chat-tabs button{min-height:48px;white-space:nowrap;font-size:20px}.chat-tabs button em{font-style:normal;margin-left:3px}.chat-tabs button.active{outline:2px solid rgba(130,220,228,.5)}
.chat-friend-select{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:0 12px 10px;font-size:20px}.chat-friend-select select{min-height:48px;font-size:20px;min-width:0}.chat-history{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:10px 12px;display:flex;flex-direction:column;gap:10px;min-height:0}.chat-load-older{align-self:center}.chat-message{border:1px solid rgba(135,214,224,.18);border-radius:12px;padding:10px;background:rgba(6,39,49,.86);display:grid;gap:7px;max-width:94%}.chat-message.mine{align-self:flex-end;background:rgba(21,70,77,.9)}.chat-message-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.chat-message-head b,.chat-message-head time,.chat-message-body{font-size:20px}.chat-message-head time{color:#99b9be}.chat-message-body{overflow-wrap:anywhere;line-height:1.5}.chat-message-actions{display:flex;gap:6px;flex-wrap:wrap}.chat-message-actions button{min-height:48px;font-size:20px}.chat-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px 12px;border-top:1px solid rgba(135,214,224,.18)}.chat-composer textarea{resize:none;min-height:54px;max-height:150px;font-size:20px}.chat-composer button{min-width:82px;font-size:20px}.chat-footnote{padding:0 12px 10px;font-size:20px;color:#9bbdc2}.chat-restricted{margin:10px 12px;padding:12px;border:1px solid rgba(222,151,84,.5);border-radius:10px;display:grid;gap:5px}.chat-restricted b,.chat-restricted span{font-size:20px}
.support-workspace{display:grid;grid-template-columns:minmax(280px,36%) minmax(0,1fr);gap:14px}.support-list-pane,.support-detail-pane{min-width:0}.support-list-pane{display:grid;align-content:start;gap:8px}.support-ticket-row,.admin-support-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;padding:12px;border-radius:10px}.support-ticket-row>span,.admin-support-row>span{display:grid;gap:3px;min-width:0}.support-ticket-row b,.support-ticket-row small,.admin-support-row b,.admin-support-row small{font-size:20px;overflow-wrap:anywhere}.support-ticket-row.selected{outline:2px solid rgba(121,210,221,.55)}.support-status{font-style:normal;white-space:nowrap;border-radius:999px;padding:5px 9px;font-size:20px}.support-status.waiting{background:rgba(220,164,74,.2)}.support-status.replied{background:rgba(80,187,149,.2)}.support-status.closed{background:rgba(140,150,160,.2)}
.support-detail-head{padding:12px;border-bottom:1px solid rgba(135,214,224,.18)}.support-detail-head>div{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.support-detail-head h3,.support-detail-head span{font-size:20px}.support-thread{display:grid;gap:10px;padding:12px}.support-message{padding:12px;border-radius:11px;border:1px solid rgba(135,214,224,.18)}.support-admin-message{background:rgba(25,73,80,.65)}.support-player-message{background:rgba(9,38,48,.7)}.support-message>div{display:flex;justify-content:space-between;gap:10px}.support-message b,.support-message time,.support-message p{font-size:20px}.support-message p{margin:8px 0 0;line-height:1.55;overflow-wrap:anywhere}.support-reply-box{display:grid;gap:8px;padding:12px}.support-reply-box textarea,.support-new-dialog textarea,.support-new-dialog input,.support-new-dialog select{font-size:20px}.support-reply-box>div{display:flex;gap:8px;flex-wrap:wrap}.support-new-dialog{display:grid;gap:12px}.support-new-dialog label{display:grid;gap:6px;font-size:20px}.admin-support-list,.admin-chat-report-list{display:grid;gap:8px}.admin-chat-report{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px;border:1px solid rgba(135,214,224,.18);border-radius:10px}.admin-chat-report>div:first-child{display:grid;gap:4px;min-width:0}.admin-chat-report b,.admin-chat-report span,.admin-chat-report small{font-size:20px;overflow-wrap:anywhere}.admin-chat-report>div:last-child{display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:900px){.chat-launcher{right:12px;bottom:12px}.chat-drawer{width:100vw;max-width:none}.chat-backdrop{display:none!important}.support-workspace{grid-template-columns:1fr}.support-detail-pane{border-top:1px solid rgba(135,214,224,.18);padding-top:8px}}
@media(max-width:520px){.chat-tabs{grid-template-columns:1fr 1fr 1fr;padding:8px}.chat-tabs button{font-size:20px;padding:6px}.chat-message{max-width:100%}.chat-composer{grid-template-columns:1fr}.chat-composer button{width:100%;min-height:48px}.support-ticket-row,.admin-support-row,.admin-chat-report{flex-direction:column;align-items:stretch}.support-status{align-self:flex-start}}

.chat-muted-list{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:0 12px 8px}.chat-muted-list b,.chat-muted-list button{font-size:20px}

.support-context{margin-top:10px;display:flex;gap:8px 12px;align-items:center;flex-wrap:wrap;color:#a9c7cc}.support-context b,.support-context span{font-size:20px}.support-context b{color:#d8ecef}

.admin-support-filter{display:grid;grid-template-columns:minmax(150px,220px) minmax(220px,1fr) auto;gap:8px;margin:8px 0 12px}.admin-support-filter select,.admin-support-filter input,.admin-support-filter button{min-height:48px;font-size:20px}@media(max-width:700px){.admin-support-filter{grid-template-columns:1fr}.admin-support-filter button{width:100%}}


/* ========================================================================
   v2026.09.04.10 — 聊天／航海事件位置與 Tidebound 配色修正
   - 聊天固定在左側，航海事件維持右側，避免兩個全域浮動入口互相重疊。
   - 所有聊天按鈕、關閉按鈕明確使用萬潮群島深海藍綠配色，不依賴瀏覽器預設樣式。
   - 聊天與航海事件互斥開啟；任何時候只保留一個抽屜，手機亦不互蓋。
   ======================================================================== */
:root{
  --ti-float-bg:#0a2731;
  --ti-float-bg-2:#123c49;
  --ti-float-bg-hover:#185568;
  --ti-float-border:#3f7583;
  --ti-float-border-strong:#67a8b5;
  --ti-float-text:#e4f3f6;
  --ti-float-muted:#9ab8c0;
  --ti-float-active:#1a5968;
  --ti-float-disabled:#0b2028;
}

/* 全站關閉按鈕不能再回退到瀏覽器白底按鈕。 */
.ui-close-button,
#eventDrawerClose,
#helpModalClose,
#battleReplayClose,
#chatCloseBtn{
  border:1px solid var(--ti-float-border)!important;
  background:linear-gradient(180deg,#153f4c,#0a2832)!important;
  color:var(--ti-float-text)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
  border-radius:8px!important;
  opacity:1!important;
}
.ui-close-button:hover,
#eventDrawerClose:hover,
#helpModalClose:hover,
#battleReplayClose:hover,
#chatCloseBtn:hover{
  border-color:var(--ti-float-border-strong)!important;
  background:linear-gradient(180deg,#1f5d6b,#103743)!important;
  color:#fff!important;
}
.ui-close-button:focus-visible,
#eventDrawerClose:focus-visible,
#chatCloseBtn:focus-visible{
  outline:2px solid #7ac0ca!important;
  outline-offset:2px!important;
}

/* 聊天入口／抽屜改到左側；航海事件維持右側。 */
.chat-launcher{
  left:22px!important;
  right:auto!important;
  bottom:22px!important;
  border:1px solid var(--ti-float-border)!important;
  background:linear-gradient(135deg,#164d5b,#0a2d38)!important;
  color:var(--ti-float-text)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.04)!important;
}
.chat-launcher:hover{
  background:linear-gradient(135deg,#1d6473,#0e3b48)!important;
  border-color:var(--ti-float-border-strong)!important;
  color:#fff!important;
}
.chat-launcher>span:first-child{filter:saturate(.8)}
.chat-drawer{
  left:0!important;
  right:auto!important;
  background:linear-gradient(180deg,#08242d 0%,#061820 100%)!important;
  border-left:0!important;
  border-right:1px solid rgba(116,193,204,.34)!important;
  box-shadow:18px 0 44px rgba(0,0,0,.42)!important;
}
.chat-head{
  background:linear-gradient(180deg,#103945,#092731)!important;
  border-bottom-color:rgba(116,193,204,.28)!important;
}
.chat-head b{color:#e8f6f8!important}
.chat-head span{color:var(--ti-float-muted)!important}

/* v09 新增的 tab / 送出鈕原本沒有自己的背景色，在抽屜位於 page-frame 外時會變成瀏覽器白底。 */
.chat-tabs button,
.chat-composer button,
.chat-load-older,
.chat-muted-list button,
.chat-message-actions button{
  border:1px solid var(--ti-float-border)!important;
  background:linear-gradient(180deg,#174653,#0d303a)!important;
  color:var(--ti-float-text)!important;
  border-radius:7px!important;
  box-shadow:none!important;
  opacity:1;
}
.chat-tabs button:hover:not(:disabled),
.chat-composer button:hover:not(:disabled),
.chat-load-older:hover:not(:disabled),
.chat-muted-list button:hover:not(:disabled),
.chat-message-actions button:hover:not(:disabled){
  border-color:var(--ti-float-border-strong)!important;
  background:linear-gradient(180deg,#215c68,#123b46)!important;
  color:#fff!important;
}
.chat-tabs button.active{
  outline:none!important;
  border-color:#75bdc7!important;
  background:linear-gradient(180deg,#1d6573,#11414d)!important;
  color:#f4fdff!important;
  box-shadow:inset 0 0 0 1px rgba(135,222,230,.18)!important;
}
.chat-tabs button:disabled{
  border-color:#26434d!important;
  background:var(--ti-float-disabled)!important;
  color:#68848c!important;
  opacity:.62!important;
  cursor:not-allowed!important;
}
.chat-tabs button em{color:#bfe2e7!important}
.chat-tabs button:disabled em{color:#68848c!important}
.chat-composer textarea,
.chat-friend-select select{
  border:1px solid rgba(116,193,204,.4)!important;
  background:#041219!important;
  color:#edf9fb!important;
  border-radius:7px!important;
}
.chat-composer textarea::placeholder{color:#718f98!important;opacity:1!important}
.chat-composer button{font-weight:700!important;min-width:88px!important}
.chat-message{border-color:rgba(116,193,204,.22)!important;background:rgba(7,35,44,.92)!important}
.chat-message.mine{background:rgba(18,70,78,.94)!important;border-color:rgba(116,207,214,.34)!important}
.chat-message-head b{color:#dff1f4!important}.chat-message-head time{color:#88a8b1!important}.chat-message-body{color:#c7dde2!important}
.chat-footnote{color:#7899a2!important;border-top:1px solid rgba(116,193,204,.1)!important;padding-top:8px!important}

/* 關閉其中一個抽屜後才允許操作另一個入口，完全避免手機／平板堆疊。 */
body.chat-open .event-drawer-toggle{opacity:0!important;pointer-events:none!important;visibility:hidden!important}
body.event-open .chat-launcher{opacity:0!important;pointer-events:none!important;visibility:hidden!important}

/* 航海事件標題區與 × 按鈕沿用同一深海藍綠系統。 */
body.in-game .event-drawer-head{
  background:linear-gradient(135deg,#123c49,#082832)!important;
  border-bottom-color:#315c68!important;
}
body.in-game .event-drawer-head b{color:#e8f6f8!important}
body.in-game .event-drawer-head span{color:#8fafb7!important}

@media(max-width:900px){
  .chat-launcher{left:12px!important;right:auto!important;bottom:12px!important}
  .chat-drawer{left:0!important;right:0!important;width:100vw!important;max-width:none!important;border-right:0!important}
}
@media(max-width:520px){
  .chat-launcher{left:8px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important}
  .chat-head{padding:12px!important}
  .chat-tabs{gap:6px!important}
  .chat-tabs button{min-width:0!important;padding:7px 5px!important}
}

/* ========================================================================
   v2026.09.04.11 — 平板／手機可正常遊玩 UI 重構
   目標：
   1. 桌面維持既有 20px 世界觀介面，不回頭縮小桌面。
   2. 平板改採 15~16px 為主，手機改採 13~14px 為主；手機輔助資訊最低 12px。
   3. 手機把「固定佔高但不是核心操作」的區塊壓縮：頂端資源列、島嶼切換列、功能抽屜、Tab、卡片與表單。
   4. 所有寬表格／海圖仍只在自己的區塊內水平捲動，不得撐寬整頁。
   5. 聊天、航海事件、Modal、客服與訊息中心同樣套用手機版密度，避免全螢幕後仍用桌面字級。
   ======================================================================== */

/* ---------- 平板：621 ~ 1100px ---------- */
@media (max-width:1100px) and (min-width:621px){
  html body.in-game #game{
    font-size:16px!important;
    line-height:1.42!important;
    --ti-page-x:12px;
    --ti-page-y:11px;
    --ti-panel-x:13px;
    --ti-panel-y:12px;
    --ti-section-gap:11px;
    --ti-card-pad:11px;
    --ti-gap:9px;
    --ti-gap-sm:6px;
    --ti-control-h:42px;
  }
  html body.in-game #game :is(p,span,b,strong,em,label,button,input,select,textarea,td,th,a,li,summary){font-size:16px!important;line-height:1.42!important}
  html body.in-game #game :is(small,.muted,.panel-subline,.coords,.item-level,.item-info,.fleet-hint,.queue small,.section-kicker){font-size:14px!important;line-height:1.34!important}
  html body.in-game #game h1{font-size:24px!important}
  html body.in-game #game h2{font-size:21px!important}
  html body.in-game #game h3{font-size:18px!important}
  html body.in-game #game h4{font-size:16px!important}
  html body.in-game #game :is(button,input,select){min-height:42px!important}
  html body.in-game #game textarea{min-height:82px!important}
  html body.in-game #game :is(.big-action,.primary){min-height:44px!important}

  html body.in-game #game .topbar{padding:6px 9px 7px!important;gap:6px 10px!important}
  html body.in-game #game .game-brand .brand-emblem{width:38px!important;height:38px!important;flex-basis:38px!important}
  html body.in-game #game .account-actions{gap:5px!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){height:42px!important;min-height:42px!important;padding:5px 9px!important;font-size:15px!important}
  html body.in-game #game .resource-bar{gap:5px!important}
  html body.in-game #game .resource-cell{min-height:54px!important;height:54px!important;padding:6px 7px!important;grid-template-columns:30px minmax(0,1fr)!important;gap:6px!important}
  html body.in-game #game .resource-cell img{width:30px!important;height:30px!important;min-width:30px!important}
  html body.in-game #game .resource-cell :is(span,small){font-size:13px!important;line-height:1.15!important}
  html body.in-game #game .resource-cell b{font-size:15px!important;line-height:1.15!important;max-width:none!important;text-overflow:clip!important}

  html body.in-game #game .rightbar,
  html body.in-game #game .rightbar.single-territory{padding:6px 9px!important;gap:7px!important}
  html body.in-game #game .rightbar .island-card{min-height:64px!important;padding:6px 8px!important;grid-template-columns:48px minmax(0,1fr)!important;column-gap:8px!important}
  html body.in-game #game .rightbar .island-thumb{width:48px!important;height:48px!important}
  html body.in-game #game .rightbar .island-card strong{font-size:16px!important}
  html body.in-game #game .rightbar .island-card .coords{font-size:13px!important}
  html body.in-game #game .rightbar #islandSelect.hidden{height:42px!important;min-height:42px!important;font-size:15px!important}

  html body.in-game #game #content{padding:10px 11px 22px!important}
  html body.in-game #game .panel>h2,
  html body.in-game #game .panel>h3,
  html body.in-game #game .panel>h4{padding:11px 13px!important}
  html body.in-game #game :is(.panel-body,.compact-body,.cards,.storage-list){padding:11px 13px!important}
  html body.in-game #game :is(.resource-capacity-grid,.research-grid,.inventory-grid,.advisor-grid,.islands-overview-grid){gap:9px!important}
  html body.in-game #game .cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.in-game #game .inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.in-game #game .advisor-card{grid-template-columns:112px minmax(0,1fr)!important;gap:12px!important}
  html body.in-game #game .advisor-art{width:112px!important;height:112px!important}

  html body.in-game #game :is(.facility-category-tabs,.shipyard-category-tabs,.research-branch-tabs,.message-tabs,.message-hub-nav,.market-tabs,.tabs){flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;padding:8px 11px!important;gap:6px!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game #game :is(.facility-category-tabs,.shipyard-category-tabs,.research-branch-tabs,.message-tabs,.message-hub-nav,.market-tabs,.tabs)>button,
  html body.in-game #game .message-hub-nav .message-hub-tab{flex:0 0 auto!important;min-width:max-content!important;min-height:40px!important;padding:6px 10px!important;font-size:15px!important;white-space:nowrap!important}

  html body.in-game #game .table-scroll{max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game #game .table{font-size:14px!important;min-width:620px!important}
  html body.in-game #game .table :is(th,td){font-size:14px!important;padding:6px 7px!important}

  html body.in-game #game :is(.facility-island-stage,.shipyard-harbor-stage,.defense-sea-stage){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  html body.in-game #game :is(.facility-spot,.shipyard-berth,.defense-emplacement){min-height:104px!important;padding:9px!important;grid-template-columns:70px minmax(0,1fr)!important;gap:9px!important}
  html body.in-game #game :is(.facility-art-wrap,.shipyard-ship-art-wrap,.defense-art-wrap,.empty-berth-mark,.mystery-berth-mark){width:70px!important;height:66px!important;min-width:70px!important;min-height:66px!important}
  html body.in-game #game :is(.facility-art-wrap img,.shipyard-ship-art-wrap img,.defense-art-wrap img){width:66px!important;height:62px!important;max-width:66px!important;max-height:62px!important}
  html body.in-game #game :is(.facility-spot-copy,.shipyard-berth-copy,.defense-emplacement-copy) :is(b,em){font-size:15px!important}
  html body.in-game #game :is(.facility-spot-copy,.shipyard-berth-copy,.defense-emplacement-copy) small{font-size:13px!important}
}

/* ---------- 手機：<=620px，輔助文字最低 12px ---------- */
@media (max-width:620px){
  html,body,body.in-game{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
  html body.in-game #game{
    font-size:14px!important;
    line-height:1.38!important;
    --ti-page-x:6px;
    --ti-page-y:6px;
    --ti-panel-x:8px;
    --ti-panel-y:8px;
    --ti-section-gap:7px;
    --ti-card-pad:8px;
    --ti-gap:6px;
    --ti-gap-sm:5px;
    --ti-control-h:40px;
  }
  html body.in-game #game :is(p,span,b,strong,em,label,button,input,select,textarea,td,th,a,li,summary){font-size:14px!important;line-height:1.38!important}
  html body.in-game #game :is(small,.muted,.panel-subline,.coords,.item-level,.item-info,.fleet-hint,.queue small,.section-kicker,.catalog-eyebrow,.overview-eyebrow){font-size:12px!important;line-height:1.32!important}
  html body.in-game #game h1{font-size:20px!important;line-height:1.24!important}
  html body.in-game #game h2{font-size:18px!important;line-height:1.26!important}
  html body.in-game #game h3{font-size:16px!important;line-height:1.28!important}
  html body.in-game #game h4{font-size:14px!important;line-height:1.3!important}
  html body.in-game #game :is(button,input,select){min-height:40px!important}
  html body.in-game #game textarea{min-height:76px!important}
  html body.in-game #game :is(.big-action,.primary){min-height:42px!important;font-size:14px!important}

  /* 登入／註冊也必須可用，避免登入頁本身就佔滿手機。 */
  .auth-card{width:calc(100vw - 14px)!important;max-width:430px!important;padding:14px 13px 16px!important}
  .auth-brand .brand-emblem{width:40px!important;height:40px!important}
  .auth-brand b{font-size:18px!important}.auth-brand small{font-size:13px!important}
  .auth-subtitle{font-size:13px!important;margin:0 0 12px!important}
  .auth-form{gap:9px!important}
  .auth-form label,.auth-field>label{font-size:13px!important;gap:4px!important}
  .auth-form input{height:42px!important;min-height:42px!important;font-size:14px!important}
  .password-toggle{width:44px!important;height:40px!important}
  .password-toggle .password-eye-icon{width:21px!important;height:21px!important}
  .auth-card .tab,.auth-card .primary{min-height:42px!important;font-size:14px!important}
  .auth-card .note{font-size:12px!important;line-height:1.4!important}

  /* 頂端固定列：控制在約 92px，高度不再吃掉大量遊戲畫面。 */
  html body.in-game #game .topbar{padding:4px 6px 5px!important;gap:4px 6px!important;grid-template-columns:minmax(0,1fr) auto!important}
  html body.in-game #game .brand-area{min-height:38px!important}
  html body.in-game #game .game-brand{gap:5px!important}
  html body.in-game #game .game-brand .brand-emblem{width:28px!important;height:28px!important;min-width:28px!important;flex-basis:28px!important}
  html body.in-game #game .game-brand small{font-size:14px!important;line-height:1!important}
  html body.in-game #game .account-actions{gap:3px!important}
  html body.in-game #game .account-actions .account-rename-btn{display:none!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn),
  html body.in-game .event-drawer-toggle.event-toggle-inline{height:38px!important;min-height:38px!important;padding:4px 7px!important;font-size:13px!important;border-radius:7px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline .event-drawer-icon{width:19px!important;height:19px!important;min-width:19px!important;font-size:12px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline b{height:18px!important;min-width:18px!important;font-size:12px!important;padding:0 4px!important}

  html body.in-game #game .resource-bar{gap:4px!important;padding:0 0 1px!important;scroll-snap-type:x proximity!important}
  html body.in-game #game .resource-cell{flex:0 0 104px!important;width:104px!important;min-width:104px!important;height:46px!important;min-height:46px!important;padding:4px 5px!important;grid-template-columns:24px minmax(0,1fr)!important;gap:5px!important;border-radius:8px!important}
  html body.in-game #game .resource-cell img{width:24px!important;height:24px!important;min-width:24px!important}
  html body.in-game #game .resource-cell :is(span,small){font-size:12px!important;line-height:1.05!important;margin:0!important}
  html body.in-game #game .resource-cell b{font-size:13px!important;line-height:1.08!important;margin-top:1px!important;max-width:none!important;text-overflow:clip!important;overflow:visible!important}

  /* 手機只留「快速跳島」一列；目前島名稱／座標已在 select 選項內，不再重複佔 60~70px。 */
  html body.in-game #game .rightbar,
  html body.in-game #game .rightbar.single-territory{display:block!important;width:100%!important;padding:4px 6px!important;min-height:0!important;border-bottom:1px solid var(--ti-line-soft)!important;background:rgba(4,22,29,.98)!important}
  html body.in-game #game .rightbar .island-card{display:none!important}
  html body.in-game #game .rightbar #islandSelect.hidden{display:block!important;width:100%!important;height:40px!important;min-height:40px!important;padding:4px 8px!important;font-size:13px!important;border-radius:7px!important}
  html body.in-game #game .rightbar :is(.island-list,.island-list-title,.island-strip-shell,.territory-discover){display:none!important}

  html body.in-game #game #content{width:100%!important;max-width:100%!important;min-width:0!important;padding:6px 6px calc(58px + env(safe-area-inset-bottom))!important;overflow-x:hidden!important;overflow-y:visible!important}
  html body.in-game #game #content>*{max-width:100%!important;min-width:0!important}
  html body.in-game #game #content>*+*{margin-top:7px!important}
  html body.in-game #game .panel{margin-bottom:7px!important;border-radius:8px!important}
  html body.in-game #game .panel>h2,
  html body.in-game #game .panel>h3,
  html body.in-game #game .panel>h4{padding:8px 9px!important;font-size:16px!important}
  html body.in-game #game :is(.panel-body,.compact-body,.cards,.storage-list){padding:8px!important}
  html body.in-game #game :is(.resource-overview-title,.resource-capacity-title,.production-panel-head,.scene-panel-head,.governance-hero,.governance-section-head,.islands-overview-head,.map-head,.fleet-dispatch-head,.friends-hero,.message-center-head,.message-center-head-v11,.inventory-title-row,.pearl-section-title){padding:8px!important;gap:6px!important}
  html body.in-game #game :is(.resource-overview-title,.resource-capacity-title,.production-panel-head,.scene-panel-head,.governance-hero,.governance-section-head,.islands-overview-head,.map-head,.fleet-dispatch-head,.friends-hero,.message-center-head,.message-center-head-v11,.inventory-title-row,.pearl-section-title) p{margin-top:3px!important;font-size:12px!important;line-height:1.3!important}

  /* 功能抽屜：2 欄緊湊但仍可準確點擊。 */
  html body.in-game.nav-open #game .sidebar{top:4px!important;right:4px!important;bottom:4px!important;left:4px!important;padding:0 7px 8px!important;border-radius:10px!important}
  html body.in-game #game .mobile-nav-head{margin:0 -7px 7px!important;padding:7px 8px!important;gap:7px!important}
  html body.in-game #game .mobile-nav-head b{font-size:16px!important}
  html body.in-game #game .mobile-nav-head span{font-size:12px!important}
  html body.in-game #game .mobile-nav-close{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;font-size:23px!important;border-radius:8px!important}
  html body.in-game #game .sidebar .nav-unified-sections{gap:7px!important}
  html body.in-game #game .sidebar .nav-section{gap:4px!important;padding-bottom:7px!important}
  html body.in-game #game .sidebar .nav-section-label{font-size:12px!important;padding:1px 1px 3px!important}
  html body.in-game #game .sidebar .nav-section .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .sidebar .nav-cluster-unified .nav{min-height:46px!important;height:auto!important;padding:5px 7px!important;gap:6px!important;white-space:nowrap!important}
  html body.in-game #game .sidebar .nav-cluster-unified .nav :is(.nav-icon,.nav-symbol){width:23px!important;height:23px!important;min-width:23px!important;flex-basis:23px!important;font-size:19px!important}
  html body.in-game #game .sidebar .nav-cluster-unified .nav span{font-size:13px!important;line-height:1.15!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important}
  html body.in-game #game .nav-message-badge{font-size:12px!important;min-width:18px!important;height:18px!important;padding:0 4px!important}

  /* Tab／分類列改為水平滑動，不再每個按鈕佔半欄或整欄導致頁面暴長。 */
  html body.in-game #game :is(.tabs,.message-tabs,.message-hub-nav,.message-primary-tabs,.market-tabs,.facility-category-tabs,.shipyard-category-tabs,.research-branch-tabs){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:5px!important;padding:6px 7px!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game #game :is(.tabs,.message-tabs,.message-hub-nav,.message-primary-tabs,.market-tabs,.facility-category-tabs,.shipyard-category-tabs,.research-branch-tabs)>button,
  html body.in-game #game .message-hub-nav .message-hub-tab,
  html body.in-game #game .message-primary-tab{flex:0 0 auto!important;min-width:max-content!important;min-height:38px!important;height:38px!important;padding:5px 9px!important;font-size:13px!important;white-space:nowrap!important;scroll-snap-align:start!important}

  /* 共用卡片密度。 */
  html body.in-game #game .cards{grid-template-columns:1fr!important;gap:6px!important;padding:7px!important}
  html body.in-game #game .card{min-height:0!important}
  html body.in-game #game .item-card{grid-template-columns:78px minmax(0,1fr)!important;min-height:96px!important}
  html body.in-game #game .item-image{width:78px!important;height:96px!important}
  html body.in-game #game .item-info{padding:7px!important}
  html body.in-game #game .item-info h3{font-size:15px!important;margin-bottom:3px!important}
  html body.in-game #game .cost-row{gap:4px 7px!important}
  html body.in-game #game .cost-row :is(span,b){font-size:12px!important}
  html body.in-game #game .item-actions{gap:5px!important;margin-top:6px!important;flex-wrap:wrap!important}
  html body.in-game #game .item-actions input{width:72px!important;min-height:38px!important}
  html body.in-game #game .item-actions button{min-height:38px!important;padding:4px 8px!important;font-size:13px!important}

  /* 總覽／資源：重要資訊 2 欄，不用每一張卡都直排一整屏。 */
  html body.in-game #game .overview-hero{grid-template-columns:1fr!important;min-height:0!important}
  html body.in-game #game .planet-visual-wrap{height:112px!important}
  html body.in-game #game .overview-planet{width:100%!important;height:112px!important;min-height:112px!important;border-right:0!important;border-bottom:1px solid var(--ti-line-soft)!important}
  html body.in-game #game .overview-info{padding:8px!important}
  html body.in-game #game .overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px 8px!important;margin-top:7px!important}
  html body.in-game #game .stat-line{gap:5px!important;padding:3px 0!important}
  html body.in-game #game .resource-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .summary-box{gap:5px!important;padding:6px!important;min-height:50px!important}
  html body.in-game #game .summary-box img{width:28px!important;height:28px!important;flex-basis:28px!important}
  html body.in-game #game .summary-box span{font-size:12px!important}
  html body.in-game #game .summary-box :is(b,em){font-size:13px!important}
  html body.in-game #game .resource-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .production-settings{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:7px!important}
  html body.in-game #game .production-settings label{font-size:12px!important}

  /* 表單：手機預設兩欄，超長區塊再自行單欄；每個 input 永遠不超出卡片。 */
  html body.in-game #game :is(.row,.fleet-target,.fleet-cargo,.galaxy-tools,.admin-form,.market-form,.merchant-trade,.merchant-call-row,.moon-form){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:end!important;gap:6px!important;padding:7px!important}
  html body.in-game #game :is(.row,.fleet-target,.fleet-cargo,.galaxy-tools,.admin-form,.market-form,.merchant-trade,.merchant-call-row,.moon-form) label{width:100%!important;min-width:0!important;max-width:none!important;font-size:12px!important;gap:3px!important}
  html body.in-game #game :is(.row,.fleet-target,.fleet-cargo,.galaxy-tools,.admin-form,.market-form,.merchant-trade,.merchant-call-row,.moon-form) :is(input,select,textarea){width:100%!important;min-width:0!important;max-width:100%!important}
  html body.in-game #game :is(.fleet-cargo,.market-form,.admin-form,.merchant-trade,.merchant-call-row)>.big-action{grid-column:1/-1!important;width:100%!important}
  html body.in-game #game .admin-form{grid-template-columns:1fr!important}
  html body.in-game #game .admin-form :is(label,button){width:100%!important}

  /* 研究／顧問／物品庫：圖不要在手機佔半屏。 */
  html body.in-game #game .research-grid{grid-template-columns:1fr!important;gap:6px!important}
  html body.in-game #game .research-grid-card{padding:8px!important}
  html body.in-game #game .research-grid-card-head{grid-template-columns:56px minmax(0,1fr)!important;gap:7px!important}
  html body.in-game #game .research-grid-card-head img{width:56px!important;height:56px!important}
  html body.in-game #game .research-grid-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .advisor-grid{grid-template-columns:1fr!important;gap:7px!important}
  html body.in-game #game .advisor-card{grid-template-columns:82px minmax(0,1fr)!important;gap:9px!important;padding:8px!important}
  html body.in-game #game .advisor-art{width:82px!important;height:82px!important}
  html body.in-game #game .advisor-main{gap:6px!important}
  html body.in-game #game .advisor-footer{gap:6px!important}
  html body.in-game #game .inventory-grid{grid-template-columns:1fr!important;gap:6px!important}
  html body.in-game #game .inventory-card{gap:8px!important;padding:8px!important}
  html body.in-game #game .inventory-item-icon{width:38px!important;height:38px!important;flex-basis:38px!important;font-size:21px!important}
  html body.in-game #game .inventory-item-image{width:54px!important;height:54px!important;flex-basis:54px!important}
  html body.in-game #game .inventory-item-image :is(.imprint-item-art,.boss-pack-item-art){width:50px!important;height:50px!important}
  html body.in-game #game .inventory-item-main p{margin-top:4px!important;line-height:1.35!important}

  /* 設施／港灣／海防：手機維持一欄卡片，但高度與圖像都縮回合理範圍。 */
  html body.in-game #game :is(.facility-scene-scroll,.shipyard-scene-scroll,.defense-scene-scroll){padding:6px!important;overflow:visible!important}
  html body.in-game #game :is(.facility-island-stage,.shipyard-harbor-stage,.defense-sea-stage){grid-template-columns:1fr!important;gap:6px!important}
  html body.in-game #game :is(.facility-spot,.shipyard-berth,.defense-emplacement){min-height:82px!important;height:auto!important;padding:7px 8px!important;grid-template-columns:58px minmax(0,1fr)!important;gap:8px!important}
  html body.in-game #game :is(.facility-art-wrap,.shipyard-ship-art-wrap,.defense-art-wrap,.empty-berth-mark,.mystery-berth-mark){width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;top:auto!important}
  html body.in-game #game :is(.facility-art-wrap img,.shipyard-ship-art-wrap img,.defense-art-wrap img){width:54px!important;height:54px!important;max-width:54px!important;max-height:54px!important}
  html body.in-game #game :is(.facility-spot-copy,.shipyard-berth-copy,.defense-emplacement-copy){min-height:0!important;grid-template-columns:minmax(0,1fr) auto!important;gap:2px 5px!important}
  html body.in-game #game :is(.facility-spot-copy,.shipyard-berth-copy,.defense-emplacement-copy) b{font-size:14px!important}
  html body.in-game #game :is(.facility-spot-copy,.shipyard-berth-copy,.defense-emplacement-copy) em{font-size:13px!important}
  html body.in-game #game :is(.facility-spot-copy,.shipyard-berth-copy,.defense-emplacement-copy) small{font-size:12px!important}

  /* 航隊：編成一欄但控制列縮短，不讓每隻魚佔一整個手機畫面。 */
  html body.in-game #game .fleet-slots{gap:4px!important;padding:6px!important}
  html body.in-game #game .fleet-slots span{padding:4px 6px!important;font-size:12px!important}
  html body.in-game #game .fleet-grid{grid-template-columns:1fr!important;gap:5px!important;padding:6px!important}
  html body.in-game #game .fleet-pick{grid-template-columns:54px minmax(0,1fr)!important;min-height:72px!important}
  html body.in-game #game .fleet-pick img{width:54px!important;height:44px!important}
  html body.in-game #game .fleet-pick div{padding:4px 6px!important}
  html body.in-game #game .fleet-pick b{font-size:14px!important}
  html body.in-game #game .fleet-pick small{font-size:12px!important}
  html body.in-game #game .fleet-pick-controls{grid-column:1/-1!important;padding:5px!important;gap:5px!important}
  html body.in-game #game .fleet-pick-controls :is(input,button){min-height:38px!important;height:38px!important;font-size:13px!important}
  html body.in-game #game .fleet-cargo-card{padding:7px!important}

  /* 海域圖／特殊航區：地圖自己滑，詳情永遠在畫面內。 */
  html body.in-game #game :is(.galaxy-map-main,.galaxy-map-stage,.galaxy-map-scroll,.ocean-chart-scroll,.archipelago-scroll,.special-zone-map-scroll){max-width:100%!important;min-width:0!important}
  html body.in-game #game :is(.galaxy-map-scroll,.ocean-chart-scroll,.archipelago-scroll,.special-zone-map-scroll){overflow-x:auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x pan-y!important}
  html body.in-game #game .galaxy-selection{width:100%!important;max-width:100%!important;position:relative!important;inset:auto!important}
  html body.in-game #game .special-zone-treasure-map{grid-template-columns:1fr!important;gap:7px!important;padding:7px!important}
  html body.in-game #game .special-zone-pin{min-height:0!important;padding:9px!important;gap:6px!important}
  html body.in-game #game .special-zone-pin-select{min-height:48px!important;grid-template-columns:42px minmax(0,1fr)!important;gap:7px!important}
  html body.in-game #game .special-zone-pin-mark{width:42px!important;height:42px!important;font-size:21px!important}
  html body.in-game #game .special-zone-pin-copy b{font-size:14px!important}
  html body.in-game #game .special-zone-pin-copy small,
  html body.in-game #game .special-zone-pin-facts :is(span,b,em){font-size:12px!important}

  /* 寬表格一律局部捲動；手機字級 12px，不再用 20px 把欄位撐爆。 */
  html body.in-game #game .table-scroll{width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;overscroll-behavior-x:contain!important;overscroll-behavior-y:auto!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game #game .table{font-size:12px!important;min-width:560px!important}
  html body.in-game #game .table :is(th,td){font-size:12px!important;line-height:1.3!important;padding:5px 6px!important}
  html body.in-game #game :is(.governance-animal-table,.governance-market-table,.score-table){min-width:680px!important}
  html body.in-game #game :is(.resource-production-table,.market-table){min-width:620px!important}

  /* 訊息中心：單欄、清單不強制 56vh，閱讀區不再有 590px 固定高度。 */
  html body.in-game #game .message-workspace-v11{grid-template-columns:1fr!important;gap:7px!important;padding:7px!important;min-height:0!important}
  html body.in-game #game :is(.message-list-pane,.message-detail-pane){min-height:0!important;max-height:none!important;border-radius:8px!important;overflow:visible!important}
  html body.in-game #game .message-list-scroll{max-height:none!important;overflow:visible!important}
  html body.in-game #game .message-list-head{padding:8px!important;gap:5px!important}
  html body.in-game #game .message-list-head b{font-size:15px!important}
  html body.in-game #game .message-list-head span,
  html body.in-game #game .message-pager-v11 :is(span,button){font-size:12px!important}
  html body.in-game #game .message-pager-v11 button{min-height:36px!important;padding:4px 7px!important}
  html body.in-game #game .message-list-row{padding:8px!important;gap:4px!important}
  html body.in-game #game .message-row-top{flex-direction:row!important;align-items:flex-start!important;gap:5px!important}
  html body.in-game #game .message-row-top :is(span,time){font-size:12px!important}
  html body.in-game #game .message-list-row>strong{font-size:14px!important}
  html body.in-game #game .message-row-preview{font-size:12px!important;line-height:1.35!important;-webkit-line-clamp:2!important}
  html body.in-game #game .message-row-foot{font-size:12px!important}
  html body.in-game #game .message-detail-card{min-height:0!important}
  html body.in-game #game .message-detail-card>header{padding:9px!important;gap:5px!important}
  html body.in-game #game .message-detail-category,
  html body.in-game #game .message-detail-status{min-height:26px!important;padding:2px 6px!important;font-size:12px!important}
  html body.in-game #game .message-detail-card h3{font-size:16px!important}
  html body.in-game #game .message-detail-card time{font-size:12px!important}
  html body.in-game #game .message-detail-body{padding:9px!important;font-size:13px!important;line-height:1.55!important}
  html body.in-game #game .message-detail-body :is(p,li,span,summary){font-size:13px!important;line-height:1.55!important}
  html body.in-game #game :is(.message-related-actions,.message-detail-manage){display:flex!important;flex-wrap:wrap!important;gap:5px!important;padding:7px 9px!important}
  html body.in-game #game :is(.message-related-actions,.message-detail-manage) button{width:auto!important;flex:1 1 120px!important;min-height:38px!important;font-size:13px!important}
  html body.in-game #game .message-detail-empty{min-height:160px!important;padding:14px!important}

  /* 物品／珍珠：手機不再把圖片與說明拆成整段直排。 */
  html body.in-game #game .pearl-hero{grid-template-columns:70px minmax(0,1fr)!important;gap:8px!important;padding:9px!important}
  html body.in-game #game .pearl-hero img{width:70px!important;height:70px!important}
  html body.in-game #game .pearl-hero strong{font-size:20px!important}
  html body.in-game #game .imprint-tier-grid,
  html body.in-game #game .boss-pack-grid{grid-template-columns:1fr!important;gap:6px!important}
  html body.in-game #game .imprint-shop-card,
  html body.in-game #game .boss-pack-card{grid-template-columns:66px minmax(0,1fr)!important;gap:7px!important;padding:8px!important}
  html body.in-game #game :is(.imprint-shop-art,.boss-pack-art){width:66px!important;height:76px!important}
  html body.in-game #game :is(.imprint-shop-item-art,.boss-pack-item-art){max-width:62px!important;max-height:70px!important}
  html body.in-game #game .boss-pack-open{grid-template-columns:minmax(0,1fr) auto auto!important;gap:5px!important}
  html body.in-game #game .boss-pack-open :is(input,button){min-height:38px!important;font-size:13px!important}

  /* 聯盟／好友／市場／客服：區塊縮排、按鈕允許合理換行。 */
  html body.in-game #game :is(.friend-section,.market-card,.admin-box,.support-ticket-row,.admin-support-row){padding:8px!important}
  html body.in-game #game :is(.message-actions,.friend-request-actions,.battle-library-actions,.galaxy-player-social,.gov-row-actions,.support-reply-box>div){gap:5px!important}
  html body.in-game #game :is(.message-actions,.friend-request-actions,.battle-library-actions,.galaxy-player-social,.gov-row-actions,.support-reply-box>div) button{min-height:38px!important;font-size:13px!important;flex:1 1 110px!important}
  html body.in-game #game .support-workspace{grid-template-columns:1fr!important;gap:7px!important}
  html body.in-game #game .support-ticket-row :is(b,small),
  html body.in-game #game .support-message :is(b,time,p),
  html body.in-game #game .support-detail-head :is(h3,span),
  html body.in-game #game .support-status{font-size:13px!important}
  html body.in-game #game .support-thread,
  html body.in-game #game .support-reply-box{padding:8px!important;gap:6px!important}

  /* Modal／故事／戰報：真全螢幕但內容可捲，關閉鈕固定可觸。 */
  html body.in-game .help-modal-card,
  html body.in-game .story-modal-card,
  html body.in-game .battle-replay-card{width:calc(100vw - 6px)!important;max-width:calc(100vw - 6px)!important;height:calc(100dvh - 6px)!important;max-height:calc(100dvh - 6px)!important;margin:3px!important;border-radius:9px!important}
  html body.in-game :is(.help-modal-head,.story-modal-head,.battle-replay-head){padding:7px 8px!important;gap:6px!important;min-height:48px!important}
  html body.in-game :is(.help-modal-body,.story-modal-body,.battle-replay-body){padding:8px!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game :is(.ui-close-button,.mobile-nav-close){width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;font-size:22px!important}

  /* 聊天與航海事件在手機也使用 12~14px，而不是桌面 20px。 */
  html body.in-game .chat-drawer,
  html body.in-game .event-drawer{font-size:14px!important}
  html body.in-game .chat-drawer :is(b,span,button,textarea,select,label,.chat-message-body),
  html body.in-game .event-drawer :is(b,span,button,small,time){font-size:14px!important;line-height:1.35!important}
  html body.in-game .chat-drawer :is(small,time,.chat-footnote),
  html body.in-game .event-drawer :is(small,time){font-size:12px!important;line-height:1.3!important}
  html body.in-game .chat-head{padding:8px!important;min-height:50px!important}
  html body.in-game .chat-tabs{padding:6px!important;gap:5px!important}
  html body.in-game .chat-tabs button{min-height:38px!important;height:38px!important;padding:4px 7px!important;font-size:13px!important}
  html body.in-game .chat-history{padding:7px!important;gap:6px!important}
  html body.in-game .chat-message{padding:7px!important;gap:4px!important;max-width:100%!important}
  html body.in-game .chat-composer{grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;padding:7px!important}
  html body.in-game .chat-composer textarea{min-height:44px!important;max-height:104px!important;font-size:14px!important}
  html body.in-game .chat-composer button{width:auto!important;min-width:64px!important;min-height:44px!important;font-size:13px!important}
  html body.in-game .chat-footnote{padding:0 7px 7px!important}
  html body.in-game .event-drawer-head{padding:8px!important;gap:6px!important}
  html body.in-game .event-drawer-list{padding:7px!important}

  /* 浮動入口縮小並保留 safe area。 */
  html body.in-game .chat-launcher,
  html body.in-game .event-drawer-toggle:not(.event-toggle-inline){min-height:44px!important;height:44px!important;padding:5px 9px!important;font-size:13px!important;border-radius:10px!important;bottom:calc(7px + env(safe-area-inset-bottom))!important}
  html body.in-game .chat-launcher{left:7px!important}
  html body.in-game .event-drawer-toggle:not(.event-toggle-inline){right:7px!important}
}

/* 360px 以下仍維持 12px 下限，但再減少非必要間距。 */
@media (max-width:360px){
  html body.in-game #game{font-size:13px!important;--ti-page-x:4px;--ti-page-y:4px;--ti-panel-x:6px;--ti-panel-y:6px;--ti-card-pad:6px;--ti-gap:5px}
  html body.in-game #game :is(p,span,b,strong,em,label,button,input,select,textarea,a,li,summary){font-size:13px!important}
  html body.in-game #game :is(small,.muted,.panel-subline,.coords,.item-level,.item-info,.fleet-hint,.section-kicker){font-size:12px!important}
  html body.in-game #game .game-brand small{font-size:13px!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn),
  html body.in-game .event-drawer-toggle.event-toggle-inline{padding-left:5px!important;padding-right:5px!important;font-size:12px!important}
  html body.in-game #game .resource-cell{flex-basis:96px!important;width:96px!important;min-width:96px!important}
  html body.in-game #game .resource-cell b{font-size:12px!important}
  html body.in-game #game .sidebar .nav-cluster-unified .nav{padding-left:5px!important;padding-right:5px!important;gap:4px!important}
  html body.in-game #game .sidebar .nav-cluster-unified .nav span{font-size:12px!important}
  html body.in-game #game :is(.row,.fleet-target,.fleet-cargo,.galaxy-tools,.market-form,.merchant-trade,.merchant-call-row,.moon-form){grid-template-columns:1fr!important}
  html body.in-game #game .resource-capacity-grid{grid-template-columns:1fr!important}
}

/* 平板補強：全域抽屜／登入／訊息也使用平板密度，不能只縮主遊戲內容。 */
@media (max-width:1100px) and (min-width:621px){
  .auth-card{max-width:520px!important;padding:20px!important}
  .auth-brand b{font-size:22px!important}.auth-brand small,.auth-subtitle{font-size:15px!important}
  .auth-form label,.auth-field>label{font-size:15px!important}
  .auth-form input,.auth-card .tab,.auth-card .primary{min-height:44px!important;font-size:16px!important}
  .auth-card .note{font-size:14px!important}

  html body.in-game .chat-drawer{width:min(430px,70vw)!important;font-size:16px!important}
  html body.in-game .event-drawer{width:min(430px,70vw)!important;font-size:16px!important}
  html body.in-game .chat-drawer :is(b,span,button,textarea,select,label,.chat-message-body),
  html body.in-game .event-drawer :is(b,span,button,small,time){font-size:16px!important;line-height:1.4!important}
  html body.in-game .chat-drawer :is(small,time,.chat-footnote),
  html body.in-game .event-drawer :is(small,time){font-size:14px!important}
  html body.in-game .chat-head,.event-drawer-head{padding:11px!important}
  html body.in-game .chat-tabs{padding:8px!important;gap:6px!important}
  html body.in-game .chat-tabs button{min-height:42px!important;font-size:15px!important}
  html body.in-game .chat-message{padding:9px!important;gap:5px!important}
  html body.in-game .chat-composer{padding:9px!important;gap:6px!important}
  html body.in-game .chat-composer textarea{min-height:48px!important;font-size:16px!important}
  html body.in-game .chat-composer button{min-height:44px!important;font-size:15px!important}

  html body.in-game #game .message-center-v11 #msgBody{padding:10px!important}
  html body.in-game #game .message-list-row{padding:10px!important}
  html body.in-game #game .message-list-scroll{max-height:none!important;overflow-y:visible!important}
  html body.in-game #game .message-detail-pane{min-height:0!important;max-height:none!important;overflow-y:visible!important}
  html body.in-game #game .support-thread,
  html body.in-game #game .support-reply-box{padding:10px!important}
  html body.in-game #game :is(.support-ticket-row,.admin-support-row,.admin-chat-report){padding:10px!important}
  html body.in-game #game .admin-support-filter{grid-template-columns:minmax(150px,200px) minmax(0,1fr) auto!important;gap:7px!important}
  html body.in-game #game .admin-support-filter :is(select,input,button){min-height:42px!important;font-size:15px!important}
}

/* 手機可見文字硬下限：只允許 >=12px。桌面不受此段影響。 */
@media (max-width:620px){
  html body.in-game #game :is(p,span,b,strong,em,small,label,button,input,select,textarea,td,th,a,li,summary),
  html body.in-game :is(.chat-drawer,.event-drawer) :is(p,span,b,strong,em,small,label,button,input,select,textarea,time,a,li,summary){font-size:max(12px,1em)!important}
}


/* v2026.09.04.12 — 島政動物圖鑑 / 戰報與情報收藏清理 */
.governance-animal-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px}
.governance-animal-card{min-width:0;border:1px solid var(--line2);border-radius:12px;background:linear-gradient(145deg,rgba(9,40,48,.96),rgba(4,27,34,.96));padding:14px;display:grid;gap:12px;align-content:start}
.governance-animal-card.gov-bronze{border-color:rgba(213,154,105,.55)}
.governance-animal-card.gov-silver{border-color:rgba(198,216,225,.55)}
.governance-animal-card.gov-gold{border-color:rgba(241,215,120,.6)}
.governance-animal-card-top{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;align-items:center;min-width:0}
.governance-animal-portrait-wrap{width:88px;height:88px;border-radius:14px;border:1px solid rgba(107,190,199,.32);background:rgba(3,23,30,.65);display:grid;place-items:center;overflow:hidden}
.governance-animal-portrait{width:100%;height:100%;object-fit:contain;display:block}
.governance-animal-identity{min-width:0;display:grid;gap:4px}
.governance-animal-identity h4{margin:0;font-size:22px;line-height:1.25;overflow-wrap:anywhere}
.governance-quality-label{font-weight:800;letter-spacing:.04em}
.gov-bronze .governance-quality-label,.gov-bronze .governance-animal-identity h4{color:#d59a69}
.gov-silver .governance-quality-label,.gov-silver .governance-animal-identity h4{color:#c6d8e1}
.gov-gold .governance-quality-label,.gov-gold .governance-animal-identity h4{color:#f1d778}
.governance-animal-state{color:var(--muted);overflow-wrap:anywhere}
.governance-animal-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.governance-animal-stats>div,.governance-animal-found{min-width:0;border:1px solid rgba(91,159,169,.25);border-radius:8px;background:rgba(2,22,28,.46);padding:8px 9px;display:grid;gap:3px}
.governance-animal-stats span,.governance-animal-found span{color:var(--muted)}
.governance-animal-stats b{font-size:22px;color:var(--text)}
.governance-animal-found{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}
.governance-animal-found b{text-align:right;overflow-wrap:anywhere}
.governance-animal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:44px}
.governance-animal-actions small,.governance-animal-listed{color:var(--muted)}
.governance-animal-empty{grid-column:1/-1}
.battle-library-head-actions,.intel-library-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.intel-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.intel-library-head h2,.battle-library-head h2{margin:0 0 5px}
.intel-library-head p,.battle-library-head p{margin:0;color:var(--muted)}
.intel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.intel-head>div{min-width:0;display:grid;gap:4px}
.intel-head .battle-fav-btn{flex:0 0 auto}
@media(max-width:1100px){
  .governance-animal-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .governance-animal-card-top{grid-template-columns:76px minmax(0,1fr)}
  .governance-animal-portrait-wrap{width:76px;height:76px}
  .governance-animal-identity h4{font-size:18px}
  .governance-animal-stats b{font-size:18px}
  .intel-library-head,.battle-library-head{align-items:stretch;flex-direction:column}
  .intel-library-head-actions,.battle-library-head-actions{justify-content:flex-start}
}
@media(max-width:620px){
  .governance-animal-gallery{grid-template-columns:1fr;gap:9px;margin-top:9px}
  .governance-animal-card{padding:10px;gap:9px;border-radius:9px}
  .governance-animal-card-top{grid-template-columns:68px minmax(0,1fr);gap:9px}
  .governance-animal-portrait-wrap{width:68px;height:68px;border-radius:10px}
  .governance-animal-identity h4{font-size:16px}
  .governance-quality-label,.governance-animal-state{font-size:13px}
  .governance-animal-stats{gap:5px}
  .governance-animal-stats>div{padding:6px 5px;text-align:center}
  .governance-animal-stats span,.governance-animal-found span{font-size:12px}
  .governance-animal-stats b{font-size:15px}
  .governance-animal-found{padding:6px 7px;font-size:12px}
  .governance-animal-actions{min-height:40px}
  .intel-library-head-actions,.battle-library-head-actions{display:grid;grid-template-columns:1fr;gap:7px;width:100%}
  .intel-library-head-actions .battle-scope-filters,.battle-library-head-actions .battle-scope-filters{width:100%;display:grid;grid-template-columns:1fr 1fr}
  #intelDeleteAll,#battleDeleteAll{width:100%}
}

/* v2026.09.04.15：戰鬥場景海面／水下分層
   - 可出現固定海防的戰鬥：海防位於海面，魚群／可移動海洋單位置於水下。
   - 規則上只能派魚群／可移動海洋單位的戰鬥：整個戰場切為水下場景。
   - 純水下背景只用低存在感 CSS 海床／植物輪廓，不新增圖片、不新增逐幀 JS。 */
.battle-cinematic .battle-underwater-seabed,
.battle-cinematic .battle-underwater-plants{display:none;position:absolute;pointer-events:none}

/* 一般海面戰：清楚保留海面線，固定設施在水線上方，魚群在水下。 */
.battle-cinematic.battle-scene-surface .battle-ocean-sky{bottom:50%}
.battle-cinematic.battle-scene-surface .battle-ocean-horizon{top:46%;height:54%}
.battle-cinematic.battle-scene-surface .battle-distant-school{top:56%}
.battle-cinematic.battle-scene-surface .battle-distant-school.school-b{top:61%}
.battle-cinematic.battle-scene-surface .battle-distant-school.school-c{top:53%}

/* 固定海防／固定動能設備：主體大多位於水線上方，只讓浮力基座輕觸海面。
   不顯示推進光、浪花、尾流，也不做向前衝刺。 */
.battle-visual-sprite[data-battle-role="fixed"]{
  transform:translate(-50%,-72%) scale(var(--ship-scale));
  animation:battleDefenseSurfaceBob 4.8s ease-in-out var(--float-delay) infinite alternate;
  transform-origin:center bottom;
  filter:drop-shadow(0 8px 8px rgba(0,0,0,.62));
}
.battle-visual-fleet.defender .battle-visual-sprite[data-battle-role="fixed"]{
  transform:translate(-50%,-72%) scaleX(-1) scale(var(--ship-scale));
  animation-name:battleDefenseSurfaceBobDefender;
}
.battle-visual-sprite[data-battle-role="fixed"] .battle-engine-halo{display:none!important}
.battle-visual-sprite[data-battle-role="fixed"] .battle-ship-shadow{
  left:25%;right:25%;bottom:-3%;height:5px;opacity:.26;filter:blur(7px);
}
.battle-visual-sprite[data-battle-role="fixed"].firing{
  animation:battleDefenseSurfaceBob 4.8s ease-in-out var(--float-delay) infinite alternate!important;
}
.battle-visual-fleet.defender .battle-visual-sprite[data-battle-role="fixed"].firing{
  animation:battleDefenseSurfaceBobDefender 4.8s ease-in-out var(--float-delay) infinite alternate!important;
}
.battle-visual-sprite[data-battle-role="fixed"].destroyed{
  animation:battleDefenseDestroyed .85s cubic-bezier(.2,.75,.3,1) forwards!important;
}
.battle-visual-fleet.defender .battle-visual-sprite[data-battle-role="fixed"].destroyed{
  animation:battleDefenseDestroyedDefender .85s cubic-bezier(.2,.75,.3,1) forwards!important;
}
@keyframes battleDefenseSurfaceBob{
  0%{transform:translate(-50%,-72%) scale(var(--ship-scale)) translate3d(-1px,-1px,0) rotate(-.25deg)}
  100%{transform:translate(-50%,-72%) scale(var(--ship-scale)) translate3d(1px,1px,0) rotate(.25deg)}
}
@keyframes battleDefenseSurfaceBobDefender{
  0%{transform:translate(-50%,-72%) scaleX(-1) scale(var(--ship-scale)) translate3d(-1px,-1px,0) rotate(-.25deg)}
  100%{transform:translate(-50%,-72%) scaleX(-1) scale(var(--ship-scale)) translate3d(1px,1px,0) rotate(.25deg)}
}
@keyframes battleDefenseDestroyed{
  0%{opacity:1;transform:translate(-50%,-72%) scale(var(--ship-scale));filter:brightness(1)}
  20%{filter:brightness(2.7)}
  48%{opacity:.88;transform:translate(-50%,-72%) scale(var(--ship-scale)) rotate(7deg)}
  100%{opacity:0;transform:translate(-50%,-54%) scale(.28) rotate(34deg);filter:brightness(.35)}
}
@keyframes battleDefenseDestroyedDefender{
  0%{opacity:1;transform:translate(-50%,-72%) scaleX(-1) scale(var(--ship-scale));filter:brightness(1)}
  20%{filter:brightness(2.7)}
  48%{opacity:.88;transform:translate(-50%,-72%) scaleX(-1) scale(var(--ship-scale)) rotate(7deg)}
  100%{opacity:0;transform:translate(-50%,-54%) scaleX(-1) scale(.28) rotate(34deg);filter:brightness(.35)}
}

/* 純魚群戰鬥：整個舞台位於水下。 */
.battle-cinematic.battle-scene-underwater{background:#052837;box-shadow:inset 0 0 90px rgba(0,0,0,.72)}
.battle-cinematic.battle-scene-underwater .battle-ocean-sky{display:none}
.battle-cinematic.battle-scene-underwater .battle-ocean-horizon{
  top:0;height:100%;
  background:linear-gradient(180deg,#287f94 0%,#145f77 20%,#0a4a64 48%,#07384e 73%,#05283a 100%);
  box-shadow:inset 0 18px 30px rgba(179,237,238,.06),inset 0 -55px 80px rgba(0,0,0,.22);
}
.battle-cinematic.battle-scene-underwater:before{
  background:
    linear-gradient(104deg,transparent 0 18%,rgba(205,246,239,.045) 28%,transparent 40%),
    linear-gradient(76deg,transparent 0 54%,rgba(205,246,239,.035) 66%,transparent 78%),
    linear-gradient(180deg,rgba(202,241,236,.05),transparent 34%,rgba(0,0,0,.18));
}
.battle-cinematic.battle-scene-underwater .battle-ocean-fog{
  top:8%;height:66%;opacity:.08;filter:blur(22px);
  background:linear-gradient(90deg,transparent,rgba(177,231,225,.55) 23%,transparent 47%,rgba(129,195,195,.42) 70%,transparent);
}
.battle-cinematic.battle-scene-underwater .battle-distant-school{top:31%;opacity:.085;filter:blur(.65px) brightness(.62)}
.battle-cinematic.battle-scene-underwater .battle-distant-school.school-b{top:46%;opacity:.07}
.battle-cinematic.battle-scene-underwater .battle-distant-school.school-c{top:61%;opacity:.055}
.battle-cinematic.battle-scene-underwater .battle-underwater-seabed{
  display:block;z-index:1;left:-4%;right:-4%;bottom:-2%;height:31%;
  opacity:.16;filter:blur(.7px);
  background:
    radial-gradient(ellipse at 12% 90%,rgba(12,36,33,.9) 0 8%,transparent 9%),
    radial-gradient(ellipse at 31% 94%,rgba(18,44,38,.8) 0 10%,transparent 11%),
    radial-gradient(ellipse at 56% 93%,rgba(13,39,37,.82) 0 13%,transparent 14%),
    radial-gradient(ellipse at 82% 96%,rgba(18,43,39,.82) 0 12%,transparent 13%),
    linear-gradient(180deg,transparent 0 48%,rgba(14,44,40,.42) 67%,rgba(7,27,27,.72) 100%);
}
.battle-cinematic.battle-scene-underwater .battle-underwater-plants{
  display:block;z-index:2;left:0;right:0;bottom:-2%;height:30%;opacity:.08;filter:blur(.35px)
}
.battle-underwater-plants i{position:absolute;bottom:0;width:7px;height:var(--plant-h,76px);border-radius:80% 10% 70% 15%;transform-origin:50% 100%;background:linear-gradient(180deg,rgba(49,102,80,.55),rgba(13,54,48,.9));box-shadow:10px 10px 0 -2px rgba(25,73,62,.45)}
.battle-underwater-plants i:nth-child(1){left:6%;--plant-h:54px;transform:rotate(-10deg)}
.battle-underwater-plants i:nth-child(2){left:17%;--plant-h:82px;transform:rotate(7deg)}
.battle-underwater-plants i:nth-child(3){left:34%;--plant-h:46px;transform:rotate(-6deg)}
.battle-underwater-plants i:nth-child(4){left:61%;--plant-h:68px;transform:rotate(9deg)}
.battle-underwater-plants i:nth-child(5){left:73%;--plant-h:42px;transform:rotate(-8deg)}
.battle-underwater-plants i:nth-child(6){left:86%;--plant-h:74px;transform:rotate(6deg)}
.battle-underwater-plants i:nth-child(7){left:94%;--plant-h:50px;transform:rotate(-4deg)}

/* 水下場景仍保留不同航區氣氛，但不再出現天空／海平線。 */
.battle-cinematic.battle-scene-underwater.battle-scene-unknown-sea .battle-ocean-horizon{
  background:linear-gradient(180deg,#123f4c 0%,#0a3443 28%,#062938 58%,#041c29 100%);
}
.battle-cinematic.battle-scene-underwater.battle-scene-tide-sea .battle-ocean-horizon{
  background:linear-gradient(180deg,#237f83 0%,#11656f 27%,#07515e 58%,#043743 100%);
}
.battle-cinematic.battle-scene-underwater.battle-scene-boss-sea .battle-ocean-horizon{
  background:linear-gradient(180deg,#0b2933 0%,#071f2a 30%,#041a24 62%,#02121b 100%);
  box-shadow:inset 0 12px 30px rgba(72,130,130,.05),inset 0 -70px 100px rgba(0,0,0,.34);
}
.battle-cinematic.battle-scene-underwater.battle-scene-boss-sea .battle-underwater-seabed{opacity:.14}
.battle-cinematic.battle-scene-underwater.battle-scene-boss-sea .battle-underwater-plants{opacity:.055}

@media(max-width:900px){
  .battle-cinematic.battle-scene-surface .battle-ocean-horizon{top:45%;height:55%}
  .battle-cinematic.battle-scene-underwater .battle-underwater-plants{height:27%}
}
@media(max-width:620px){
  .battle-cinematic.battle-scene-surface .battle-ocean-horizon{top:44%;height:56%}
  .battle-cinematic.battle-scene-underwater .battle-underwater-seabed{height:28%;opacity:.14}
  .battle-cinematic.battle-scene-underwater .battle-underwater-plants{height:25%;opacity:.065}
}
@media(prefers-reduced-motion:reduce){
  .battle-visual-sprite[data-battle-role="fixed"]{animation:none!important}
}


/* ========================================================================
   v2026.09.04.16 — 聊天桌面／平板改為非遮罩浮動視窗
   - 手機 <=620px 維持 v11 的全寬聊天介面，因小螢幕以可操作性優先。
   - 平板與桌面改為左下浮動聊天視窗，不再從左側整高蓋住遊戲，也不再暗化整個頁面。
   - 桌面與平板可在聊天開啟時繼續看／捲動後方遊戲內容；聊天自身紀錄仍只在聊天區內捲動。
   ======================================================================== */
/* 聊天不再是 modal；所有裝置都不需要黑色遮罩。 */
.chat-backdrop{display:none!important;pointer-events:none!important}

/* 桌面：固定為適中的左下浮動視窗，而不是整頁高度的側欄。 */
@media (min-width:1101px){
  html body.in-game .chat-drawer{
    left:18px!important;
    right:auto!important;
    top:auto!important;
    bottom:18px!important;
    width:clamp(400px,28vw,460px)!important;
    height:min(680px,calc(100dvh - 36px))!important;
    max-height:calc(100dvh - 36px)!important;
    border:1px solid rgba(116,193,204,.38)!important;
    border-radius:14px!important;
    box-shadow:0 18px 50px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.035)!important;
    overflow:hidden!important;
  }
  html body.in-game #chatDrawerBody{height:100%!important;min-height:0!important}
  html body.in-game .chat-head{padding:12px 14px!important}
  html body.in-game .chat-head b{font-size:21px!important}
  html body.in-game .chat-head span{font-size:17px!important}
  html body.in-game .chat-tabs{padding:8px!important;gap:6px!important}
  html body.in-game .chat-tabs button{min-height:42px!important;font-size:17px!important}
  html body.in-game .chat-message-head b,
  html body.in-game .chat-message-head time,
  html body.in-game .chat-message-body{font-size:17px!important}
  html body.in-game .chat-message-actions button{min-height:38px!important;font-size:16px!important}
  html body.in-game .chat-composer{padding:8px 10px!important}
  html body.in-game .chat-composer textarea{min-height:48px!important;font-size:17px!important}
  html body.in-game .chat-composer button{min-height:44px!important;font-size:17px!important}
  html body.in-game .chat-footnote{font-size:15px!important;padding:7px 10px 9px!important}
}

/* 平板：仍採浮動視窗，不誤套手機的 100vw 全螢幕抽屜。 */
@media (min-width:621px) and (max-width:1100px){
  html body.in-game .chat-drawer{
    left:14px!important;
    right:auto!important;
    top:auto!important;
    bottom:14px!important;
    width:clamp(360px,48vw,420px)!important;
    height:min(620px,calc(100dvh - 28px))!important;
    max-height:calc(100dvh - 28px)!important;
    max-width:calc(100vw - 28px)!important;
    border:1px solid rgba(116,193,204,.38)!important;
    border-radius:13px!important;
    box-shadow:0 16px 42px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.035)!important;
    overflow:hidden!important;
  }
  html body.in-game #chatDrawerBody{height:100%!important;min-height:0!important}
  html body.in-game .chat-head{padding:10px 11px!important}
  html body.in-game .chat-tabs{padding:7px!important;gap:5px!important}
  html body.in-game .chat-history{padding:8px!important;gap:7px!important}
  html body.in-game .chat-composer{padding:8px!important;gap:6px!important}
  html body.in-game .chat-footnote{padding:6px 8px 8px!important}
}

/* 手機：使用者已確認現有呈現可接受，保留全螢幕／全寬模式。 */
@media (max-width:620px){
  html body.in-game .chat-drawer{
    left:0!important;
    right:0!important;
    top:0!important;
    bottom:0!important;
    width:100vw!important;
    height:100dvh!important;
    max-width:none!important;
    max-height:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  html body.in-game #chatDrawerBody{height:100%!important;min-height:0!important}
}


/* ========================================================================
   v2026.09.04.18 — 只修正「發展與航行」功能導覽
   - 不修改物品庫、設定、遊戲說明三個頁面的內容或版面。
   - 物品庫／設定／遊戲說明三個入口改成與其他功能一致的圖示框與文字對齊。
   - 桌面「其他」區最多四欄，避免七個入口橫向擠成一列；平板／手機沿用既有 2 欄／窄手機 1 欄規則。
   ======================================================================== */
body.in-game .sidebar .nav-section[aria-label="其他"] .nav-cluster-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
body.in-game .sidebar .nav-utility-button{
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr)!important;
  align-items:center!important;
  justify-content:start!important;
  column-gap:8px!important;
  text-align:left!important;
}
body.in-game .sidebar .nav-utility-icon{
  box-sizing:border-box!important;
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  display:grid!important;
  place-items:center!important;
  padding:2px!important;
  border:1px solid rgba(83,151,181,.45)!important;
  border-radius:8px!important;
  background:radial-gradient(circle at 35% 30%,rgba(40,109,136,.40),rgba(5,22,30,.86))!important;
  color:#bfe8f4!important;
  font-size:21px!important;
  font-weight:800!important;
  line-height:1!important;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.45))!important;
}
body.in-game .sidebar .nav-utility-button:is(:hover,.active) .nav-utility-icon{
  border-color:#75b9d2!important;
  background:radial-gradient(circle at 35% 30%,rgba(62,153,188,.55),rgba(8,33,44,.95))!important;
  color:#e3f8ff!important;
}
body.in-game .sidebar .nav-utility-button>span:last-child{
  min-width:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
@media(max-width:1100px){
  body.in-game .sidebar .nav-section[aria-label="其他"] .nav-cluster-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:620px){
  html body.in-game #game .sidebar .nav-utility-button{
    grid-template-columns:23px minmax(0,1fr)!important;
    column-gap:6px!important;
  }
  html body.in-game #game .sidebar .nav-utility-icon{
    width:23px!important;
    height:23px!important;
    min-width:23px!important;
    font-size:16px!important;
    border-radius:6px!important;
    padding:1px!important;
  }
}
@media(max-width:390px){
  body.in-game .sidebar .nav-section[aria-label="其他"] .nav-cluster-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
}


/* ========================================================================
   v2026.09.04.19 — 帳號設定 SOP／發展與航行島政對齊／群島快速管理動能
   只處理本版指定介面；不重排物品庫、遊戲說明等其他功能頁。
   ======================================================================== */
/* 帳號設定：與全站 panel header + panel-body 的共同內距、區塊間距一致。 */
body.in-game .player-settings-panel{
  max-width:none!important;
  width:100%!important;
  margin:0 0 var(--ti-section-gap)!important;
}
body.in-game .player-settings-panel>.player-settings-head{
  margin:0!important;
  padding:var(--ti-panel-y) var(--ti-panel-x)!important;
  gap:var(--ti-gap)!important;
  border:0!important;
  border-bottom:1px solid var(--ti-line-soft)!important;
  background:linear-gradient(180deg,var(--ti-surface-3),var(--ti-surface-2))!important;
}
body.in-game .player-settings-panel>.player-settings-head h2,
body.in-game .player-settings-panel>.player-settings-head .eyebrow,
body.in-game .player-settings-panel>.player-settings-head p{margin-left:0!important;margin-right:0!important;}
body.in-game .player-settings-panel>.player-settings-head p{
  margin-top:6px!important;
  margin-bottom:0!important;
  color:var(--ti-muted)!important;
}
body.in-game .player-settings-panel>.player-settings-body{
  padding:var(--ti-panel-y) var(--ti-panel-x)!important;
}
body.in-game .player-settings-body .account-settings-grid{
  margin:0!important;
  gap:var(--ti-gap)!important;
}
body.in-game .player-settings-body .account-settings-grid label{gap:var(--ti-gap-sm)!important;}
body.in-game .player-settings-body .settings-actions{
  margin:var(--ti-section-gap) 0 0!important;
  gap:var(--ti-gap-sm)!important;
}

/* 發展與航行：「島政」是唯一使用文字符號的主導覽項目。
   nav 的通用 span 規則不可把符號也 flex-grow，否則文字會被推到按鈕最右側。 */
body.in-game .sidebar .nav-cluster-unified .nav>.nav-symbol{
  flex:0 0 32px!important;
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
body.in-game .sidebar .nav-cluster-unified .nav>.nav-symbol+span{
  flex:1 1 auto!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:normal!important;
}

/* 群島快速管理：動能是島嶼狀態，不和四種資源擠在同一小格。 */
body.in-game .island-quick-current-energy{
  grid-column:1/-1!important;
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px 14px!important;
  min-width:0!important;
}
body.in-game .island-quick-current-energy>b{justify-self:start!important;}
body.in-game .island-quick-current-energy>em{
  min-width:0!important;
  font-style:normal!important;
  color:var(--ti-muted)!important;
}
body.in-game .island-quick-current-energy>small{
  grid-column:1/-1!important;
  margin:0!important;
  color:var(--ti-muted)!important;
}
body.in-game .island-quick-energy{
  flex:1 0 100%!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:6px 12px!important;
  margin-top:2px!important;
  padding:8px 10px!important;
  border:1px solid rgba(117,190,202,.18)!important;
  border-radius:8px!important;
  background:rgba(4,25,33,.48)!important;
}
body.in-game .island-quick-energy>span{color:var(--ti-muted)!important;white-space:nowrap!important;}
body.in-game .island-quick-energy>b{white-space:nowrap!important;}
body.in-game .island-quick-energy>small{
  min-width:0!important;
  margin:0!important;
  text-align:right!important;
  color:var(--ti-muted)!important;
}
body.in-game .island-quick-energy.consume>b{color:#efb18d!important;}
body.in-game .island-quick-energy.supply>b{color:#83ddbd!important;}

@media(max-width:1100px){
  body.in-game .player-settings-body .account-settings-grid{grid-template-columns:1fr!important;}
  body.in-game .player-settings-body .settings-actions{justify-content:flex-start!important;}
}
@media(max-width:620px){
  html body.in-game #game .sidebar .nav-cluster-unified .nav>.nav-symbol{
    flex-basis:23px!important;
    width:23px!important;
    height:23px!important;
    min-width:23px!important;
    font-size:19px!important;
  }
  body.in-game .island-quick-current-energy,
  body.in-game .island-quick-energy{
    grid-template-columns:1fr!important;
    gap:4px!important;
  }
  body.in-game .island-quick-current-energy>small{grid-column:auto!important;}
  body.in-game .island-quick-energy>small{text-align:left!important;}
}


/* ========================================================================
   v2026.09.04.20 — 發展與航行「其他」收合＋群島快速管理動能卡片
   僅處理本版指定 UI；不變更 gameplay、Server 動能公式或其他頁面內容。
   ======================================================================== */
/* 「其他」改為群島列最後一顆按鈕，內容預設收合；展開後才佔高度。 */
body.in-game .sidebar .nav-other-toggle{
  position:relative!important;
  grid-template-columns:32px minmax(0,1fr) 24px!important;
}
body.in-game .sidebar .nav-other-toggle .nav-more-symbol{
  letter-spacing:1px!important;
  font-size:15px!important;
}
body.in-game .sidebar .nav-other-chevron{
  flex:0 0 24px!important;
  width:24px!important;
  min-width:24px!important;
  height:24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:var(--ti-muted)!important;
  transition:transform .16s ease,color .16s ease!important;
}
body.in-game .sidebar .nav-other-chevron::before{
  content:""!important;
  display:block!important;
  width:8px!important;
  height:8px!important;
  border-right:2px solid currentColor!important;
  border-bottom:2px solid currentColor!important;
  transform:rotate(45deg) translate(-1px,-1px)!important;
  transform-origin:center!important;
}
body.in-game .sidebar .nav-other-toggle.expanded .nav-other-chevron{
  transform:rotate(180deg)!important;
  color:#dffbf7!important;
}
body.in-game .sidebar .nav-section-other[hidden]{display:none!important;}
body.in-game .sidebar .nav-section-other{
  grid-template-columns:1fr!important;
  margin-top:6px!important;
  padding-top:8px!important;
  border-top:1px solid rgba(92,166,178,.22)!important;
}
body.in-game .sidebar .nav-section-other .nav-cluster-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

/* 快速管理卡片：動能獨立佔滿卡片寬度，不再與右側按鈕互相擠壓。 */
body.in-game .island-quick-action-card{
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:
    "main main"
    "cost action"
    "energy energy"!important;
  align-items:center!important;
}
body.in-game .island-quick-energy{
  grid-area:energy!important;
  width:100%!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px 18px!important;
  margin:0!important;
  padding:10px 12px!important;
  border:1px solid rgba(117,190,202,.18)!important;
  border-radius:8px!important;
  background:rgba(4,25,33,.48)!important;
}
body.in-game .island-quick-energy-route,
body.in-game .island-quick-energy-change{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
body.in-game .island-quick-energy-route>span,
body.in-game .island-quick-energy-change>span{
  color:var(--ti-muted)!important;
  white-space:nowrap!important;
}
body.in-game .island-quick-energy-route>b,
body.in-game .island-quick-energy-change>strong,
body.in-game .island-quick-energy-route>i{
  white-space:nowrap!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
}
body.in-game .island-quick-energy-route>i{
  color:#8eb4ba!important;
  font-style:normal!important;
}
body.in-game .island-quick-energy-change{
  justify-content:flex-end!important;
  text-align:right!important;
}
body.in-game .island-quick-energy.consume .island-quick-energy-change>strong{color:#efb18d!important;}
body.in-game .island-quick-energy.supply .island-quick-energy-change>strong{color:#83ddbd!important;}
body.in-game .island-quick-energy .energy-good{color:#83ddbd!important;}
body.in-game .island-quick-energy .energy-bad{color:#f08d8d!important;}
body.in-game .island-quick-energy.research-energy .island-quick-energy-route>b{color:#efb18d!important;}

@media(max-width:1100px){
  body.in-game .sidebar .nav-section-other .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.in-game .island-quick-energy{grid-template-columns:1fr!important;gap:6px!important;}
  body.in-game .island-quick-energy-change{justify-content:flex-start!important;text-align:left!important;}
}
@media(max-width:620px){
  html body.in-game #game .sidebar .nav-other-toggle{grid-template-columns:23px minmax(0,1fr) 20px!important;}
  html body.in-game #game .sidebar .nav-other-toggle .nav-other-chevron{width:20px!important;min-width:20px!important;}
  body.in-game .sidebar .nav-section-other .nav-cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.in-game .island-quick-action-card{
    grid-template-columns:1fr!important;
    grid-template-areas:"main" "cost" "energy" "action"!important;
    align-items:stretch!important;
  }
  body.in-game .island-quick-energy{padding:9px 10px!important;}
  body.in-game .island-quick-energy-route,
  body.in-game .island-quick-energy-change{gap:6px!important;}
}
@media(max-width:340px){
  body.in-game .sidebar .nav-section-other .nav-cluster-grid{grid-template-columns:1fr!important;}
}


/* ========================================================================
   v2026.09.04.21 — 修正「其他」展開事件與正式 Chevron 箭頭
   data-nav-other-toggle 必須排除一般 .nav 導頁綁定，避免 click handler 被覆寫。
   ======================================================================== */
body.in-game .sidebar .nav-other-toggle:focus-visible{
  outline:2px solid rgba(112,220,215,.92)!important;
  outline-offset:2px!important;
}


/* v2026.09.04.22 — 訊息中心：右側閱讀區可直接逐則瀏覽，不必反覆回到左側清單。 */
body.in-game .message-detail-nav-v22{
  position:sticky!important;
  top:8px!important;
  z-index:7!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:10px 12px!important;
  border-bottom:1px solid rgba(112,190,201,.24)!important;
  background:linear-gradient(180deg,rgba(8,40,49,.98),rgba(6,31,39,.98))!important;
  backdrop-filter:blur(6px)!important;
}
body.in-game .message-detail-nav-position{
  min-width:0!important;
  font-size:20px!important;
  line-height:1.35!important;
  color:#9ec5cc!important;
  white-space:nowrap!important;
}
body.in-game .message-detail-nav-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex:0 0 auto!important;
}
body.in-game .message-detail-nav-actions button{
  min-width:96px!important;
  min-height:42px!important;
  padding:6px 12px!important;
  font-size:20px!important;
}
@media(max-width:900px){
  body.in-game .message-detail-nav-v22{position:static!important;top:auto!important}
}
@media(max-width:600px){
  body.in-game .message-detail-nav-v22{padding:8px!important;gap:7px!important}
  body.in-game .message-detail-nav-position{font-size:12px!important}
  body.in-game .message-detail-nav-actions{gap:5px!important}
  body.in-game .message-detail-nav-actions button{min-width:0!important;min-height:38px!important;padding:4px 9px!important;font-size:13px!important}
}

/* v2026.09.04.23 — 航海事件抽屜底部訊息捷徑。 */
@media (min-width:761px) and (max-width:1100px){body.in-game .event-drawer-message-btn{min-height:48px}}
@media (max-width:620px){body.in-game .event-drawer-message-btn,body.in-game .event-drawer-message-btn>span,body.in-game .event-drawer-message-btn>b{font-size:13px!important}}


/* ========================================================================
   v2026.09.05.01 — 設施分類獨立背景 + 近海動能設施正式移入「設施 → 動能」
   - 資源 / 設施 / 島政各自讀取獨立圖片，可直接用同檔名覆蓋。
   - 手機 / 平板沿用既有場景卡片 RWD，不以縮字硬塞。
   ======================================================================== */
:root{
  --ti-scene-bg-facility-resource:url('/assets/scene_bg_facilities_resource.png?v=2026090501');
  --ti-scene-bg-facility-facility:url('/assets/scene_bg_facilities_facility.png?v=2026090501');
  --ti-scene-bg-facility-governance:url('/assets/scene_bg_facilities_governance.png?v=2026090501');
}
body.in-game .facility-category-resource .facility-island-stage.land-stage{
  background:#4c8250!important;
  background-image:var(--ti-scene-bg-facility-resource)!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:cover!important;
}
body.in-game .facility-category-facility .facility-island-stage.land-stage{
  background:#4c8250!important;
  background-image:var(--ti-scene-bg-facility-facility)!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:cover!important;
}
body.in-game .facility-category-governance .facility-island-stage.land-stage{
  background:#4c8250!important;
  background-image:var(--ti-scene-bg-facility-governance)!important;
  background-repeat:no-repeat!important;
  background-position:center center!important;
  background-size:cover!important;
}
body.in-game .facility-energy-device-spot .facility-art-wrap img{
  object-fit:contain!important;
  filter:drop-shadow(0 8px 8px rgba(0,22,34,.48)) saturate(1.05)!important;
}
body.in-game .facility-energy-device-spot.locked{opacity:.72!important}
body.in-game .facility-energy-production-queue{margin-top:var(--ti-section-gap,16px)!important}
body.in-game .facility-energy-production-queue>h3{margin:0!important;padding:14px var(--ti-panel-x,18px)!important;border-bottom:1px solid var(--ti-line-soft)!important}
body.in-game .facility-energy-production-queue>.panel-subline{margin:0!important;padding:10px var(--ti-panel-x,18px)!important;border-bottom:1px solid var(--ti-line-soft)!important}
body.in-game .facility-energy-production-queue .energy-device-queue-list{padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important}
@media (min-width:621px) and (max-width:1100px){
  body.in-game .facility-category-energy .facility-island-stage{min-height:650px!important}
}
@media (max-width:620px){
  body.in-game .facility-energy-production-queue>.panel-subline{font-size:13px!important}
}


/* ========================================================================
   v2026.09.05.03 — 手機航海事件抽屜可關閉性修正
   手機版必須完整留在 viewport / safe-area 內；標題與關閉鈕永遠可觸。
   事件清單自己捲動，底部訊息捷徑固定在抽屜內，不讓長內容把關閉鈕推走。
   ======================================================================== */
@media (max-width:620px){
  html body.in-game .event-drawer{
    position:fixed!important;
    left:6px!important;
    right:6px!important;
    top:auto!important;
    bottom:calc(6px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    height:min(78dvh,calc(100dvh - 18px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important;
    max-height:min(78dvh,calc(100dvh - 18px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))!important;
    box-sizing:border-box!important;
    border:1px solid #315c68!important;
    border-radius:14px!important;
    overflow:hidden!important;
    transform:translateY(calc(100% + 24px))!important;
    z-index:190!important;
  }
  html body.in-game .event-drawer.open{
    transform:translateY(0)!important;
  }
  html body.in-game .event-drawer-head{
    position:relative!important;
    flex:0 0 auto!important;
    min-width:0!important;
    min-height:52px!important;
    padding:8px 54px 8px 10px!important;
    box-sizing:border-box!important;
  }
  html body.in-game .event-drawer-head>div{
    min-width:0!important;
    max-width:100%!important;
  }
  html body.in-game .event-drawer-head>div :is(b,span){
    max-width:100%!important;
    overflow-wrap:anywhere!important;
  }
  html body.in-game .event-drawer-head .ui-close-button{
    position:absolute!important;
    top:6px!important;
    right:6px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    margin:0!important;
    z-index:3!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html body.in-game .event-drawer-list{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  html body.in-game .event-drawer-footer{
    flex:0 0 auto!important;
    padding-bottom:8px!important;
  }
  html body.event-open .event-drawer-toggle:not(.event-toggle-inline){
    opacity:0!important;
    pointer-events:none!important;
    visibility:hidden!important;
  }
}


/* ========================================================================
   v2026.09.05.05 — 手機 UI 緊急修正（最高優先，放在檔尾避免舊版 RWD 互相覆蓋）
   - 登入／註冊完整留在 viewport 並可垂直捲動
   - 頂端六項資源固定為緊湊 3×2；極窄螢幕優先縮短品牌文字而不是增加資源列高度
   - 行動版「事件」按鈕的 !／標題／數字各自置中，不再擠壓或破版
   - 訊息詳細區所有情境操作按鈕使用萬潮群島深色樣式，禁止 browser 白底按鈕
   ======================================================================== */

/* 訊息詳細操作：桌面、平板、手機都不可退回瀏覽器白色按鈕。 */
body.in-game .message-related-actions .message-context-btn,
body.in-game .message-related-actions button:not(.danger-act):not(.soft-btn),
body.in-game .message-detail-manage button:not(.danger-act):not(.soft-btn){
  appearance:none!important;
  -webkit-appearance:none!important;
  border:1px solid #3d7180!important;
  border-radius:8px!important;
  background:linear-gradient(180deg,#173e4d,#0d2b37)!important;
  color:#e1f3f5!important;
  box-shadow:inset 0 1px rgba(255,255,255,.05)!important;
}
body.in-game .message-related-actions .message-context-btn:hover,
body.in-game .message-related-actions .message-context-btn:focus-visible,
body.in-game .message-related-actions button:not(.danger-act):not(.soft-btn):hover,
body.in-game .message-related-actions button:not(.danger-act):not(.soft-btn):focus-visible{
  background:linear-gradient(180deg,#205568,#123847)!important;
  border-color:#63a5b3!important;
  color:#fff!important;
}
body.in-game .message-related-actions button:disabled,
body.in-game .message-detail-manage button:disabled{opacity:.55!important;color:#9db4ba!important}

@media(max-width:620px){
  /* ---------- 登入 / 註冊 ---------- */
  html,body{max-width:100%!important;overflow-x:hidden!important}
  .auth-shell{
    width:100%!important;
    min-height:100dvh!important;
    height:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    place-items:start center!important;
    padding:max(10px,env(safe-area-inset-top)) 8px max(12px,env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
  }
  .auth-card{
    width:min(100%,430px)!important;
    max-width:calc(100vw - 16px)!important;
    min-width:0!important;
    margin:0 auto!important;
    padding:13px 12px 15px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  .auth-card :is(.auth-brand,.auth-subtitle,.story-intro-btn,.tabs,.auth-form,.auth-field,.password-input-wrap,label,input,button){min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  .auth-card .auth-brand{width:100%!important;margin-bottom:6px!important}
  .auth-card .auth-brand .brand-emblem{width:36px!important;height:36px!important;flex:0 0 36px!important}
  .auth-card .auth-brand b{font-size:17px!important;line-height:1.15!important}
  .auth-card .auth-brand small{font-size:12px!important;line-height:1.15!important;margin-top:1px!important}
  .auth-card .auth-subtitle{font-size:12px!important;line-height:1.3!important;margin:0 0 9px!important;white-space:normal!important}
  .auth-card .story-intro-btn{width:100%!important;min-height:40px!important;margin:0 0 9px!important;padding:5px 9px!important;font-size:13px!important}
  .auth-card .tabs{width:100%!important;margin:0 0 10px!important}
  .auth-card .tab{min-height:40px!important;height:40px!important;padding:5px 7px!important;font-size:13px!important}
  .auth-card .auth-form{width:100%!important;gap:8px!important}
  .auth-card .auth-form label,.auth-card .auth-field>label{width:100%!important;font-size:13px!important;line-height:1.25!important;gap:3px!important}
  .auth-card .auth-field,.auth-card .password-input-wrap{width:100%!important}
  .auth-card .auth-form input{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 10px!important;
    font-size:14px!important;
    border-radius:6px!important;
  }
  .auth-card .password-input-wrap input{padding-right:48px!important}
  .auth-card .password-toggle{
    right:1px!important;top:1px!important;
    width:44px!important;height:40px!important;min-width:44px!important;min-height:40px!important;
    padding:0!important;border-radius:0 5px 5px 0!important;
  }
  .auth-card .password-toggle .password-eye-icon{width:20px!important;height:20px!important}
  .auth-card .primary{display:block!important;width:100%!important;max-width:100%!important;min-height:42px!important;padding:6px 10px!important;font-size:14px!important}
  .auth-card .note{font-size:12px!important;line-height:1.35!important;overflow-wrap:anywhere!important}

  /* ---------- 遊戲頁頂端 ---------- */
  html body.in-game .page-frame{
    width:100%!important;max-width:100vw!important;
    height:100dvh!important;min-height:100dvh!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    overflow:hidden!important;
  }
  html body.in-game #game .topbar{
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"brand account" "resources resources"!important;
    grid-template-rows:auto auto!important;
    width:100%!important;min-width:0!important;height:auto!important;
    padding:5px 6px 6px!important;
    gap:5px 6px!important;
    overflow:visible!important;
  }
  html body.in-game #game .brand-area{grid-area:brand!important;display:flex!important;min-width:0!important;padding:0!important;align-items:center!important}
  html body.in-game #game .game-brand{min-width:0!important;gap:5px!important}
  html body.in-game #game .game-brand .brand-emblem{width:28px!important;height:28px!important;min-width:28px!important;flex:0 0 28px!important}
  html body.in-game #game .game-brand b{font-size:14px!important;line-height:1.1!important;letter-spacing:.2px!important;white-space:nowrap!important}
  html body.in-game #game .game-brand small{font-size:12px!important;line-height:1.05!important;white-space:nowrap!important}
  html body.in-game #game .account-area{grid-area:account!important;display:block!important;min-width:0!important;padding:0!important;align-self:center!important}
  html body.in-game #game .server-line,html body.in-game #game .account-area #playerName{display:none!important}
  html body.in-game #game .account-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:4px!important;min-width:0!important}
  html body.in-game #game .account-actions .account-rename-btn{display:inline-flex!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){
    width:auto!important;min-width:0!important;height:38px!important;min-height:38px!important;
    padding:4px 7px!important;font-size:12px!important;line-height:1!important;border-radius:7px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;
  }

  /* 六項資源一次看完，避免橫向捲動與超高 2 欄卡片。 */
  html body.in-game #game .resource-bar{
    grid-area:resources!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    gap:4px!important;padding:0!important;margin:0!important;
    overflow:visible!important;scroll-snap-type:none!important;
  }
  html body.in-game #game .resource-cell{
    display:grid!important;
    grid-template-columns:24px minmax(0,1fr)!important;
    align-items:center!important;
    width:100%!important;min-width:0!important;max-width:none!important;
    height:50px!important;min-height:50px!important;
    padding:4px 5px!important;gap:4px!important;
    border-radius:8px!important;overflow:hidden!important;
  }
  html body.in-game #game .resource-cell img{width:24px!important;height:24px!important;min-width:24px!important;flex:0 0 24px!important}
  html body.in-game #game .resource-cell>div{display:grid!important;grid-template-rows:auto auto!important;align-content:center!important;min-width:0!important;gap:1px!important}
  html body.in-game #game .resource-cell :is(span,small){display:block!important;font-size:12px!important;line-height:1!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important}
  html body.in-game #game .resource-cell b{
    display:block!important;font-size:13px!important;line-height:1.05!important;margin:0!important;
    white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:normal!important;
    font-variant-numeric:tabular-nums!important;letter-spacing:-.15px!important;max-width:none!important;
  }
  html body.in-game #game .resource-cell.energy-cell>div{grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;column-gap:3px!important}
  html body.in-game #game .resource-cell.energy-cell span{grid-column:1;grid-row:1!important}
  html body.in-game #game .resource-cell.energy-cell b{grid-column:2;grid-row:1!important;text-align:right!important}
  html body.in-game #game .resource-cell.energy-cell small{grid-column:1/-1;grid-row:2!important;color:#6fbea4!important}

  /* 行動版事件入口：三個內容分欄置中，! 與數字都不得貼邊。 */
  html body.in-game .event-drawer-toggle.event-toggle-inline{
    position:static!important;inset:auto!important;
    display:inline-grid!important;
    grid-template-columns:20px minmax(28px,auto) minmax(20px,auto)!important;
    align-items:center!important;justify-items:center!important;
    width:auto!important;min-width:92px!important;max-width:106px!important;
    height:38px!important;min-height:38px!important;
    padding:3px 5px!important;gap:3px!important;margin:0!important;
    border-radius:8px!important;line-height:1!important;overflow:hidden!important;
  }
  html body.in-game .event-drawer-toggle.event-toggle-inline .event-drawer-icon{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:20px!important;height:20px!important;min-width:20px!important;
    padding:0!important;margin:0!important;border-radius:50%!important;
    font-size:12px!important;line-height:1!important;
  }
  html body.in-game .event-drawer-toggle.event-toggle-inline>span:not(.event-drawer-icon){font-size:12px!important;line-height:1!important;white-space:nowrap!important;margin:0!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline>b{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:auto!important;min-width:20px!important;height:20px!important;min-height:20px!important;
    padding:0 4px!important;margin:0!important;border-radius:10px!important;
    font-size:12px!important;line-height:1!important;font-variant-numeric:tabular-nums!important;
  }

  /* ---------- 訊息詳細閱讀 ---------- */
  html body.in-game #game .message-related-actions,
  html body.in-game #game .message-detail-manage{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;padding:8px!important;
  }
  html body.in-game #game .message-related-actions button,
  html body.in-game #game .message-detail-manage button{
    width:100%!important;min-width:0!important;max-width:100%!important;
    min-height:40px!important;height:auto!important;
    padding:5px 8px!important;font-size:13px!important;line-height:1.2!important;
    white-space:normal!important;overflow-wrap:anywhere!important;
  }
}

@media(max-width:349px){
  html body.in-game #game .resource-cell{height:48px!important;min-height:48px!important}
  html body.in-game #game .account-actions{gap:2px!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){padding-left:5px!important;padding-right:5px!important;font-size:12px!important}
  html body.in-game #game .game-brand>div{display:none!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline{min-width:88px!important;max-width:98px!important;grid-template-columns:18px minmax(28px,auto) minmax(18px,auto)!important;padding-left:4px!important;padding-right:4px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline .event-drawer-icon{width:18px!important;min-width:18px!important;height:18px!important;min-height:18px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline>b{width:auto!important;min-width:18px!important;height:18px!important;min-height:18px!important;padding-left:3px!important;padding-right:3px!important}
}

/* ========================================================================
   v2026.09.05.06 — Tablet / Mobile Responsive Contract（檔尾唯一最終規則）
   目的：收斂歷史 RWD 疊加衝突；手機／平板以實際可操作、無遮擋、無異常換行為準。
   注意：本區塊只調整版面與互動層，不變更任何遊戲規則或 Server 計算。
   ======================================================================== */

/* 共同防破版：短標籤不要被壓成逐字直排；只有真正長字串才允許安全斷行。 */
body.in-game #game,
body.in-game #game *{min-width:0}
body.in-game #game :is(button,.mini-btn,.nav-toggle-btn,.soft-btn,.danger-soft-btn,.big-action,.tab,.nav,.message-hub-tab,.message-primary-tab){
  word-break:keep-all;
}
body.in-game #game :is(p,li,.message-detail-body,.chat-message-body,.event-drawer-item p,.support-message p){
  word-break:normal;
  overflow-wrap:break-word;
}
body.in-game #game :is(input,select,textarea){max-width:100%}

@media (max-width:1100px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body.in-game{width:100%;max-width:100%;overflow-x:hidden!important}
  html body.in-game .page-frame,
  html body.in-game #game,
  html body.in-game .game-grid,
  html body.in-game #content,
  html body.in-game .topbar,
  html body.in-game .rightbar,
  html body.in-game .sidebar{min-width:0!important;max-width:100%!important}
  html body.in-game #content{overflow-x:hidden!important}
  html body.in-game #content>*{min-width:0!important;max-width:100%!important}

  /* 首頁標題區舊版 flex-basis:420px 會在窄畫面產生數百 px 空白，必須解除。 */
  html body.in-game .overview-section-head{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:3px!important;
    margin-bottom:8px!important;
  }
  html body.in-game .overview-section-head>div,
  html body.in-game .overview-section-head>small{
    flex:0 1 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    text-align:left!important;
  }
  html body.in-game .overview-section-head>small{display:none!important}
  html body.in-game .overview-command-center{min-height:0!important;height:auto!important;align-content:start!important}
  html body.in-game .overview-action-grid{align-content:start!important;height:auto!important;min-height:0!important}

  /* 事件抽屜關閉時完全離開互動／視覺層，修正 768~820px 仍蓋住右側內容。 */
  html body.in-game .event-drawer{
    box-sizing:border-box!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    overscroll-behavior:contain!important;
    transition:transform .18s ease,opacity .14s ease,visibility 0s linear .18s!important;
  }
  html body.in-game .event-drawer.open{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    transition:transform .18s ease,opacity .14s ease!important;
  }
  html body.in-game .event-drawer-head{
    position:relative!important;
    flex:0 0 auto!important;
    min-height:52px!important;
    padding-right:56px!important;
  }
  html body.in-game .event-drawer-head>div{min-width:0!important;max-width:100%!important}
  html body.in-game .event-drawer-head .ui-close-button{
    position:absolute!important;
    top:6px!important;
    right:6px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    margin:0!important;
    z-index:4!important;
  }
  html body.in-game .event-drawer-list{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  /* 所有 compact 模式的浮動入口保留底部安全距離，避免擋住最後一個操作。 */
  html body.in-game #content{padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
  html body.in-game .chat-launcher{
    left:max(8px,env(safe-area-inset-left))!important;
    right:auto!important;
    bottom:max(8px,calc(8px + env(safe-area-inset-bottom)))!important;
    z-index:188!important;
  }

  /* 通用 Modal：卡片永遠在 viewport 內，標題列與關閉鈕不能被內容推走。 */
  html body.in-game :is(.help-modal,.story-modal,.battle-replay-modal){
    box-sizing:border-box!important;
    padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;
  }
  html body.in-game :is(.help-modal-card,.story-modal-card,.battle-replay-card){
    width:min(100%,920px)!important;
    max-width:100%!important;
    max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)))!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  html body.in-game :is(.help-modal-head,.story-modal-head,.battle-replay-head){flex:0 0 auto!important;position:relative!important}
  html body.in-game :is(.help-modal-body,.story-modal-body,.battle-replay-body){flex:1 1 auto!important;min-height:0!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important}

  /* 表格只准自己的容器橫捲，不准把整個遊戲頁撐寬。 */
  html body.in-game .table-scroll{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game .table-scroll>.table{max-width:none!important}
}

/* ----------------------------- 平板 621~1100 ----------------------------- */
@media (min-width:621px) and (max-width:1100px){
  html body.in-game #game .topbar{
    width:100%!important;
    grid-template-columns:minmax(150px,1fr) auto!important;
    grid-template-areas:"brand account" "resources resources"!important;
    grid-template-rows:auto auto!important;
    height:auto!important;
    min-height:0!important;
    padding:6px 9px!important;
    gap:6px 9px!important;
  }
  html body.in-game #game .brand-area{grid-area:brand!important;min-width:0!important}
  html body.in-game #game .account-area{grid-area:account!important;min-width:0!important;padding:0!important}
  html body.in-game #game .resource-bar{
    grid-area:resources!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:5px!important;
    width:100%!important;
    overflow:visible!important;
    padding:0!important;
  }
  html body.in-game #game .resource-cell{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:52px!important;
    min-height:52px!important;
    grid-template-columns:27px minmax(0,1fr)!important;
    gap:5px!important;
    padding:5px 6px!important;
    overflow:hidden!important;
  }
  html body.in-game #game .resource-cell img{width:27px!important;height:27px!important;min-width:27px!important}
  html body.in-game #game .resource-cell :is(span,small){font-size:12px!important;line-height:1.08!important;white-space:nowrap!important;overflow:hidden!important}
  html body.in-game #game .resource-cell b{font-size:14px!important;line-height:1.08!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important}

  /* 島嶼列保持緊湊橫向瀏覽，不讓一個卡片吃掉大量垂直高度。 */
  html body.in-game #game .rightbar,
  html body.in-game #game .rightbar.single-territory{
    width:100%!important;
    min-height:0!important;
    padding:6px 9px!important;
    gap:6px!important;
  }
  html body.in-game #game .rightbar .island-card{min-height:58px!important;padding:5px 7px!important;grid-template-columns:44px minmax(0,1fr)!important;gap:7px!important}
  html body.in-game #game .rightbar .island-thumb{width:44px!important;height:44px!important}
  html body.in-game #game .rightbar .planet-choice{min-height:56px!important;flex-basis:190px!important}

  /* 首頁：平板使用二欄快捷卡，避免 8 張卡片變成超長單欄。 */
  html body.in-game .overview-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  html body.in-game .overview-action{
    min-height:70px!important;
    height:auto!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:5px 8px!important;
    padding:8px 9px!important;
  }
  html body.in-game .overview-action img{grid-row:1/3!important;width:42px!important;height:42px!important}
  html body.in-game .overview-action b{font-size:15px!important;line-height:1.2!important}
  html body.in-game .overview-action small{font-size:12px!important;line-height:1.28!important;margin-top:2px!important}
  html body.in-game .overview-action em{position:static!important;grid-column:2!important;justify-self:start!important;font-size:12px!important;line-height:1.1!important;padding:2px 6px!important;white-space:nowrap!important}
  html body.in-game .overview-production-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  html body.in-game .overview-production-strip>div{min-height:58px!important;padding:7px 8px!important;grid-template-columns:30px minmax(0,1fr) auto!important;gap:5px!important}
  html body.in-game .overview-production-strip img{width:30px!important;height:30px!important}
  html body.in-game .overview-production-strip :is(span,b){font-size:13px!important}
  html body.in-game .overview-production-strip small{font-size:12px!important}

  /* 統計標籤不允許「島嶼類 / 型」這種逐字擠壓。 */
  html body.in-game .overview-stats-v32{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  html body.in-game .overview-stats-v32 .stat-line{
    display:grid!important;
    grid-template-columns:max-content minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    padding:7px 9px!important;
  }
  html body.in-game .overview-stats-v32 .stat-line>span{white-space:nowrap!important;font-size:14px!important}
  html body.in-game .overview-stats-v32 .stat-line>b{font-size:14px!important;text-align:right!important;white-space:normal!important;word-break:keep-all!important}

  /* 平板事件抽屜：開啟才顯示；大小限制在螢幕內，不再殘留右半屏。 */
  html body.in-game .event-drawer{
    left:auto!important;
    right:max(10px,env(safe-area-inset-right))!important;
    top:auto!important;
    bottom:max(10px,calc(10px + env(safe-area-inset-bottom)))!important;
    width:min(430px,calc(100vw - 20px))!important;
    height:min(68dvh,660px)!important;
    max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    border:1px solid #315c68!important;
    border-radius:14px!important;
    transform:translateX(calc(100% + 28px))!important;
    overflow:hidden!important;
    z-index:220!important;
  }
  html body.in-game .event-drawer.open{transform:translateX(0)!important}

  /* 平板聊天：高度控制在畫面內，關閉後完全不留透明攔截層。 */
  html body.in-game .chat-drawer{
    left:max(10px,env(safe-area-inset-left))!important;
    right:auto!important;
    top:auto!important;
    bottom:max(10px,calc(10px + env(safe-area-inset-bottom)))!important;
    width:min(430px,calc(100vw - 20px))!important;
    height:min(68dvh,660px)!important;
    max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    border:1px solid rgba(116,193,204,.38)!important;
    border-radius:14px!important;
    overflow:hidden!important;
    z-index:221!important;
  }
}

/* 621~760 平板直向空間較窄：資源改 3×2，但仍只佔兩列。 */
@media (min-width:621px) and (max-width:760px){
  html body.in-game #game .resource-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html body.in-game #game .resource-cell{height:48px!important;min-height:48px!important}
}

/* ------------------------------- 手機 <=620 ------------------------------ */
@media (max-width:620px){
  /* 登入／註冊：短副標題不留下單一中文字。 */
  .auth-shell{overflow-y:auto!important;overflow-x:hidden!important}
  .auth-card{overflow:visible!important}
  .auth-card .auth-subtitle{
    font-size:12px!important;
    line-height:1.25!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }

  /* 頂部列不允許品牌、功能、設定、登出、事件互相擠壓。 */
  html body.in-game #game .topbar{overflow:hidden!important}
  html body.in-game #game .game-brand{max-width:100%!important;overflow:hidden!important}
  html body.in-game #game .game-brand>div{min-width:0!important;overflow:hidden!important}
  html body.in-game #game .game-brand b{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html body.in-game #game .account-actions{max-width:100%!important;overflow:visible!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){flex:0 0 auto!important;white-space:nowrap!important}

  /* 首頁領地卡：統計用「固定短標籤 + 可伸縮值」，禁止一字一行。 */
  html body.in-game .overview-stats-v32{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    margin-top:7px!important;
  }
  html body.in-game .overview-stats-v32 .stat-line{
    display:grid!important;
    grid-template-columns:max-content minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
    min-height:34px!important;
    padding:5px 7px!important;
  }
  html body.in-game .overview-stats-v32 .stat-line>span{
    white-space:nowrap!important;
    word-break:keep-all!important;
    font-size:13px!important;
    line-height:1.2!important;
  }
  html body.in-game .overview-stats-v32 .stat-line>b{
    justify-self:end!important;
    text-align:right!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    font-size:14px!important;
    line-height:1.25!important;
  }
  /* 不再隱藏動能／效率，手機也能看到完整四項但不浪費空間。 */
  html body.in-game .overview-stats-v32 .stat-line:nth-child(3),
  html body.in-game .overview-stats-v32 .stat-line:nth-child(4){display:grid!important}

  html body.in-game .overview-command-center{padding:8px!important;margin:7px 0!important}
  html body.in-game .overview-section-head{margin-bottom:6px!important}
  html body.in-game .overview-section-head span{font-size:13px!important;line-height:1.15!important;letter-spacing:.5px!important}
  html body.in-game .overview-section-head h2{font-size:16px!important;line-height:1.2!important;margin:1px 0 0!important}
  html body.in-game .overview-action-grid{grid-template-columns:1fr!important;gap:5px!important}
  html body.in-game .overview-action{
    min-height:58px!important;
    height:auto!important;
    grid-template-columns:36px minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    gap:2px 7px!important;
    padding:6px 7px!important;
  }
  html body.in-game .overview-action img{grid-column:1!important;grid-row:1/3!important;width:36px!important;height:36px!important;padding:4px!important}
  html body.in-game .overview-action span{grid-column:2!important;grid-row:1/3!important;align-self:center!important}
  html body.in-game .overview-action b{font-size:14px!important;line-height:1.18!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html body.in-game .overview-action small{font-size:12px!important;line-height:1.25!important;margin-top:2px!important;display:block!important}
  html body.in-game .overview-action em{
    position:static!important;
    grid-column:3!important;
    grid-row:1/3!important;
    align-self:center!important;
    justify-self:end!important;
    max-width:88px!important;
    font-size:12px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    padding:3px 6px!important;
  }
  html body.in-game .overview-production-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game .overview-production-strip>div{min-height:50px!important;padding:5px 6px!important;grid-template-columns:26px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:2px 5px!important}
  html body.in-game .overview-production-strip img{width:26px!important;height:26px!important;grid-row:1/3!important}
  html body.in-game .overview-production-strip span{font-size:12px!important;line-height:1.08!important}
  html body.in-game .overview-production-strip span small{font-size:12px!important;line-height:1.05!important;margin-top:1px!important}
  html body.in-game .overview-production-strip b{grid-column:2!important;font-size:13px!important;line-height:1.08!important;white-space:nowrap!important}

  /* 表單在手機預設單欄；兩欄只留給非常短的成對數值，避免早換行與難點擊。 */
  html body.in-game #game :is(.fleet-target,.fleet-cargo,.market-form,.merchant-trade,.merchant-call-row,.moon-form){grid-template-columns:1fr!important}
  html body.in-game #game :is(.fleet-target,.fleet-cargo,.market-form,.merchant-trade,.merchant-call-row,.moon-form)>*{min-width:0!important;max-width:100%!important}

  /* 航海事件：真正的安全 bottom sheet。開啟後上下邊都一定在 viewport 內。 */
  html body.in-game .event-drawer{
    left:max(6px,env(safe-area-inset-left))!important;
    right:max(6px,env(safe-area-inset-right))!important;
    top:auto!important;
    bottom:max(6px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    height:min(70dvh,620px)!important;
    max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    min-height:0!important;
    border:1px solid #315c68!important;
    border-radius:14px!important;
    transform:translateY(calc(100% + 24px))!important;
    overflow:hidden!important;
    z-index:220!important;
  }
  html body.in-game .event-drawer.open{transform:translateY(0)!important}
  html body.in-game .event-drawer-head{padding:8px 54px 8px 10px!important;min-height:50px!important}
  html body.in-game .event-drawer-head b{font-size:16px!important;line-height:1.2!important;white-space:nowrap!important}
  html body.in-game .event-drawer-head span{font-size:12px!important;line-height:1.28!important;display:block!important;margin-top:2px!important}
  html body.in-game .event-drawer-item{grid-template-columns:minmax(0,1fr)!important;gap:5px!important;padding:8px!important}
  html body.in-game .event-drawer-item>time,
  html body.in-game .event-drawer-item>span{justify-self:start!important;white-space:nowrap!important;font-size:12px!important}
  html body.in-game .event-drawer-footer{padding:7px 8px!important}

  /* 聊天改為可關閉 bottom sheet，不再整個 100dvh 蓋死遊戲。 */
  html body.in-game .chat-drawer{
    left:max(6px,env(safe-area-inset-left))!important;
    right:max(6px,env(safe-area-inset-right))!important;
    top:auto!important;
    bottom:max(6px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    height:min(72dvh,640px)!important;
    max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    border:1px solid rgba(116,193,204,.38)!important;
    border-radius:14px!important;
    box-shadow:0 18px 55px rgba(0,0,0,.55)!important;
    overflow:hidden!important;
    z-index:221!important;
  }
  html body.in-game #chatDrawerBody{height:100%!important;min-height:0!important}
  html body.in-game .chat-head{position:relative!important;flex:0 0 auto!important;min-height:50px!important;padding:8px 54px 8px 9px!important}
  html body.in-game .chat-head .ui-close-button,
  html body.in-game .chat-head button[data-chat-close]{position:absolute!important;right:6px!important;top:5px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
  html body.in-game .chat-tabs{flex:0 0 auto!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important}
  html body.in-game .chat-history{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important}
  html body.in-game .chat-composer{flex:0 0 auto!important}
  html body.in-game .chat-footnote{flex:0 0 auto!important}

  /* 任何關閉的聊天元素不可留下透明 hit area。 */
  html body.in-game .chat-drawer.hidden{display:none!important;pointer-events:none!important}

  /* 訊息操作按鈕：短操作名稱完整顯示，不以逐字換行硬塞。 */
  html body.in-game #game :is(.message-related-actions,.message-detail-manage) button{
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
  }

  /* Toast 不要剛好蓋住聊天／事件關閉鈕與輸入列。 */
  #toast{left:6px!important;right:6px!important;bottom:calc(62px + env(safe-area-inset-bottom))!important;max-width:none!important;width:auto!important;font-size:13px!important;line-height:1.35!important}
}

/* 320~359：保留可讀性，優先縮品牌，不去壓短按鈕與資源名稱。 */
@media (max-width:359px){
  .auth-card .auth-subtitle{font-size:11.5px!important}
  html body.in-game #game .game-brand>div{display:none!important}
  html body.in-game #game .account-actions{gap:2px!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){padding-left:4px!important;padding-right:4px!important;font-size:12px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline{min-width:82px!important;max-width:88px!important;padding-left:3px!important;padding-right:3px!important;gap:2px!important}
  html body.in-game .overview-production-strip{grid-template-columns:1fr 1fr!important}
}

/* 小高度裝置（例如手機橫向）：聊天與事件最多吃 76% 高度，關閉鈕始終可見。 */
@media (max-width:1100px) and (max-height:560px){
  html body.in-game .event-drawer,
  html body.in-game .chat-drawer{height:min(76dvh,430px)!important;max-height:calc(100dvh - 10px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}
}

/* v2026.09.05.06 — compact 聊天入口收進 topbar，關閉狀態不再有任何浮鈕覆蓋內容。 */
@media(max-width:1100px){
  html body.in-game .chat-launcher.chat-launcher-inline{
    position:static!important;
    inset:auto!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:42px!important;
    min-height:42px!important;
    margin:0!important;
    padding:4px 8px!important;
    border-radius:8px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    box-shadow:none!important;
    z-index:auto!important;
    white-space:nowrap!important;
  }
  html body.in-game .chat-launcher.chat-launcher-inline>span{font-size:16px!important;line-height:1!important}
  html body.in-game .chat-launcher.chat-launcher-inline>b{font-size:14px!important;line-height:1!important;white-space:nowrap!important}
  html body.in-game .chat-launcher.chat-launcher-inline>em{
    min-width:18px!important;width:auto!important;height:18px!important;min-height:18px!important;
    padding:0 4px!important;border-radius:9px!important;font-size:11px!important;line-height:18px!important;
  }
  html body.event-open .chat-launcher.chat-launcher-inline{opacity:1!important;visibility:visible!important;pointer-events:auto!important}
}
@media(max-width:620px){
  html body.in-game #game .account-actions{gap:3px!important}
  html body.in-game .chat-launcher.chat-launcher-inline{
    width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;
    padding:0!important;position:relative!important;
  }
  html body.in-game .chat-launcher.chat-launcher-inline>b{display:none!important}
  html body.in-game .chat-launcher.chat-launcher-inline>span{font-size:17px!important}
  html body.in-game .chat-launcher.chat-launcher-inline>em{
    position:absolute!important;right:-3px!important;top:-4px!important;min-width:17px!important;height:17px!important;line-height:17px!important;font-size:10px!important;padding:0 3px!important;
  }
}
@media(max-width:430px){
  /* 小手機把品牌文字縮成單一中文名稱；再窄則只保留徽記，避免操作鈕被擠出螢幕。 */
  html body.in-game #game .game-brand b{display:none!important}
  html body.in-game #game .game-brand small{display:block!important;font-size:13px!important;white-space:nowrap!important}
}
@media(max-width:350px){
  html body.in-game #game .game-brand>div{display:none!important}
}

/* v2026.09.05.06 — 手機首頁統計最終覆蓋：必須單欄，不得被舊 #game 高權重規則改回 2 欄。 */
@media(max-width:620px){
  html body.in-game #game .overview-stats-v32{grid-template-columns:1fr!important}
  html body.in-game #game .overview-stats-v32 .stat-line{width:100%!important;min-height:34px!important;height:auto!important}
}

/* v2026.09.05.06 — Responsive typography authority。
   歷史樣式仍有不少 24px !important；在 compact 模式由本區塊統一接管，
   避免某些頁面突然回到桌面字級而把中文字壓成一字一行。 */
@media(min-width:621px) and (max-width:1100px){
  html body.in-game #game #content :is(p,span,b,strong,em,label,button,input,select,textarea,td,th,a,li,summary){font-size:16px!important;line-height:1.38!important}
  html body.in-game #game #content :is(small,.muted,.panel-subline,.coords,.item-level,.item-info,.fleet-hint,.queue small,.section-kicker){font-size:14px!important;line-height:1.32!important}
  html body.in-game #game #content h1{font-size:24px!important;line-height:1.22!important}
  html body.in-game #game #content h2{font-size:21px!important;line-height:1.24!important}
  html body.in-game #game #content h3{font-size:18px!important;line-height:1.26!important}
  html body.in-game #game #content h4{font-size:16px!important;line-height:1.28!important}
}
@media(max-width:620px){
  html body.in-game #game #content :is(p,span,b,strong,em,label,button,input,select,textarea,td,th,a,li,summary){font-size:14px!important;line-height:1.36!important}
  html body.in-game #game #content :is(small,.muted,.panel-subline,.coords,.item-level,.item-info,.fleet-hint,.queue small,.section-kicker,.catalog-eyebrow,.overview-eyebrow){font-size:12px!important;line-height:1.3!important}
  html body.in-game #game #content h1{font-size:20px!important;line-height:1.2!important}
  html body.in-game #game #content h2{font-size:18px!important;line-height:1.22!important}
  html body.in-game #game #content h3{font-size:16px!important;line-height:1.24!important}
  html body.in-game #game #content h4{font-size:14px!important;line-height:1.26!important}

  html body.in-game #game .resource-capacity-grid{grid-template-columns:1fr!important;gap:6px!important}
  html body.in-game #game .resource-capacity-card{padding:8px!important}
  html body.in-game #game .resource-capacity-head{grid-template-columns:38px minmax(0,1fr) auto!important;gap:7px!important}
  html body.in-game #game .resource-capacity-head img{width:38px!important;height:38px!important}
  html body.in-game #game .resource-capacity-head b{font-size:14px!important;white-space:nowrap!important}
  html body.in-game #game .resource-capacity-head span{font-size:12px!important;line-height:1.25!important;white-space:normal!important;word-break:keep-all!important}
  html body.in-game #game .resource-capacity-head strong{font-size:14px!important}
  html body.in-game #game .resource-capacity-values,
  html body.in-game #game .resource-capacity-foot{grid-template-columns:1fr 1fr!important;gap:5px!important}
  html body.in-game #game .resource-capacity-values>div,
  html body.in-game #game .resource-capacity-foot>div{padding:6px 7px!important}
  html body.in-game #game .resource-capacity-values :is(span,b),
  html body.in-game #game .resource-capacity-foot :is(span,b){white-space:normal!important;word-break:keep-all!important;overflow-wrap:normal!important}

  html body.in-game #game .fleet-step-preview .fleet-dispatch-summary{grid-template-columns:1fr!important;gap:5px!important}
  html body.in-game #game .fleet-step-preview .fleet-dispatch-summary>div{
    min-height:48px!important;
    grid-template-columns:max-content minmax(0,1fr)!important;
    gap:8px!important;
    padding:7px 8px!important;
  }
  html body.in-game #game .fleet-step-preview .fleet-dispatch-summary>div>span{white-space:nowrap!important;word-break:keep-all!important;font-size:13px!important}
  html body.in-game #game .fleet-step-preview .fleet-dispatch-summary>div>b{text-align:right!important;font-size:14px!important;word-break:keep-all!important;overflow-wrap:normal!important}
}
@media(max-width:380px){
  html body.in-game #game .resource-capacity-values,
  html body.in-game #game .resource-capacity-foot{grid-template-columns:1fr!important}
}
@media(max-width:340px){
  .auth-card .auth-subtitle{
    white-space:normal!important;
    text-wrap:balance;
    overflow-wrap:normal!important;
    word-break:keep-all!important;
    line-height:1.25!important;
  }
}

/* ========================================================================
   v2026.09.05.07 — Tablet / Mobile scroll + resource + inner-spacing fix
   1) 手機資源數值不得越界覆蓋相鄰卡片。
   2) <=1100px 由文件本身負責垂直捲動；只有功能選單 / 真正 modal 開啟時才鎖背景。
   3) 行動版框線容器保留一致、足夠但不浪費空間的文字內距。
   ======================================================================== */
@media (max-width:1100px){
  html{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
  }
  html body.in-game{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html body.in-game .page-frame{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow:visible!important;
    grid-template-rows:auto auto!important;
  }
  html body.in-game .game-grid{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  html body.in-game #content{
    height:auto!important;
    min-height:60vh!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y!important;
  }
  html body.in-game .rightbar{
    height:auto!important;
    max-height:none!important;
    overflow-y:visible!important;
  }
  /* 水平內容可左右拖，也不能吃掉整頁上下手勢。 */
  html body.in-game :is(.table-scroll,.table-wrap,.scroll-x,.resource-bar,.tabs,.message-tabs,.message-hub-nav,.message-primary-tabs,.market-tabs,.facility-category-tabs,.shipyard-category-tabs,.research-branch-tabs,.galaxy-map-scroll,.ocean-chart-scroll,.archipelago-scroll,.special-zone-map-scroll){
    touch-action:pan-x pan-y!important;
    overscroll-behavior-y:auto!important;
  }
  /* 功能抽屜與真正 modal 開啟才鎖住背景頁。 */
  html body.in-game.nav-open,
  html body.in-game.modal-open{overflow-y:hidden!important;touch-action:pan-y!important}

  /* 平板框線內容：提高內距，但維持緊湊。 */
  html body.in-game #game{
    --ti-panel-x:13px;
    --ti-panel-y:11px;
    --ti-card-pad:11px;
  }
  html body.in-game #game :is(.panel>h2,.panel>h3,.panel>h4,.panel-subline,.panel-body,.compact-body,.section-head){
    padding-left:13px!important;
    padding-right:13px!important;
  }
  html body.in-game #game :is(.panel-body,.compact-body,.section-head){
    padding-top:11px!important;
    padding-bottom:11px!important;
  }
  html body.in-game #game .panel-subline{padding-top:8px!important;padding-bottom:8px!important}
}

@media (max-width:620px){
  html body.in-game #game{
    --ti-page-x:7px;
    --ti-page-y:7px;
    --ti-panel-x:11px;
    --ti-panel-y:10px;
    --ti-card-pad:10px;
  }

  /* 六項資源固定 3×2。文字與數值上下分層，任何數字都不得畫進隔壁卡。 */
  html body.in-game #game .resource-bar{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
    padding:0!important;
  }
  html body.in-game #game .resource-cell{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:52px!important;
    min-height:52px!important;
    padding:5px 6px!important;
    gap:4px!important;
    overflow:hidden!important;
  }
  html body.in-game #game .resource-cell img{
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
  }
  html body.in-game #game .resource-cell>div{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-content:center!important;
    gap:2px!important;
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  html body.in-game #game .resource-cell>div>span{
    grid-column:1!important;
    grid-row:1!important;
    display:block!important;
    min-width:0!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }
  html body.in-game #game .resource-cell>div>b{
    grid-column:1!important;
    grid-row:2!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1.08!important;
    letter-spacing:-.2px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    font-variant-numeric:tabular-nums!important;
  }
  /* 動能：第一列「動能 / 產能%」，第二列單獨放動能數值。 */
  html body.in-game #game .resource-cell.energy-cell>div{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    column-gap:3px!important;
    row-gap:2px!important;
  }
  html body.in-game #game .resource-cell.energy-cell>div>span{grid-column:1!important;grid-row:1!important}
  html body.in-game #game .resource-cell.energy-cell>div>small{
    grid-column:2!important;
    grid-row:1!important;
    display:block!important;
    margin:0!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
  html body.in-game #game .resource-cell.energy-cell>div>b{
    grid-column:1/-1!important;
    grid-row:2!important;
    text-align:left!important;
  }

  /* 手機框線內容統一保留 10~11px；避免標題、說明、欄位直接黏邊。 */
  html body.in-game #game :is(.panel>h2,.panel>h3,.panel>h4,.panel-subline,.panel-body,.compact-body,.section-head){
    padding-left:11px!important;
    padding-right:11px!important;
  }
  html body.in-game #game :is(.panel-body,.compact-body,.section-head){
    padding-top:10px!important;
    padding-bottom:10px!important;
  }
  html body.in-game #game .panel-subline{padding-top:8px!important;padding-bottom:8px!important}
  html body.in-game #game :is(.card,.message-card,.resource-capacity-card,.production-resource-card,.game-help-card,.fleet-step-card,.support-ticket-card){
    scroll-margin:8px;
  }
  html body.in-game #game :is(.account-settings-grid,.admin-email-config-grid,.admin-email-compose,.settings-actions){
    min-width:0!important;
  }
  html body.in-game #game :is(input,select,textarea){
    padding-left:10px!important;
    padding-right:10px!important;
  }
  /* 少數舊頁面直接把說明文字放在 panel 下方，沒有 panel-body 包裝；仍須離框線。 */
  html body.in-game #game .panel>:is(p,ul,ol,.muted,.hint,.notice,.empty-state,.empty-message){
    margin-left:11px!important;
    margin-right:11px!important;
  }
}


@media (max-width:360px){
  html body.in-game #game .resource-cell{grid-template-columns:20px minmax(0,1fr)!important;padding-left:5px!important;padding-right:5px!important;gap:3px!important}
  html body.in-game #game .resource-cell img{width:20px!important;height:20px!important;min-width:20px!important}
  html body.in-game #game .resource-cell>div>b{font-size:11.5px!important;letter-spacing:-.3px!important}
  html body.in-game #game .resource-cell.energy-cell>div>small{font-size:9.5px!important}
}


/* ========================================================================
   v2026.09.05.08 — 手機左上品牌完整顯示
   - 「萬潮群島」在 320px 以上手機寬度必須完整顯示，不可被帳號操作列擠成「萬潮」。
   - 僅重新分配 topbar 第一列寬度與 compact 操作鈕密度，不改動 v2026.09.05.07
     已完成的資源 3×2、頁面垂直捲動、panel 內距與聊天／事件 bottom-sheet。
   ======================================================================== */
@media (max-width:430px){
  html body.in-game #game .topbar{
    grid-template-columns:78px minmax(0,1fr)!important;
    column-gap:4px!important;
    padding-left:5px!important;
    padding-right:5px!important;
  }
  html body.in-game #game .brand-area{
    width:78px!important;
    min-width:78px!important;
    max-width:78px!important;
    overflow:visible!important;
    flex:0 0 78px!important;
  }
  html body.in-game #game .game-brand{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    overflow:visible!important;
    flex:0 0 auto!important;
    gap:4px!important;
  }
  html body.in-game #game .game-brand .brand-emblem{
    width:24px!important;
    height:24px!important;
    min-width:24px!important;
    flex:0 0 24px!important;
  }
  html body.in-game #game .game-brand>div{
    display:block!important;
    min-width:max-content!important;
    max-width:none!important;
    overflow:visible!important;
  }
  html body.in-game #game .game-brand b{display:none!important}
  html body.in-game #game .game-brand small{
    display:block!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    font-size:12px!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    word-break:keep-all!important;
  }
  html body.in-game #game .account-area{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  html body.in-game #game .account-actions{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    justify-content:flex-end!important;
    gap:2px!important;
    overflow:visible!important;
  }
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){
    flex:0 1 auto!important;
    width:auto!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    padding:3px 4px!important;
    font-size:12px!important;
    line-height:1!important;
  }
  html body.in-game .chat-launcher.chat-launcher-inline{
    flex:0 0 34px!important;
    width:34px!important;
    min-width:34px!important;
    height:36px!important;
    min-height:36px!important;
  }
  html body.in-game .event-drawer-toggle.event-toggle-inline{
    flex:0 0 auto!important;
    grid-template-columns:16px auto 16px!important;
    width:auto!important;
    min-width:62px!important;
    max-width:68px!important;
    height:36px!important;
    min-height:36px!important;
    padding:2px 3px!important;
    gap:1px!important;
  }
  html body.in-game .event-drawer-toggle.event-toggle-inline .event-drawer-icon{
    width:16px!important;height:16px!important;min-width:16px!important;font-size:11px!important;
  }
  html body.in-game .event-drawer-toggle.event-toggle-inline>span:not(.event-drawer-icon){font-size:12px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline>b{
    min-width:16px!important;width:auto!important;height:16px!important;min-height:16px!important;
    padding:0 2px!important;font-size:10px!important;line-height:16px!important;
  }
}
@media (max-width:350px){
  html body.in-game #game .topbar{
    grid-template-columns:74px minmax(0,1fr)!important;
    column-gap:3px!important;
    padding-left:4px!important;
    padding-right:4px!important;
  }
  html body.in-game #game .brand-area{
    width:74px!important;min-width:74px!important;max-width:74px!important;flex-basis:74px!important;
  }
  html body.in-game #game .game-brand{gap:3px!important}
  html body.in-game #game .game-brand .brand-emblem{
    width:22px!important;height:22px!important;min-width:22px!important;flex-basis:22px!important;
  }
  /* 覆蓋歷史 <=350px 隱藏品牌文字規則；320px 仍必須完整看到「萬潮群島」。 */
  html body.in-game #game .game-brand>div{display:block!important;min-width:max-content!important;overflow:visible!important}
  html body.in-game #game .game-brand small{display:block!important;font-size:12px!important}
  html body.in-game #game .account-actions{gap:1px!important}
  html body.in-game #game .account-actions :is(.mini-btn,.nav-toggle-btn){padding-left:3px!important;padding-right:3px!important}
  html body.in-game .chat-launcher.chat-launcher-inline{width:32px!important;min-width:32px!important;flex-basis:32px!important}
  html body.in-game .event-drawer-toggle.event-toggle-inline{min-width:58px!important;max-width:62px!important;padding-left:2px!important;padding-right:2px!important}
}


/* ========================================================================
   v2026.09.05.09 — 行動版島嶼切換 + 登出誤觸保護配套 UI
   - 手機不再把 island-list-title 整段隱藏；多島時固定保留「上一島 / 快速跳島 / 下一島」。
   - 平板改為緊湊島嶼切換列，避免完整大卡列浪費大量垂直空間。
   - 單一島嶼時隱藏切換列；不占用無意義空間。
   ======================================================================== */
@media (min-width:621px) and (max-width:1100px){
  html body.in-game #game .rightbar,
  html body.in-game #game .rightbar:not(.single-territory){display:block!important;width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;padding:7px 9px!important;overflow:visible!important}
  html body.in-game #game .rightbar.single-territory{display:none!important}
  html body.in-game #game .rightbar .island-list-title{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;width:100%!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  html body.in-game #game .rightbar .island-dock-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important}
  html body.in-game #game .rightbar .island-dock-heading b{font-size:15px!important;white-space:nowrap!important}
  html body.in-game #game .rightbar .island-dock-heading span{min-width:0!important;font-size:13px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:right!important}
  html body.in-game #game .rightbar .island-dock-controls{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px auto!important;align-items:center!important;gap:6px!important;width:100%!important;min-width:0!important}
  html body.in-game #game .rightbar .island-jump-control{grid-column:2!important;grid-row:1!important;display:block!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important}
  html body.in-game #game .rightbar .island-jump-control>span{display:none!important}
  html body.in-game #game .rightbar #islandSelect{display:block!important;width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;padding:5px 31px 5px 9px!important;font-size:14px!important;line-height:1.2!important}
  html body.in-game #game .rightbar #islandPrevBtn,
  html body.in-game #game .rightbar #islandNextBtn{display:flex!important;align-items:center!important;justify-content:center!important;width:44px!important;min-width:44px!important;height:42px!important;min-height:42px!important;padding:0!important;font-size:0!important;line-height:1!important}
  html body.in-game #game .rightbar #islandPrevBtn{grid-column:1!important;grid-row:1!important}
  html body.in-game #game .rightbar #islandNextBtn{grid-column:3!important;grid-row:1!important}
  html body.in-game #game .rightbar #islandPrevBtn::before{content:'‹';font-size:27px!important;line-height:1!important}
  html body.in-game #game .rightbar #islandNextBtn::before{content:'›';font-size:27px!important;line-height:1!important}
  html body.in-game #game .rightbar #islandLocateBtn{display:none!important}
  html body.in-game #game .rightbar #islandDiscoverBtn{grid-column:4!important;grid-row:1!important;display:flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:88px!important;height:42px!important;min-height:42px!important;padding:5px 9px!important;font-size:14px!important;white-space:nowrap!important}
  html body.in-game #game .rightbar .island-strip-shell,
  html body.in-game #game .rightbar .island-list{display:none!important}
}

@media (max-width:620px){
  html body.in-game #game .rightbar,
  html body.in-game #game .rightbar:not(.single-territory){display:block!important;width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;padding:5px 6px!important;overflow:visible!important;border-bottom:1px solid var(--ti-line-soft)!important;background:rgba(4,22,29,.98)!important}
  html body.in-game #game .rightbar.single-territory{display:none!important}
  html body.in-game #game .rightbar .island-list-title{display:block!important;width:100%!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  html body.in-game #game .rightbar .island-dock-heading{display:none!important}
  html body.in-game #game .rightbar .island-dock-controls{display:grid!important;grid-template-columns:42px minmax(0,1fr) 42px!important;align-items:center!important;gap:5px!important;width:100%!important;min-width:0!important;margin:0!important}
  html body.in-game #game .rightbar .island-jump-control{display:block!important;grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important}
  html body.in-game #game .rightbar .island-jump-control>span{display:none!important}
  html body.in-game #game .rightbar #islandSelect,
  html body.in-game #game .rightbar #islandSelect.hidden{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:40px!important;min-height:40px!important;padding:4px 29px 4px 8px!important;font-size:13px!important;line-height:1.15!important;border-radius:7px!important}
  html body.in-game #game .rightbar #islandPrevBtn,
  html body.in-game #game .rightbar #islandNextBtn{display:flex!important;align-items:center!important;justify-content:center!important;width:42px!important;min-width:42px!important;height:40px!important;min-height:40px!important;padding:0!important;font-size:0!important;line-height:1!important}
  html body.in-game #game .rightbar #islandPrevBtn{grid-column:1!important;grid-row:1!important}
  html body.in-game #game .rightbar #islandNextBtn{grid-column:3!important;grid-row:1!important}
  html body.in-game #game .rightbar #islandPrevBtn::before{content:'‹';font-size:26px!important;line-height:1!important}
  html body.in-game #game .rightbar #islandNextBtn::before{content:'›';font-size:26px!important;line-height:1!important}
  html body.in-game #game .rightbar #islandLocateBtn,
  html body.in-game #game .rightbar #islandDiscoverBtn,
  html body.in-game #game .rightbar .island-strip-shell,
  html body.in-game #game .rightbar .island-list,
  html body.in-game #game .rightbar .territory-discover{display:none!important}
}


/* ============================================================
   v2026.09.05.10 — 海域航圖座標群組點擊安全修正
   海域／群島改為非互動 group 容器；只有 button/input 自己可操作。
   ============================================================ */
body.in-game .ocean-map-panel .galaxy-coordinate-group{
  display:grid!important;
  gap:5px!important;
  min-width:0!important;
  margin:0!important;
  color:#819daa!important;
}
body.in-game .ocean-map-panel .galaxy-coordinate-label{
  display:block!important;
  color:#86aab2!important;
  cursor:default!important;
  user-select:none;
}
@media (max-width:620px){
  html body.in-game #game .ocean-map-panel .galaxy-coordinate-group{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    gap:3px!important;
    font-size:12px!important;
  }
  html body.in-game #game .ocean-map-panel .galaxy-coordinate-label{font-size:12px!important}
}

/* =========================================================
   v2026.09.05.11 — 深海霸主關卡風險資訊
   - 顯示本關固定強度浮動與敵方戰鬥科技預估。
   - 特殊戰群進場順序用緊湊流程呈現，不增加大量垂直空白。
   ========================================================= */
body.in-game .boss-enemy-risk{
  display:grid;
  grid-template-columns:auto auto minmax(220px,1fr);
  align-items:center;
  gap:8px 12px;
  padding:10px 12px;
  border:1px solid rgba(214,185,106,.28);
  border-radius:9px;
  background:rgba(66,52,19,.24);
}
body.in-game .boss-enemy-risk>b{font-size:20px;color:#e2c66f;white-space:nowrap;}
body.in-game .boss-enemy-risk>span{font-size:20px;color:#dce8ea;white-space:nowrap;}
body.in-game .boss-enemy-risk>small{font-size:20px;color:#a9bec4;line-height:1.45;min-width:0;}
body.in-game .boss-enemy-research{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
body.in-game .boss-enemy-research>span{
  min-width:0;
  padding:8px 10px;
  border:1px solid rgba(106,174,184,.22);
  border-radius:8px;
  background:rgba(8,43,50,.58);
  font-size:20px;
  line-height:1.35;
  text-align:center;
}
body.in-game .boss-special-timeline{
  display:grid;
  gap:8px;
  padding:10px 12px;
  border:1px solid rgba(90,164,175,.24);
  border-radius:9px;
  background:rgba(5,31,37,.58);
}
body.in-game .boss-special-timeline>b{font-size:20px;color:#dce9ec;}
body.in-game .boss-special-timeline>div{
  display:flex;
  align-items:stretch;
  gap:7px;
  overflow-x:auto;
  padding-bottom:2px;
}
body.in-game .boss-special-timeline span{
  display:grid;
  gap:2px;
  min-width:max-content;
  padding:7px 9px;
  border:1px solid rgba(109,157,165,.22);
  border-radius:8px;
  background:rgba(8,42,49,.70);
  font-size:20px;
}
body.in-game .boss-special-timeline span small{font-size:16px;color:#a9bec4;}
body.in-game .boss-special-timeline i{align-self:center;font-style:normal;color:#7aa9b1;font-size:18px;}
@media(max-width:900px){
  body.in-game .boss-enemy-risk{grid-template-columns:1fr auto;}
  body.in-game .boss-enemy-risk>small{grid-column:1/-1;}
  body.in-game .boss-enemy-research{grid-template-columns:1fr;}
}
@media(max-width:620px){
  body.in-game .boss-enemy-risk{grid-template-columns:1fr;gap:5px;padding:9px 10px;}
  body.in-game .boss-enemy-risk>small{grid-column:auto;}
  body.in-game .boss-enemy-risk>b,body.in-game .boss-enemy-risk>span,body.in-game .boss-enemy-risk>small,
  body.in-game .boss-enemy-research>span,body.in-game .boss-special-timeline>b,body.in-game .boss-special-timeline span{font-size:14px;}
  body.in-game .boss-special-timeline span small{font-size:12px;}
}


/* v2026.09.05.12 — 深海霸主科技上限與 Lv 敵軍規模平衡：本版無新增 CSS 規則。 */

/* =========================================================
   v2026.09.06.02 — 珍珠加速道具圖片卡 + 漂流商會圖像化雙向換算
   - 加速道具沿用豐潮印記的「左圖右文」卡片骨架。
   - 漂流商會以資源圖片為主要操作入口；支付量／取得量可雙向反算。
   - 桌面、平板、手機皆維持可讀、可觸與不超出 viewport。
   ========================================================= */
body.in-game .speedup-shop-groups{display:grid;gap:16px;margin-bottom:20px}
body.in-game .speedup-shop-group{min-width:0;padding:14px!important;border:1px solid rgba(85,155,173,.24)!important;border-radius:12px!important;background:rgba(4,24,32,.52)!important}
body.in-game .speedup-shop-head{display:block!important;margin:0 0 12px!important;padding:0!important;background:transparent!important;border:0!important}
body.in-game .speedup-shop-head>div{display:grid;gap:3px;min-width:0}
body.in-game .speedup-shop-head b{font-size:22px!important;color:#d7edf3!important}
body.in-game .speedup-shop-head span{font-size:20px!important;line-height:1.4!important;color:#87a6b2!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.in-game .speedup-tier-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
body.in-game .speedup-shop-card{height:100%;min-width:0}
body.in-game .speedup-shop-art{background:radial-gradient(circle,rgba(26,79,87,.78),rgba(7,27,35,.98))!important;border-color:#356771!important}
body.in-game .speedup-item-art{width:88px!important;height:100px!important;object-fit:contain!important;display:block!important}
body.in-game .speedup-inventory-card{align-items:center}
body.in-game .speedup-inventory-card .inventory-item-image{background:radial-gradient(circle,rgba(26,79,87,.62),rgba(7,27,35,.98));border-color:#356771}
body.in-game .speedup-inventory-card .speedup-item-art{width:70px!important;height:70px!important;object-fit:contain!important;display:block!important}

body.in-game .merchant-section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
body.in-game .merchant-section-title h3,body.in-game .merchant-section-title p{margin:0}
body.in-game .merchant-section-title p{margin-top:5px;color:#9db4bc;line-height:1.5}
body.in-game .merchant-resource-choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body.in-game .merchant-target-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body.in-game .merchant-resource-choice{
  appearance:none!important;
  width:100%!important;
  min-width:0!important;
  min-height:132px!important;
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:center!important;
  padding:12px!important;
  border:1px solid rgba(76,131,144,.5)!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,rgba(7,39,47,.9),rgba(4,22,29,.97))!important;
  color:#dcebed!important;
  text-align:left!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;
}
body.in-game button.merchant-resource-choice{cursor:pointer}
body.in-game .merchant-resource-choice:hover{border-color:#5c9dac!important;background:linear-gradient(145deg,rgba(10,55,64,.92),rgba(5,27,34,.98))!important}
body.in-game .merchant-resource-choice.selected{border-color:#6ec8c0!important;box-shadow:0 0 0 2px rgba(78,193,181,.18) inset,0 0 18px rgba(43,159,151,.12)!important;background:linear-gradient(145deg,rgba(11,63,69,.94),rgba(5,31,37,.98))!important}
body.in-game .merchant-resource-choice.static{cursor:default}
body.in-game .merchant-resource-choice>img{width:88px!important;height:88px!important;object-fit:contain!important;filter:drop-shadow(0 5px 10px rgba(0,0,0,.28))}
body.in-game .merchant-resource-choice>span{min-width:0;display:grid;gap:4px}
body.in-game .merchant-resource-choice>span>b{font-size:24px!important;color:#e6f4f4!important;line-height:1.2!important}
body.in-game .merchant-resource-choice>span>small{font-size:20px!important;color:#9ab5bd!important;line-height:1.3!important;white-space:normal!important}
body.in-game .merchant-resource-choice>span>em{font-size:18px!important;color:#6f97a3!important;font-style:normal!important;line-height:1.3!important;white-space:normal!important}
body.in-game .merchant-call-action{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(76,131,144,.24)}
body.in-game .merchant-call-action>div{display:grid;gap:2px;text-align:right}
body.in-game .merchant-call-action span{font-size:18px!important;color:#87a3ad}
body.in-game .merchant-call-action b{font-size:22px!important;color:#dcebed}
body.in-game .merchant-exchange-route{display:grid;grid-template-columns:minmax(240px,.9fr) auto minmax(0,1.5fr);gap:16px;align-items:center}
body.in-game .merchant-route-side{min-width:0;display:grid;gap:8px}
body.in-game .merchant-route-label{font-size:20px!important;color:#8daab3;font-weight:700}
body.in-game .merchant-route-arrow{font-size:38px!important;color:#69b9bd;text-align:center;line-height:1}
body.in-game .merchant-amount-editor{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;margin-top:16px;padding:14px;border:1px solid rgba(74,127,139,.38);border-radius:14px;background:rgba(5,29,36,.72)}
body.in-game .merchant-amount-field{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;min-width:0}
body.in-game .merchant-amount-field>span{font-size:20px!important;font-weight:700;color:#d7eaed}
body.in-game .merchant-amount-field>input{width:100%!important;min-width:0!important;box-sizing:border-box!important;font-variant-numeric:tabular-nums}
body.in-game .merchant-amount-field>small{font-size:18px!important;line-height:1.35!important;color:#809da6!important}
body.in-game .merchant-amount-arrow{font-size:30px!important;color:#68b4b8;text-align:center}
body.in-game .merchant-live-preview{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;margin-top:12px;padding:14px;border:1px solid rgba(72,137,145,.42);border-radius:14px;background:rgba(8,43,50,.72)}
body.in-game .merchant-live-preview>div{min-width:0;display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:auto auto auto;gap:1px 9px;align-items:center}
body.in-game .merchant-live-preview>div>img{grid-row:1/4;width:52px;height:52px;object-fit:contain}
body.in-game .merchant-live-preview>div>span{font-size:18px!important;color:#8faab2}
body.in-game .merchant-live-preview>div>b{font-size:26px!important;color:#e3f3f4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body.in-game .merchant-live-preview>div>small{font-size:18px!important;color:#819da6;overflow-wrap:anywhere}
body.in-game .merchant-live-preview>strong{font-size:30px!important;color:#69b8bc;text-align:center}
body.in-game .merchant-live-preview>p{grid-column:1/-1;margin:2px 0 0!important;text-align:center;color:#9fb9c0;font-size:18px!important;line-height:1.4}
body.in-game .merchant-live-preview.bad{border-color:rgba(164,80,70,.72);background:rgba(74,28,26,.38)}
body.in-game .merchant-live-preview.bad>p{color:#e3a099}
body.in-game .merchant-confirm-trade{width:100%;margin-top:12px}
body.in-game .merchant-storage>div{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:2px 8px!important;align-items:center!important}
body.in-game .merchant-storage>div>img{grid-row:1/3;width:42px;height:42px;object-fit:contain}
body.in-game .merchant-storage>div>span{font-size:18px!important}
body.in-game .merchant-storage>div>b{font-size:20px!important;overflow-wrap:anywhere}

@media(max-width:1180px){
  body.in-game .speedup-tier-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .speedup-tier-grid>.speedup-shop-card:nth-child(3):last-child{grid-column:1/-1}
  body.in-game .merchant-resource-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .merchant-exchange-route{grid-template-columns:1fr}
  body.in-game .merchant-route-arrow{transform:rotate(90deg)}
  body.in-game .merchant-target-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.in-game .speedup-shop-group{padding:11px!important}
  body.in-game .speedup-tier-grid{grid-template-columns:minmax(0,1fr)}
  body.in-game .speedup-tier-grid>.speedup-shop-card:nth-child(3):last-child{grid-column:auto}
  body.in-game .speedup-item-art{width:76px!important;height:88px!important}
  body.in-game .merchant-resource-choice{grid-template-columns:74px minmax(0,1fr)!important;min-height:104px!important;padding:10px!important;gap:9px!important}
  body.in-game .merchant-resource-choice>img{width:70px!important;height:70px!important}
  body.in-game .merchant-resource-choice>span>b{font-size:18px!important}
  body.in-game .merchant-resource-choice>span>small{font-size:15px!important}
  body.in-game .merchant-resource-choice>span>em{font-size:14px!important}
  body.in-game .merchant-call-action{align-items:stretch;flex-direction:column}
  body.in-game .merchant-call-action>div{text-align:left}
  body.in-game .merchant-call-action button{width:100%}
  body.in-game .merchant-target-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .merchant-amount-editor{grid-template-columns:1fr!important;gap:8px!important;padding:10px!important}
  body.in-game .merchant-amount-arrow{transform:rotate(90deg);font-size:22px!important}
  body.in-game .merchant-live-preview{grid-template-columns:1fr!important;padding:10px!important}
  body.in-game .merchant-live-preview>strong{transform:rotate(90deg);font-size:22px!important}
  body.in-game .merchant-live-preview>p{grid-column:auto}
}
@media(max-width:460px){
  body.in-game .speedup-shop-head b{font-size:16px!important}
  body.in-game .speedup-shop-head span{font-size:13px!important}
  body.in-game .speedup-item-art{width:68px!important;height:80px!important}
  body.in-game .merchant-section-title p{font-size:13px!important}
  body.in-game .merchant-resource-choice-grid,body.in-game .merchant-target-grid{grid-template-columns:1fr}
  body.in-game .merchant-resource-choice{grid-template-columns:64px minmax(0,1fr)!important;min-height:88px!important;padding:8px!important}
  body.in-game .merchant-resource-choice>img{width:60px!important;height:60px!important}
  body.in-game .merchant-resource-choice>span>b{font-size:15px!important}
  body.in-game .merchant-resource-choice>span>small,body.in-game .merchant-resource-choice>span>em{font-size:12px!important}
  body.in-game .merchant-route-label,body.in-game .merchant-amount-field>span{font-size:14px!important}
  body.in-game .merchant-amount-field>small,body.in-game .merchant-live-preview>div>span,body.in-game .merchant-live-preview>div>small,body.in-game .merchant-live-preview>p{font-size:12px!important}
  body.in-game .merchant-live-preview>div>b{font-size:16px!important}
  body.in-game .merchant-storage>div>span{font-size:12px!important}
  body.in-game .merchant-storage>div>b{font-size:13px!important}
}

/* v2026.09.06.04 — PNG-only replaceable UI icon contract */
body.in-game .ui-icon,
body.in-game .inline-ui-icon,
body.in-game .chip-ui-icon,
body.in-game .button-ui-icon,
body.in-game .favorite-ui-icon,
body.in-game .exchange-ui-icon,
body.in-game .chat-launcher-icon,
body.in-game .unit-research-stat-img,
body.in-game .special-zone-pin-img{
  display:inline-block;
  object-fit:contain;
  flex:0 0 auto;
  vertical-align:middle;
}
body.in-game .inline-ui-icon{width:22px;height:22px;margin-right:5px}
body.in-game .chip-ui-icon{width:20px;height:20px;margin-right:5px}
body.in-game .button-ui-icon{width:20px;height:20px;margin-right:6px}
body.in-game .favorite-ui-icon{width:24px;height:24px;margin:0}
body.in-game .exchange-ui-icon{width:28px;height:28px}
body.in-game .chat-launcher-icon{width:24px;height:24px;margin:0}
body.in-game .unit-research-stat-img{width:30px;height:30px}
body.in-game .special-zone-pin-img{width:30px;height:30px;margin:0}
body.in-game .advisor-animal-icon{overflow:hidden}
body.in-game .advisor-animal-icon img{width:100%;height:100%;object-fit:contain;display:block}
body.in-game .inventory-item-image img{width:100%;height:100%;object-fit:contain;display:block}

/* 舊文字三角形不再當正式圖示；以可替換 PNG 顯示。 */
.message-fleet-details summary::before{
  content:''!important;
  width:20px;height:20px;display:inline-block!important;
  background:url('/assets/icon_expand.png?v=2026091903') center/contain no-repeat;
  vertical-align:middle;
}
.message-fleet-details[open] summary::before{
  background-image:url('/assets/icon_collapse.png?v=2026091903');
}
body.in-game .resource-bonus-toggle:after{
  content:''!important;display:inline-block;width:16px;height:16px;margin-left:5px;
  background:url('/assets/icon_expand.png?v=2026091903') center/contain no-repeat;vertical-align:middle;
}
body.in-game .resource-bonus-details[open] .resource-bonus-toggle:after{
  background-image:url('/assets/icon_collapse.png?v=2026091903');
}

@media(max-width:620px){
  body.in-game .inline-ui-icon{width:18px;height:18px;margin-right:4px}
  body.in-game .chip-ui-icon{width:17px;height:17px}
  body.in-game .button-ui-icon{width:18px;height:18px}
  body.in-game .special-zone-pin-img{width:26px;height:26px}
}

/* v2026.09.06.04 — PNG-only small icon replacement contract */
body.in-game .event-drawer-icon{display:inline-flex;align-items:center;justify-content:center}
body.in-game .event-drawer-icon img{display:block;width:22px;height:22px;object-fit:contain}
body.in-game .mystery-ui-icon{display:block;width:28px;height:28px;object-fit:contain}
body.in-game .route-ui-icon{display:block;width:30px;height:30px;object-fit:contain}
body.in-game .mystery-berth-mark{display:flex!important;align-items:center;justify-content:center}
body.in-game .merchant-route-arrow{display:flex;align-items:center;justify-content:center}

/* v2026.09.06.05 — 純方向／加減控制恢復共用字形，不再建立獨立圖片槽位。
   上一島／下一島只產生一個箭頭；手機、平板維持單列，不讓箭頭另占一行。 */
html body.in-game #game .rightbar #islandPrevBtn,
html body.in-game #game .rightbar #islandNextBtn{
  white-space:nowrap!important;
}
html body.in-game #game .rightbar #islandPrevBtn::before,
html body.in-game #game .rightbar #islandNextBtn::before{
  display:inline-block!important;
  width:auto!important;
  height:auto!important;
  background:none!important;
  background-image:none!important;
  font-size:27px!important;
  line-height:1!important;
  vertical-align:-1px;
}
html body.in-game #game .rightbar #islandPrevBtn::before{content:'‹'!important}
html body.in-game #game .rightbar #islandNextBtn::before{content:'›'!important}
@media(min-width:1101px){
  html body.in-game #game .rightbar #islandPrevBtn::before,
  html body.in-game #game .rightbar #islandNextBtn::before{margin-right:6px!important}
}
@media(max-width:1100px){
  html body.in-game #game .rightbar #islandPrevBtn::before,
  html body.in-game #game .rightbar #islandNextBtn::before{margin:0!important}
}
@media(max-width:620px){
  body.in-game .event-drawer-icon img{width:18px;height:18px}
  body.in-game .mystery-ui-icon{width:23px;height:23px}
  body.in-game .route-ui-icon{width:24px;height:24px}
  html body.in-game #game .rightbar #islandPrevBtn::before,
  html body.in-game #game .rightbar #islandNextBtn::before{font-size:26px!important}
}

/* 關閉按鈕統一使用一般白色叉叉，不再使用紅色或圖片式叉叉。 */
body.in-game .ui-close-button,
body.in-game .mobile-nav-close{
  font-size:28px!important;
  font-weight:700!important;
  line-height:1!important;
  color:#ffffff!important;
  text-align:center!important;
  background-image:none!important;
  background-repeat:initial!important;
  background-position:initial!important;
  background-size:auto!important;
}

/* Text-only route separators are visually backed by the replaceable route PNG. */
body.in-game .market-arrow,
body.in-game .merchant-live-preview>strong,
body.in-game .island-quick-energy-route>i,
body.in-game .boss-special-timeline i,
body.in-game .battle-result-count>strong{
  font-size:0!important;
  display:inline-block;
  width:24px;
  min-width:24px;
  height:24px;
  background:url('/assets/icon_route.png') center/contain no-repeat;
  vertical-align:middle;
}
.share-controls .button-ui-icon{display:inline-block;width:20px;height:20px;object-fit:contain;vertical-align:middle;margin-right:6px}


/* ========================================================================
   v2026.09.06.06 — 戰鬥動畫正式背景圖分流
   每張圖都是可直接同檔名替換的 1600×900 PNG；檔名同時標示其難度來源。
   背景只負責美術，不參與戰鬥判定，也不增加 polling / requestAnimationFrame。
   ======================================================================== */
.battle-cinematic.battle-scene-player-sea{
  --battle-scene-image:url('/assets/scene_bg_battle_player_conflict.png?v=2026091211');
}
.battle-cinematic.battle-scene-expedition-pirates{
  --battle-scene-image:url('/assets/scene_bg_battle_expedition_hostile_encounter.png?v=2026091214');
}
.battle-cinematic.battle-scene-tide-sea{
  --battle-scene-image:url('/assets/scene_bg_battle_tidal_event_sea.png?v=2026091211');
}
.battle-cinematic.battle-scene-mist-island{
  --battle-scene-image:url('/assets/scene_bg_battle_mist_island.png?v=2026091211');
}
.battle-cinematic.battle-scene-boss-sea{
  --battle-scene-image:url('/assets/scene_bg_battle_deep_sea_boss.png?v=2026091211');
}
.battle-cinematic.battle-scene-player-sea,
.battle-cinematic.battle-scene-expedition-pirates,
.battle-cinematic.battle-scene-tide-sea,
.battle-cinematic.battle-scene-mist-island,
.battle-cinematic.battle-scene-boss-sea{
  background-color:#062633!important;
  background-image:var(--battle-scene-image)!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
  background-size:cover!important;
}
/* 新正式背景圖已包含海面／水下環境；舊 CSS 天空與海平線只保留為圖片缺失時的歷史 fallback，
   正常載入正式背景時不得用不透明漸層蓋住圖片。 */
.battle-cinematic.battle-scene-player-sea .battle-ocean-sky,
.battle-cinematic.battle-scene-player-sea .battle-ocean-horizon,
.battle-cinematic.battle-scene-expedition-pirates .battle-ocean-sky,
.battle-cinematic.battle-scene-expedition-pirates .battle-ocean-horizon,
.battle-cinematic.battle-scene-tide-sea .battle-ocean-sky,
.battle-cinematic.battle-scene-tide-sea .battle-ocean-horizon,
.battle-cinematic.battle-scene-mist-island .battle-ocean-sky,
.battle-cinematic.battle-scene-mist-island .battle-ocean-horizon,
.battle-cinematic.battle-scene-boss-sea .battle-ocean-sky,
.battle-cinematic.battle-scene-boss-sea .battle-ocean-horizon{
  opacity:0!important;
  box-shadow:none!important;
}
/* 舊 unknown/raider 類別仍保留作歷史樣式 fallback，但新戰報不再把遠洋海盜與迷霧海島混在同一背景。 */


/* ========================================================================
   v2026.09.06.08 — 海域航圖融圖顯示 + 設施動能獨立背景
   - 海域航圖保留正式 5×5 座標與點擊範圍，但移除每個島位像獨立小卡片的突兀感。
   - 島嶼縮圖邊緣以 CSS mask 柔化，讓圖片中的海水自然融入 scene_bg_ocean_chart。
   - 只有 hover / selected / current 才顯示低存在感選取框；座標與名稱使用局部半透明標籤確保可讀。
   - 不新增逐幀工作、不改座標、不改 gameplay。
   - 設施 → 動能新增可直接替換的 scene_bg_facilities_energy.png。
   ======================================================================== */
:root{
  --ti-scene-bg-facility-energy:url('/assets/scene_bg_facilities_energy.png?v=2026090707');
}

/* 海圖背景本身向周圍深色 UI 做輕微收邊，避免明亮照片像另外貼上一張圖。 */
html body.in-game #game .ocean-chart-scroll{
  border:1px solid rgba(91,176,193,.24)!important;
  border-radius:18px!important;
  background:#05384a!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.018),0 12px 30px rgba(0,0,0,.16)!important;
}
html body.in-game #game .ocean-chart-stage{
  border-radius:17px!important;
  background-color:#07556b!important;
  background-image:
    linear-gradient(180deg,rgba(1,20,31,.10) 0%,rgba(1,18,29,.04) 30%,rgba(1,18,29,.08) 68%,rgba(1,17,28,.24) 100%),
    radial-gradient(ellipse at center,transparent 48%,rgba(2,18,29,.12) 78%,rgba(2,17,27,.34) 100%),
    var(--ti-scene-bg-ocean-chart)!important;
  background-repeat:no-repeat,no-repeat,no-repeat!important;
  background-position:center center,center center,center center!important;
  background-size:100% 100%,100% 100%,cover!important;
  box-shadow:inset 0 0 58px rgba(0,19,31,.25)!important;
}

/* 島位本身不再常駐黑色圓角卡；完整點擊範圍仍維持原尺寸。 */
html body.in-game #game .map-island-node{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
  isolation:isolate!important;
}
html body.in-game #game .map-island-node::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:none!important;
  border:1px solid transparent!important;
  border-radius:18px!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:0!important;
  transition:opacity .16s,border-color .16s,background .16s,box-shadow .16s!important;
}
html body.in-game #game .map-island-node:hover::before,
html body.in-game #game .map-island-node:focus-visible::before{
  opacity:1!important;
  border-color:rgba(170,226,228,.32)!important;
  background:rgba(3,31,42,.22)!important;
}
html body.in-game #game .map-island-node.selected::before{
  opacity:1!important;
  border-color:rgba(143,220,216,.66)!important;
  background:rgba(3,35,45,.28)!important;
  box-shadow:0 0 0 2px rgba(105,196,192,.09),0 8px 22px rgba(0,0,0,.12)!important;
}
html body.in-game #game .map-island-node.current::before{
  opacity:1!important;
  border-color:rgba(130,225,198,.76)!important;
  background:rgba(2,43,46,.20)!important;
  box-shadow:0 0 0 2px rgba(121,221,193,.12),0 0 20px rgba(89,204,181,.12)!important;
}

/* 圖片不再裁成小圓章；以橢圓柔邊把原圖海面淡出到航圖背景。 */
html body.in-game #game .map-island-node > .map-node-coordinate,
html body.in-game #game .map-island-node > .map-node-image,
html body.in-game #game .map-island-node > .map-node-name{
  position:relative!important;
  z-index:1!important;
}
html body.in-game #game .map-node-debris{z-index:2!important}
html body.in-game #game .map-island-node.current:after{z-index:3!important}

html body.in-game #game .map-node-image{
  flex:0 0 60px!important;
  width:78px!important;
  height:60px!important;
  border:0!important;
  border-radius:0!important;
  overflow:visible!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body.in-game #game .map-node-image img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  -webkit-mask-image:radial-gradient(ellipse 72% 66% at 50% 50%,#000 0 54%,rgba(0,0,0,.96) 64%,rgba(0,0,0,.66) 76%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 72% 66% at 50% 50%,#000 0 54%,rgba(0,0,0,.96) 64%,rgba(0,0,0,.66) 76%,transparent 100%)!important;
  filter:drop-shadow(0 5px 6px rgba(0,22,34,.34)) saturate(.96) contrast(.98)!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image{
  filter:none!important;
  opacity:.72!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image img{
  filter:drop-shadow(0 4px 5px rgba(0,22,34,.26)) saturate(.52) brightness(.80)!important;
}
html body.in-game #game .map-island-node.scouted .map-node-image{
  border:0!important;
}

/* 只讓文字本身有小型海圖標籤，不再整格上黑底。 */
html body.in-game #game .map-node-coordinate,
html body.in-game #game .map-node-name{
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  padding:0 6px!important;
  border:1px solid rgba(145,206,215,.08)!important;
  border-radius:999px!important;
  background:rgba(2,26,37,.34)!important;
  box-shadow:0 1px 4px rgba(0,0,0,.10)!important;
  text-shadow:0 1px 2px rgba(0,0,0,.90)!important;
  backdrop-filter:blur(1.5px)!important;
}
html body.in-game #game .map-node-coordinate{
  color:#d1e8ec!important;
}
html body.in-game #game .map-node-name{
  color:#eefafa!important;
}
html body.in-game #game .map-island-node.current:after{
  box-shadow:0 2px 7px rgba(0,0,0,.22)!important;
}

/* 手機／窄平板仍使用原本 620px 航圖與水平捲動，不改 5×5 版面；只縮融圖尺寸。 */
@media(max-width:760px){
  html body.in-game #game .map-node-image{width:68px!important;height:54px!important;flex-basis:54px!important}
  html body.in-game #game .map-node-coordinate,
  html body.in-game #game .map-node-name{padding-left:5px!important;padding-right:5px!important}
}

/* 設施 → 動能：正式獨立背景槽。現版先以海防背景原檔複製占位，日後只需同檔名覆蓋。 */
html body.in-game #game .facility-category-energy .facility-island-stage.energy-sea-stage{
  background-color:#07556b!important;
  background-image:
    linear-gradient(180deg,rgba(2,25,35,.10),rgba(2,25,35,.22)),
    var(--ti-scene-bg-facility-energy)!important;
  background-repeat:no-repeat,no-repeat!important;
  background-position:center center,center center!important;
  background-size:100% 100%,cover!important;
  box-shadow:inset 0 0 75px rgba(0,20,31,.26),0 18px 42px rgba(0,0,0,.22)!important;
}

/* ========================================================================
   v2026.09.06.09 — 海域航圖島位可讀性與融圖修正
   - 修正座標／島名被 22px 固定高度裁掉的問題。
   - 島名保留最多兩行顯示，不再用單行 ellipsis 把正常名稱硬切掉。
   - 島圖改成較寬、較低的海面切片並加強柔邊，減少「方形圖片貼在海上」的突兀感。
   - 平常不顯示整格底卡；只有 hover / selected / current 才出現很淡的互動框。
   - 保留正式 5×5 座標、點擊範圍、目前島標籤與手機水平航圖，不改 gameplay。
   ======================================================================== */
html body.in-game #game .ocean-chart-stage{
  /* 航圖中央保持原圖清楚，四周才向深色 UI 收邊。 */
  background-image:
    linear-gradient(180deg,rgba(1,19,29,.08) 0%,rgba(1,18,28,.02) 32%,rgba(1,18,28,.05) 70%,rgba(1,16,26,.20) 100%),
    radial-gradient(ellipse at center,transparent 58%,rgba(2,18,29,.08) 80%,rgba(2,17,27,.28) 100%),
    var(--ti-scene-bg-ocean-chart)!important;
  box-shadow:inset 0 0 42px rgba(0,19,31,.18)!important;
}

/* 桌面版：5×5 每格中心距足夠，讓島位稍微加寬，文字不必硬塞。 */
html body.in-game #game .map-island-node{
  width:140px!important;
  height:124px!important;
  min-height:124px!important;
  padding:2px 6px 4px!important;
  gap:1px!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  background:transparent!important;
  border-color:transparent!important;
  border-radius:18px!important;
}

/* 互動框只負責告訴玩家「這格可點／已選」，不再做成黑色小卡片。 */
html body.in-game #game .map-island-node::before{
  inset:1px 3px!important;
  border-radius:17px!important;
}
html body.in-game #game .map-island-node:hover::before,
html body.in-game #game .map-island-node:focus-visible::before{
  background:rgba(3,31,42,.10)!important;
  border-color:rgba(170,226,228,.26)!important;
}
html body.in-game #game .map-island-node.selected::before{
  background:rgba(3,35,45,.13)!important;
  border-color:rgba(143,220,216,.62)!important;
  box-shadow:0 0 0 2px rgba(105,196,192,.07),0 7px 18px rgba(0,0,0,.08)!important;
}
html body.in-game #game .map-island-node.current::before{
  background:rgba(2,43,46,.10)!important;
  border-color:rgba(130,225,198,.72)!important;
  box-shadow:0 0 0 2px rgba(121,221,193,.09),0 0 18px rgba(89,204,181,.10)!important;
}

/* 座標：取消舊版固定 22px 高度，改由內容本身撐高，避免中文字／英數上緣被裁掉。 */
html body.in-game #game .map-node-coordinate{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  max-width:132px!important;
  height:auto!important;
  min-height:25px!important;
  margin:0!important;
  padding:1px 8px!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  font-size:20px!important;
  line-height:1.12!important;
  color:#d6ebee!important;
  border:1px solid rgba(151,209,217,.08)!important;
  border-radius:999px!important;
  background:rgba(2,27,38,.26)!important;
  box-sizing:border-box!important;
}

/* 島圖：用橫向切片放大島本體，並把四周海水更早淡出。 */
html body.in-game #game .map-node-image{
  position:relative!important;
  display:block!important;
  flex:0 0 50px!important;
  width:92px!important;
  height:50px!important;
  margin:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  opacity:.96!important;
  -webkit-mask-image:radial-gradient(ellipse 64% 58% at 50% 50%,#000 0 46%,rgba(0,0,0,.96) 58%,rgba(0,0,0,.62) 74%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 64% 58% at 50% 50%,#000 0 46%,rgba(0,0,0,.96) 58%,rgba(0,0,0,.62) 74%,transparent 100%)!important;
}
html body.in-game #game .map-node-image img{
  width:112%!important;
  height:112%!important;
  max-width:none!important;
  object-fit:cover!important;
  object-position:50% 50%!important;
  transform:translate(-5.35%,-5.35%) scale(1.04)!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
  filter:drop-shadow(0 4px 5px rgba(0,22,34,.22)) saturate(.88) contrast(.94) brightness(.98)!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image{
  opacity:.62!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image img{
  filter:drop-shadow(0 3px 4px rgba(0,22,34,.18)) saturate(.42) contrast(.88) brightness(.78)!important;
}

/* 島名：固定保留兩行高度，但不再用單行 ellipsis。短名稱仍保持完整居中。 */
html body.in-game #game .map-node-name{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  width:132px!important;
  max-width:132px!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  padding:1px 5px 0!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  text-align:center!important;
  font-size:20px!important;
  line-height:20px!important;
  color:#f1fbfc!important;
  border:0!important;
  border-radius:8px!important;
  background:linear-gradient(90deg,transparent,rgba(2,25,35,.20) 18%,rgba(2,25,35,.24) 50%,rgba(2,25,35,.20) 82%,transparent)!important;
  box-shadow:none!important;
  text-shadow:0 1px 3px rgba(0,0,0,.95),0 0 5px rgba(0,0,0,.38)!important;
  backdrop-filter:none!important;
  box-sizing:border-box!important;
}

/* 「目前」放在島圖右上附近，避開座標與島名；不會蓋住文字。 */
html body.in-game #game .map-island-node.current:after{
  right:1px!important;
  top:35px!important;
  min-height:25px!important;
  padding:1px 7px!important;
  font-size:20px!important;
  line-height:23px!important;
  border:1px solid rgba(166,237,214,.22)!important;
  box-sizing:border-box!important;
}
html body.in-game #game .map-node-debris{
  left:9px!important;
  top:42px!important;
}

/* 中等桌面／窄桌面：略縮寬度，但仍保留兩行島名與完整座標。 */
@media(max-width:1260px) and (min-width:1121px){
  html body.in-game #game .map-island-node{width:124px!important}
  html body.in-game #game .map-node-coordinate{max-width:118px!important}
  html body.in-game #game .map-node-name{width:118px!important;max-width:118px!important}
  html body.in-game #game .map-node-image{width:86px!important}
}

/* 平板：右側詳細區會下移，因此航圖仍有足夠寬度；只做小幅縮放。 */
@media(max-width:1120px) and (min-width:761px){
  html body.in-game #game .map-island-node{width:126px!important;height:122px!important;min-height:122px!important}
  html body.in-game #game .map-node-coordinate{max-width:120px!important}
  html body.in-game #game .map-node-name{width:120px!important;max-width:120px!important;height:40px!important;min-height:40px!important}
  html body.in-game #game .map-node-image{width:86px!important;height:48px!important;flex-basis:48px!important}
}

/* 手機：維持 620px 固定航圖＋區域內水平滑動，文字仍完整，不讓 5 欄互撞。 */
@media(max-width:760px){
  html body.in-game #game .ocean-chart-stage{width:620px!important;min-width:620px!important}
  html body.in-game #game .map-island-node{
    width:108px!important;
    height:108px!important;
    min-height:108px!important;
    padding:1px 4px 2px!important;
  }
  html body.in-game #game .map-node-coordinate{
    max-width:102px!important;
    min-height:21px!important;
    padding:1px 5px!important;
    font-size:16px!important;
    line-height:1.12!important;
  }
  html body.in-game #game .map-node-image{
    width:76px!important;
    height:46px!important;
    flex-basis:46px!important;
  }
  html body.in-game #game .map-node-name{
    width:102px!important;
    max-width:102px!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 4px!important;
    font-size:16px!important;
    line-height:18px!important;
  }
  html body.in-game #game .map-island-node.current:after{
    right:0!important;
    top:29px!important;
    min-height:22px!important;
    padding:0 5px!important;
    font-size:15px!important;
    line-height:20px!important;
  }
  html body.in-game #game .map-node-debris{left:6px!important;top:34px!important}
}


/* ========================================================================
   v2026.09.06.10 — 海域航圖島圖再融合修正
   - 目標：消除仍殘留的「小長方形切片」感。
   - 作法：讓每格島圖使用不同的有機柔邊遮罩與微差裁切，
           並在邊緣疊一層低存在感海色霧化，讓原圖海水更自然地融入航圖背景。
   - 不修改海域 5×5 座標、點擊邏輯、資料來源與玩法。
   ======================================================================== */
html body.in-game #game .map-node-image{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  opacity:.97!important;
}
html body.in-game #game .map-node-image::after{
  content:""!important;
  position:absolute!important;
  inset:-18% -20%!important;
  z-index:2!important;
  pointer-events:none!important;
  background:
    radial-gradient(ellipse 64% 58% at 50% 52%, transparent 0 38%, rgba(14,88,128,.05) 54%, rgba(9,67,104,.18) 68%, rgba(7,49,79,.42) 84%, rgba(5,33,54,.72) 100%),
    radial-gradient(ellipse 48% 24% at 18% 70%, rgba(22,120,166,.10), transparent 72%),
    radial-gradient(ellipse 44% 20% at 82% 34%, rgba(34,137,180,.08), transparent 70%)!important;
  filter:blur(4px)!important;
  opacity:.88!important;
}
html body.in-game #game .map-node-image img{
  position:relative!important;
  z-index:1!important;
  width:128%!important;
  height:128%!important;
  max-width:none!important;
  object-fit:cover!important;
  transform:translate(-11.5%,-12.0%) scale(1.14)!important;
  filter:drop-shadow(0 4px 5px rgba(0,22,34,.18)) saturate(.86) contrast(.93) brightness(.985)!important;
}
html body.in-game #game .map-island-node.mask-v1 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 66% 60% at 48% 52%,#000 0 41%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.76) 69%,rgba(0,0,0,.32) 82%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 66% 60% at 48% 52%,#000 0 41%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.76) 69%,rgba(0,0,0,.32) 82%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.mask-v2 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 63% 58% at 46% 50%,#000 0 42%,rgba(0,0,0,.98) 55%,rgba(0,0,0,.74) 70%,rgba(0,0,0,.28) 83%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 63% 58% at 46% 50%,#000 0 42%,rgba(0,0,0,.98) 55%,rgba(0,0,0,.74) 70%,rgba(0,0,0,.28) 83%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.mask-v3 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 64% 56% at 53% 54%,#000 0 42%,rgba(0,0,0,.98) 55%,rgba(0,0,0,.72) 70%,rgba(0,0,0,.26) 84%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 64% 56% at 53% 54%,#000 0 42%,rgba(0,0,0,.98) 55%,rgba(0,0,0,.72) 70%,rgba(0,0,0,.26) 84%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.mask-v4 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 68% 57% at 50% 48%,#000 0 40%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.74) 69%,rgba(0,0,0,.28) 83%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 68% 57% at 50% 48%,#000 0 40%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.74) 69%,rgba(0,0,0,.28) 83%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.crop-v1 .map-node-image img{
  object-position:50% 52%!important;
  transform:translate(-12.5%,-12.0%) scale(1.15)!important;
}
html body.in-game #game .map-island-node.crop-v2 .map-node-image img{
  object-position:47% 49%!important;
  transform:translate(-10.5%,-11.0%) scale(1.13)!important;
}
html body.in-game #game .map-island-node.crop-v3 .map-node-image img{
  object-position:53% 51%!important;
  transform:translate(-12.0%,-13.0%) scale(1.16)!important;
}
html body.in-game #game .map-island-node.crop-v4 .map-node-image img{
  object-position:49% 55%!important;
  transform:translate(-11.0%,-13.5%) scale(1.14)!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image::after{
  opacity:.82!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image img{
  filter:drop-shadow(0 3px 4px rgba(0,22,34,.15)) saturate(.38) contrast(.88) brightness(.76)!important;
}
@media(max-width:760px){
  html body.in-game #game .map-node-image::after{filter:blur(3px)!important;opacity:.84!important}
  html body.in-game #game .map-node-image img{width:126%!important;height:126%!important;transform:translate(-10.5%,-11.5%) scale(1.12)!important}
}


/* ========================================================================
   v2026.09.06.11 — 海域航圖左右邊緣再柔化
   - 目標：修正島圖左右兩端仍有被直接切斷的感覺。
   - 作法：強化左右海色霧化、讓遮罩更早在左右側淡出，並略為放大原圖，
           讓可見區集中在島本體而不是兩側海水切片。
   ======================================================================== */
html body.in-game #game .map-node-image{
  opacity:.98!important;
}
html body.in-game #game .map-node-image::before{
  content:""!important;
  position:absolute!important;
  inset:-6px -14px -5px -14px!important;
  z-index:2!important;
  pointer-events:none!important;
  background:
    linear-gradient(90deg,
      rgba(7,52,86,.82) 0%,
      rgba(10,72,108,.56) 10%,
      rgba(14,93,132,.20) 19%,
      rgba(14,93,132,0) 30%,
      rgba(14,93,132,0) 70%,
      rgba(14,93,132,.20) 81%,
      rgba(10,72,108,.56) 90%,
      rgba(7,52,86,.82) 100%),
    radial-gradient(ellipse 34% 28% at 14% 52%, rgba(13,88,131,.22), transparent 72%),
    radial-gradient(ellipse 34% 28% at 86% 48%, rgba(13,88,131,.22), transparent 72%)!important;
  filter:blur(4.5px)!important;
  opacity:.95!important;
}
html body.in-game #game .map-node-image::after{
  inset:-19% -24%!important;
  background:
    linear-gradient(90deg,
      rgba(5,37,61,.58) 0%,
      rgba(8,55,84,.22) 16%,
      transparent 33%,
      transparent 67%,
      rgba(8,55,84,.22) 84%,
      rgba(5,37,61,.58) 100%),
    radial-gradient(ellipse 62% 56% at 50% 52%, transparent 0 36%, rgba(14,88,128,.05) 53%, rgba(9,67,104,.18) 68%, rgba(7,49,79,.40) 83%, rgba(5,33,54,.68) 100%),
    radial-gradient(ellipse 42% 20% at 18% 68%, rgba(22,120,166,.09), transparent 72%),
    radial-gradient(ellipse 40% 18% at 82% 34%, rgba(34,137,180,.08), transparent 70%)!important;
  filter:blur(4.5px)!important;
  opacity:.94!important;
}
html body.in-game #game .map-node-image img{
  width:134%!important;
  height:130%!important;
  transform:translate(-13.8%,-12.2%) scale(1.18)!important;
}
html body.in-game #game .map-island-node.mask-v1 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 58% 60% at 48% 52%,#000 0 39%,rgba(0,0,0,.98) 53%,rgba(0,0,0,.72) 68%,rgba(0,0,0,.24) 82%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 58% 60% at 48% 52%,#000 0 39%,rgba(0,0,0,.98) 53%,rgba(0,0,0,.72) 68%,rgba(0,0,0,.24) 82%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.mask-v2 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 56% 58% at 46% 50%,#000 0 40%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.70) 69%,rgba(0,0,0,.22) 83%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 56% 58% at 46% 50%,#000 0 40%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.70) 69%,rgba(0,0,0,.22) 83%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.mask-v3 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 57% 56% at 53% 54%,#000 0 40%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.68) 69%,rgba(0,0,0,.22) 84%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 57% 56% at 53% 54%,#000 0 40%,rgba(0,0,0,.98) 54%,rgba(0,0,0,.68) 69%,rgba(0,0,0,.22) 84%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.mask-v4 .map-node-image{
  -webkit-mask-image:radial-gradient(ellipse 60% 57% at 50% 48%,#000 0 38%,rgba(0,0,0,.98) 52%,rgba(0,0,0,.70) 68%,rgba(0,0,0,.24) 83%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 60% 57% at 50% 48%,#000 0 38%,rgba(0,0,0,.98) 52%,rgba(0,0,0,.70) 68%,rgba(0,0,0,.24) 83%,transparent 100%)!important;
}
html body.in-game #game .map-island-node.crop-v1 .map-node-image img{
  object-position:50% 52%!important;
  transform:translate(-14.5%,-12.2%) scale(1.18)!important;
}
html body.in-game #game .map-island-node.crop-v2 .map-node-image img{
  object-position:47% 49%!important;
  transform:translate(-12.6%,-11.4%) scale(1.16)!important;
}
html body.in-game #game .map-island-node.crop-v3 .map-node-image img{
  object-position:53% 51%!important;
  transform:translate(-14.2%,-13.0%) scale(1.19)!important;
}
html body.in-game #game .map-island-node.crop-v4 .map-node-image img{
  object-position:49% 55%!important;
  transform:translate(-13.2%,-13.8%) scale(1.17)!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image::before{
  opacity:.90!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image::after{
  opacity:.90!important;
}
html body.in-game #game .map-island-node.vacant:not(.scouted) .map-node-image img{
  filter:drop-shadow(0 3px 4px rgba(0,22,34,.13)) saturate(.34) contrast(.86) brightness(.74)!important;
}
@media(max-width:760px){
  html body.in-game #game .map-node-image::before{filter:blur(3.5px)!important;opacity:.93!important}
  html body.in-game #game .map-node-image::after{filter:blur(3.5px)!important;opacity:.91!important}
  html body.in-game #game .map-node-image img{width:132%!important;height:128%!important;transform:translate(-13.0%,-11.8%) scale(1.15)!important}
}

/* ========================================================================
   v2026.09.06.12 — 外海行動集中管理
   ======================================================================== */
html body.in-game #game .special-ops-panel{padding-bottom:18px!important}
html body.in-game #game .special-ops-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid var(--ti-line)}
html body.in-game #game .special-ops-head h2{margin:2px 0 5px!important}
html body.in-game #game .special-ops-head p{margin:0;color:var(--ti-text-soft)}
html body.in-game #game .special-ops-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:14px 18px 4px}
html body.in-game #game .special-ops-summary>div{display:flex;flex-direction:column;gap:4px;min-width:0;padding:13px 14px;border:1px solid var(--ti-line);border-radius:14px;background:rgba(7,37,48,.72)}
html body.in-game #game .special-ops-summary>div.attention{border-color:rgba(226,151,91,.68);background:rgba(67,39,27,.55)}
html body.in-game #game .special-ops-summary span{color:var(--ti-text-soft)}
html body.in-game #game .special-ops-summary b{font-size:28px;color:#e9fbfb}
html body.in-game #game .special-ops-summary small{color:#86abb2}
html body.in-game #game .special-ops-section{margin:16px 18px 0;padding-top:14px;border-top:1px solid var(--ti-line)}
html body.in-game #game .special-ops-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:10px}
html body.in-game #game .special-ops-section-head h3{margin:0 0 3px!important}
html body.in-game #game .special-ops-section-head span{color:var(--ti-text-soft)}
html body.in-game #game .special-ops-section-head>b{flex:0 0 auto;padding:5px 10px;border:1px solid var(--ti-line);border-radius:999px;background:rgba(8,46,58,.7)}
html body.in-game #game .special-ops-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html body.in-game #game .special-op-card{display:flex;flex-direction:column;gap:11px;min-width:0;padding:14px;border:1px solid var(--ti-line);border-radius:16px;background:linear-gradient(180deg,rgba(8,47,59,.83),rgba(5,31,42,.83));box-shadow:0 8px 22px rgba(0,0,0,.14)}
html body.in-game #game .special-op-card.boss{border-color:rgba(109,142,198,.42)}
html body.in-game #game .special-op-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
html body.in-game #game .special-op-card-head>div{min-width:0}
html body.in-game #game .special-op-kicker{display:block;color:#80aeb6;margin-bottom:2px}
html body.in-game #game .special-op-card-head h3{margin:0 0 3px!important;overflow-wrap:anywhere}
html body.in-game #game .special-op-card-head small{display:block;color:#88aeb5}
html body.in-game #game .special-op-status{flex:0 0 auto;padding:4px 9px;border:1px solid rgba(114,191,186,.38);border-radius:999px;background:rgba(17,80,82,.45);color:#b9eee4;white-space:nowrap}
html body.in-game #game .special-op-status.complete{border-color:rgba(105,202,159,.48);color:#bff0d4}
html body.in-game #game .special-op-status.attention{border-color:rgba(235,163,92,.62);background:rgba(91,50,25,.52);color:#ffd0a0}
html body.in-game #game .special-op-status.returning{color:#b9dce8}
html body.in-game #game .special-op-stat-row{display:flex;flex-wrap:wrap;gap:8px}
html body.in-game #game .special-op-stat-row>span{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid rgba(115,176,184,.18);border-radius:10px;background:rgba(3,28,39,.5);min-width:0}
html body.in-game #game .special-op-stat-row>span:last-child{flex:1 1 220px}
html body.in-game #game .special-op-timing{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding:9px 10px;border-radius:11px;background:rgba(4,29,39,.7);border:1px solid rgba(119,177,184,.16)}
html body.in-game #game .special-op-timing.danger{border-color:rgba(213,132,100,.36)}
html body.in-game #game .special-op-timing.attention{border-color:rgba(235,163,92,.54);background:rgba(71,42,25,.44)}
html body.in-game #game .special-op-timing.complete{border-color:rgba(104,195,155,.30)}
html body.in-game #game .special-op-timing small{grid-column:1/-1;color:#8fb2b8}
html body.in-game #game .special-op-unit-group{display:flex;flex-direction:column;gap:6px}
html body.in-game #game .special-op-unit-group>b{color:#a8c9ce}
html body.in-game #game .special-op-unit-list{display:flex;flex-wrap:wrap;gap:7px}
html body.in-game #game .special-op-unit-chip{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:100%;padding:5px 8px;border:1px solid rgba(115,176,184,.18);border-radius:10px;background:rgba(2,25,35,.56)}
html body.in-game #game .special-op-unit-chip img{width:38px;height:38px;object-fit:contain;flex:0 0 38px}
html body.in-game #game .special-op-unit-chip>span{display:flex;flex-direction:column;min-width:0}
html body.in-game #game .special-op-unit-chip>span>b{color:#dff7f4}
html body.in-game #game .special-op-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:4px}
html body.in-game #game .special-op-actions button{min-width:0}
html body.in-game #game .special-op-boss-intel{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid rgba(105,137,190,.24);border-radius:12px;background:rgba(7,28,48,.52)}
html body.in-game #game .special-op-boss-intel>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}
html body.in-game #game .special-ops-fleet-list{display:flex;flex-direction:column;gap:8px}
html body.in-game #game .special-op-fleet-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--ti-line);border-radius:12px;background:rgba(5,35,46,.72)}
html body.in-game #game .special-op-fleet-row>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
html body.in-game #game .special-op-fleet-row>div:first-child>span{color:#7faab2}
html body.in-game #game .special-op-fleet-row small{color:#86aab2;overflow-wrap:anywhere}
html body.in-game #game .special-op-fleet-time{display:flex;flex-direction:column;text-align:right;white-space:nowrap}
html body.in-game #game .special-op-fleet-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
@media(max-width:1120px){
  html body.in-game #game .special-ops-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  html body.in-game #game .special-ops-grid{grid-template-columns:1fr}
  html body.in-game #game .special-op-fleet-row{grid-template-columns:minmax(0,1fr) auto}
  html body.in-game #game .special-op-fleet-actions{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:760px){
  html body.in-game #game .special-ops-head{align-items:stretch;flex-direction:column;padding:12px!important}
  html body.in-game #game .special-ops-head>button{width:100%}
  html body.in-game #game .special-ops-summary{grid-template-columns:1fr 1fr;padding:10px 12px 2px;gap:7px}
  html body.in-game #game .special-ops-summary>div{padding:9px 10px}
  html body.in-game #game .special-ops-summary b{font-size:22px!important}
  html body.in-game #game .special-ops-section{margin:12px 12px 0}
  html body.in-game #game .special-ops-section-head{align-items:flex-start}
  html body.in-game #game .special-op-card{padding:11px}
  html body.in-game #game .special-op-card-head{gap:7px}
  html body.in-game #game .special-op-timing{grid-template-columns:1fr auto}
  html body.in-game #game .special-op-timing>span{grid-column:1/-1}
  html body.in-game #game .special-op-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  html body.in-game #game .special-op-actions button{width:100%}
  html body.in-game #game .special-op-fleet-row{grid-template-columns:1fr;gap:7px}
  html body.in-game #game .special-op-fleet-time{text-align:left}
  html body.in-game #game .special-op-fleet-actions{grid-column:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  html body.in-game #game .special-op-fleet-actions button{width:100%;min-width:0}
}


/* ========================================================================
   v2026.09.06.13 — 外海行動入口歸入海域圖
   - 主功能列不再另佔一格；正式一般入口移到「海域圖 → 外海特殊區域」。
   - 桌面放在區段標題右側；手機／窄平板自然換到下一行並維持完整觸控寬度。
   ======================================================================== */
html body.in-game #game .special-zones-head .special-ops-entry-btn{
  flex:0 0 auto!important;
  align-self:flex-end!important;
  min-height:42px!important;
  padding:7px 16px!important;
  white-space:nowrap!important;
  font-weight:800!important;
}
@media(max-width:760px){
  html body.in-game #game .special-zones-head .special-ops-entry-btn{
    width:100%!important;
    align-self:stretch!important;
    min-height:40px!important;
  }
}


/* ========================================================================
   v2026.09.07.04 — 導覽箭頭與頂端動能入口
   - 「其他」Chevron 固定貼齊按鈕最右側，不再卡在文字旁。
   - 我的島嶼：上一島顯示「‹ 上一島」，下一島顯示「下一島 ›」。
   - 頂端動能卡可點擊前往資源總覽。
   ======================================================================== */
html body.in-game #game .sidebar .nav-other-toggle{
  position:relative!important;
  grid-template-columns:32px minmax(0,1fr)!important;
  padding-right:46px!important;
}
html body.in-game #game .sidebar .nav-other-toggle .nav-other-chevron{
  position:absolute!important;
  right:14px!important;
  top:50%!important;
  margin:0!important;
  transform:translateY(-50%)!important;
}
html body.in-game #game .sidebar .nav-other-toggle.expanded .nav-other-chevron{
  transform:translateY(-50%) rotate(180deg)!important;
}

/* 上一島箭頭在左；下一島箭頭在右。後置規則避免舊 ::before 造成「>下一島」。 */
html body.in-game #game .rightbar #islandPrevBtn::before{
  content:'‹'!important;
}
html body.in-game #game .rightbar #islandPrevBtn::after{
  content:none!important;
  display:none!important;
}
html body.in-game #game .rightbar #islandNextBtn::before{
  content:none!important;
  display:none!important;
}
html body.in-game #game .rightbar #islandNextBtn::after{
  content:'›'!important;
  display:inline-block!important;
  width:auto!important;
  height:auto!important;
  background:none!important;
  background-image:none!important;
  font-size:27px!important;
  line-height:1!important;
  vertical-align:-1px!important;
}
@media(min-width:1101px){
  html body.in-game #game .rightbar #islandPrevBtn::before{margin-right:6px!important}
  html body.in-game #game .rightbar #islandNextBtn::after{margin-left:6px!important}
}
@media(max-width:1100px){
  html body.in-game #game .rightbar #islandPrevBtn::before,
  html body.in-game #game .rightbar #islandNextBtn::after{margin:0!important}
}
@media(max-width:620px){
  html body.in-game #game .sidebar .nav-other-toggle{grid-template-columns:23px minmax(0,1fr)!important;padding-right:36px!important}
  html body.in-game #game .sidebar .nav-other-toggle .nav-other-chevron{right:10px!important}
  html body.in-game #game .rightbar #islandNextBtn::after{font-size:26px!important}
}

html body.in-game #game .resource-cell.energy-cell.resource-nav-link{
  cursor:pointer!important;
  transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease!important;
}
html body.in-game #game .resource-cell.energy-cell.resource-nav-link:hover{
  border-color:rgba(101,216,200,.72)!important;
  box-shadow:inset 0 0 0 1px rgba(101,216,200,.18),0 5px 18px rgba(0,0,0,.16)!important;
}
html body.in-game #game .resource-cell.energy-cell.resource-nav-link:focus-visible{
  outline:2px solid rgba(112,220,215,.92)!important;
  outline-offset:2px!important;
}
html body.in-game #game .resource-cell.energy-cell.resource-nav-link:active{
  transform:translateY(1px)!important;
}


/* v2026.09.07.05 — 迷霧海島 Lv / 未佔領刷新資訊 */
html body.in-game #game .mist-rules-line,
html body.in-game #game .mist-refresh-line{
  display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;
  margin-top:10px!important;padding:9px 12px!important;border:1px solid rgba(115,194,203,.22)!important;
  border-radius:12px!important;background:rgba(3,35,47,.42)!important;
}
html body.in-game #game .mist-rules-line>b,
html body.in-game #game .mist-refresh-line>b{color:#d9f5f1!important;font-weight:800!important}
html body.in-game #game .mist-rules-line>span,
html body.in-game #game .mist-refresh-line>span{color:#8fc6ce!important;font-weight:700!important}
html body.in-game #game .mist-refresh-line>small{flex-basis:100%!important;color:var(--ti-text-soft)!important}
html body.in-game #game .mist-refresh-line.locked{border-color:rgba(221,186,105,.32)!important;background:rgba(70,53,20,.28)!important}
@media(max-width:760px){
  html body.in-game #game .mist-rules-line,
  html body.in-game #game .mist-refresh-line{padding:8px 10px!important;gap:6px 8px!important}
}

html body.in-game #game .mist-rules-line,html body.in-game #game .mist-rules-line *,html body.in-game #game .mist-refresh-line,html body.in-game #game .mist-refresh-line *{font-size:20px!important;line-height:1.35!important}
@media(max-width:760px){html body.in-game #game .mist-rules-line,html body.in-game #game .mist-rules-line *,html body.in-game #game .mist-refresh-line,html body.in-game #game .mist-refresh-line *{font-size:14px!important}}
html body.in-game #game .mist-rules-line,
html body.in-game #game .mist-rules-line *,
html body.in-game #game .mist-refresh-line,
html body.in-game #game .mist-refresh-line *{font-size:20px!important;line-height:1.35!important}
@media(max-width:760px){
  html body.in-game #game .mist-rules-line,
  html body.in-game #game .mist-rules-line *,
  html body.in-game #game .mist-refresh-line,
  html body.in-game #game .mist-refresh-line *{font-size:14px!important}
}

/* v2026.09.08.01 虛擬玩家設定 */
.settings-check-option,.admin-check-option{display:flex!important;align-items:flex-start!important;gap:12px!important;cursor:pointer}.settings-check-option{margin-top:18px;padding:16px;border:1px solid var(--line,#d8dee8);border-radius:12px}.settings-check-option input,.admin-check-option input{width:22px!important;height:22px!important;min-width:22px!important;margin:2px 0 0!important;accent-color:currentColor}.settings-check-option span{display:flex;flex-direction:column;gap:5px}.settings-check-option small{display:block}.virtual-player-admin-form .admin-check-option{min-height:44px;justify-content:flex-start}.gal-social-state.virtual{white-space:nowrap}

.market-virtual-badge{display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border:1px solid currentColor;border-radius:999px;font-size:.82em;line-height:1.35;white-space:nowrap;opacity:.82}


/* v2026.09.08.02 — 虛擬勢力、好感度、聯盟外交 */
.virtual-relation-name{font-weight:900!important;text-shadow:0 1px 1px rgba(0,0,0,.22)}
.virtual-relation-red{color:#ff686d!important}
.virtual-relation-orange{color:#f4a641!important}
.virtual-relation-white{color:#f4f7fb!important}
.virtual-relation-green{color:#62d88b!important}
.friend-player-name{color:#63d7ff!important;font-weight:900!important;text-shadow:0 1px 1px rgba(0,0,0,.22)}
.enemy-alliance-player-name{color:#ff686d!important;font-weight:900!important}
.gal-social-state.virtual{border:1px solid currentColor!important;border-radius:999px!important;padding:4px 9px!important;font-weight:800!important;background:rgba(0,0,0,.12)!important}
.virtual-player-profile{display:grid!important;gap:14px!important}
.virtual-player-profile .virtual-profile-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;flex-wrap:wrap!important;padding:14px 16px!important;border:1px solid rgba(124,190,196,.28)!important;border-radius:14px!important;background:rgba(3,35,47,.36)!important}
.virtual-player-profile .virtual-profile-head h3{margin:0 0 6px!important}
.virtual-player-profile .virtual-profile-head p{margin:0!important;color:var(--ti-text-soft,#a9bcc3)!important}
.virtual-player-profile .virtual-profile-meta{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
.virtual-player-profile .virtual-profile-meta>div{padding:12px!important;border:1px solid rgba(124,190,196,.2)!important;border-radius:12px!important;background:rgba(3,35,47,.25)!important}
.virtual-player-profile .virtual-profile-meta small{display:block!important;color:var(--ti-text-soft,#a9bcc3)!important;margin-bottom:4px!important}
.virtual-player-profile .virtual-profile-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important}
.virtual-player-profile .virtual-gift-row{display:grid!important;grid-template-columns:minmax(130px,1fr) minmax(120px,1fr) auto!important;gap:8px!important;align-items:end!important}
.virtual-player-profile .virtual-gift-preview{display:flex!important;font-size:20px!important;align-items:center!important;min-height:38px!important;margin-top:-4px!important;padding:8px 12px!important;border:1px solid rgba(124,190,196,.24)!important;border-radius:10px!important;background:rgba(3,35,47,.28)!important;font-weight:800!important;color:#8fe6bd!important}
.virtual-player-profile .virtual-gift-preview.is-max{color:var(--ti-text-soft,#a9bcc3)!important}
.virtual-search-result{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:11px 12px!important;margin-top:8px!important;border:1px solid rgba(124,190,196,.24)!important;border-radius:12px!important;background:rgba(3,35,47,.28)!important;text-align:left!important;cursor:pointer!important}
.virtual-search-result:hover{border-color:rgba(124,220,204,.65)!important;background:rgba(7,54,65,.48)!important}
.virtual-search-result span{font-weight:700!important;opacity:.92!important}
.leaderboard-kind-tabs{display:flex!important;gap:8px!important;flex-wrap:wrap!important;margin-top:12px!important}
.leaderboard-kind-tabs button{border:1px solid rgba(124,190,196,.32)!important;border-radius:999px!important;padding:7px 14px!important;background:rgba(3,35,47,.28)!important;font-weight:800!important}
.leaderboard-kind-tabs button.active{background:rgba(69,145,151,.38)!important;border-color:rgba(118,220,208,.72)!important}
.alliance-diplomacy-card{margin-top:18px!important;padding:16px!important;border:1px solid rgba(124,190,196,.24)!important;border-radius:14px!important;background:rgba(3,35,47,.24)!important}
.alliance-diplomacy-head h3{margin:0 0 7px!important}
.alliance-diplomacy-head p{margin:0 0 12px!important;color:var(--ti-text-soft,#a9bcc3)!important}
.alliance-diplomacy-search{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;margin:10px 0!important}
.alliance-diplomacy-search input{flex:1 1 260px!important;min-width:0!important}
@media(max-width:760px){
  .virtual-player-profile .virtual-profile-meta{grid-template-columns:1fr!important}
  .virtual-player-profile .virtual-gift-row{grid-template-columns:1fr!important}
  .virtual-player-profile .virtual-gift-preview{font-size:14px!important}
  .virtual-search-result{align-items:flex-start!important;flex-direction:column!important}
  .alliance-diplomacy-search{align-items:stretch!important}
  .alliance-diplomacy-search button{width:100%!important}
}

/* ========================================================================
   v2026.09.08.09 — 新增功能 Tablet / Mobile 響應式收尾
   目的：虛擬玩家、好友／盟友、私下交易、排行榜與協同攻防在窄畫面
         維持一致間距、完整按鈕文字與可操作尺寸；不變更任何遊戲規則。
   ======================================================================== */
body.in-game #game :is(.virtual-player-profile,.alliance-diplomacy-card,.virtual-friend-section,.market-page,.leaderboard-panel){box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
body.in-game #game :is(.virtual-player-profile,.alliance-diplomacy-card) :is(button,input,select,textarea){box-sizing:border-box!important;max-width:100%!important}

/* 虛擬玩家互動：補齊實際 app.js 使用的 stats / section 類別。 */
body.in-game #game .virtual-profile-stats{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:var(--ti-gap-sm)!important;
}
body.in-game #game .virtual-profile-stats>span{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-height:62px!important;
  padding:9px 11px!important;
  border:1px solid rgba(124,190,196,.20)!important;
  border-radius:10px!important;
  background:rgba(3,35,47,.25)!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
}
body.in-game #game .virtual-profile-stats>span>b{margin-top:3px!important;word-break:keep-all!important;overflow-wrap:normal!important}
body.in-game #game .virtual-profile-section{
  display:grid!important;
  gap:var(--ti-gap-sm)!important;
  padding:12px!important;
  border:1px solid rgba(124,190,196,.20)!important;
  border-radius:12px!important;
  background:rgba(3,35,47,.22)!important;
}
body.in-game #game .virtual-profile-section>h3{margin:0!important}
body.in-game #game .virtual-profile-section>small,
body.in-game #game .virtual-relocate-note{display:block!important;line-height:1.55!important;overflow-wrap:break-word!important;word-break:normal!important}
body.in-game #game .virtual-relocate-note{margin-top:-4px!important;padding:0 2px!important}
body.in-game #game .virtual-player-profile .virtual-profile-actions{align-items:stretch!important}
body.in-game #game .virtual-player-profile .virtual-profile-actions>button{flex:1 1 180px!important;min-width:0!important}

/* 好友頁新增的虛擬玩家搜尋與列項。 */
body.in-game #game .virtual-friend-search{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:var(--ti-gap-sm)!important;
  padding:9px!important;
  border-bottom:1px solid rgba(120,166,183,.11)!important;
}
body.in-game #game .virtual-friend-search input{width:100%!important;min-width:0!important}
body.in-game #game .friend-direct-actions{display:flex!important;gap:6px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
body.in-game #game .friends-overview{grid-template-columns:repeat(4,minmax(0,1fr))!important}

/* 市場頁籤預設可換行；手機不使用只有半個按鈕可見的橫向頁籤列。 */
body.in-game #game .market-tabs{align-items:stretch!important}
body.in-game #game .market-tabs>button{min-width:0!important;word-break:keep-all!important;overflow-wrap:normal!important}
body.in-game #game .market-note{display:grid!important;gap:5px!important;line-height:1.55!important}
body.in-game #game .market-note>b{display:block!important}
body.in-game #game .market-note>span{display:block!important;overflow-wrap:break-word!important;word-break:normal!important}
body.in-game #game .market-check-head>*{min-width:0!important}
body.in-game #game .market-quick>button{min-width:0!important;max-width:100%!important}

/* 聯盟外交表格保留自己的水平捲動，不讓操作按鈕被拆成單字。 */
body.in-game #game .alliance-diplomacy-card>.table-scroll{margin-top:10px!important}
body.in-game #game .alliance-diplomacy-card>.table-scroll>.table{min-width:690px!important}
body.in-game #game .alliance-diplomacy-card>.table-scroll td:last-child{white-space:nowrap!important}
body.in-game #game .alliance-diplomacy-card>.table-scroll td:last-child>button{white-space:nowrap!important;word-break:keep-all!important}
body.in-game #game 
/* 協同攻擊邀請：checkbox 固定寬度，長名稱使用完整文字區，不壓成直排。 */
body.in-game #game .joint-attack-member-check{
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr)!important;
  align-items:start!important;
  gap:8px!important;
  min-width:0!important;
}
body.in-game #game .joint-attack-member-check>input{width:20px!important;height:20px!important;min-width:20px!important;margin:1px 0 0!important}
body.in-game #game .joint-attack-member-check>span{min-width:0!important;word-break:normal!important;overflow-wrap:break-word!important}

/* 設定頁 checkbox 文字永遠取得剩餘寬度。 */
body.in-game #game .settings-check-option{box-sizing:border-box!important;width:100%!important;max-width:100%!important}
body.in-game #game .settings-check-option>span{flex:1 1 auto!important;min-width:0!important}
body.in-game #game .settings-check-option>span>*{word-break:normal!important;overflow-wrap:break-word!important}

@media (min-width:621px) and (max-width:1100px){
  body.in-game #game .friends-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game #game .market-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  body.in-game #game .market-tabs>button{width:100%!important;min-height:46px!important;padding:8px 10px!important}
  body.in-game #game .virtual-player-profile .virtual-profile-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.in-game #game .virtual-player-profile .virtual-profile-actions>button{width:100%!important;min-height:46px!important}
  body.in-game #game .virtual-player-profile .virtual-gift-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;gap:8px!important}
  body.in-game #game .leaderboard-kind-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.in-game #game .leaderboard-kind-tabs>button{width:100%!important}
}

@media (max-width:620px){
  /* 新功能共同間距。 */
  body.in-game #game :is(.virtual-player-profile,.alliance-diplomacy-card){gap:8px!important}
  body.in-game #game .alliance-diplomacy-card{margin-top:10px!important;padding:10px!important;border-radius:11px!important}

  /* 市場頁籤改 2 欄網格，完全取消窄畫面橫捲頁籤。 */
  body.in-game #game .market-tabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    width:100%!important;
    overflow:visible!important;
    white-space:normal!important;
    margin-bottom:10px!important;
  }
  body.in-game #game .market-tabs>button{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    padding:7px 6px!important;
    margin:0!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    text-align:center!important;
  }
  body.in-game #game .market-card{padding:10px!important;margin-bottom:10px!important;border-radius:11px!important}
  body.in-game #game .market-form{grid-template-columns:1fr!important;gap:7px!important;margin-top:9px!important;padding:0!important}
  body.in-game #game .market-form>label{width:100%!important}
  body.in-game #game .market-form>.big-action{grid-column:auto!important;width:100%!important}
  body.in-game #game .market-check{padding:10px!important;border-radius:10px!important}
  body.in-game #game .market-check-head{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;align-items:start!important}
  body.in-game #game .market-range{grid-template-columns:1fr!important;gap:6px!important;margin-top:7px!important}
  body.in-game #game .market-range>span{padding:7px 8px!important}
  body.in-game #game .market-quick{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin-top:8px!important}
  body.in-game #game .market-quick>button{width:100%!important;min-height:42px!important;padding:6px 7px!important}

  /* 虛擬玩家互動 Modal：標頭、統計、操作皆不互擠。 */
  body.in-game #game .virtual-player-profile{gap:8px!important}
  body.in-game #game .virtual-player-profile .virtual-profile-head{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:5px!important;padding:10px!important}
  body.in-game #game .virtual-player-profile .virtual-profile-head>strong{justify-self:start!important}
  body.in-game #game .virtual-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game #game .virtual-profile-stats>span{min-height:54px!important;padding:7px 8px!important}
  body.in-game #game .virtual-profile-stats>span:last-child:nth-child(odd){grid-column:1/-1!important}
  body.in-game #game .virtual-profile-section{padding:9px!important;gap:7px!important}
  body.in-game #game .virtual-player-profile .virtual-gift-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game #game .virtual-player-profile .virtual-gift-row>button{grid-column:1/-1!important;width:100%!important}
  body.in-game #game .virtual-player-profile .virtual-profile-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game #game .virtual-player-profile .virtual-profile-actions>button{width:100%!important;min-height:44px!important;padding:7px 7px!important}
  body.in-game #game .virtual-player-profile .virtual-profile-actions>.danger-act{grid-column:1/-1!important}

  /* 好友：虛擬搜尋不擠壓；虛擬好友動作固定落到下一列。 */
  body.in-game #game .friends-overview{grid-template-columns:1fr!important;gap:6px!important}
  body.in-game #game .virtual-friend-search{grid-template-columns:1fr!important;padding:7px!important;gap:6px!important}
  body.in-game #game .virtual-friend-search>button{width:100%!important}
  body.in-game #game .virtual-friend-section .friend-person{grid-template-columns:36px minmax(0,1fr) auto!important;gap:6px!important}
  body.in-game #game .virtual-friend-section .friend-person>[data-virtual-profile]{grid-column:2/4!important;width:100%!important;justify-self:stretch!important}
  body.in-game #game .friend-direct-actions{grid-column:2/4!important;width:100%!important;justify-content:flex-start!important}
  body.in-game #game .friend-direct-actions>button{flex:1 1 110px!important}

  /* 聯盟外交搜尋。 */
  body.in-game #game .alliance-diplomacy-search{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;margin:8px 0!important}
  body.in-game #game .alliance-diplomacy-search>button{width:100%!important}
  /* 排行榜種類固定兩格，不形成半個頁籤。表格維持容器內水平捲動。 */
  body.in-game #game .leaderboard-kind-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin-top:8px!important}
  body.in-game #game .leaderboard-kind-tabs>button{width:100%!important;min-height:42px!important;padding:6px 7px!important}
  body.in-game #game .leaderboard-table-scroll{max-width:100%!important;overflow-x:auto!important}

  /* 協同攻防 Modal。 */
  body.in-game #game .joint-attack-create-form{gap:7px!important}
  body.in-game #game .joint-attack-create-form>h3{margin:8px 0 2px!important}
  body.in-game #game .joint-attack-member-check{padding:8px!important}
  body.in-game #game .joint-attack-create-form>.big-action{width:100%!important;margin-top:3px!important}

  /* 設定與管理參數。 */
  body.in-game #game .settings-check-option{margin-top:10px!important;padding:10px!important;gap:9px!important;border-radius:10px!important}
  body.in-game #game .settings-check-option input{width:20px!important;height:20px!important;min-width:20px!important}
  body.in-game #game .settings-actions{margin-top:10px!important}
  body.in-game #game .settings-actions>button{width:100%!important}
  body.in-game #game .virtual-player-admin-box{padding:10px!important;margin:8px!important}
  body.in-game #game .virtual-player-admin-box .admin-speed-big{font-size:18px!important;line-height:1.3!important;overflow-wrap:normal!important;word-break:keep-all!important}
  body.in-game #game .virtual-player-admin-form{gap:7px!important;padding:0!important}
  body.in-game #game .virtual-player-admin-form .admin-check-option{width:100%!important;min-height:42px!important;padding:7px 0!important}
}

@media(max-width:380px){
  body.in-game #game .virtual-player-profile .virtual-profile-actions{grid-template-columns:1fr!important}
  body.in-game #game .virtual-player-profile .virtual-profile-actions>.danger-act{grid-column:auto!important}
  body.in-game #game .market-quick{grid-template-columns:1fr!important}
  body.in-game #game .virtual-friend-section .friend-person{grid-template-columns:34px minmax(0,1fr)!important}
  body.in-game #game .virtual-friend-section .friend-person .relationship-badge{grid-column:2!important;justify-self:start!important}
  body.in-game #game .virtual-friend-section .friend-person>[data-virtual-profile]{grid-column:2!important}
}

/* v2026.09.08.09 — market tabs must override the older global horizontal-tab contract. */
@media (min-width:621px) and (max-width:1100px){
  html body.in-game #game .market-tabs{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    padding:0!important;
    overflow:visible!important;
    flex-wrap:wrap!important;
    scroll-snap-type:none!important;
  }
  html body.in-game #game .market-tabs>button{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    flex:none!important;
  }
}
@media (max-width:620px){
  html body.in-game #game .market-tabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:0!important;
    overflow:visible!important;
    flex-wrap:wrap!important;
    scroll-snap-type:none!important;
  }
  html body.in-game #game .market-tabs>button{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    min-height:44px!important;
    padding:7px 6px!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    flex:none!important;
  }
}

/* v2026.09.08.09 — tablet friend cards and private-trade action alignment. */
@media (min-width:621px) and (max-width:1100px){
  html body.in-game #game .market-form>.big-action{grid-column:1/-1!important;width:100%!important}
  html body.in-game #game .friend-person{
    grid-template-columns:36px minmax(0,1fr) auto!important;
    gap:7px!important;
    align-items:center!important;
  }
  html body.in-game #game .friend-person-main>b{
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
    line-height:1.3!important;
  }
  html body.in-game #game .friend-direct-actions,
  html body.in-game #game .friend-request-actions,
  html body.in-game #game .virtual-friend-section .friend-person>[data-virtual-profile],
  html body.in-game #game .friend-person.compact>.danger-act{
    grid-column:2/4!important;
    width:100%!important;
    justify-self:stretch!important;
  }
  html body.in-game #game .friend-direct-actions{justify-content:flex-start!important}
  html body.in-game #game .friend-direct-actions>button{flex:1 1 110px!important}
  html body.in-game #game .virtual-friend-section .friend-person>[data-virtual-profile]{min-height:42px!important}
}

/* =========================================================================
   v2026.09.08.10 — 按鈕對比與瀏覽器預設樣式防呆
   ========================================================================= */
/* 遊戲內文字是淺色系，因此沒有專屬樣式的原生 button 必須避免落回白色 UA 背景。 */
body.in-game button{color-scheme:dark}

/* 少數文字型操作原先只定義排版，補上完整 default / hover / focus / disabled 對比。 */
body.in-game :is(
  .pause-banner>button.pause-allowed,
  .support-reply-box>div>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .admin-support-filter>button,
  .admin-email-compose>button,
  .history-filter>button,
  .admin-activity-actions>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .alliance-text-editor>button
){
  border:1px solid #456d7d!important;
  background:linear-gradient(180deg,#24556a,#173847)!important;
  color:#eaf6f9!important;
  border-radius:6px!important;
  min-height:44px;
  padding:8px 13px;
  font-weight:700;
  text-shadow:none!important;
  box-shadow:none;
}
body.in-game :is(
  .pause-banner>button.pause-allowed,
  .support-reply-box>div>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .admin-support-filter>button,
  .admin-email-compose>button,
  .history-filter>button,
  .admin-activity-actions>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .alliance-text-editor>button
):hover:not(:disabled),
body.in-game :is(
  .pause-banner>button.pause-allowed,
  .support-reply-box>div>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .admin-support-filter>button,
  .admin-email-compose>button,
  .history-filter>button,
  .admin-activity-actions>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .alliance-text-editor>button
):focus-visible:not(:disabled){
  border-color:#6aa5b5!important;
  background:linear-gradient(180deg,#2d667d,#1b4353)!important;
  color:#fff!important;
}
body.in-game :is(
  .pause-banner>button.pause-allowed,
  .support-reply-box>div>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .admin-support-filter>button,
  .admin-email-compose>button,
  .history-filter>button,
  .admin-activity-actions>button:not(.soft-btn):not(.danger-act):not(.danger-soft-btn),
  .alliance-text-editor>button
):disabled{
  border-color:#2d434b!important;
  background:linear-gradient(180deg,#182a31,#101b20)!important;
  color:#71868f!important;
  opacity:.72;
  cursor:not-allowed;
}

/* 客服清單本身是 button，不能依賴瀏覽器的白色預設背景。 */
body.in-game .support-ticket-row,
body.in-game .admin-support-row{
  border:1px solid rgba(117,205,209,.32)!important;
  background:linear-gradient(180deg,rgba(14,52,63,.96),rgba(8,35,44,.96))!important;
  color:#dceff2!important;
  box-shadow:none!important;
}
body.in-game .support-ticket-row:hover,
body.in-game .admin-support-row:hover,
body.in-game .support-ticket-row:focus-visible,
body.in-game .admin-support-row:focus-visible{
  border-color:rgba(117,205,209,.62)!important;
  background:linear-gradient(180deg,rgba(24,76,89,.98),rgba(11,48,59,.98))!important;
  color:#fff!important;
}
body.in-game .support-ticket-row.selected{
  border-color:rgba(121,210,221,.78)!important;
  background:linear-gradient(180deg,rgba(25,82,94,.98),rgba(12,54,64,.98))!important;
  color:#fff!important;
}

/* 公開戰報分享頁也統一明確按鈕對比，避免瀏覽器／系統主題造成淺底淺字。 */
.share-battle-body button{
  color-scheme:dark;
}
.share-battle-body .share-controls button{
  border:1px solid #456d7d;
  background:linear-gradient(180deg,#24556a,#173847);
  color:#eaf6f9;
  border-radius:6px;
  min-height:42px;
  padding:7px 12px;
  font-weight:700;
}
.share-battle-body .share-controls button:hover,
.share-battle-body .share-controls button:focus-visible{
  border-color:#6aa5b5;
  background:linear-gradient(180deg,#2d667d,#1b4353);
  color:#fff;
}


/* v2026.09.09.02：登入狀態確認前只顯示啟動畫面，避免 F5 時登入頁短暫閃現。 */
.boot-shell{min-height:100vh;display:grid;place-items:center;padding:24px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 25%,rgba(21,58,77,.6) 0,rgba(7,17,24,.82) 42%,#020608 78%)}
.boot-card{width:min(430px,92vw);display:grid;justify-items:center;gap:18px;padding:30px 28px;border:1px solid #41606e;border-radius:12px;background:linear-gradient(#0e202b,#071118);box-shadow:0 28px 90px #000c,inset 0 1px #ffffff12;text-align:center}
.boot-card>.auth-brand{justify-self:center}.boot-card>#bootStatus{font-size:20px;color:#c0d7e0;line-height:1.55}.boot-card>#bootRetryBtn{min-width:150px}
.boot-loader{display:flex;gap:8px;align-items:center;height:22px}.boot-loader span{width:8px;height:8px;border-radius:50%;background:currentColor;color:#78b6ca;animation:bootPulse 1.15s ease-in-out infinite}.boot-loader span:nth-child(2){animation-delay:.14s}.boot-loader span:nth-child(3){animation-delay:.28s}
@keyframes bootPulse{0%,70%,100%{opacity:.32;transform:translateY(0)}35%{opacity:1;transform:translateY(-5px)}}
@media(prefers-reduced-motion:reduce){.boot-loader span{animation:none;opacity:.72}}
@media(max-width:620px){.boot-shell{padding:10px}.boot-card{width:min(430px,calc(100vw - 20px));padding:24px 18px}.boot-card>#bootStatus{font-size:16px}}

/* ========================================================================
   v2026.09.09.06 — 全站底部操作安全空間
   主內容真正結束後固定保留 40px 可捲動空白，避免桌面版事件／聊天浮動入口
   遮住頁面最後一列的取消、返回、儲存等操作。這是純 CSS，不新增 JS 或 Server 請求。
   ======================================================================== */
body.in-game #content::after{
  content:"";
  display:block;
  width:100%;
  height:40px;
  min-height:40px;
  clear:both;
  pointer-events:none;
  user-select:none;
}



/* ========================================================================
   v2026.09.10.01 — 情報中心內距一致性
   情報中心沿用全站 --ti-panel-x / --ti-panel-y / --ti-card-pad；
   修正先前 selector 誤指 message-center-panel，造成情報內容未套用共用內距。
   純 CSS，不新增 JavaScript、polling 或 Server 請求。
   ======================================================================== */

/* v2026.09.10.02：所有紅色刪除／危險操作按鈕與同區一般按鈕共用圓角矩形外形。 */
body.in-game #game :is(.danger-act,.danger-action,.danger-soft-btn,.unit-scrap-btn,.queue-cancel-btn,.unit-queue-cancel-btn,.admin-ban-btn,.demolish-btn,.table-manage-btn){
  border-radius:5px!important;
}



/* v2026.09.10.04：群島菁英協作院。只做響應式版面，不新增任何前端輪詢。 */
.governance-elite-panel{display:grid;gap:16px}
.governance-elite-bonus{min-width:220px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);display:flex;flex-direction:column;gap:3px;align-items:flex-end;text-align:right}
.governance-elite-bonus small,.governance-elite-bonus span{opacity:.78}
.governance-elite-bonus b{font-size:1.35em}
.governance-elite-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.governance-elite-count{border:1px solid var(--line);border-radius:10px;padding:14px;display:grid;gap:5px;background:var(--panel2)}
.governance-elite-count span{font-weight:700}.governance-elite-count b{font-size:1.15em}.governance-elite-count small{opacity:.78}
.governance-elite-transfer{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.governance-elite-transfer-head{display:grid;gap:6px}
.governance-elite-transfer-head h4{margin:0;color:var(--cyan2)}
.governance-elite-transfer-head p{margin:0;line-height:1.6;color:var(--text)}
.governance-elite-transfer-field{display:grid;gap:6px;max-width:720px;padding:10px 12px;border:1px solid rgba(106,171,190,.18);border-radius:10px;background:rgba(5,27,34,.36)}
.governance-elite-transfer-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:720px}
.governance-elite-transfer-counts label{display:grid;gap:6px}
.governance-elite-transfer input,.governance-elite-transfer select{width:100%}
.governance-elite-transfer-capacity{margin:0;max-width:720px}
.governance-elite-transfer-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.governance-animal-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* v2026.09.24.08：島政頁直接顯示群島菁英協作院建築圖；點擊後前往「設施 → 島政」並定位正式建築。 */
body.in-game .governance-elite-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(220px,auto);align-items:center;gap:18px!important}
body.in-game .governance-elite-title{min-width:0}
body.in-game .governance-elite-building-jump{width:118px;min-width:118px;padding:7px 8px 8px!important;border:1px solid rgba(114,210,226,.34)!important;border-radius:12px!important;background:rgba(5,29,38,.72)!important;display:grid!important;justify-items:center;gap:5px;cursor:pointer;box-shadow:0 7px 22px rgba(0,0,0,.16);transition:transform .16s ease,border-color .16s ease,background .16s ease}
body.in-game .governance-elite-building-jump:hover,body.in-game .governance-elite-building-jump:focus-visible{transform:translateY(-2px);border-color:rgba(121,233,247,.72)!important;background:rgba(11,50,62,.9)!important;outline:none}
body.in-game .governance-elite-building-jump img{display:block;width:92px;height:72px;object-fit:contain;filter:drop-shadow(0 5px 7px rgba(0,0,0,.28));pointer-events:none}
body.in-game .governance-elite-building-jump span{font-weight:800;font-size:16px;line-height:1.1;white-space:nowrap;color:var(--cyan2);pointer-events:none}
@media (max-width:1024px){body.in-game .governance-elite-head{grid-template-columns:minmax(0,1fr) auto}.governance-elite-bonus{grid-column:1/-1;width:100%}.governance-elite-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.governance-elite-summary>*:last-child{grid-column:1/-1}}
@media (max-width:620px){body.in-game .governance-elite-head{grid-template-columns:minmax(0,1fr) 86px!important;align-items:start}body.in-game .governance-elite-building-jump{width:82px;min-width:82px;padding:5px!important}body.in-game .governance-elite-building-jump img{width:70px;height:56px}body.in-game .governance-elite-building-jump span{font-size:12px}.governance-elite-summary,.governance-elite-transfer-counts{grid-template-columns:1fr}.governance-elite-summary>*:last-child{grid-column:auto}.governance-elite-bonus{min-width:0;width:100%;align-items:flex-start;text-align:left}.governance-elite-transfer{padding:14px}.governance-elite-transfer-field{max-width:none}}


/* ========================================================================
   v2026.09.10.05 — 定位與筆記 / 排行榜主島定位
   純互動版面；筆記只在玩家主動進入、儲存或刪除時存取。
   ======================================================================== */
body.in-game .score-player-home-link{
  display:inline-block;min-width:0;max-width:100%;padding:0;border:0;background:transparent;color:inherit;
  font:inherit;font-weight:900;line-height:inherit;text-align:left;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;
}
body.in-game .score-player-home-link:hover,
body.in-game .score-player-home-link:focus-visible{text-decoration:underline;text-underline-offset:3px;outline:none}
body.in-game .leaderboard-podium-copy :is(b,.score-player-home-link){color:#edf8fa;font-size:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.in-game .score-player-cell :is(b,.score-player-home-link){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e6f4f7}
body.in-game .map-notes-panel{display:grid;gap:var(--ti-section-gap,18px)}
body.in-game .map-notes-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
body.in-game .map-notes-head>div{min-width:0;flex:1 1 420px}
body.in-game .map-notes-head h2{margin:2px 0 6px}
body.in-game .map-notes-head p{margin:0;opacity:.82}
body.in-game .map-note-editor{display:grid;gap:14px;padding:var(--ti-card-pad,16px);border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
body.in-game .map-note-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.in-game .map-note-editor label{display:grid;gap:6px;font-weight:700;min-width:0}
body.in-game .map-note-editor :is(input,select,textarea){width:100%;min-width:0}
body.in-game .map-note-note-field textarea{resize:vertical;min-height:104px;line-height:1.55}
body.in-game .map-note-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
body.in-game .map-notes-section-head{display:flex;justify-content:space-between;gap:12px;align-items:end;border-top:1px solid var(--line);padding-top:16px}
body.in-game .map-notes-section-head h3{margin:0 0 4px}
body.in-game .map-notes-section-head span{opacity:.76}
body.in-game .map-note-list{display:grid;gap:12px}
body.in-game .map-note-card{display:grid;gap:12px;padding:var(--ti-card-pad,16px);border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
body.in-game .map-note-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
body.in-game .map-note-card-head>div:first-child{display:grid;gap:4px;min-width:0}
body.in-game .map-note-card-head b{overflow-wrap:anywhere}
body.in-game .map-note-coordinate-link{
  display:inline;
  width:auto;
  max-width:100%;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#f4fbfd;
  font:inherit;
  font-weight:900;
  line-height:1.45;
  text-align:left;
  cursor:pointer;
  overflow-wrap:anywhere;
}
body.in-game .map-note-coordinate-link:hover,
body.in-game .map-note-coordinate-link:focus-visible{
  color:#fff;
  text-decoration:underline;
  text-underline-offset:3px;
  outline:none;
}
body.in-game .map-note-card-head span{opacity:.7}
body.in-game .map-note-card-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
body.in-game .map-note-text{white-space:normal;overflow-wrap:anywhere;line-height:1.65}
@media(max-width:768px){
  body.in-game .map-note-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .map-note-form-grid label:last-child{grid-column:1/-1}
  body.in-game .map-note-card-head{display:grid}
  body.in-game .map-note-card-actions{justify-content:flex-start}
}
@media(max-width:430px){
  body.in-game .map-note-form-grid{grid-template-columns:1fr}
  body.in-game .map-note-form-grid label:last-child{grid-column:auto}
  body.in-game .map-note-card-actions>*{flex:1 1 calc(50% - 8px)}
}

/* ========================================================================
   v2026.09.10.09 — 海域航圖定位筆記 + 定位與筆記 RWD/內距整理
   純版面與玩家主動操作；不新增 polling、timer 或自動背景 request。
   ======================================================================== */
body.in-game .map-notes-panel{
  display:grid!important;
  gap:var(--ti-section-gap,18px)!important;
  padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px)!important;
}
body.in-game .map-notes-panel>.map-notes-head,
body.in-game .map-notes-panel>.map-note-editor,
body.in-game .map-notes-panel>.map-notes-section-head,
body.in-game .map-notes-panel>#mapNotesList{min-width:0}
body.in-game .map-notes-head{margin:0!important}
body.in-game .map-note-editor,
body.in-game .map-note-card{padding:var(--ti-card-pad,14px)!important}
body.in-game .map-notes-section-head{padding-top:var(--ti-section-gap,18px)!important}
body.in-game .map-note-list{gap:var(--ti-gap,12px)!important}
body.in-game .map-note-card-head{gap:var(--ti-gap,12px)!important}
body.in-game .map-note-card-actions,
body.in-game .map-note-actions{gap:var(--ti-gap-sm,8px)!important}

body.in-game .map-inline-note{
  min-width:0;
  display:grid;
  gap:12px;
  padding:var(--ti-card-pad,14px);
  border:1px solid rgba(89,151,166,.36);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(9,33,42,.96),rgba(6,25,33,.96));
}
body.in-game .map-selection-panel>.map-inline-note{margin-top:2px}
body.in-game .special-zone-detail-panel>.map-inline-note{margin-top:12px}
body.in-game .map-inline-note-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
body.in-game .map-inline-note-head>div{display:grid;gap:3px;min-width:0}
body.in-game .map-inline-note-head b{font-weight:900}
body.in-game .map-inline-note-head span{opacity:.72}
body.in-game .map-inline-note-text{
  padding:10px 12px;
  border:1px solid rgba(82,139,152,.26);
  border-radius:8px;
  background:rgba(3,18,24,.54);
  line-height:1.6;
  overflow-wrap:anywhere;
}
body.in-game .map-inline-note-empty{opacity:.76;line-height:1.55}
body.in-game .map-inline-note-editor{display:grid;gap:10px;min-width:0}
body.in-game .map-inline-note-editor.hidden{display:none!important}
body.in-game .map-inline-note-editor label{display:grid;gap:6px;font-weight:700;min-width:0}
body.in-game .map-inline-note-editor textarea{
  width:100%;
  min-width:0;
  min-height:92px;
  resize:vertical;
  line-height:1.55;
}
body.in-game .map-inline-note-actions,
body.in-game .map-inline-note-editor-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  min-width:0;
}
body.in-game .map-inline-note-actions.is-empty{grid-template-columns:1fr}
body.in-game .map-inline-note-actions.hidden{display:none!important}
body.in-game .map-inline-note-actions>button,
body.in-game .map-inline-note-editor-actions>button{width:100%;min-width:0}
body.in-game .map-inline-note-all{white-space:nowrap}

@media(max-width:834px){
  body.in-game .map-notes-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important}
  body.in-game .map-note-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .map-note-form-grid label:last-child{grid-column:1/-1!important}
  body.in-game .map-note-card-head{display:grid!important;grid-template-columns:1fr!important}
  body.in-game .map-note-card-actions{justify-content:flex-start!important}
}
@media(max-width:620px){
  body.in-game .map-notes-panel{padding:var(--ti-panel-y,13px) var(--ti-panel-x,14px)!important}
  body.in-game .map-notes-head{grid-template-columns:1fr!important}
  body.in-game .map-notes-head>#mapNotesUseCurrent,
  body.in-game .map-notes-head>.soft-btn{width:100%}
  body.in-game .map-note-form-grid{grid-template-columns:1fr!important}
  body.in-game .map-note-form-grid label:last-child{grid-column:auto!important}
  body.in-game .map-note-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  body.in-game .map-note-actions>button{width:100%;min-width:0}
  body.in-game .map-note-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  body.in-game .map-note-card-actions>button{width:100%;min-width:0}
  body.in-game .map-inline-note-head{display:grid;grid-template-columns:1fr}
  body.in-game .map-inline-note-all{width:100%}
}
@media(max-width:430px){
  body.in-game .map-note-actions,
  body.in-game .map-note-card-actions,
  body.in-game .map-inline-note-actions,
  body.in-game .map-inline-note-editor-actions{grid-template-columns:1fr!important}
  body.in-game .map-note-editor,
  body.in-game .map-note-card,
  body.in-game .map-inline-note{padding:var(--ti-card-pad,10px)!important}
}

/* =========================================================================
   v2026.09.10.14 — 海洋整備／海防成本辨識與航隊歷史內距
   ========================================================================= */
/* 海洋單位、魚群、海防與動能設施的成本使用正式資源／物品圖片。
   僅改玩家辨識方式，不變更任何實際成本或 Server 扣款規則。 */
body.in-game .unit-cost-grid,
body.in-game .unit-order-costs{
  align-items:stretch!important;
}
body.in-game .unit-cost-chip{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  min-height:52px!important;
  padding:7px 10px!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
body.in-game .unit-cost-chip .unit-cost-icon{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  flex:0 0 30px!important;
  object-fit:contain!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
body.in-game .unit-cost-chip>b{
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  color:inherit!important;
  font-weight:700!important;
  line-height:1.25!important;
  white-space:normal!important;
}
body.in-game .unit-cost-chip>strong{
  margin-left:auto!important;
  padding-left:5px!important;
  color:inherit!important;
  font-weight:800!important;
  line-height:1.25!important;
  white-space:nowrap!important;
}
body.in-game .unit-cost-chip.unit-special-cost{
  color:#d9c58a!important;
  border-color:rgba(205,176,111,.34)!important;
  background:rgba(49,39,16,.34)!important;
}
body.in-game .unit-order-preview{
  display:grid!important;
  gap:8px!important;
}
body.in-game .unit-order-preview-status,
body.in-game .unit-order-preview-title,
body.in-game .unit-order-combat-total,
body.in-game .unit-order-zero-cost{
  line-height:1.45!important;
}
body.in-game .unit-order-preview-title{font-weight:700!important}
body.in-game .unit-order-costs{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  margin:0!important;
}
body.in-game #helpModalBody .help-cost .unit-cost-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}

/* 航隊航行紀錄與其他 Panel 共用相同的內容邊界；表格只在自身容器橫向捲動。 */
body.in-game #fleetHistoryBody{
  box-sizing:border-box!important;
  display:grid!important;
  gap:12px!important;
  min-width:0!important;
  padding:var(--ti-panel-y,16px) var(--ti-panel-x,18px) calc(var(--ti-panel-y,16px) + 2px)!important;
}
body.in-game #fleetHistoryBody>.history-filter{
  box-sizing:border-box!important;
  margin:0!important;
  padding:12px!important;
  border:1px solid var(--ti-line-soft,#203e49)!important;
  border-radius:var(--ti-radius,7px)!important;
  background:rgba(7,27,35,.72)!important;
}
body.in-game #fleetHistoryBody>.history-filter label{min-width:0!important}
body.in-game #fleetHistoryBody>.history-filter input{max-width:100%!important}
body.in-game #fleetHistoryBody>.history-filter>span{
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
body.in-game #fleetHistoryBody>.fleet-history-scroll{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
}
body.in-game #fleetHistoryBody>.empty-state,
body.in-game #fleetHistoryBody>.loading-line{margin:0!important}

@media(max-width:700px){
  body.in-game .unit-cost-chip{
    gap:6px!important;
    min-height:44px!important;
    padding:6px 7px!important;
  }
  body.in-game .unit-cost-chip .unit-cost-icon{
    width:24px!important;
    height:24px!important;
    min-width:24px!important;
    flex-basis:24px!important;
  }
  body.in-game .unit-cost-chip>b,
  body.in-game .unit-cost-chip>strong{font-size:12px!important}
  body.in-game .unit-order-costs,
  body.in-game #helpModalBody .help-cost .unit-cost-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
  }
  body.in-game #fleetHistoryBody{
    gap:8px!important;
    padding:9px var(--ti-panel-x,11px) 11px!important;
  }
  body.in-game #fleetHistoryBody>.history-filter{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:end!important;
    gap:6px!important;
    padding:8px!important;
  }
  body.in-game #fleetHistoryBody>.history-filter>label{width:100%!important}
  body.in-game #fleetHistoryBody>.history-filter>label input{width:100%!important;box-sizing:border-box!important}
  body.in-game #fleetHistoryBody>.history-filter>span{grid-column:1/-1!important}
}
@media(max-width:460px){
  body.in-game .catalog-costs.unit-cost-grid,
  body.in-game .unit-order-costs,
  body.in-game #helpModalBody .help-cost .unit-cost-grid{
    grid-template-columns:1fr!important;
  }
  body.in-game #fleetHistoryBody>.history-filter{grid-template-columns:1fr!important}
  body.in-game #fleetHistoryBody>.history-filter>button{width:100%!important}
  body.in-game #fleetHistoryBody>.history-filter>span{grid-column:auto!important}
}


/* =========================================================================
   v2026.09.10.15 — 航圖筆記精簡、通知層級與筆記視窗
   ========================================================================= */
/* Toast 必須永遠位於操作遮罩／說明視窗／戰鬥視窗上方。
   只調整顯示層級，不攔截滑鼠事件。 */
html body #toast{z-index:20000!important;border-radius:8px!important}

/* 海域航圖只保留最小筆記操作列，不顯示狀態卡、全文或 textarea，避免把航圖詳細欄撐高。 */
body.in-game .map-inline-note{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:wrap!important;
  gap:6px!important;padding:6px 0 0!important;margin-top:6px!important;
  border:0!important;background:transparent!important;min-width:0!important;
}
body.in-game .map-inline-note>button{width:auto!important;min-width:0!important;white-space:nowrap!important}
body.in-game .map-note-modal-editor{display:grid;gap:12px;min-width:0}
body.in-game .map-note-modal-coordinate{padding:8px 10px;border:1px solid rgba(86,145,158,.3);border-radius:8px;background:rgba(4,24,31,.65);color:#e7f5fa;font-weight:800}
body.in-game .map-note-modal-editor label{display:grid;gap:7px;min-width:0;font-weight:800}
body.in-game .map-note-modal-editor textarea{width:100%;min-width:0;min-height:150px;resize:vertical;line-height:1.55}
body.in-game .map-note-modal-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
@media(max-width:620px){
  body.in-game .map-inline-note{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  body.in-game .map-inline-note>button{width:100%!important}
  body.in-game .map-note-modal-actions{display:grid;grid-template-columns:1fr 1fr}
  body.in-game .map-note-modal-actions>button{width:100%}
}
@media(max-width:390px){
  body.in-game .map-note-modal-actions{grid-template-columns:1fr}
}


/* =========================================================================
   v2026.09.10.16 — 戰鬥大數顯示與聊天關閉按鈕
   ========================================================================= */
/* 戰鬥中的「數值」固定單行；名稱仍可正常換行。搭配 fmtBattle() 的百萬級以上萬／億／兆…縮寫，
   即使後期數量很大也不會把中央統計、左右單位列或戰果列撐爆。 */
html body.in-game .battle-unit>div{min-width:0!important}
html body.in-game .battle-unit>div>span,
html body.in-game .battle-unit>div>em,
html body.in-game .battle-stat-grid b,
html body.in-game .battle-unit-count,
html body.in-game .battle-outcome-side>header>strong,
html body.in-game .battle-outcome-total>b,
html body.in-game .battle-result-count span,
html body.in-game .battle-resource-loss-grid strong,
html body.in-game .battle-defense-recovery-row>span>b,
html body.in-game .battle-defense-recovery-totals b{
  min-width:0!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  font-variant-numeric:tabular-nums!important;
}
html body.in-game .battle-stat-grid>div{min-width:0!important}
html body.in-game .battle-result-count{min-width:0!important;flex-wrap:nowrap!important}
html body.in-game .battle-resource-loss-grid span{min-width:0!important}
html body.in-game .battle-resource-loss-grid strong{justify-self:start!important}
html body.in-game .battle-economy-card{min-width:0!important}
html body.in-game .battle-economy-card>b{min-width:0!important;max-width:100%!important}

/* 聊天關閉按鈕沿用共用白色叉叉，不再額外套用圖片。 */
html body.in-game #chatCloseBtn{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  padding:0!important;
  font-size:28px!important;
  font-weight:700!important;
  line-height:1!important;
  color:#ffffff!important;
  background-color:#0a2832!important;
  background-image:none!important;
}
html body.in-game #chatCloseBtn:hover{
  background-color:#103743!important;
  background-image:none!important;
}
@media(max-width:620px){
  html body.in-game #chatCloseBtn{width:48px!important;min-width:48px!important;height:48px!important;font-size:30px!important}
  html body.in-game .battle-result-count{gap:5px!important}
}


/* ========================================================================
   v2026.09.11.02 — 深海霸主風險分支闖關
   已通過關卡亮起；下一關同時預覽穩定／高壓魚群與追加補給。
   ======================================================================== */
body.in-game .boss-stage-chip{position:relative;align-content:center;min-height:82px;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
body.in-game .boss-stage-chip em{font-size:20px;font-style:normal;color:#8eabb2;line-height:1.2}
body.in-game .boss-stage-chip.cleared{border-color:rgba(75,220,166,.62);background:linear-gradient(180deg,rgba(17,94,72,.88),rgba(7,55,51,.90));box-shadow:inset 0 0 0 1px rgba(99,235,185,.10)}
body.in-game .boss-stage-chip.cleared b{color:#dcfff2}
body.in-game .boss-stage-chip.cleared em{color:#78e7bc}
body.in-game .boss-stage-chip.next{border-color:rgba(241,199,82,.72);background:linear-gradient(180deg,rgba(92,70,18,.88),rgba(58,43,10,.90));box-shadow:0 0 0 2px rgba(241,199,82,.12),0 0 18px rgba(241,199,82,.10)}
body.in-game .boss-stage-chip.next b{color:#ffe49a}
body.in-game .boss-stage-chip.next em{color:#e8c863}
body.in-game .boss-stage-chip.failed{border-color:rgba(211,93,93,.6);background:rgba(81,27,31,.78)}
body.in-game .boss-stage-chip.future{opacity:.62}
body.in-game .boss-branch-choice-wrap{display:grid;gap:10px;padding:12px;border:1px solid rgba(109,171,184,.28);border-radius:12px;background:rgba(2,24,31,.60)}
body.in-game .boss-branch-choice-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
body.in-game .boss-branch-choice-head>b,body.in-game .boss-branch-choice-head>span{font-size:20px}
body.in-game .boss-branch-choice-head>span{color:#a9c2c8}
body.in-game .boss-branch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
body.in-game .boss-branch-card{display:flex;flex-direction:column;gap:10px;min-width:0;padding:12px;border:1px solid rgba(120,178,187,.30);border-radius:12px;background:linear-gradient(180deg,rgba(7,45,53,.86),rgba(4,28,35,.90))}
body.in-game .boss-branch-card.pressure{border-color:rgba(223,174,70,.48);background:linear-gradient(180deg,rgba(74,51,14,.52),rgba(35,28,14,.86))}
body.in-game .boss-branch-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
body.in-game .boss-branch-card-head>div{display:grid;gap:2px}
body.in-game .boss-branch-card-head span,body.in-game .boss-branch-card-head b,body.in-game .boss-branch-card-head strong{font-size:20px}
body.in-game .boss-branch-card-head>div>span{color:#8fb5bc}
body.in-game .boss-branch-card.pressure .boss-branch-card-head>div>span{color:#e0bd68}
body.in-game .boss-branch-card-head>strong{white-space:nowrap;color:#e8f2f3}
body.in-game .boss-branch-card-head>strong em{font-style:normal;color:#f0c568}
body.in-game .boss-branch-preview-title,body.in-game .boss-branch-reward-title{display:flex;justify-content:space-between;align-items:center;gap:8px}
body.in-game .boss-branch-preview-title b,body.in-game .boss-branch-preview-title small,body.in-game .boss-branch-reward-title b,body.in-game .boss-branch-reward-title span{font-size:20px}
body.in-game .boss-branch-preview-title small,body.in-game .boss-branch-reward-title span{color:#9eb9c0}
body.in-game .boss-branch-unit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
body.in-game .boss-branch-unit{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:7px;border:1px solid rgba(106,160,169,.20);border-radius:9px;background:rgba(5,33,40,.66)}
body.in-game .boss-branch-card.pressure .boss-branch-unit{background:rgba(49,37,13,.48);border-color:rgba(199,159,72,.22)}
body.in-game .boss-branch-unit img{width:72px;height:72px;object-fit:contain}
body.in-game .boss-branch-unit>div{display:grid;gap:3px;min-width:0}
body.in-game .boss-branch-unit b{font-size:20px;line-height:1.25;overflow-wrap:anywhere}
body.in-game .boss-branch-unit strong{font-size:22px;line-height:1.15;white-space:nowrap;color:#eaf5f5;overflow:hidden;text-overflow:ellipsis}
body.in-game .boss-branch-rewards{display:flex;flex-wrap:wrap;gap:8px}
body.in-game .boss-branch-final-reward{display:grid;gap:8px;padding:9px;border:1px solid rgba(232,196,88,.30);border-radius:10px;background:rgba(81,66,20,.20)}
body.in-game .boss-reward-pack{display:inline-flex;align-items:center;gap:8px;min-width:132px;padding:7px 9px;border:1px solid rgba(229,192,86,.34);border-radius:10px;background:rgba(72,55,13,.40)}
body.in-game .boss-reward-pack img{width:58px;height:58px;object-fit:contain;flex:0 0 58px}
body.in-game .boss-reward-pack>span{display:grid;gap:1px}
body.in-game .boss-reward-pack b,body.in-game .boss-reward-pack strong{font-size:20px;white-space:nowrap}
body.in-game .boss-reward-pack b{color:#f2d57a}.boss-reward-pack strong{color:#edf5f5}
body.in-game .boss-branch-no-reward{min-height:58px;display:flex;align-items:center;padding:9px 11px;border:1px dashed rgba(127,164,172,.28);border-radius:10px;color:#9db4ba;font-size:20px}
body.in-game .boss-branch-select{width:100%;margin-top:auto;min-height:46px}
html body.in-game #game .boss-branch-choice-wrap.compact{padding:9px;background:rgba(2,22,31,.54)}
html body.in-game #game .boss-branch-choice-wrap.compact .boss-branch-grid{grid-template-columns:1fr 1fr;gap:8px}
html body.in-game #game .boss-branch-card.compact{padding:9px;gap:7px}
html body.in-game #game .boss-branch-card.compact .boss-branch-unit-grid{grid-template-columns:1fr 1fr}
html body.in-game #game .boss-branch-card.compact .boss-branch-unit{grid-template-columns:42px minmax(0,1fr);padding:5px}
html body.in-game #game .boss-branch-card.compact .boss-branch-unit img{width:42px;height:42px}
html body.in-game #game .boss-branch-card.compact .boss-branch-unit b,html body.in-game #game .boss-branch-card.compact .boss-branch-unit strong{font-size:20px}
html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack{min-width:112px;padding:5px 7px}
html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack img{width:42px;height:42px;flex-basis:42px}
html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack b,html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack strong{font-size:20px}
@media(max-width:1100px){body.in-game .boss-branch-unit-grid{grid-template-columns:1fr}html body.in-game #game .boss-branch-card.compact .boss-branch-unit-grid{grid-template-columns:1fr}}
@media(max-width:760px){body.in-game .boss-branch-grid,html body.in-game #game .boss-branch-choice-wrap.compact .boss-branch-grid{grid-template-columns:1fr}body.in-game .boss-branch-card-head>strong{white-space:normal}}
@media(max-width:620px){body.in-game .boss-stage-chip em{font-size:12px}body.in-game .boss-branch-choice-head>b,body.in-game .boss-branch-choice-head>span,body.in-game .boss-branch-card-head span,body.in-game .boss-branch-card-head b,body.in-game .boss-branch-card-head strong,body.in-game .boss-branch-preview-title b,body.in-game .boss-branch-preview-title small,body.in-game .boss-branch-reward-title b,body.in-game .boss-branch-reward-title span,body.in-game .boss-branch-unit b,body.in-game .boss-reward-pack b,body.in-game .boss-reward-pack strong,body.in-game .boss-branch-no-reward{font-size:14px!important}body.in-game .boss-branch-unit strong{font-size:16px!important}body.in-game .boss-branch-unit{grid-template-columns:62px minmax(0,1fr)}body.in-game .boss-branch-unit img{width:62px;height:62px}body.in-game .boss-reward-pack img{width:50px;height:50px;flex-basis:50px}}

/* v2026.09.11.02：深海霸主分支預覽的次要科技資訊。魚群圖片與數量仍為主要視覺。 */
.boss-branch-research{display:flex;flex-wrap:wrap;gap:6px 10px;margin-top:8px}
.boss-branch-research span{font-size:20px;line-height:1.3;opacity:.82;white-space:nowrap}
@media (max-width:620px){.boss-branch-research{gap:4px 8px}.boss-branch-research span{font-size:12px}}

/* ========================================================================
   v2026.09.11.03 — 深海霸主分支 RWD + 危險／取消按鈕外觀統一
   1) 深海霸主 10 關進度、穩定／高壓分支、魚群預覽、補給箱預覽在桌面／平板／手機皆不得撐寬整頁。
   2) 紅色取消／刪除／拆除／拆解等危險按鈕全部沿用目前共用 5px 圓角按鈕骨架，不再出現扁平長方形舊樣式。
   純 CSS；不新增 polling、timer 或逐幀工作。
   ======================================================================== */

/* 危險操作按鈕：完整覆蓋舊 queue-cancel 28px 扁平樣式，與目前一般按鈕維持同一控制高度、內距與 5px 圓角。 */
html body.in-game #game :is(
  .danger-act,
  .danger-action,
  .danger-soft-btn,
  .unit-scrap-btn,
  .queue-cancel-btn,
  .unit-queue-cancel-btn,
  .admin-ban-btn,
  .demolish-btn,
  .table-manage-btn
){
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:var(--ti-control-h,44px)!important;
  height:auto!important;
  padding:8px 13px!important;
  border:1px solid #7a4b47!important;
  border-radius:5px!important;
  background:linear-gradient(180deg,#4a211f 0%,#351918 58%,#2d1514 100%)!important;
  color:#f1b0a8!important;
  font-weight:700!important;
  line-height:1.35!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  vertical-align:middle!important;
  cursor:pointer;
}
html body.in-game #game :is(
  .danger-act,
  .danger-action,
  .danger-soft-btn,
  .unit-scrap-btn,
  .queue-cancel-btn,
  .unit-queue-cancel-btn,
  .admin-ban-btn,
  .demolish-btn,
  .table-manage-btn
):hover:not(:disabled),
html body.in-game #game :is(
  .danger-act,
  .danger-action,
  .danger-soft-btn,
  .unit-scrap-btn,
  .queue-cancel-btn,
  .unit-queue-cancel-btn,
  .admin-ban-btn,
  .demolish-btn,
  .table-manage-btn
):focus-visible:not(:disabled){
  border-color:#a8655e!important;
  background:linear-gradient(180deg,#5b2926 0%,#421e1c 58%,#351817 100%)!important;
  color:#ffd2cc!important;
}
html body.in-game #game :is(
  .danger-act,
  .danger-action,
  .danger-soft-btn,
  .unit-scrap-btn,
  .queue-cancel-btn,
  .unit-queue-cancel-btn,
  .admin-ban-btn,
  .demolish-btn,
  .table-manage-btn
):disabled{
  opacity:.48!important;
  cursor:not-allowed!important;
}
/* queue 尾端維持靠右；手機既有全寬規則仍保留。 */
html body.in-game #game .queue-cancel-btn{margin-left:auto!important}
html body.in-game #game .unit-queue-cancel-btn{margin-top:6px!important}

/* 深海霸主整塊先建立防破版邊界。 */
html body.in-game #game :is(
  .boss-challenge-preview,
  .boss-stage-track,
  .boss-stage-chip,
  .boss-branch-choice-wrap,
  .boss-branch-grid,
  .boss-branch-card,
  .boss-branch-unit-grid,
  .boss-branch-unit,
  .boss-branch-rewards,
  .boss-reward-pack,
  .boss-completion-reward,
  .boss-enemy-intel,
  .boss-enemy-grid,
  .boss-enemy-card
){
  min-width:0!important;
  max-width:100%!important;
}
html body.in-game #game .boss-challenge-preview{overflow:hidden!important}
html body.in-game #game .boss-stage-track{
  overflow:visible!important;
  width:100%!important;
}
html body.in-game #game .boss-stage-chip{
  min-width:0!important;
  width:100%!important;
}
html body.in-game #game .boss-stage-chip :is(small,b,em){
  min-width:0!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html body.in-game #game .boss-branch-card-head,
html body.in-game #game .boss-branch-preview-title,
html body.in-game #game .boss-branch-reward-title,
html body.in-game #game .boss-branch-choice-head{
  min-width:0!important;
  max-width:100%!important;
}
html body.in-game #game .boss-branch-card-head>div,
html body.in-game #game .boss-branch-card-head>strong,
html body.in-game #game .boss-branch-preview-title>*,
html body.in-game #game .boss-branch-reward-title>*,
html body.in-game #game .boss-branch-choice-head>*{
  min-width:0!important;
  max-width:100%!important;
}
html body.in-game #game .boss-branch-card-head>strong{
  text-align:right!important;
  overflow-wrap:break-word!important;
}
html body.in-game #game .boss-branch-unit strong{
  max-width:100%!important;
  font-variant-numeric:tabular-nums!important;
}
html body.in-game #game .boss-reward-pack{
  flex:1 1 132px!important;
  min-width:0!important;
}
html body.in-game #game .boss-reward-pack>span{min-width:0!important}
html body.in-game #game .boss-reward-pack :is(b,strong){
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html body.in-game #game .boss-completion-reward>strong{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
}

/* 桌面：維持 10 關一列、兩條分支並排。 */
@media (min-width:1101px){
  html body.in-game #game .boss-stage-track{grid-template-columns:repeat(10,minmax(0,1fr))!important;gap:6px!important}
  html body.in-game #game .boss-branch-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* 平板橫向／一般平板：10 關改成 5×2，不用橫向捲動。 */
@media (max-width:1100px) and (min-width:835px){
  html body.in-game #game .boss-stage-track{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important}
  html body.in-game #game .boss-stage-chip{min-height:70px!important;padding:7px 5px!important}
  html body.in-game #game .boss-branch-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  html body.in-game #game .boss-branch-card{padding:10px!important;gap:8px!important}
  html body.in-game #game .boss-branch-unit-grid{grid-template-columns:1fr!important}
  html body.in-game #game .boss-branch-unit{grid-template-columns:58px minmax(0,1fr)!important;gap:7px!important;padding:6px!important}
  html body.in-game #game .boss-branch-unit img{width:58px!important;height:58px!important}
  html body.in-game #game .boss-reward-pack img{width:46px!important;height:46px!important;flex-basis:46px!important}
}

/* 834 / 768 類平板：兩條分支改成上下排列，魚群仍可兩欄看圖比較。 */
@media (max-width:834px) and (min-width:621px){
  html body.in-game #game .boss-challenge-preview{padding:11px!important;gap:10px!important}
  html body.in-game #game .boss-stage-track{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .boss-stage-chip{min-height:68px!important;padding:6px 4px!important}
  html body.in-game #game .boss-branch-grid,
  html body.in-game #game .boss-branch-choice-wrap.compact .boss-branch-grid{grid-template-columns:1fr!important;gap:9px!important}
  html body.in-game #game .boss-branch-card{padding:10px!important;gap:8px!important}
  html body.in-game #game .boss-branch-unit-grid,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.in-game #game .boss-branch-unit{grid-template-columns:58px minmax(0,1fr)!important;gap:7px!important;padding:6px!important}
  html body.in-game #game .boss-branch-unit img{width:58px!important;height:58px!important}
  html body.in-game #game .boss-branch-research span{white-space:normal!important}
  html body.in-game #game .boss-reward-pack{flex:1 1 150px!important}
}

/* 手機：5×2 關卡進度維持一眼看完整 10 關；分支上下排列。 */
@media (max-width:620px){
  html body.in-game #game .boss-challenge-preview{padding:8px!important;gap:8px!important;margin:8px 0!important;border-radius:9px!important}
  html body.in-game #game .boss-challenge-head{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}
  html body.in-game #game .boss-challenge-head>div{min-width:0!important;width:100%!important}
  html body.in-game #game .boss-challenge-head>strong{justify-self:start!important;text-align:left!important}
  html body.in-game #game .boss-stage-track{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;padding:0!important}
  html body.in-game #game .boss-stage-chip{min-height:62px!important;padding:5px 3px!important;border-radius:7px!important;gap:1px!important}
  html body.in-game #game .boss-stage-chip :is(small,b,em){font-size:12px!important;line-height:1.2!important;text-overflow:clip!important}

  html body.in-game #game .boss-branch-choice-wrap{padding:8px!important;gap:7px!important;border-radius:9px!important}
  html body.in-game #game .boss-branch-choice-head{display:grid!important;grid-template-columns:1fr!important;gap:3px!important}
  html body.in-game #game .boss-branch-grid,
  html body.in-game #game .boss-branch-choice-wrap.compact .boss-branch-grid{grid-template-columns:1fr!important;gap:8px!important}
  html body.in-game #game .boss-branch-card{padding:8px!important;gap:7px!important;border-radius:9px!important}
  html body.in-game #game .boss-branch-card-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:6px!important}
  html body.in-game #game .boss-branch-card-head>strong{font-size:13px!important;text-align:right!important;white-space:normal!important}
  html body.in-game #game .boss-branch-preview-title,
  html body.in-game #game .boss-branch-reward-title{gap:6px!important}
  html body.in-game #game .boss-branch-unit-grid,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .boss-branch-unit,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit{grid-template-columns:48px minmax(0,1fr)!important;gap:5px!important;padding:5px!important;border-radius:7px!important}
  html body.in-game #game .boss-branch-unit img,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit img{width:48px!important;height:48px!important}
  html body.in-game #game .boss-branch-unit b{font-size:12px!important;line-height:1.24!important;overflow-wrap:break-word!important}
  html body.in-game #game .boss-branch-unit strong{font-size:13px!important;line-height:1.2!important;white-space:nowrap!important}
  html body.in-game #game .boss-branch-research{display:grid!important;grid-template-columns:1fr!important;gap:2px!important;margin-top:3px!important}
  html body.in-game #game .boss-branch-research span{font-size:12px!important;white-space:normal!important}
  html body.in-game #game .boss-branch-rewards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
  html body.in-game #game .boss-reward-pack,
  html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;gap:5px!important;min-width:0!important;padding:5px!important;border-radius:7px!important}
  html body.in-game #game .boss-reward-pack img,
  html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack img{width:38px!important;height:38px!important;flex-basis:38px!important}
  html body.in-game #game .boss-reward-pack>span{gap:0!important}
  html body.in-game #game .boss-reward-pack :is(b,strong){font-size:12px!important;line-height:1.18!important;text-overflow:clip!important}
  html body.in-game #game .boss-branch-select{width:100%!important;min-height:42px!important;margin-top:1px!important}
  html body.in-game #game .boss-completion-reward{grid-template-columns:1fr!important;gap:4px!important;padding:9px!important}
  html body.in-game #game .boss-completion-reward>small{grid-column:auto!important}

  html body.in-game #game :is(.queue-cancel-btn,.unit-queue-cancel-btn){min-height:40px!important;padding:7px 11px!important}
}

/* 430px 以下：魚群改單欄，補給箱仍保留圖片 + 1M/100K/10K + 數量，避免中文魚名被擠成逐字換行。 */
@media (max-width:430px){
  html body.in-game #game .boss-branch-unit-grid,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit-grid{grid-template-columns:1fr!important}
  html body.in-game #game .boss-branch-unit,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit{grid-template-columns:52px minmax(0,1fr)!important}
  html body.in-game #game .boss-branch-unit img,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit img{width:52px!important;height:52px!important}
  html body.in-game #game .boss-branch-rewards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.in-game #game .boss-branch-card-head{grid-template-columns:1fr!important}
  html body.in-game #game .boss-branch-card-head>strong{justify-self:start!important;text-align:left!important}
}

/* 360 / 320px：維持五欄關卡但再縮內距，不讓第 10 關或 Lv 文字把卡片撐寬。 */
@media (max-width:360px){
  html body.in-game #game .boss-stage-track{gap:3px!important}
  html body.in-game #game .boss-stage-chip{min-height:58px!important;padding:4px 2px!important}
  html body.in-game #game .boss-stage-chip :is(small,b,em){font-size:12px!important;letter-spacing:-.15px!important}
  html body.in-game #game .boss-branch-choice-wrap{padding:6px!important}
  html body.in-game #game .boss-branch-card{padding:7px!important}
  html body.in-game #game .boss-reward-pack,
  html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack{grid-template-columns:34px minmax(0,1fr)!important;padding:4px!important}
  html body.in-game #game .boss-reward-pack img,
  html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack img{width:34px!important;height:34px!important;flex-basis:34px!important}
}

/* ========================================================================
   v2026.09.11.04 — 深海霸主／危險操作文字內距校正
   - 文字不得貼著卡片、魚群預覽、補給箱、關卡晶片或紅色操作按鈕邊框。
   - 仍維持 v11.03 的 1100/1024/834/768/620/430/390/360/320px 響應式與無整頁水平溢位規則。
   ======================================================================== */
html body.in-game #game .boss-challenge-preview{
  padding:16px!important;
  gap:13px!important;
}
html body.in-game #game .boss-stage-chip{
  padding:9px 7px!important;
}
html body.in-game #game .boss-branch-choice-wrap,
html body.in-game #game .boss-branch-choice-wrap.compact{
  padding:14px!important;
  gap:11px!important;
}
html body.in-game #game .boss-branch-card,
html body.in-game #game .boss-branch-card.compact{
  padding:14px!important;
  gap:10px!important;
}
html body.in-game #game .boss-branch-unit,
html body.in-game #game .boss-branch-card.compact .boss-branch-unit{
  padding:9px!important;
}
html body.in-game #game .boss-reward-pack,
html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack{
  padding:8px 10px!important;
}
html body.in-game #game .boss-branch-no-reward{
  padding:11px 13px!important;
}
html body.in-game #game .boss-completion-reward{
  padding:14px!important;
}
html body.in-game #game .special-op-boss-intel{
  padding:12px!important;
}
html body.in-game #game .special-op-unit-chip{
  padding:7px 10px!important;
}

/* 紅色危險／取消按鈕：保留 5px 圓角，同時確保文字和邊框之間有足夠呼吸空間。 */
html body.in-game #game :is(
  .danger-act,
  .danger-action,
  .danger-soft-btn,
  .unit-scrap-btn,
  .queue-cancel-btn,
  .unit-queue-cancel-btn,
  .admin-ban-btn,
  .demolish-btn,
  .table-manage-btn
){
  padding:9px 14px!important;
  line-height:1.4!important;
}

@media (max-width:1100px) and (min-width:835px){
  html body.in-game #game .boss-challenge-preview{padding:14px!important;gap:11px!important}
  html body.in-game #game .boss-stage-chip{padding:8px 6px!important}
  html body.in-game #game .boss-branch-choice-wrap,
  html body.in-game #game .boss-branch-choice-wrap.compact{padding:12px!important;gap:9px!important}
  html body.in-game #game .boss-branch-card,
  html body.in-game #game .boss-branch-card.compact{padding:12px!important;gap:9px!important}
  html body.in-game #game .boss-branch-unit,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit{padding:8px!important}
}

@media (max-width:834px) and (min-width:621px){
  html body.in-game #game .boss-challenge-preview{padding:13px!important;gap:11px!important}
  html body.in-game #game .boss-stage-chip{padding:7px 6px!important}
  html body.in-game #game .boss-branch-choice-wrap,
  html body.in-game #game .boss-branch-choice-wrap.compact{padding:11px!important;gap:9px!important}
  html body.in-game #game .boss-branch-card,
  html body.in-game #game .boss-branch-card.compact{padding:11px!important;gap:9px!important}
  html body.in-game #game .boss-branch-unit,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit{padding:7px!important}
}

@media (max-width:620px){
  html body.in-game #game .boss-challenge-preview{padding:10px!important;gap:9px!important;margin:9px 0!important}
  html body.in-game #game .boss-stage-chip{padding:6px 4px!important}
  html body.in-game #game .boss-branch-choice-wrap,
  html body.in-game #game .boss-branch-choice-wrap.compact{padding:10px!important;gap:8px!important}
  html body.in-game #game .boss-branch-card,
  html body.in-game #game .boss-branch-card.compact{padding:10px!important;gap:8px!important}
  html body.in-game #game .boss-branch-unit,
  html body.in-game #game .boss-branch-card.compact .boss-branch-unit{padding:7px!important}
  html body.in-game #game .boss-reward-pack,
  html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack{padding:6px!important}
  html body.in-game #game .boss-branch-no-reward{padding:10px 11px!important}
  html body.in-game #game .boss-completion-reward{padding:11px!important}
  html body.in-game #game .special-op-boss-intel{padding:11px!important}
  html body.in-game #game .special-op-unit-chip{padding:6px 9px!important}
  html body.in-game #game :is(.danger-act,.danger-action,.danger-soft-btn,.unit-scrap-btn,.queue-cancel-btn,.unit-queue-cancel-btn,.admin-ban-btn,.demolish-btn,.table-manage-btn){padding:8px 12px!important}
}

@media (max-width:360px){
  html body.in-game #game .boss-challenge-preview{padding:9px!important}
  html body.in-game #game .boss-stage-chip{padding:5px 3px!important}
  html body.in-game #game .boss-branch-choice-wrap,
  html body.in-game #game .boss-branch-choice-wrap.compact{padding:8px!important}
  html body.in-game #game .boss-branch-card,
  html body.in-game #game .boss-branch-card.compact{padding:9px!important}
  html body.in-game #game .boss-reward-pack,
  html body.in-game #game .boss-branch-rewards.compact .boss-reward-pack{padding:5px!important}
}


/* v2026.09.11.05 — 資源完整數值：短格式維持版面，完整數字可在 tooltip／資源總覽查看。 */
body.in-game .resource-hover-tooltip{
  white-space:pre-line!important;
  overflow-wrap:anywhere!important;
  min-width:min(300px,calc(100vw - 16px));
  max-width:min(430px,calc(100vw - 16px));
  line-height:1.45!important;
}
body.in-game .resource-capacity-values .resource-exact-value{
  display:block;
  margin-top:4px;
  color:#8fb0ba;
  font-size:16px;
  line-height:1.35;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
  scrollbar-width:thin;
}
@media(max-width:620px){
  body.in-game .resource-hover-tooltip{font-size:16px!important;padding:9px 11px!important;}
  body.in-game .resource-capacity-values .resource-exact-value{font-size:14px;}
}
@media(max-width:430px){
  body.in-game .resource-capacity-values .resource-exact-value{font-size:13px;}
}


/* v2026.09.11.09：特殊航區殘骸提醒。以短句顯示，桌面維持 20px，手機不低於 12px。 */
body.in-game .special-zone-debris-note{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:10px 0;
  padding:10px 12px;
  border:1px solid rgba(214,177,105,.34);
  border-radius:9px;
  background:rgba(72,54,24,.22);
  min-width:0;
  max-width:100%;
}
body.in-game .special-zone-debris-note>b{
  flex:0 0 auto;
  font-size:20px;
  line-height:1.45;
  color:#f0d49d;
  white-space:nowrap;
}
body.in-game .special-zone-debris-note>span{
  min-width:0;
  font-size:20px;
  line-height:1.45;
  color:#c4d5d9;
  overflow-wrap:break-word;
}
@media (max-width:620px){
  body.in-game .special-zone-debris-note{
    display:grid;
    grid-template-columns:1fr;
    gap:3px;
    margin:8px 0;
    padding:9px 10px;
  }
  body.in-game .special-zone-debris-note>b,
  body.in-game .special-zone-debris-note>span{
    font-size:13px;
    white-space:normal;
  }
}

/* v2026.09.11.16：公開市場支援分批成交；魚骨以 1:X 單價顯示。 */
body.in-game #game .market-partial-table{min-width:980px!important}
body.in-game #game .market-unit-rate{display:block;white-space:nowrap;color:var(--cyan2);font-variant-numeric:tabular-nums}
body.in-game #game .market-fishbone-unit{border-color:rgba(232,199,111,.32)!important;background:rgba(232,199,111,.07)!important}
body.in-game #game .market-buy-box{display:grid;gap:7px;min-width:260px;max-width:360px}
body.in-game #game .market-buy-box>label{display:grid;grid-template-columns:auto minmax(90px,1fr);gap:7px;align-items:center;min-width:0}
body.in-game #game .market-buy-box input{width:100%!important;min-width:90px!important;max-width:180px!important;text-align:right;font-variant-numeric:tabular-nums}
body.in-game #game .market-buy-box>small{display:block;line-height:1.4;color:var(--muted);white-space:normal;overflow-wrap:break-word}
body.in-game #game .market-buy-box>small.bad{color:var(--red)}
body.in-game #game .market-buy-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
body.in-game #game .market-buy-actions>button{width:100%;min-height:42px;white-space:nowrap}
@media(max-width:620px){
  body.in-game #game .market-partial-table{min-width:920px!important}
  body.in-game #game .market-buy-box{min-width:230px;max-width:300px;gap:6px}
  body.in-game #game .market-buy-box>label{grid-template-columns:1fr;gap:4px}
  body.in-game #game .market-buy-box input{max-width:100%!important;min-height:42px!important;font-size:13px!important}
  body.in-game #game .market-buy-box>small,body.in-game #game .market-unit-rate{font-size:13px!important}
  body.in-game #game .market-buy-actions>button{font-size:13px!important;min-height:42px!important;padding:6px 8px!important}
}

/* v2026.09.11.17 — 玩家交易市場重整：以資源圖片為主、單一「確認交易」流程，公開掛單改為響應式卡片。 */
body.in-game #game .market-value-guide{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  padding:16px!important;
}
body.in-game #game .market-value-guide-intro{display:grid!important;gap:4px!important;min-width:0!important}
body.in-game #game .market-value-guide-intro>b{font-size:22px!important;color:var(--cyan2)!important}
body.in-game #game .market-value-guide-intro>span,body.in-game #game .market-value-guide>small{font-size:20px!important;line-height:1.5!important;color:var(--muted)!important;overflow-wrap:break-word!important}
body.in-game #game .market-value-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important}
body.in-game #game .market-value-chip{display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;align-items:center!important;justify-items:start!important;gap:9px!important;min-width:0!important;padding:10px 12px!important}
body.in-game #game .market-value-chip>img{width:48px!important;height:48px!important;object-fit:contain!important;display:block!important}
body.in-game #game .market-value-chip>span{font-size:20px!important;color:var(--text)!important;min-width:0!important;white-space:nowrap!important}
body.in-game #game .market-value-chip>b{font-size:22px!important;justify-self:end!important}

body.in-game #game .market-create-visual-card{padding:18px!important}
body.in-game #game .market-create-visual{display:grid!important;grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)!important;gap:14px!important;align-items:stretch!important;margin-top:14px!important}
body.in-game #game .market-create-side{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px!important;padding:14px!important;border:1px solid rgba(79,134,147,.55)!important;border-radius:14px!important;background:rgba(5,29,36,.76)!important;min-width:0!important}
body.in-game #game .market-create-side.offer{border-color:rgba(72,147,124,.58)!important}
body.in-game #game .market-create-side.want{border-color:rgba(70,131,163,.62)!important}
body.in-game #game .market-create-resource-hero{grid-column:1/-1!important;display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;gap:13px!important;align-items:center!important;min-width:0!important;padding-bottom:10px!important;border-bottom:1px solid rgba(98,139,151,.28)!important}
body.in-game #game .market-create-resource-hero>img{width:76px!important;height:76px!important;object-fit:contain!important;display:block!important}
body.in-game #game .market-create-resource-hero>div{min-width:0!important}
body.in-game #game .market-create-resource-hero span{display:block!important;font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-create-resource-hero b{display:block!important;margin-top:2px!important;font-size:28px!important;color:var(--cyan2)!important;overflow-wrap:break-word!important}
body.in-game #game .market-create-side>label{display:grid!important;gap:6px!important;min-width:0!important;font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-create-side select,body.in-game #game .market-create-side input{width:100%!important;min-width:0!important;min-height:48px!important;font-size:20px!important}
body.in-game #game .market-route-visual{display:flex!important;align-items:center!important;justify-content:center!important;font-size:36px!important;color:var(--cyan2)!important}
body.in-game #game .market-create-submit{display:block!important;width:min(420px,100%)!important;min-height:52px!important;margin:14px auto 0!important;font-size:22px!important}

body.in-game #game .market-create-quote-route{display:grid!important;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;margin-top:10px!important}
body.in-game #game .market-create-quote-route>div{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto!important;grid-template-areas:'img label value' 'img name value'!important;gap:1px 9px!important;align-items:center!important;padding:9px 10px!important;border:1px solid rgba(76,122,135,.42)!important;border-radius:10px!important;background:rgba(2,24,30,.62)!important;min-width:0!important}
body.in-game #game .market-create-quote-route img{grid-area:img!important;width:44px!important;height:44px!important;object-fit:contain!important}
body.in-game #game .market-create-quote-route span{grid-area:label!important;font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-create-quote-route small{grid-area:name!important;font-size:20px!important;color:var(--text)!important}
body.in-game #game .market-create-quote-route b{grid-area:value!important;font-size:22px!important;color:var(--cyan2)!important;text-align:right!important}
body.in-game #game .market-create-quote-route>strong{text-align:center!important;font-size:28px!important;color:var(--cyan2)!important}
body.in-game #game .market-range{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body.in-game #game .market-range>span{font-size:20px!important}

body.in-game #game .market-order-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;width:100%!important;min-width:0!important}
body.in-game #game .market-order-card{display:grid!important;gap:12px!important;min-width:0!important;padding:14px!important;border:1px solid rgba(67,118,131,.56)!important;border-radius:14px!important;background:linear-gradient(180deg,rgba(5,31,39,.92),rgba(3,22,28,.94))!important}
body.in-game #game .market-order-card.is-own{border-color:rgba(113,112,67,.65)!important}
body.in-game #game .market-order-card-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:start!important;padding-bottom:9px!important;border-bottom:1px solid rgba(89,132,144,.3)!important;min-width:0!important}
body.in-game #game .market-order-card-head>div{min-width:0!important}
body.in-game #game .market-order-card-head span{display:block!important;font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-order-card-head b{display:block!important;margin-top:2px!important;font-size:22px!important;color:var(--text)!important;overflow-wrap:break-word!important}
body.in-game #game .market-order-card-head>strong{max-width:270px!important;font-size:20px!important;line-height:1.4!important;color:var(--cyan2)!important;text-align:right!important;overflow-wrap:break-word!important}
body.in-game #game .market-order-route{display:grid!important;grid-template-columns:minmax(0,1fr) 36px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;min-width:0!important}
body.in-game #game .market-order-resource{display:grid!important;grid-template-columns:68px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;min-width:0!important;padding:10px!important;border:1px solid rgba(78,127,140,.4)!important;border-radius:12px!important;background:rgba(6,35,42,.7)!important}
body.in-game #game .market-order-resource>img{width:68px!important;height:68px!important;object-fit:contain!important;display:block!important}
body.in-game #game .market-order-resource span{display:block!important;font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-order-resource b{display:block!important;font-size:26px!important;line-height:1.15!important;color:var(--cyan2)!important;overflow-wrap:anywhere!important}
body.in-game #game .market-order-resource small{display:block!important;font-size:20px!important;color:var(--text)!important}
body.in-game #game .market-order-route-arrow{text-align:center!important;font-size:30px!important;color:var(--cyan2)!important}

body.in-game #game .market-order-buy-editor{display:grid!important;gap:9px!important;padding-top:3px!important}
body.in-game #game .market-buy-editor-head{display:flex!important;align-items:baseline!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important}
body.in-game #game .market-buy-editor-head>span{font-size:22px!important;font-weight:700!important;color:var(--text)!important}
body.in-game #game .market-buy-editor-head>small{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-buy-input-row{display:grid!important;grid-template-columns:44px minmax(105px,1fr) auto auto!important;gap:8px!important;align-items:center!important;min-width:0!important}
body.in-game #game .market-buy-input-row>img{width:44px!important;height:44px!important;object-fit:contain!important}
body.in-game #game .market-buy-input-row>input{width:100%!important;min-width:0!important;min-height:48px!important;font-size:22px!important;text-align:right!important;font-variant-numeric:tabular-nums!important}
body.in-game #game .market-buy-input-row>span{font-size:20px!important;color:var(--text)!important;white-space:nowrap!important}
body.in-game #game .market-buy-input-row>button{min-height:48px!important;min-width:76px!important;font-size:20px!important;padding:7px 12px!important}
body.in-game #game .market-buy-preview{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:9px!important;border:1px solid rgba(66,108,121,.42)!important;border-radius:10px!important;background:rgba(2,23,29,.7)!important}
body.in-game #game .market-buy-preview.ok{border-color:rgba(64,141,110,.58)!important}
body.in-game #game .market-buy-preview.bad{border-color:rgba(147,81,73,.68)!important}
body.in-game #game .market-buy-preview>div{display:grid!important;gap:2px!important;min-width:0!important}
body.in-game #game .market-buy-preview>div>span{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-buy-preview>div>b{font-size:22px!important;color:var(--cyan2)!important;overflow-wrap:anywhere!important}
body.in-game #game .market-buy-preview>small{grid-column:1/-1!important;font-size:20px!important;line-height:1.4!important;color:var(--muted)!important;overflow-wrap:break-word!important}
body.in-game #game .market-buy-preview>small.bad{color:var(--red)!important}
body.in-game #game .market-confirm-buy{width:100%!important;min-height:50px!important;font-size:21px!important}
body.in-game #game .market-order-own{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding-top:4px!important}
body.in-game #game .market-order-own>span{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-order-own>button{min-height:46px!important;font-size:20px!important;padding:8px 14px!important}
body.in-game #game .market-empty-orders{margin-top:8px!important}

@media (max-width:1100px){
  body.in-game #game .market-value-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.in-game #game .market-order-grid{grid-template-columns:1fr!important}
  body.in-game #game .market-create-side{grid-template-columns:1fr!important}
  body.in-game #game .market-create-resource-hero{grid-column:auto!important}
}

@media (max-width:620px){
  body.in-game #game .market-value-guide{padding:10px!important;gap:8px!important}
  body.in-game #game .market-value-guide-intro>b{font-size:15px!important}
  body.in-game #game .market-value-guide-intro>span,body.in-game #game .market-value-guide>small{font-size:13px!important}
  body.in-game #game .market-value-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.in-game #game .market-value-chip{grid-template-columns:34px minmax(0,1fr) auto!important;gap:6px!important;padding:7px!important}
  body.in-game #game .market-value-chip>img{width:34px!important;height:34px!important}
  body.in-game #game .market-value-chip>span,body.in-game #game .market-value-chip>b{font-size:13px!important}
  body.in-game #game .market-create-visual-card{padding:10px!important}
  body.in-game #game .market-create-visual{grid-template-columns:1fr!important;gap:7px!important;margin-top:9px!important}
  body.in-game #game .market-route-visual{transform:rotate(90deg)!important;font-size:24px!important;height:22px!important}
  body.in-game #game .market-create-side{padding:9px!important;gap:7px!important;border-radius:10px!important}
  body.in-game #game .market-create-resource-hero{grid-template-columns:54px minmax(0,1fr)!important;gap:9px!important;padding-bottom:7px!important}
  body.in-game #game .market-create-resource-hero>img{width:54px!important;height:54px!important}
  body.in-game #game .market-create-resource-hero span,body.in-game #game .market-create-side>label{font-size:13px!important}
  body.in-game #game .market-create-resource-hero b{font-size:18px!important}
  body.in-game #game .market-create-side select,body.in-game #game .market-create-side input{min-height:44px!important;font-size:13px!important}
  body.in-game #game .market-create-quote-route{grid-template-columns:1fr!important;gap:5px!important}
  body.in-game #game .market-create-quote-route>strong{transform:rotate(90deg)!important;font-size:20px!important;line-height:1!important;height:18px!important}
  body.in-game #game .market-create-quote-route>div{grid-template-columns:34px minmax(0,1fr) auto!important;padding:7px!important;gap:1px 7px!important}
  body.in-game #game .market-create-quote-route img{width:34px!important;height:34px!important}
  body.in-game #game .market-create-quote-route :is(span,small){font-size:13px!important}
  body.in-game #game .market-create-quote-route b{font-size:14px!important}
  body.in-game #game .market-range{grid-template-columns:1fr!important}
  body.in-game #game .market-range>span{font-size:13px!important}
  body.in-game #game .market-create-submit{min-height:46px!important;font-size:14px!important;margin-top:9px!important}
  body.in-game #game .market-order-grid{gap:9px!important}
  body.in-game #game .market-order-card{gap:8px!important;padding:9px!important;border-radius:10px!important}
  body.in-game #game .market-order-card-head{grid-template-columns:1fr!important;gap:5px!important;padding-bottom:7px!important}
  body.in-game #game .market-order-card-head span,body.in-game #game .market-order-card-head b,body.in-game #game .market-order-card-head>strong{font-size:13px!important;text-align:left!important;max-width:none!important}
  body.in-game #game .market-order-route{grid-template-columns:1fr!important;gap:5px!important}
  body.in-game #game .market-order-route-arrow{transform:rotate(90deg)!important;font-size:20px!important;height:18px!important;line-height:18px!important}
  body.in-game #game .market-order-resource{grid-template-columns:50px minmax(0,1fr)!important;gap:8px!important;padding:8px!important;border-radius:9px!important}
  body.in-game #game .market-order-resource>img{width:50px!important;height:50px!important}
  body.in-game #game .market-order-resource span,body.in-game #game .market-order-resource small{font-size:13px!important}
  body.in-game #game .market-order-resource b{font-size:18px!important}
  body.in-game #game .market-buy-editor-head>span,body.in-game #game .market-buy-editor-head>small{font-size:13px!important}
  body.in-game #game .market-buy-input-row{grid-template-columns:36px minmax(0,1fr) auto!important;gap:6px!important}
  body.in-game #game .market-buy-input-row>img{width:36px!important;height:36px!important}
  body.in-game #game .market-buy-input-row>input{min-height:44px!important;font-size:14px!important}
  body.in-game #game .market-buy-input-row>span{font-size:13px!important}
  body.in-game #game .market-buy-input-row>button{grid-column:1/-1!important;width:100%!important;min-height:42px!important;font-size:13px!important}
  body.in-game #game .market-buy-preview{grid-template-columns:1fr 1fr!important;gap:5px!important;padding:7px!important}
  body.in-game #game .market-buy-preview>div>span,body.in-game #game .market-buy-preview>small{font-size:12px!important}
  body.in-game #game .market-buy-preview>div>b{font-size:13px!important}
  body.in-game #game .market-confirm-buy{min-height:46px!important;font-size:14px!important}
  body.in-game #game .market-order-own{display:grid!important;grid-template-columns:1fr!important}
  body.in-game #game .market-order-own>span,body.in-game #game .market-order-own>button{font-size:13px!important}
  body.in-game #game .market-order-own>button{width:100%!important;min-height:44px!important}
}

@media (max-width:360px){
  body.in-game #game .market-value-grid{grid-template-columns:1fr!important}
  body.in-game #game .market-buy-preview{grid-template-columns:1fr!important}
  body.in-game #game .market-buy-preview>small{grid-column:auto!important}
}

/* v2026.09.11.19：公開市場大量掛單桌面表格、資源查詢、平板／手機卡片化與「全部」操作回饋。 */
body.in-game #game .market-orders-head-query{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;flex-wrap:wrap!important;margin-top:16px!important}
body.in-game #game .market-orders-head-query>div:first-child{display:flex!important;align-items:baseline!important;gap:12px!important;flex-wrap:wrap!important;min-width:0!important}
body.in-game #game .market-orders-head-query h3{margin:0!important}
body.in-game #game .market-orders-head-query span{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-order-querybar{display:grid!important;grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) minmax(250px,auto) auto!important;gap:10px!important;align-items:end!important;margin:10px 0 12px!important;padding:12px!important;border:1px solid rgba(74,126,139,.5)!important;border-radius:10px!important;background:rgba(4,29,36,.78)!important;min-width:0!important}
body.in-game #game .market-order-querybar label{display:grid!important;gap:5px!important;min-width:0!important}
body.in-game #game .market-order-querybar label>span{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-order-querybar select{width:100%!important;min-width:0!important;min-height:46px!important;font-size:20px!important}
body.in-game #game .market-seller-filter{display:grid!important;gap:5px!important;min-width:0!important}
body.in-game #game .market-seller-filter>span{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-seller-filter-options{display:flex!important;align-items:center!important;gap:12px!important;min-height:46px!important;padding:5px 10px!important;border:1px solid rgba(81,132,145,.45)!important;border-radius:8px!important;background:rgba(1,19,24,.45)!important;flex-wrap:wrap!important}
body.in-game #game .market-order-querybar .market-filter-check{display:flex!important;grid-template-columns:none!important;align-items:center!important;gap:7px!important;min-width:0!important;cursor:pointer!important}
body.in-game #game .market-order-querybar .market-filter-check input{width:20px!important;height:20px!important;min-width:20px!important;margin:0!important;accent-color:#63d7ff!important}
body.in-game #game .market-order-querybar .market-filter-check>span{font-size:20px!important;color:var(--text)!important;white-space:nowrap!important}
body.in-game #game .market-order-query-actions{display:grid!important;grid-template-columns:auto auto!important;gap:8px!important}
body.in-game #game .market-order-query-actions button{min-height:46px!important;min-width:90px!important;font-size:20px!important;padding:8px 16px!important}
body.in-game #game .market-order-pager{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;margin:8px 0!important}
body.in-game #game .market-order-pager>span{font-size:20px!important;color:var(--muted)!important;white-space:nowrap!important}
body.in-game #game .market-order-pager>button{min-height:42px!important;font-size:20px!important;padding:7px 12px!important}
body.in-game #game .market-order-table-wrap{width:100%!important;min-width:0!important;overflow-x:auto!important;border:1px solid rgba(72,122,136,.52)!important;border-radius:10px!important;background:rgba(3,24,30,.72)!important}
body.in-game #game .market-open-order-table{width:100%!important;min-width:1180px!important;margin:0!important;border-collapse:separate!important;border-spacing:0!important;table-layout:fixed!important}
body.in-game #game .market-open-order-table th{position:sticky!important;top:0!important;z-index:2!important;padding:10px!important;font-size:20px!important;text-align:left!important;background:#0a303b!important;color:var(--text)!important;border-bottom:1px solid rgba(88,141,154,.58)!important}
body.in-game #game .market-open-order-table td{padding:9px 10px!important;font-size:20px!important;vertical-align:middle!important;border-bottom:1px solid rgba(70,111,123,.3)!important;min-width:0!important}
body.in-game #game .market-open-order-table tbody tr:last-child td{border-bottom:0!important}
body.in-game #game .market-open-order-table tbody tr:hover td{background:rgba(15,58,69,.32)!important}
body.in-game #game .market-open-order-table tbody tr.is-own td{background:rgba(77,71,32,.12)!important}
body.in-game #game .market-open-order-table th:nth-child(1){width:16%!important}
body.in-game #game .market-open-order-table th:nth-child(2){width:16%!important}
body.in-game #game .market-open-order-table th:nth-child(3){width:20%!important}
body.in-game #game .market-open-order-table th:nth-child(4){width:18%!important}
body.in-game #game .market-open-order-table th:nth-child(5){width:17%!important}
body.in-game #game .market-open-order-table th:nth-child(6){width:13%!important}
body.in-game #game .market-table-seller{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;min-width:0!important}
body.in-game #game .market-table-seller>b{font-size:20px!important;overflow-wrap:anywhere!important}
body.in-game #game .market-table-resource{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;min-width:0!important}
body.in-game #game .market-table-resource>img{width:48px!important;height:48px!important;object-fit:contain!important;display:block!important}
body.in-game #game .market-table-resource>div{min-width:0!important}
body.in-game #game .market-table-resource b{display:block!important;font-size:22px!important;color:var(--cyan2)!important;line-height:1.1!important;font-variant-numeric:tabular-nums!important;overflow-wrap:anywhere!important}
body.in-game #game .market-table-resource span{display:block!important;margin-top:2px!important;font-size:20px!important;color:var(--text)!important}
body.in-game #game .market-table-rate{display:grid!important;gap:3px!important;min-width:0!important}
body.in-game #game .market-table-rate b{font-size:20px!important;line-height:1.35!important;color:var(--cyan2)!important;overflow-wrap:anywhere!important}
body.in-game #game .market-table-rate small{font-size:20px!important;line-height:1.3!important;color:var(--muted)!important;overflow-wrap:anywhere!important}
body.in-game #game .market-table-buy{display:grid!important;gap:4px!important;min-width:0!important}
body.in-game #game .market-table-buy-input{display:grid!important;grid-template-columns:minmax(88px,1fr) auto!important;gap:6px!important;align-items:center!important;min-width:0!important}
body.in-game #game .market-table-buy-input input{width:100%!important;min-width:0!important;min-height:44px!important;font-size:20px!important;text-align:right!important;font-variant-numeric:tabular-nums!important}
body.in-game #game .market-table-buy-input input.market-input-bad{border-color:var(--red)!important;box-shadow:0 0 0 1px rgba(192,88,77,.28)!important}
body.in-game #game .market-table-buy-input button{min-height:44px!important;min-width:66px!important;font-size:20px!important;padding:7px 10px!important}
body.in-game #game .market-fill-all-btn.is-applied{border-color:rgba(77,174,139,.82)!important;background:rgba(38,112,86,.85)!important}
body.in-game #game .market-table-buy>small{font-size:20px!important;color:var(--muted)!important}
body.in-game #game .market-table-pay{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;gap:7px!important;align-items:center!important;min-width:0!important;padding:6px 7px!important;border:1px solid rgba(70,116,129,.36)!important;border-radius:8px!important;background:rgba(2,24,30,.58)!important}
body.in-game #game .market-table-pay>img{width:42px!important;height:42px!important;object-fit:contain!important}
body.in-game #game .market-table-pay>div{display:grid!important;grid-template-columns:auto 1fr!important;gap:1px 5px!important;align-items:baseline!important;min-width:0!important}
body.in-game #game .market-table-pay b{font-size:22px!important;color:var(--cyan2)!important;font-variant-numeric:tabular-nums!important;overflow-wrap:anywhere!important}
body.in-game #game .market-table-pay span{font-size:20px!important;color:var(--text)!important}
body.in-game #game .market-table-pay small{grid-column:1/-1!important;font-size:20px!important;color:var(--muted)!important;line-height:1.3!important;overflow-wrap:anywhere!important}
body.in-game #game .market-table-pay small.bad{color:var(--red)!important}
body.in-game #game .market-table-pay.ok{border-color:rgba(62,145,111,.58)!important}
body.in-game #game .market-table-pay.bad{border-color:rgba(153,79,70,.68)!important}
body.in-game #game .market-table-pay.muted{display:block!important;color:var(--muted)!important;text-align:center!important}
body.in-game #game .market-table-action{text-align:center!important}
body.in-game #game .market-table-action .market-confirm-buy,body.in-game #game .market-table-own .danger-act{width:100%!important;min-height:44px!important;font-size:20px!important;padding:7px 10px!important}
body.in-game #game .market-table-own{display:grid!important;gap:5px!important}
body.in-game #game .market-table-own>span,body.in-game #game .market-own-note{font-size:20px!important;color:var(--muted)!important}

/* 1100px 以下改成卡片式，讓平板／手機保留圖像優先與較大的觸控空間。 */
@media(max-width:1100px){
  body.in-game #game .market-order-querybar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game #game .market-order-query-actions{grid-column:1/-1!important;grid-template-columns:1fr 1fr!important}
  body.in-game #game .market-order-table-wrap{overflow:visible!important;border:0!important;background:transparent!important}
  body.in-game #game .market-open-order-table{display:block!important;min-width:0!important;width:100%!important;background:transparent!important}
  body.in-game #game .market-open-order-table thead{display:none!important}
  body.in-game #game .market-open-order-table tbody{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important}
  body.in-game #game .market-open-order-table tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 12px!important;padding:12px!important;border:1px solid rgba(67,118,131,.56)!important;border-radius:12px!important;background:linear-gradient(180deg,rgba(5,31,39,.92),rgba(3,22,28,.94))!important;min-width:0!important}
  body.in-game #game .market-open-order-table tr.is-own{border-color:rgba(113,112,67,.65)!important}
  body.in-game #game .market-open-order-table td{display:grid!important;grid-template-columns:105px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;padding:6px 0!important;border:0!important;background:transparent!important;min-width:0!important}
  body.in-game #game .market-open-order-table td::before{content:attr(data-label)!important;font-size:18px!important;color:var(--muted)!important}
  body.in-game #game .market-open-order-table td:nth-child(2),body.in-game #game .market-open-order-table td:nth-child(3),body.in-game #game .market-open-order-table td:nth-child(4),body.in-game #game .market-open-order-table td:nth-child(5),body.in-game #game .market-open-order-table td:nth-child(6){grid-column:1/-1!important}
  body.in-game #game .market-open-order-table td:nth-child(2),body.in-game #game .market-open-order-table td:nth-child(5){padding:8px!important;border:1px solid rgba(68,112,125,.36)!important;border-radius:9px!important;background:rgba(3,25,31,.52)!important}
  body.in-game #game .market-table-resource{grid-template-columns:62px minmax(0,1fr)!important}
  body.in-game #game .market-table-resource>img{width:62px!important;height:62px!important}
  body.in-game #game .market-table-buy-input{grid-template-columns:minmax(0,1fr) 86px!important}
  body.in-game #game .market-table-pay{grid-template-columns:52px minmax(0,1fr)!important}
  body.in-game #game .market-table-pay>img{width:52px!important;height:52px!important}
  body.in-game #game .market-table-action{text-align:left!important}
}

@media(max-width:620px){
  body.in-game #game .market-orders-head-query{align-items:stretch!important;gap:8px!important}
  body.in-game #game .market-orders-head-query>div:first-child{display:grid!important;gap:2px!important}
  body.in-game #game .market-orders-head-query h3{font-size:16px!important}
  body.in-game #game .market-orders-head-query span{font-size:13px!important}
  body.in-game #game .market-order-querybar{grid-template-columns:1fr!important;gap:7px!important;padding:9px!important}
  body.in-game #game .market-order-querybar label>span,body.in-game #game .market-order-querybar select,body.in-game #game .market-seller-filter>span,body.in-game #game .market-order-querybar .market-filter-check>span{font-size:13px!important}
  body.in-game #game .market-order-querybar select{min-height:44px!important}
  body.in-game #game .market-seller-filter-options{min-height:44px!important;padding:5px 8px!important;gap:10px!important}
  body.in-game #game .market-order-querybar .market-filter-check input{width:18px!important;height:18px!important;min-width:18px!important}
  body.in-game #game .market-order-query-actions{grid-column:auto!important;grid-template-columns:1fr 1fr!important}
  body.in-game #game .market-order-query-actions button{min-width:0!important;min-height:44px!important;font-size:13px!important;padding:7px 9px!important}
  body.in-game #game .market-order-pager{justify-content:space-between!important;width:100%!important;gap:6px!important}
  body.in-game #game .market-order-pager>span,body.in-game #game .market-order-pager>button{font-size:13px!important}
  body.in-game #game .market-order-pager>button{min-height:42px!important;padding:6px 10px!important}
  body.in-game #game .market-open-order-table tbody{gap:8px!important}
  body.in-game #game .market-open-order-table tr{grid-template-columns:1fr!important;gap:5px!important;padding:9px!important;border-radius:10px!important}
  body.in-game #game .market-open-order-table td,body.in-game #game .market-open-order-table td:nth-child(n){grid-column:auto!important;grid-template-columns:82px minmax(0,1fr)!important;gap:7px!important;padding:5px 0!important}
  body.in-game #game .market-open-order-table td:nth-child(2),body.in-game #game .market-open-order-table td:nth-child(5){padding:7px!important}
  body.in-game #game .market-open-order-table td::before{font-size:13px!important}
  body.in-game #game .market-table-seller>b,body.in-game #game .market-table-resource span,body.in-game #game .market-table-rate b,body.in-game #game .market-table-rate small,body.in-game #game .market-table-buy>small,body.in-game #game .market-table-pay span,body.in-game #game .market-table-pay small,body.in-game #game .market-table-own>span,body.in-game #game .market-own-note{font-size:13px!important}
  body.in-game #game .market-table-resource{grid-template-columns:48px minmax(0,1fr)!important;gap:7px!important}
  body.in-game #game .market-table-resource>img{width:48px!important;height:48px!important}
  body.in-game #game .market-table-resource b,body.in-game #game .market-table-pay b{font-size:16px!important}
  body.in-game #game .market-table-buy-input{grid-template-columns:minmax(0,1fr) 74px!important;gap:5px!important}
  body.in-game #game .market-table-buy-input input,body.in-game #game .market-table-buy-input button{min-height:44px!important;font-size:13px!important}
  body.in-game #game .market-table-pay{grid-template-columns:42px minmax(0,1fr)!important;padding:6px!important}
  body.in-game #game .market-table-pay>img{width:42px!important;height:42px!important}
  body.in-game #game .market-table-action .market-confirm-buy,body.in-game #game .market-table-own .danger-act{min-height:44px!important;font-size:13px!important}
}

@media(max-width:360px){
  body.in-game #game .market-order-query-actions{grid-template-columns:1fr!important}
  body.in-game #game .market-open-order-table td,body.in-game #game .market-open-order-table td:nth-child(n){grid-template-columns:72px minmax(0,1fr)!important}
}

/* v2026.09.12.01：我的群島－島嶼搬遷。桌面以清楚的雙區塊呈現，窄畫面自動單欄。 */
body.in-game .island-relocate-btn{border-color:rgba(207,178,101,.52)!important;background:rgba(72,57,24,.58)!important;color:#f2dfaa!important}
body.in-game .island-relocation-shell{display:grid!important;gap:14px!important;min-width:0!important}
body.in-game .island-relocation-current{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(320px,.9fr)!important;gap:14px!important;align-items:stretch!important}
body.in-game .island-relocation-current>div:first-child,body.in-game .island-relocation-rules,body.in-game .island-relocation-target,body.in-game .island-relocation-preview{min-width:0!important;padding:14px!important;border:1px solid rgba(83,151,163,.34)!important;border-radius:12px!important;background:rgba(5,31,39,.78)!important}
body.in-game .island-relocation-current>div:first-child{display:flex!important;flex-direction:column!important;gap:6px!important;justify-content:center!important}
body.in-game .island-relocation-current>div:first-child>span,body.in-game .island-relocation-preview-head>span{color:#8eb6bd!important;font-size:20px!important}
body.in-game .island-relocation-current>div:first-child>b,body.in-game .island-relocation-preview-head>b{color:#e8f7f6!important;font-size:24px!important;line-height:1.35!important}
body.in-game .island-relocation-current>div:first-child>small{color:#9fb8bd!important;font-size:20px!important;line-height:1.45!important}
body.in-game .island-relocation-env{display:grid!important;gap:9px!important;padding:14px!important;border:1px solid rgba(79,145,137,.34)!important;border-radius:12px!important;background:rgba(7,44,48,.72)!important}
body.in-game .island-relocation-env>strong{font-size:20px!important;color:#bde9df!important}
body.in-game .island-relocation-env>div{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
body.in-game .island-relocation-env span{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;padding:9px!important;border-radius:9px!important;background:rgba(0,18,24,.58)!important;color:#c9dfe1!important;font-size:20px!important}
body.in-game .island-relocation-env img{width:30px!important;height:30px!important;object-fit:contain!important;flex:0 0 30px!important}
body.in-game .island-relocation-env b{margin-left:auto!important;color:#a9efcf!important;white-space:nowrap!important;font-size:20px!important}
body.in-game .island-relocation-rules{display:grid!important;gap:7px!important}
body.in-game .island-relocation-rules>b{color:#f0d38e!important;font-size:22px!important}
body.in-game .island-relocation-rules>span{color:#b9cdd1!important;font-size:20px!important;line-height:1.5!important}
body.in-game .island-relocation-target{display:grid!important;gap:12px!important}
body.in-game .island-relocation-target h3{margin:0!important;font-size:24px!important;color:#e3f2f2!important}
body.in-game .island-relocation-target-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
body.in-game .island-relocation-target-grid label{display:grid!important;gap:6px!important;color:#abc3c8!important;font-size:20px!important}
body.in-game .island-relocation-target-grid input{width:100%!important;min-width:0!important;min-height:46px!important;font-size:20px!important}
body.in-game .island-relocation-target>#relocateCheck{justify-self:start!important;min-width:180px!important}
body.in-game .island-relocation-preview{display:grid!important;gap:12px!important}
body.in-game .island-relocation-preview-head{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important}
body.in-game .island-relocation-preview-head>em{font-style:normal!important;color:#f0d38e!important;font-size:20px!important;text-align:right!important}
body.in-game .island-relocation-balance{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
body.in-game .island-relocation-balance>span{display:flex!important;justify-content:space-between!important;gap:10px!important;padding:10px 12px!important;border-radius:9px!important;background:rgba(3,24,31,.7)!important;color:#a9c2c6!important;font-size:20px!important}
body.in-game .island-relocation-balance b{color:#f3db9a!important;font-size:20px!important;white-space:nowrap!important}
body.in-game .island-relocation-blockers{margin:0!important;padding:12px 12px 12px 34px!important;border:1px solid rgba(205,93,87,.4)!important;border-radius:10px!important;background:rgba(82,31,31,.28)!important;color:#efb5b2!important}
body.in-game .island-relocation-blockers li{font-size:20px!important;line-height:1.45!important;margin:4px 0!important}
body.in-game .island-relocation-ready{padding:11px 12px!important;border:1px solid rgba(84,180,139,.42)!important;border-radius:10px!important;background:rgba(26,91,64,.28)!important;color:#b8efd4!important;font-size:20px!important;font-weight:800!important}
body.in-game .island-relocation-error{padding:11px 12px!important;border:1px solid rgba(205,93,87,.4)!important;border-radius:10px!important;background:rgba(82,31,31,.28)!important;color:#efb5b2!important;font-size:20px!important}
body.in-game .island-relocation-actions{display:flex!important;justify-content:flex-end!important}
body.in-game .island-relocation-actions button{min-width:240px!important}
@media(max-width:900px){body.in-game .island-relocation-current{grid-template-columns:1fr!important}body.in-game .island-relocation-target-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body.in-game .island-relocation-preview-head{grid-template-columns:1fr!important;align-items:start!important}body.in-game .island-relocation-preview-head>em{text-align:left!important}}
@media(max-width:620px){body.in-game .island-relocation-env>div{grid-template-columns:1fr!important}body.in-game .island-relocation-target-grid{grid-template-columns:1fr 1fr!important}body.in-game .island-relocation-balance{grid-template-columns:1fr!important}body.in-game .island-relocation-actions button,body.in-game .island-relocation-target>#relocateCheck{width:100%!important;min-width:0!important}}
@media(max-width:390px){body.in-game .island-relocation-target-grid{grid-template-columns:1fr!important}}


/* ========================================================================
   v2026.09.12.07 — 聯盟共同科技：圖為主、字為輔
   ======================================================================== */
body.in-game .alliance-tech-card-identity{display:flex;align-items:center;gap:14px;min-width:0}
body.in-game .alliance-tech-card-identity>img{width:72px;height:72px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 6px 10px rgba(0,0,0,.28))}
body.in-game .alliance-tech-card-identity>div{min-width:0}
body.in-game .alliance-tech-source-resources{gap:10px}
body.in-game .alliance-tech-source-resource{display:flex;align-items:center;gap:10px;min-width:0;padding:8px 10px;border:1px solid rgba(98,190,179,.16);border-radius:10px;background:rgba(3,22,28,.55)}
body.in-game .alliance-tech-source-resource>img{width:46px;height:46px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 4px 7px rgba(0,0,0,.25))}
body.in-game .alliance-tech-source-resource>span{display:grid;gap:2px;min-width:0}
body.in-game .alliance-tech-source-resource small{color:#8fb7bd;font-size:20px;line-height:1.15}
body.in-game .alliance-tech-source-resource b{color:#e7fbf7;font-size:22px;line-height:1.2;overflow-wrap:anywhere}
body.in-game .alliance-tech-progress-row{padding:8px 10px;border:1px solid rgba(83,152,159,.16);border-radius:10px;background:rgba(3,20,27,.36)}
body.in-game .alliance-tech-progress-row>div:first-child{margin-bottom:7px}
body.in-game .alliance-tech-progress-info{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;color:#9ebbc1}
body.in-game .alliance-tech-progress-info>img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 4px 7px rgba(0,0,0,.24))}
body.in-game .alliance-tech-progress-info>span{display:grid;gap:1px;min-width:0}
body.in-game .alliance-tech-progress-info small{font-size:20px;color:#91b7bd;line-height:1.1}
body.in-game .alliance-tech-progress-info b{font-size:21px;color:#e0f4f0!important;text-align:left!important;line-height:1.2;overflow-wrap:anywhere}
body.in-game .alliance-tech-progress-info b em{font-style:normal;font-weight:600;color:#84aeb5}
body.in-game .alliance-tech-progress-info>strong{font-size:20px;color:#9be3cd;white-space:nowrap}
body.in-game .alliance-tech-my{display:grid;gap:9px}
body.in-game .alliance-tech-my>span{font-weight:800;color:#c8e2df}
body.in-game .alliance-tech-my-resources{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.in-game .alliance-tech-resource-mini{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 8px;border-radius:9px;background:rgba(2,20,26,.5)}
body.in-game .alliance-tech-resource-mini>img{width:38px;height:38px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 3px 5px rgba(0,0,0,.22))}
body.in-game .alliance-tech-resource-mini>span{display:grid;gap:1px;min-width:0}
body.in-game .alliance-tech-resource-mini small{font-size:20px;color:#88b4b9;line-height:1.1}
body.in-game .alliance-tech-resource-mini b{font-size:20px;color:#e3f5f2;line-height:1.15;overflow-wrap:anywhere}
body.in-game .alliance-tech-resource-input{gap:9px!important;padding:12px!important}
body.in-game .alliance-tech-resource-input-head{display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:12px!important}
body.in-game .alliance-tech-resource-input-head>img{width:58px;height:58px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 5px 8px rgba(0,0,0,.25))}
body.in-game .alliance-tech-resource-input-head>span{display:grid;gap:2px;min-width:0}
body.in-game .alliance-tech-resource-input-head b{font-size:22px;color:#e6faf6!important;line-height:1.15}
body.in-game .alliance-tech-resource-input-head em{font-size:20px!important;font-style:normal;color:#8fc7c1!important;text-align:left!important;line-height:1.2;overflow-wrap:anywhere}
body.in-game .alliance-tech-recent-resources{display:flex;flex-wrap:wrap;gap:7px!important;color:inherit!important}
body.in-game .alliance-tech-recent-resources .alliance-tech-resource-mini{flex:0 1 auto;min-width:150px}
body.in-game .alliance-tech-recent-resources .alliance-tech-resource-mini>img{width:32px;height:32px}
body.in-game .alliance-tech-recent-resources .alliance-tech-resource-mini small{font-size:20px}
body.in-game .alliance-tech-recent-resources .alliance-tech-resource-mini b{font-size:20px}
@media(max-width:980px){
  body.in-game .alliance-tech-card-identity>img{width:64px;height:64px}
}
@media(max-width:620px){
  body.in-game .alliance-tech-card-identity>img{width:54px;height:54px}
  body.in-game .alliance-tech-source-resources{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.in-game .alliance-tech-source-resource{padding:7px 8px;gap:8px}
  body.in-game .alliance-tech-source-resource>img{width:38px;height:38px}
  body.in-game .alliance-tech-source-resource small,
  body.in-game .alliance-tech-source-resource b,
  body.in-game .alliance-tech-progress-info small,
  body.in-game .alliance-tech-progress-info b,
  body.in-game .alliance-tech-progress-info>strong,
  body.in-game .alliance-tech-resource-mini small,
  body.in-game .alliance-tech-resource-mini b,
  body.in-game .alliance-tech-resource-input-head em{font-size:14px}
  body.in-game .alliance-tech-resource-input-head b{font-size:16px}
  body.in-game .alliance-tech-progress-info{grid-template-columns:38px minmax(0,1fr) auto;gap:8px}
  body.in-game .alliance-tech-progress-info>img{width:38px;height:38px}
  body.in-game .alliance-tech-my-resources{grid-template-columns:1fr 1fr}
  body.in-game .alliance-tech-resource-mini>img{width:34px;height:34px}
  body.in-game .alliance-tech-resource-input-head>img{width:48px;height:48px}
  body.in-game .alliance-tech-recent-resources .alliance-tech-resource-mini{min-width:0;flex:1 1 calc(50% - 7px)}
}
@media(max-width:360px){
  body.in-game .alliance-tech-source-resources,
  body.in-game .alliance-tech-my-resources{grid-template-columns:1fr}
  body.in-game .alliance-tech-recent-resources .alliance-tech-resource-mini{flex-basis:100%}
}


/* ========================================================================
   v2026.09.12.08 — 聯盟共同科技：最近 10 筆＋投入歷史查詢
   ======================================================================== */
body.in-game .alliance-tech-recent>.alliance-tech-recent-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
body.in-game .alliance-tech-recent-head>div{display:grid;gap:3px}
body.in-game .alliance-tech-recent-head h4{margin:0!important}
body.in-game .alliance-tech-recent-head small{font-size:20px;color:#86aeb5}
body.in-game .alliance-tech-recent>.alliance-tech-recent-row{display:grid;grid-template-columns:minmax(140px,.8fr) minmax(180px,1fr) minmax(0,2fr);gap:12px;padding:9px 0;border-bottom:1px solid rgba(73,126,134,.18);align-items:start}
body.in-game .alliance-tech-recent>.alliance-tech-recent-empty{display:block;padding:14px 0;color:#8eabb1;border-bottom:0}
body.in-game .alliance-tech-history-modal{position:fixed;inset:0;z-index:2200;background:rgba(0,0,0,.76);display:grid;place-items:center;padding:18px}
body.in-game .alliance-tech-history-modal.hidden{display:none!important}
body.in-game .alliance-tech-history-card{width:min(1180px,96vw);max-height:92dvh;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;border:1px solid rgba(93,159,166,.55);border-radius:16px;background:linear-gradient(150deg,rgba(7,35,43,.995),rgba(3,18,25,.995));box-shadow:0 32px 100px rgba(0,0,0,.72)}
body.in-game .alliance-tech-history-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid rgba(91,154,162,.32);background:rgba(11,47,56,.88)}
body.in-game .alliance-tech-history-head span{display:block;color:#7fc2ba;font-size:20px;font-weight:800}
body.in-game .alliance-tech-history-head h2{margin:3px 0 0;color:#edfafa;font-size:28px}
body.in-game .alliance-tech-history-body{overflow:auto;padding:16px;display:grid;gap:14px}
body.in-game .alliance-tech-history-filters{display:grid;grid-template-columns:1.15fr 1.15fr .9fr .9fr auto;gap:10px;align-items:end;padding:12px;border:1px solid rgba(81,145,151,.28);border-radius:12px;background:rgba(4,27,34,.78)}
body.in-game .alliance-tech-history-filters label{display:grid;gap:6px;color:#a9c5c9;font-size:20px}
body.in-game .alliance-tech-history-filters input,body.in-game .alliance-tech-history-filters select{width:100%;min-width:0;box-sizing:border-box;font-size:20px}
body.in-game .alliance-tech-history-filter-actions{display:flex;gap:8px}
body.in-game .alliance-tech-history-results{display:grid;gap:10px;min-height:180px}
body.in-game .alliance-tech-history-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#9dbbc0}
body.in-game .alliance-tech-history-summary span,body.in-game .alliance-tech-history-summary b{font-size:20px}
body.in-game .alliance-tech-history-list{display:grid;border:1px solid rgba(78,137,145,.24);border-radius:12px;overflow:hidden}
body.in-game .alliance-tech-history-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(220px,1fr) minmax(0,2fr);gap:12px;padding:11px 12px;align-items:center;background:rgba(3,23,30,.62);border-bottom:1px solid rgba(70,126,133,.18)}
body.in-game .alliance-tech-history-row:last-child{border-bottom:0}
body.in-game .alliance-tech-history-who{display:grid;gap:3px;min-width:0}
body.in-game .alliance-tech-history-who b{font-size:20px;color:#e4f6f3;overflow-wrap:anywhere}
body.in-game .alliance-tech-history-who span{font-size:20px;color:#82a7ae}
body.in-game .alliance-tech-history-tech{font-size:20px;color:#8fd0c9;font-weight:800;overflow-wrap:anywhere}
body.in-game .alliance-tech-history-pager{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:980px){body.in-game .alliance-tech-history-filters{grid-template-columns:1fr 1fr}body.in-game .alliance-tech-history-filter-actions{grid-column:1/-1;justify-content:flex-end}body.in-game .alliance-tech-history-row{grid-template-columns:1fr 1fr}body.in-game .alliance-tech-history-row>.alliance-tech-recent-resources{grid-column:1/-1}}
@media(max-width:620px){body.in-game .alliance-tech-recent-head{align-items:stretch;flex-direction:column}body.in-game .alliance-tech-recent-head small{font-size:14px}body.in-game .alliance-tech-recent>.alliance-tech-recent-row{grid-template-columns:1fr;gap:5px}body.in-game .alliance-tech-history-modal{padding:6px}body.in-game .alliance-tech-history-card{width:100%;max-height:calc(100dvh - 12px);border-radius:12px}body.in-game .alliance-tech-history-head{padding:12px}body.in-game .alliance-tech-history-head span{font-size:14px}body.in-game .alliance-tech-history-head h2{font-size:22px}body.in-game .alliance-tech-history-body{padding:10px}body.in-game .alliance-tech-history-filters{grid-template-columns:1fr}body.in-game .alliance-tech-history-filters label,body.in-game .alliance-tech-history-filters input,body.in-game .alliance-tech-history-filters select{font-size:14px}body.in-game .alliance-tech-history-filter-actions{grid-column:auto;display:grid;grid-template-columns:1fr 1fr}body.in-game .alliance-tech-history-row{grid-template-columns:1fr;gap:6px;padding:10px}body.in-game .alliance-tech-history-row>.alliance-tech-recent-resources{grid-column:auto}body.in-game .alliance-tech-history-who b,body.in-game .alliance-tech-history-who span,body.in-game .alliance-tech-history-tech,body.in-game .alliance-tech-history-summary span,body.in-game .alliance-tech-history-summary b{font-size:14px}body.in-game .alliance-tech-history-pager{display:grid;grid-template-columns:1fr 1fr}}

/* ========================================================================
   v2026.09.12.09 — 玩家市場名稱關係色：與排行榜完全一致
   市場表格／卡片有自己的文字樣式；此處放在樣式表最後，確保關係色不被一般市場文字色蓋掉。
   ======================================================================== */
body.in-game #game .market-page .friend-player-name{color:#63d7ff!important}
body.in-game #game .market-page .virtual-relation-name.virtual-relation-red{color:#ff686d!important}
body.in-game #game .market-page .virtual-relation-name.virtual-relation-orange{color:#f4a641!important}
body.in-game #game .market-page .virtual-relation-name.virtual-relation-white{color:#f4f7fb!important}
body.in-game #game .market-page .virtual-relation-name.virtual-relation-green{color:#62d88b!important}
body.in-game #game .market-table-seller>.friend-player-name{color:#63d7ff!important}
body.in-game #game .market-table-seller>.virtual-relation-red{color:#ff686d!important}
body.in-game #game .market-table-seller>.virtual-relation-orange{color:#f4a641!important}
body.in-game #game .market-table-seller>.virtual-relation-white{color:#f4f7fb!important}
body.in-game #game .market-table-seller>.virtual-relation-green{color:#62d88b!important}


/* v2026.09.12.10 — 公開市場掛單上限 */
.market-listing-count{display:inline-flex;margin-left:10px;padding:2px 8px;border:1px solid #356477;border-radius:5px;color:#8fd8f3;font-weight:700}.market-listing-count.is-full{border-color:#9a514c;color:#ff8d86}.market-create-submit:disabled{opacity:.55;cursor:not-allowed}

/* v2026.09.13.01：玩家每日攻擊上限顯示 */
.fleet-attack-limit{margin-top:10px;padding:10px 12px;border:1px solid rgba(99,215,255,.35);border-radius:8px;background:rgba(10,70,86,.22);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fleet-attack-limit strong{font-size:1.06em}
.fleet-attack-limit small{opacity:.82}
.fleet-attack-limit.limit-reached{border-color:rgba(255,104,109,.65);background:rgba(104,26,32,.28)}
@media(max-width:620px){.fleet-attack-limit{align-items:flex-start;flex-direction:column;gap:4px}}


/* ========================================================================
   v2026.09.13.03 — 登入前聊天入口／平板手機事件入口字級修正
   - 登入前若聊天入口可見，限制圖示與文字尺寸，避免 128px PNG 原尺寸或全站 24px 基準把入口撐大。
   - 1100px 以下的「事件」入口明確覆蓋內層 span / b 字級；不能只縮 button 本身，否則全站玩家字級規則仍會把「事件」撐回 24px。
   ======================================================================== */
body:not(.in-game) .chat-launcher{
  min-height:42px!important;
  padding:7px 11px!important;
  gap:6px!important;
  font-size:15px!important;
  line-height:1!important;
}
body:not(.in-game) .chat-launcher>span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  line-height:1!important;
}
body:not(.in-game) .chat-launcher .chat-launcher-icon{
  display:block!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  max-width:20px!important;
  object-fit:contain!important;
  margin:0!important;
}
body:not(.in-game) .chat-launcher>b{
  font-size:15px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
body:not(.in-game) .chat-launcher>em{
  min-width:20px!important;
  width:auto!important;
  height:20px!important;
  min-height:20px!important;
  padding:0 4px!important;
  border-radius:10px!important;
  font-size:11px!important;
  line-height:20px!important;
}

@media(max-width:1100px){
  html body.in-game #eventDrawerToggle{
    line-height:1!important;
  }
  html body.in-game #eventDrawerToggle>span:not(.event-drawer-icon){
    font-size:13px!important;
    line-height:1!important;
    white-space:nowrap!important;
    margin:0!important;
  }
  html body.in-game #eventDrawerToggle>b{
    font-size:11px!important;
    line-height:1!important;
  }
  html body.in-game #eventDrawerToggle .event-drawer-icon{
    font-size:12px!important;
    line-height:1!important;
  }
  html body.in-game #eventDrawerToggle .event-drawer-icon img{
    width:18px!important;
    height:18px!important;
    max-width:18px!important;
    object-fit:contain!important;
  }
}
@media(max-width:620px){
  html body.in-game #eventDrawerToggle>span:not(.event-drawer-icon){font-size:12px!important}
  html body.in-game #eventDrawerToggle>b{font-size:10px!important}
  html body.in-game #eventDrawerToggle .event-drawer-icon img{width:16px!important;height:16px!important;max-width:16px!important}
}

/* v2026.09.13 image refresh：巨鯨要塞群港灣主體視覺額外放大 30%。
   僅調整顯示尺寸與預留空間，不改單位數值、魚群／海防對應或戰鬥規則。 */
@media (min-width:1101px){
  body.in-game .shipyard-berth[data-shipyard-unit="leviathan_beast_fortress"] .shipyard-ship-art{
    transform:translateY(-40px) scale(var(--unit-harbor-scale,1))!important;
    transform-origin:center center!important;
  }
}
@media (max-width:1100px) and (min-width:621px){
  html body.in-game #game .shipyard-berth[data-shipyard-unit="leviathan_beast_fortress"]{
    grid-template-columns:112px minmax(0,1fr)!important;
  }
  html body.in-game #game .shipyard-berth[data-shipyard-unit="leviathan_beast_fortress"] .shipyard-ship-art-wrap{
    width:108px!important;height:100px!important;min-width:108px!important;min-height:100px!important;
    overflow:visible!important;
  }
}
@media (max-width:620px){
  html body.in-game #game .shipyard-berth[data-shipyard-unit="leviathan_beast_fortress"]{
    grid-template-columns:92px minmax(0,1fr)!important;
  }
  html body.in-game #game .shipyard-berth[data-shipyard-unit="leviathan_beast_fortress"] .shipyard-ship-art-wrap{
    width:88px!important;height:82px!important;min-width:88px!important;min-height:82px!important;
    overflow:visible!important;
  }
}


/* ========================================================================
   v2026.09.13.08 — 航海事件：深海霸主等待決定可直接前往處理
   ======================================================================== */
body.in-game .event-drawer-item-side{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0}
body.in-game .event-drawer-action-btn{min-height:40px;padding:6px 12px;border:1px solid #438394;border-radius:7px;background:linear-gradient(135deg,#164957,#0b3240);color:#e4f7f8;font-weight:800;white-space:nowrap!important}
body.in-game .event-drawer-action-btn:hover,body.in-game .event-drawer-action-btn:focus-visible{background:linear-gradient(135deg,#1d6274,#0d4252);border-color:#69b6c3}
@media(max-width:760px){body.in-game .event-drawer-item-side{justify-content:flex-start;width:100%}body.in-game .event-drawer-action-btn{min-height:38px;padding:5px 10px;font-size:13px!important}}
body.in-game .event-drawer-item-side>time,body.in-game .event-drawer-item-side>span{color:#8cc8c7;font-weight:800;white-space:nowrap}
body.in-game .event-drawer-item.urgent .event-drawer-item-side>time,body.in-game .event-drawer-item.urgent .event-drawer-item-side>span{color:#ffb3aa}
@media(max-width:760px){body.in-game .event-drawer-item-side>time,body.in-game .event-drawer-item-side>span{white-space:normal!important}}

/* v2026.09.13.12：排行榜分頁、聯盟成員類型篩選與最後上線欄位。 */
body.in-game .leaderboard-pagination{
  display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;
  margin:0 var(--ti-panel-x,18px) 12px;
}
body.in-game .leaderboard-pagination>span{color:#8fb0b9;white-space:nowrap}
body.in-game .leaderboard-pagination>span b{color:#d9f7f3}
body.in-game .leaderboard-table-scroll + .leaderboard-pagination{margin-top:0;margin-bottom:var(--ti-panel-y,16px)}
body.in-game .alliance-members-heading{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
}
body.in-game .alliance-members-heading>.subheading{margin-bottom:8px!important}
body.in-game .alliance-member-filters{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0;
}
body.in-game .alliance-member-filters>span{color:#86a7b1;font-weight:800}
body.in-game .alliance-member-filters label{
  display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:6px 10px;
  border:1px solid #315866;border-radius:8px;background:#071b22;cursor:pointer;
}
body.in-game .alliance-member-filters input{width:22px;height:22px;accent-color:#67d4c1}
body.in-game .alliance-member-table [data-alliance-member-kind][hidden]{display:none!important}
body.in-game .alliance-last-login{white-space:nowrap;color:#a8c5cd}

@media(max-width:700px){
  body.in-game .leaderboard-pagination{justify-content:space-between;margin-left:10px;margin-right:10px}
  body.in-game .leaderboard-pagination>span{order:-1;flex-basis:100%;white-space:normal}
  body.in-game .leaderboard-pagination>button{flex:1 1 120px}
  body.in-game .alliance-members-heading{align-items:stretch;flex-direction:column}
  body.in-game .alliance-member-filters{margin-top:0}
  body.in-game .alliance-member-filters label{flex:1 1 130px;justify-content:center}
}


/* v2026.09.13.15：未達成的科技需求維持紅字外觀，但可直接前往研究所對應科技。 */
.requirement-research-jump{
  appearance:none;
  -webkit-appearance:none;
  display:inline;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:700;
  line-height:inherit;
  padding:0;
  margin:0;
  cursor:pointer;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  vertical-align:baseline;
}
.requirement-research-jump:hover{filter:brightness(1.18)}
.requirement-research-jump:focus-visible{outline:2px solid currentColor;outline-offset:3px;border-radius:3px}
html body.in-game .requirement-research-jump{
  min-height:0!important;
  height:auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  padding:0!important;
  margin:0!important;
  font:inherit!important;
  font-weight:700!important;
  line-height:inherit!important;
  display:inline!important;
  vertical-align:baseline!important;
  white-space:normal!important;
  overflow:visible!important;
}
html body.in-game .requirement-research-jump:hover{background:transparent!important;color:inherit!important;filter:brightness(1.18)}
html body.in-game .requirement-research-jump:focus-visible{outline:2px solid currentColor!important;outline-offset:3px!important;border-radius:3px!important}


/* ========================================================================
   v2026.09.14.01 — Modal 危險按鈕外觀與遊戲內共用樣式一致
   helpModal 位於 #game 外層，舊的 #game .danger-* 規則套不到互動視窗，導致紅色按鈕
   又回到早期扁平樣式。這裡只補 helpModal 的危險按鈕外觀，不改任何按鈕行為。
   ======================================================================== */
html body.in-game #helpModal :is(
  .danger-act,
  .danger-action,
  .danger-soft-btn,
  .unit-scrap-btn,
  .queue-cancel-btn,
  .unit-queue-cancel-btn,
  .admin-ban-btn,
  .demolish-btn,
  .table-manage-btn
){
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:var(--ti-control-h,44px)!important;
  height:auto!important;
  padding:9px 14px!important;
  border:1px solid #7a4b47!important;
  border-radius:5px!important;
  background:linear-gradient(180deg,#4a211f 0%,#351918 58%,#2d1514 100%)!important;
  color:#f1b0a8!important;
  font-weight:700!important;
  line-height:1.4!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  vertical-align:middle!important;
  cursor:pointer;
}
html body.in-game #helpModal :is(
  .danger-act,.danger-action,.danger-soft-btn,.unit-scrap-btn,.queue-cancel-btn,
  .unit-queue-cancel-btn,.admin-ban-btn,.demolish-btn,.table-manage-btn
):hover:not(:disabled),
html body.in-game #helpModal :is(
  .danger-act,.danger-action,.danger-soft-btn,.unit-scrap-btn,.queue-cancel-btn,
  .unit-queue-cancel-btn,.admin-ban-btn,.demolish-btn,.table-manage-btn
):focus-visible:not(:disabled){
  border-color:#a8655e!important;
  background:linear-gradient(180deg,#5b2926 0%,#421e1c 58%,#351817 100%)!important;
  color:#ffd2cc!important;
}
html body.in-game #helpModal :is(
  .danger-act,.danger-action,.danger-soft-btn,.unit-scrap-btn,.queue-cancel-btn,
  .unit-queue-cancel-btn,.admin-ban-btn,.demolish-btn,.table-manage-btn
):disabled{
  opacity:.48!important;
  cursor:not-allowed!important;
}

/* v2026.09.14.02：海域航圖直接顯示領主所屬聯盟；排行榜新增聯盟頁籤。 */
.map-selection-alliance{width:100%;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:2px;padding-top:7px;border-top:1px solid rgba(118,190,196,.18)}
.map-selection-alliance>span{font-size:20px;color:#83a9b2}.map-selection-alliance .alliance-rank-link{font-size:20px;text-align:left}
.score-alliance-name{font-weight:800}.score-alliance-name+small{display:block;margin-top:4px}
@media (max-width:900px){body.in-game #game .leaderboard-kind-tabs{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))!important}.map-selection-alliance>span,.map-selection-alliance .alliance-rank-link{font-size:14px}}

/* v2026.09.14.04：正式友盟信賴資訊。桌面維持既有 20px 可讀基準，窄畫面只做重排。 */
body.in-game #game .alliance-trust-cell{display:flex;flex-direction:column;gap:4px;min-width:190px;font-size:20px;line-height:1.35}
body.in-game #game .alliance-trust-cell b{color:#8fe5c0;font-size:20px}
body.in-game #game .alliance-trust-cell small{display:block;color:#8fb5c2;font-size:20px;line-height:1.35;white-space:normal}
.alliance-trust-public{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:12px;border:1px solid #315566;border-radius:12px;background:#07151c;font-size:20px}
.alliance-trust-public span{display:flex;align-items:center;gap:8px;min-width:0}.alliance-trust-public b{color:#8fe5c0;font-size:22px}.alliance-trust-public small{grid-column:1/-1;color:#8fb5c2;font-size:20px;line-height:1.4}
body.in-game #game .alliance-diplomacy-card>.table-scroll>.table{min-width:900px!important}
@media(max-width:620px){body.in-game #game .alliance-trust-cell,body.in-game #game .alliance-trust-cell b,body.in-game #game .alliance-trust-cell small,.alliance-trust-public,.alliance-trust-public small{font-size:12px}.alliance-trust-public b{font-size:14px}.alliance-trust-public{grid-template-columns:1fr}.alliance-trust-public small{grid-column:auto}}


/* v2026.09.14.08 — 玩家市場私下交易方向符號只顯示單一箭頭。
   icon_route.png 本身帶有裝飾性陰影層，在此流程欄位容易視覺上像兩個箭頭；
   此處回到單一文字箭頭，不修改正式 PNG 素材，也不影響其他路徑圖示。 */
body.in-game .market-form .market-arrow{
  background:none!important;
  width:24px!important;
  min-width:24px!important;
  height:auto!important;
  font-size:28px!important;
  line-height:1!important;
  color:#75b5c2!important;
  text-shadow:none!important;
  filter:none!important;
}


/* v2026.09.14.10 — 遠洋拓域學以目前等級為中心顯示前後 10 級狀態。 */
body.in-game .research-level-overview{margin:12px 0;display:grid;gap:8px}
body.in-game .research-level-overview h4{margin:0;color:#ccecf3}
body.in-game .research-level-overview .table-scroll{max-width:100%;overflow-x:auto}
body.in-game .research-level-overview table{width:100%;min-width:720px;border-collapse:collapse}
body.in-game .research-level-overview th,body.in-game .research-level-overview td{padding:8px 10px;border:1px solid #31505c;text-align:left;vertical-align:top}
body.in-game .research-level-overview tr.current-level td{background:rgba(57,166,184,.12);font-weight:600}

/* v2026.09.14.11 — 玩家市場掛單最多保留 7 天。 */
.market-listing-expiry-note{margin-top:8px!important;}


/* v2026.09.14.12 — 深海霸主資源包改由物品庫管理。 */
body.in-game .inventory-pack-open{margin-top:10px}


/* ========================================================================
   v2026.09.15.02 — 全站內容內距巡檢＋收藏星形固定槽位
   - 只整理視覺 spacing；不修改 gameplay、API、資料流程或圖片。
   - Panel 有自訂頁首時，普通內容仍應保留 --ti-panel-x / --ti-panel-y。
   ======================================================================== */

/* 收藏星形：固定 36px 操作槽，PNG 固定 24px 且完全置中。
   不再讓標題長度、Flex/Grid 可用寬度或按鈕 padding 影響肉眼尺寸。 */
body.in-game #game .battle-fav-btn{
  width:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0!important;
  margin:0!important;
  display:inline-grid!important;
  place-items:center!important;
  align-self:flex-start!important;
  flex:0 0 36px!important;
  line-height:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
body.in-game #game .battle-fav-btn>.favorite-ui-icon{
  display:block!important;
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  flex:none!important;
}
body.in-game #game .battle-library-title>div,
body.in-game #game .intel-head>div{min-width:0!important;flex:1 1 auto!important}

/* 群島菁英協作院：自訂頁首之後的內容全部回到正式 Panel gutter。 */
body.in-game #game .governance-elite-panel{gap:0!important}
body.in-game #game .governance-elite-panel>.governance-elite-summary{
  margin:var(--ti-panel-y) var(--ti-panel-x) 0!important;
  padding:0!important;
}
body.in-game #game .governance-elite-panel>.governance-elite-transfer{
  margin:var(--ti-section-gap) var(--ti-panel-x) var(--ti-panel-y)!important;
}
body.in-game #game .governance-animal-gallery{
  margin:0!important;
  padding:var(--ti-panel-y) var(--ti-panel-x)!important;
}
body.in-game #game .governance-pager{
  padding:12px var(--ti-panel-x)!important;
}

/* 客服：讀取完成後原先 supportBody 會失去 loading-line 的 padding，補回正式內容邊界。 */
body.in-game #game .support-center-panel #supportBody{
  padding:var(--ti-panel-y) var(--ti-panel-x)!important;
}
body.in-game #game .support-workspace{gap:var(--ti-gap)!important}

/* 漂流商會／珍珠道具庫：標題下方內容不可直接貼 Panel 邊框。 */
body.in-game #game #merchantBody,
body.in-game #game #itemShopBody{
  padding:var(--ti-panel-y) var(--ti-panel-x)!important;
}
body.in-game #game #itemShopBody>h3{
  margin:var(--ti-section-gap) 0 10px!important;
}
body.in-game #game #itemShopBody>h3:first-of-type{margin-top:12px!important}

/* 好友搜尋結果是動態插入區，補齊與好友內容相同的左右內容邊界。 */
body.in-game #game .friends-panel #friendSearchResult:not(:empty){
  display:grid!important;
  gap:var(--ti-gap-sm)!important;
  padding:var(--ti-panel-y) var(--ti-panel-x) 0!important;
}
body.in-game #game .friends-panel #friendSearchResult>.friend-search-result{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:var(--ti-gap)!important;
  padding:12px 14px!important;
  border:1px solid var(--ti-line-soft)!important;
  border-radius:var(--ti-radius)!important;
  background:#081b23!important;
}
body.in-game #game .friends-panel #friendSearchResult>.friend-search-result>span{
  display:flex!important;
  align-items:center!important;
  gap:var(--ti-gap-sm)!important;
  flex-wrap:wrap!important;
}
body.in-game #game .virtual-friend-section #virtualFriendSearchResult:not(:empty){
  display:grid!important;
  gap:var(--ti-gap-sm)!important;
  padding:8px 9px 0!important;
}

@media(max-width:620px){
  body.in-game #game .governance-elite-panel>.governance-elite-summary{
    margin:12px 12px 0!important;
  }
  body.in-game #game .governance-elite-panel>.governance-elite-transfer{
    margin:12px!important;
  }
  body.in-game #game .governance-animal-gallery{
    padding:12px!important;
  }
  body.in-game #game .support-center-panel #supportBody,
  body.in-game #game #merchantBody,
  body.in-game #game #itemShopBody{
    padding:12px!important;
  }
  body.in-game #game .friends-panel #friendSearchResult:not(:empty){
    padding:12px 12px 0!important;
  }
  body.in-game #game .friends-panel #friendSearchResult>.friend-search-result{
    align-items:stretch!important;
    flex-direction:column!important;
  }
}

/* v2026.09.15.13：惡潮要塞派遣時的受邀制聯合攻擊，以及聯盟虛擬盟友發展方向。 */
body.in-game #game .fortress-joint-invite{margin:10px 12px 14px;padding:14px;border:1px solid rgba(111,191,206,.30);border-radius:14px;background:rgba(6,31,42,.78);box-sizing:border-box;min-width:0}
body.in-game #game .fortress-joint-invite.hidden{display:none!important}
body.in-game #game .fortress-joint-invite-head{display:grid;gap:7px;margin-bottom:12px}
body.in-game #game .fortress-joint-invite-head>div{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
body.in-game #game .fortress-joint-invite-head b{color:#d9f5fb}
body.in-game #game .fortress-joint-invite-head span,body.in-game #game .fortress-joint-invite-head small{color:#9fc2cb;line-height:1.5}
body.in-game #game .fortress-joint-invite-body{display:grid;gap:14px}
body.in-game #game .fortress-joint-invite-body section{display:grid;gap:8px;min-width:0}
body.in-game #game .fortress-joint-invite-body h4{margin:0;color:#c5e5eb}
body.in-game #game .fortress-invite-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.in-game #game .fortress-invite-grid .joint-attack-member-check{min-width:0;align-items:flex-start}
body.in-game #game .fortress-invite-grid .joint-attack-member-check>span{display:grid;gap:3px;min-width:0}
body.in-game #game .fortress-invite-grid .joint-attack-member-check small{display:block;color:#87aab3;line-height:1.4}
body.in-game #game .joint-attack-member-check.disabled{opacity:.55;cursor:not-allowed}
body.in-game #game .alliance-virtual-development{margin-top:18px;padding:16px;border:1px solid rgba(124,190,196,.24);border-radius:14px;background:rgba(3,35,47,.24);box-sizing:border-box;min-width:0}
body.in-game #game .alliance-virtual-development-head{margin-bottom:12px}
body.in-game #game .alliance-virtual-development-head h3{margin:0 0 6px;color:#c7e4e9}
body.in-game #game .alliance-virtual-development-head p{margin:0;color:#91b0b8;line-height:1.55}
body.in-game #game .alliance-virtual-development-global,body.in-game #game .alliance-virtual-development-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(115px,160px) minmax(115px,160px) minmax(115px,160px) auto;gap:9px;align-items:center;padding:10px;border:1px solid rgba(73,124,135,.42);background:rgba(7,29,39,.66);box-sizing:border-box;min-width:0}
body.in-game #game .alliance-virtual-development-list{display:grid;gap:8px;margin-top:9px}
body.in-game #game .alliance-virtual-development-global>div,body.in-game #game .alliance-virtual-development-row>div{display:grid;gap:3px;min-width:0}
body.in-game #game .alliance-virtual-development-global>.alliance-virtual-development-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
body.in-game #game .alliance-virtual-development-actions .soft-btn{white-space:nowrap}
body.in-game #game .alliance-virtual-development-global small,body.in-game #game .alliance-virtual-development-row small{color:#89aab2;line-height:1.35}
body.in-game #game .alliance-virtual-development :is(select,button){box-sizing:border-box;max-width:100%}
@media(max-width:768px){
  body.in-game #game .fortress-invite-grid{grid-template-columns:1fr}
  body.in-game #game .alliance-virtual-development-global,body.in-game #game .alliance-virtual-development-row{grid-template-columns:1fr 1fr}
  body.in-game #game .alliance-virtual-development-global>div,body.in-game #game .alliance-virtual-development-row>div{grid-column:1/-1}
  body.in-game #game .alliance-virtual-development-global>button,body.in-game #game .alliance-virtual-development-row>button{grid-column:1/-1;width:100%}
  body.in-game #game .alliance-virtual-development-global>.alliance-virtual-development-actions{grid-column:1/-1;display:flex;justify-content:stretch}
  body.in-game #game .alliance-virtual-development-global>.alliance-virtual-development-actions>button{flex:1 1 150px}
}
@media(max-width:430px){
  body.in-game #game .alliance-virtual-development-global,body.in-game #game .alliance-virtual-development-row{grid-template-columns:1fr}
  body.in-game #game .alliance-virtual-development-global>div,body.in-game #game .alliance-virtual-development-row>div,body.in-game #game .alliance-virtual-development-global>button,body.in-game #game .alliance-virtual-development-row>button{grid-column:auto}
}

/* v2026.09.15.17：好友卡片直接顯示所屬聯盟，並保留手機／平板可操作寬度。 */
body.in-game #game .friend-alliance-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px;min-width:0;color:#7f9ca7}
body.in-game #game .friend-alliance-meta>span{font-weight:700;white-space:nowrap}
body.in-game #game .friend-alliance-meta>em{font-style:normal;color:#6f8993}
body.in-game #game .friend-alliance-meta .alliance-rank-link{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
body.in-game #game .alliance-invite-section .friend-request-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:720px){
  body.in-game #game .friend-alliance-meta{align-items:flex-start}
  body.in-game #game .friend-alliance-meta .alliance-rank-link{white-space:normal;overflow-wrap:anywhere}
  body.in-game #game .alliance-invite-section .friend-request-actions{grid-column:2/4;justify-content:flex-start}
}

/* v2026.09.16.02｜貓頭鷹・戰術推演官 / 戰鬥推演室 */
body.in-game .advisor-simulator-open{width:100%;min-height:44px;margin-top:2px;border:1px solid #6f8fb2;border-radius:10px;background:linear-gradient(180deg,#26425a,#172f42);color:#e7f3fb;font-weight:800;font-size:20px;cursor:pointer}
body.in-game .advisor-simulator-open:hover{filter:brightness(1.1)}
body.in-game .battle-sim-shell{display:grid;gap:16px;min-width:0;width:100%}
body.in-game .battle-sim-intro{display:grid;gap:5px;padding:12px 14px;border:1px solid #355a69;border-radius:12px;background:#0a1c24}
body.in-game .battle-sim-intro b{font-size:22px;color:#e2f1f5}
body.in-game .battle-sim-intro span{font-size:20px;color:#b7cbd2;line-height:1.55}
body.in-game .battle-sim-sides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start;min-width:0}
body.in-game .battle-sim-side{min-width:0;padding:13px;border:1px solid #35515d;border-radius:14px;background:rgba(5,24,31,.92)}
body.in-game .battle-sim-side.attacker{border-color:#765f55}
body.in-game .battle-sim-side.defender{border-color:#4e6c7b}
body.in-game .battle-sim-side-head{display:grid;gap:10px;margin-bottom:12px}
body.in-game .battle-sim-side-head span{display:block;color:#93abb5;font-size:20px}
body.in-game .battle-sim-side-head h3{margin:2px 0 0;font-size:24px;color:#eef7f8}
body.in-game .battle-sim-side-tools{display:flex;gap:7px;flex-wrap:wrap}
body.in-game .battle-sim-side-tools button{min-height:40px;font-size:20px;flex:1 1 150px}
body.in-game .battle-sim-tech-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}
body.in-game .battle-sim-tech-grid label{display:grid;gap:5px;min-width:0;padding:8px;border:1px solid #294753;border-radius:10px;background:#0b2029}
body.in-game .battle-sim-tech-grid label>span{font-size:20px;color:#bfd0d6;line-height:1.35}
body.in-game .battle-sim-tech-grid input{width:100%;min-width:0;min-height:42px;box-sizing:border-box;font-size:20px;text-align:right}
body.in-game .battle-sim-percent-input{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;min-width:0}
body.in-game .battle-sim-percent-input b{font-size:20px;color:#d3e4e8}
body.in-game .battle-sim-unit-group{min-width:0;margin-top:14px}
body.in-game .battle-sim-unit-group h4{margin:0 0 7px;font-size:21px;color:#d8e9ed}
body.in-game .battle-sim-unit-grid{display:grid;grid-template-columns:1fr;gap:6px;min-width:0}
body.in-game .battle-sim-unit-row{display:grid;grid-template-columns:44px minmax(0,1fr) 112px;gap:8px;align-items:center;min-width:0;padding:6px 7px;border:1px solid #29434d;border-radius:9px;background:#091a21}
body.in-game .battle-sim-unit-row img{width:44px;height:44px;object-fit:contain;display:block}
body.in-game .battle-sim-unit-row span{min-width:0;font-size:20px;line-height:1.3;color:#c9dadd;overflow-wrap:anywhere}
body.in-game .battle-sim-unit-row input{width:100%;min-width:0;min-height:40px;box-sizing:border-box;font-size:20px;text-align:right}
body.in-game .battle-sim-runbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:13px;border:1px solid #436876;border-radius:12px;background:#0b2029}
body.in-game .battle-sim-runbar #battleSimulatorRun{min-height:48px;font-size:22px;flex:0 0 auto}
body.in-game .battle-sim-runbar small{font-size:20px;line-height:1.45;color:#a9c0c8;flex:1 1 320px}
body.in-game .battle-sim-result{display:grid;gap:14px;min-width:0;padding:14px;border:1px solid #4c6975;border-radius:14px;background:#07171e}
body.in-game .battle-sim-result.hidden{display:none!important}
body.in-game .battle-sim-result-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border-radius:11px;background:#102832;border:1px solid #42616c}
body.in-game .battle-sim-result-head span{font-size:20px;color:#a9c2ca}
body.in-game .battle-sim-result-head strong{font-size:28px;color:#eff8fa}
body.in-game .battle-sim-result-head b{margin-left:auto;font-size:20px;color:#c5dce2}
body.in-game .battle-sim-result-head.attacker{border-color:#8a6858}
body.in-game .battle-sim-result-head.defender{border-color:#63849a}
body.in-game .battle-sim-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
body.in-game .battle-sim-result-grid>section{min-width:0;padding:11px;border:1px solid #2e4c57;border-radius:11px;background:#0a1d25}
body.in-game .battle-sim-result-grid h3{margin:0 0 8px;font-size:23px}
body.in-game .battle-sim-result-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px}
body.in-game .battle-sim-result-summary span{display:grid;gap:2px;padding:7px;border:1px solid #294852;border-radius:8px;font-size:20px;color:#a8c0c7;text-align:center}
body.in-game .battle-sim-result-summary b{font-size:21px;color:#eff6f7}
body.in-game .battle-sim-result-units{display:grid;gap:5px;min-width:0}
body.in-game .battle-sim-result-unit{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:7px;align-items:center;min-width:0;padding:5px 6px;border-bottom:1px solid #233d46}
body.in-game .battle-sim-result-unit img{width:38px;height:38px;object-fit:contain}
body.in-game .battle-sim-result-unit span{min-width:0;font-size:20px;overflow-wrap:anywhere}
body.in-game .battle-sim-result-unit b{font-size:20px;white-space:nowrap}
body.in-game .battle-sim-result-unit small{grid-column:2/-1;font-size:20px;color:#b7c9ce}
body.in-game .battle-sim-loss-value{display:block;margin-top:9px;font-size:20px;color:#c8d8dc;line-height:1.45}
body.in-game .battle-sim-round-table-wrap{min-width:0;max-width:100%;overflow-x:auto;border:1px solid #294853;border-radius:10px}
body.in-game .battle-sim-round-table{width:100%;min-width:760px;border-collapse:collapse}
body.in-game .battle-sim-round-table th,body.in-game .battle-sim-round-table td{padding:8px 9px;border-bottom:1px solid #29434c;font-size:20px;text-align:right;white-space:nowrap}
body.in-game .battle-sim-round-table th:first-child,body.in-game .battle-sim-round-table td:first-child{text-align:center}
body.in-game .battle-sim-random-note{padding:9px 11px;border-radius:9px;background:#10232b;color:#afc5cb;font-size:20px;line-height:1.5}
@media(max-width:900px){
  body.in-game .battle-sim-sides,body.in-game .battle-sim-result-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  body.in-game .battle-sim-tech-grid{grid-template-columns:1fr}
  body.in-game .battle-sim-unit-row{grid-template-columns:40px minmax(0,1fr) 94px;gap:6px;padding:6px}
  body.in-game .battle-sim-unit-row img{width:40px;height:40px}
  body.in-game .battle-sim-result-summary{grid-template-columns:1fr 1fr 1fr}
  body.in-game .battle-sim-result-head b{margin-left:0;width:100%}
  body.in-game .battle-sim-runbar #battleSimulatorRun{width:100%}
}
@media(max-width:390px){
  body.in-game .battle-sim-unit-row{grid-template-columns:36px minmax(0,1fr) 82px}
  body.in-game .battle-sim-unit-row img{width:36px;height:36px}
  body.in-game .battle-sim-result-summary{grid-template-columns:1fr}
}

/* ========================================================================
   v2026.09.16.05 — 電能資源 / 潮晶蓄電池
   - 頂部電能改為橫向電池條，上方顯示存量 / 容量。
   - 低 / 中 / 高蓄電量以紅 / 黃 / 綠呈現。
   - 電池條下方在空間允許時顯示淨充放電量與狀態。
   ======================================================================== */
html body.in-game #game .resource-cell.energy-cell{
  min-width:0!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:auto auto auto auto!important;
  gap:2px!important;
  width:100%!important;
  min-width:0!important;
  align-content:center!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span{
  grid-column:1!important;grid-row:1!important;
  margin:0!important;line-height:1.05!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{
  grid-column:1!important;grid-row:2!important;
  width:100%!important;max-width:none!important;
  margin:0!important;text-align:left!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;
  font-variant-numeric:tabular-nums!important;
}
html body.in-game #game .top-energy-battery{
  grid-column:1!important;grid-row:3!important;
  position:relative!important;
  width:100%!important;height:9px!important;min-height:9px!important;
  margin:1px 0!important;
  border:1px solid rgba(157,198,207,.52)!important;
  border-radius:4px!important;
  background:rgba(2,13,18,.9)!important;
  overflow:hidden!important;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.65)!important;
}
html body.in-game #game .top-energy-battery::after{
  content:''!important;position:absolute!important;right:-3px!important;top:2px!important;
  width:3px!important;height:5px!important;border-radius:0 2px 2px 0!important;
  background:rgba(157,198,207,.58)!important;
}
html body.in-game #game .top-energy-battery-fill{
  display:block!important;height:100%!important;width:0;
  border-radius:3px!important;transition:width .25s ease!important;
}
html body.in-game #game .top-energy-battery-fill.low,
html body.in-game #game .energy-storage-overview-fill.low{background:#d95850!important}
html body.in-game #game .top-energy-battery-fill.mid,
html body.in-game #game .energy-storage-overview-fill.mid{background:#d7ad43!important}
html body.in-game #game .top-energy-battery-fill.high,
html body.in-game #game .energy-storage-overview-fill.high{background:#58b86f!important}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{
  grid-column:1!important;grid-row:4!important;
  display:block!important;margin:0!important;
  line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;
}

/* 資源總覽中的第五張「電能儲存」卡片。 */
html body.in-game #game .energy-storage-overview-card{
  min-width:0!important;padding:13px!important;
  border:1px solid rgba(95,158,176,.22)!important;border-radius:13px!important;
  background:linear-gradient(160deg,rgba(8,34,43,.95),rgba(4,21,28,.97))!important;
  box-shadow:0 8px 20px rgba(0,0,0,.14)!important;
}
html body.in-game #game .energy-storage-overview-card .resource-storage-head,
html body.in-game #game .energy-storage-overview-card .resource-storage-foot{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-width:0!important;
}
html body.in-game #game .energy-storage-overview-card .resource-storage-head>span,
html body.in-game #game .energy-storage-overview-card .resource-storage-foot>span{color:#7898a4!important}
html body.in-game #game .energy-storage-overview-card .resource-storage-head>b{color:#d8ebf1!important;font-weight:850!important;white-space:nowrap!important}
html body.in-game #game .energy-storage-overview-card .resource-storage-track{
  height:14px!important;margin:12px 0 10px!important;border:1px solid rgba(84,142,158,.38)!important;
  border-radius:999px!important;background:#031017!important;overflow:hidden!important;
}
html body.in-game #game .energy-storage-overview-card .resource-storage-track>i{
  display:block!important;height:100%!important;border-radius:999px!important;transition:width .25s ease!important;
}
html body.in-game #game .energy-storage-overview-card .resource-storage-foot>strong{font-weight:800!important;white-space:nowrap!important}

@media(max-width:1100px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{gap:1px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{font-size:13px!important;line-height:1!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span{font-size:12px!important}
  html body.in-game #game .top-energy-battery{height:7px!important;min-height:7px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{font-size:12px!important}
}
@media(max-width:620px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{font-size:12px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{display:none!important}
  html body.in-game #game .energy-storage-overview-card{padding:8px!important}
  html body.in-game #game .energy-storage-overview-card .resource-storage-head,
  html body.in-game #game .energy-storage-overview-card .resource-storage-foot{align-items:flex-start!important;flex-direction:column!important;gap:3px!important}
  html body.in-game #game .energy-storage-overview-card .resource-storage-foot>strong{white-space:normal!important}
}
@media(max-width:620px){
  /* 手機空間較窄時隱藏可選的最下方狀態；電量、容量與電池條永遠保留。 */
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{grid-template-rows:auto auto auto!important}
}


/* ========================================================================
   v2026.09.16.08 — 頂端電能卡片高度一致化
   - 電能名稱與「目前 / 容量」放在同一列，電池條位於下一列。
   - 充放電資訊保留在最下列；桌面外框高度與其他資源卡一致。
   ======================================================================== */
html body.in-game #game .resource-cell.energy-cell>.top-energy-content{
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto 9px auto!important;
  column-gap:8px!important;
  row-gap:3px!important;
  align-content:center!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span{
  grid-column:1!important;
  grid-row:1!important;
  align-self:center!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{
  grid-column:2!important;
  grid-row:1!important;
  width:auto!important;
  max-width:100%!important;
  text-align:right!important;
  align-self:center!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-battery{
  grid-column:1/3!important;
  grid-row:2!important;
  align-self:center!important;
  height:9px!important;
  min-height:9px!important;
  margin:0!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{
  grid-column:1/3!important;
  grid-row:3!important;
  margin:0!important;
  min-width:0!important;
}
@media(min-width:901px){
  html body.in-game #game .resource-bar{align-items:stretch!important;}
  html body.in-game #game .resource-cell{
    height:78px!important;
    min-height:78px!important;
    max-height:78px!important;
  }
}
@media(max-width:900px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{
    grid-template-rows:auto 7px auto!important;
    row-gap:2px!important;
  }
  html body.in-game #game .resource-cell.energy-cell .top-energy-battery{
    height:7px!important;
    min-height:7px!important;
  }
}
@media(max-width:620px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{
    grid-template-rows:auto 7px!important;
  }
}


/* ========================================================================
   v2026.09.16.16 — 情報中心／每日聯盟補給改為圖像優先
   ======================================================================== */
body.in-game .intel-library-panel .intel-tech-summary{
  display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important;
}
body.in-game .intel-library-panel .intel-tech-summary>span{color:#9dbbc1!important;font-weight:800!important}
body.in-game .intel-library-panel .intel-tech-summary>b{color:#e8fff9!important;font-size:1.15em!important}
body.in-game .intel-library-panel .intel-tech-summary>em{font-style:normal!important;color:#82d9c9!important}
body.in-game .intel-library-panel .intel-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;align-items:start!important;
}
body.in-game .intel-library-panel .intel-card{
  display:flex!important;flex-direction:column!important;gap:12px!important;padding:16px!important;
  border:1px solid rgba(77,145,160,.38)!important;border-radius:14px!important;
  background:linear-gradient(180deg,rgba(8,35,44,.97),rgba(5,23,31,.98))!important;
  box-shadow:0 10px 24px rgba(0,0,0,.14)!important;
}
body.in-game .intel-library-panel .intel-card.intel-stale{opacity:.82!important;border-color:rgba(139,126,84,.45)!important}
body.in-game .intel-library-panel .intel-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important}
body.in-game .intel-library-panel .intel-head>div{min-width:0!important;display:grid!important;gap:4px!important}
body.in-game .intel-library-panel .intel-head b{color:#d8f6f4!important;font-weight:900!important}
body.in-game .intel-library-panel .intel-head span{color:#81aab3!important}
body.in-game .intel-library-panel .intel-age{display:flex!important;justify-content:space-between!important;gap:10px!important;margin:0!important;padding-bottom:10px!important;border-bottom:1px solid rgba(80,139,151,.2)!important;color:#84a4ad!important;font-size:20px!important}
body.in-game .intel-library-panel .intel-age b{color:#a9c2c8!important;font-weight:700!important;text-align:right!important}
body.in-game .intel-visual-sections{display:grid!important;gap:12px!important}
body.in-game .intel-visual-section{min-width:0!important;padding:12px!important;border:1px solid rgba(69,135,150,.25)!important;border-radius:12px!important;background:rgba(5,26,34,.7)!important}
body.in-game .intel-visual-section>header{display:flex!important;align-items:center!important;gap:9px!important;margin-bottom:10px!important;color:#bdd7db!important}
body.in-game .intel-section-icon{width:30px!important;height:30px!important;object-fit:contain!important;flex:0 0 auto!important}
body.in-game .intel-resource-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
body.in-game .intel-resource-tile{display:grid!important;grid-template-rows:64px auto auto!important;justify-items:center!important;align-items:center!important;gap:4px!important;min-width:0!important;padding:9px 6px!important;border-radius:10px!important;background:rgba(10,45,55,.72)!important;text-align:center!important}
body.in-game .intel-resource-tile img{width:58px!important;height:58px!important;object-fit:contain!important;filter:drop-shadow(0 5px 7px rgba(0,0,0,.28))!important}
body.in-game .intel-resource-tile b{color:#f0fff9!important;font-weight:900!important}
body.in-game .intel-resource-tile span{color:#92b2b9!important;line-height:1.2!important}
body.in-game .intel-unit-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
body.in-game .intel-unit-tile{display:grid!important;grid-template-rows:78px auto auto!important;justify-items:center!important;align-items:center!important;gap:4px!important;min-width:0!important;padding:8px 5px 9px!important;border:1px solid rgba(75,137,151,.18)!important;border-radius:10px!important;background:linear-gradient(180deg,rgba(9,43,53,.82),rgba(6,29,37,.78))!important;text-align:center!important}
body.in-game .intel-unit-art{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:78px!important;overflow:hidden!important}
body.in-game .intel-unit-art img{max-width:96px!important;max-height:76px!important;width:auto!important;height:auto!important;object-fit:contain!important;filter:drop-shadow(0 6px 8px rgba(0,0,0,.34))!important}
body.in-game .intel-unit-tile b{color:#eafef9!important;font-weight:900!important}
body.in-game .intel-unit-tile span{color:#a2bec4!important;line-height:1.2!important;overflow-wrap:anywhere!important}
body.in-game .intel-activity-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
body.in-game .intel-activity-tile{display:grid!important;justify-items:center!important;gap:4px!important;padding:10px 6px!important;border-radius:10px!important;background:rgba(9,43,53,.72)!important;text-align:center!important}
body.in-game .intel-activity-icon{width:42px!important;height:42px!important;object-fit:contain!important}
body.in-game .intel-activity-tile b{color:#e8fff9!important;font-weight:900!important}
body.in-game .intel-activity-tile span{color:#9dbac0!important}
body.in-game .intel-event-visual{display:flex!important;align-items:center!important;gap:14px!important;padding:10px!important;border-radius:10px!important;background:rgba(9,43,53,.72)!important}
body.in-game .intel-event-icon{width:54px!important;height:54px!important;object-fit:contain!important;flex:0 0 auto!important}
body.in-game .intel-event-visual>div{display:grid!important;gap:3px!important;min-width:0!important}
body.in-game .intel-event-visual b{color:#e8fff9!important;font-weight:900!important}
body.in-game .intel-event-visual span{color:#9dbac0!important;overflow-wrap:anywhere!important}
body.in-game .intel-visual-empty{display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;min-height:86px!important;border-radius:10px!important;background:rgba(7,35,43,.55)!important;color:#809fa7!important;text-align:center!important}
body.in-game .intel-empty-icon{width:42px!important;height:42px!important;object-fit:contain!important;opacity:.72!important}
body.in-game .intel-actions{display:flex!important;gap:9px!important;flex-wrap:wrap!important;margin-top:auto!important}
body.in-game .intel-actions>button{flex:1 1 180px!important}

body.in-game .alliance-supply-card{
  grid-template-columns:140px minmax(0,1fr) auto!important;gap:18px!important;align-items:center!important;
  padding:18px!important;overflow:hidden!important;
  background:linear-gradient(135deg,rgba(9,65,63,.72),rgba(6,29,39,.94))!important;
}
body.in-game .alliance-supply-visual{display:grid!important;justify-items:center!important;gap:7px!important;min-width:0!important}
body.in-game .alliance-supply-art{display:flex!important;align-items:center!important;justify-content:center!important;width:124px!important;height:124px!important;border:1px solid rgba(115,226,208,.28)!important;border-radius:18px!important;background:radial-gradient(circle at 50% 42%,rgba(36,128,119,.32),rgba(4,24,31,.86) 72%)!important;box-shadow:inset 0 0 20px rgba(74,214,192,.08),0 9px 20px rgba(0,0,0,.2)!important}
body.in-game .alliance-supply-art-img{max-width:108px!important;max-height:108px!important;width:auto!important;height:auto!important;object-fit:contain!important;filter:drop-shadow(0 8px 10px rgba(0,0,0,.34))!important}
body.in-game .alliance-supply-visual>span{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;padding:4px 10px!important;border-radius:999px!important;background:rgba(55,160,148,.24)!important;color:#bff6ec!important;font-weight:900!important;text-align:center!important}
body.in-game .alliance-supply-card.claimed .alliance-supply-art-img{opacity:.55!important;filter:grayscale(.35) drop-shadow(0 5px 7px rgba(0,0,0,.25))!important}
body.in-game .alliance-supply-copy{display:grid!important;align-content:center!important;gap:5px!important}
body.in-game .alliance-supply-copy>span{color:#7fc7c0!important;font-weight:900!important}
body.in-game .alliance-supply-copy h3{margin:0!important;color:#effffb!important;font-size:1.2em!important}
body.in-game .alliance-supply-copy p{margin:0!important;color:#afd0d2!important}
body.in-game .alliance-supply-copy small{margin:0!important;color:#83a8af!important}
body.in-game .alliance-supply-action{display:flex!important;align-items:center!important;justify-content:flex-end!important}
body.in-game .alliance-supply-action>button{min-width:160px!important}

@media(max-width:1180px){
  body.in-game .intel-library-panel .intel-grid{grid-template-columns:1fr!important}
}
@media(max-width:900px){
  body.in-game .alliance-supply-card{grid-template-columns:120px minmax(0,1fr)!important}
  body.in-game .alliance-supply-art{width:108px!important;height:108px!important}
  body.in-game .alliance-supply-art-img{max-width:94px!important;max-height:94px!important}
  body.in-game .alliance-supply-action{grid-column:1/-1!important}
  body.in-game .alliance-supply-action>button{width:100%!important}
}
@media(max-width:620px){
  body.in-game .intel-resource-grid,body.in-game .intel-unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.in-game .intel-activity-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.in-game .intel-library-panel .intel-age{align-items:flex-start!important;flex-direction:column!important}
  body.in-game .intel-library-panel .intel-age b{text-align:left!important}
  body.in-game .intel-library-panel .intel-age{font-size:14px!important}
  body.in-game .alliance-supply-card{grid-template-columns:1fr!important;text-align:center!important}
  body.in-game .alliance-supply-visual{justify-self:center!important}
  body.in-game .alliance-supply-copy{justify-items:center!important}
  body.in-game .alliance-supply-copy small{text-align:center!important}
  body.in-game .alliance-supply-action{grid-column:auto!important;width:100%!important}
}
@media(max-width:360px){
  body.in-game .intel-resource-grid,body.in-game .intel-unit-grid{grid-template-columns:1fr 1fr!important}
  body.in-game .intel-activity-grid{grid-template-columns:1fr!important}
}

/* v2026.09.17.01：偵察任務只突出海豚偵巡群；其他魚群保留可辨識但不可誤派。 */
body.in-game .fleet-step-ships .fleet-pick.recon-only-disabled{
  opacity:.28!important;
  filter:saturate(.25) brightness(.72)!important;
  border-color:rgba(78,112,119,.18)!important;
  box-shadow:none!important;
}
body.in-game .fleet-step-ships .fleet-pick.recon-only-disabled .fleet-pick-controls{
  pointer-events:none!important;
}
body.in-game .fleet-step-ships .fleet-pick.recon-only-disabled :is(input,.fleet-step-btn,.fleet-all-btn){
  cursor:not-allowed!important;
}
body.in-game .fleet-step-ships .fleet-pick.recon-only-focus{
  opacity:1!important;
  filter:none!important;
  border-color:rgba(89,220,213,.9)!important;
  box-shadow:0 0 0 2px rgba(89,220,213,.16),0 0 28px rgba(52,191,184,.14)!important;
  background:linear-gradient(145deg,rgba(7,52,58,.98),rgba(5,30,36,.98))!important;
}



/* ========================================================================
   v2026.09.17.04 — 生產隊列兩行化 / 頂端電能卡片防裁切
   ======================================================================== */
html body.in-game #game .unit-queue-row.unit-queue-row-v2{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:7px!important;
  align-items:stretch!important;
  padding:10px 12px!important;
}
html body.in-game #game .unit-queue-row-v2 .unit-queue-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-width:0!important;
}
html body.in-game #game .unit-queue-row-v2 .unit-queue-title{
  min-width:0!important;
  flex:1 1 auto!important;
  margin:0!important;
  line-height:1.3!important;
}
html body.in-game #game .unit-queue-row-v2 .unit-queue-cancel-btn{
  flex:0 0 auto!important;
  width:auto!important;
  margin:0!important;
  white-space:nowrap!important;
  align-self:center!important;
}
html body.in-game #game .unit-queue-detail-row{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:5px 14px!important;
  min-width:0!important;
  color:#86a2ad!important;
  line-height:1.45!important;
}
html body.in-game #game .unit-queue-detail{
  display:inline-flex!important;
  align-items:baseline!important;
  gap:5px!important;
  min-width:0!important;
  white-space:normal!important;
}
html body.in-game #game .unit-queue-detail:not(:last-child)::after{
  content:'·';
  margin-left:9px;
  color:#42616b;
  font-weight:800;
}
html body.in-game #game .unit-queue-detail b{color:#e0c96f!important;white-space:nowrap!important}
html body.in-game #game .unit-queue-status{
  display:inline-flex!important;
  align-items:center!important;
  min-height:28px!important;
  padding:2px 8px!important;
  border:1px solid #355560!important;
  border-radius:999px!important;
  background:#0a2630!important;
  color:#9fc4ce!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
html body.in-game #game .unit-queue-status.active{border-color:#39765c!important;background:#0c2b24!important;color:#76c9a1!important}
html body.in-game #game .unit-queue-status.pending{border-color:#4b5960!important;background:#111f25!important;color:#92a6ad!important}
@media(max-width:720px){
  html body.in-game #game .unit-queue-row-v2 .unit-queue-head{align-items:stretch!important;flex-direction:column!important}
  html body.in-game #game .unit-queue-row-v2 .unit-queue-cancel-btn{width:100%!important;min-height:44px!important}
  html body.in-game #game .unit-queue-detail-row{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}
  html body.in-game #game .unit-queue-detail{display:flex!important}
  html body.in-game #game .unit-queue-detail::after{display:none!important}
  html body.in-game #game .unit-queue-status{justify-content:center!important;width:100%!important;box-sizing:border-box!important}
}

/* 電能卡第一列保證「電能」不被數字擠成直排；三層內容都限制在卡片高度內。 */
html body.in-game #game .resource-cell.energy-cell{
  overflow:visible!important;
  align-items:center!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content{
  display:grid!important;
  grid-template-columns:max-content minmax(0,1fr)!important;
  grid-template-rows:minmax(20px,auto) 8px minmax(20px,auto)!important;
  column-gap:8px!important;
  row-gap:3px!important;
  align-content:center!important;
  width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span{
  grid-column:1!important;grid-row:1!important;
  min-width:max-content!important;
  white-space:nowrap!important;
  overflow:visible!important;
  line-height:1.1!important;
  margin:0!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{
  grid-column:2!important;grid-row:1!important;
  min-width:0!important;width:100%!important;max-width:none!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  line-height:1.1!important;
  margin:0!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-battery{
  grid-column:1/3!important;grid-row:2!important;
  width:100%!important;height:8px!important;min-height:8px!important;
  margin:0!important;
  align-self:center!important;
}
html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{
  grid-column:1/3!important;grid-row:3!important;
  display:block!important;
  min-width:0!important;
  margin:0!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  line-height:1.1!important;
}
@media(min-width:1101px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span,
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{font-size:20px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{font-size:20px!important}
}
@media(min-width:901px){
  html body.in-game #game .resource-cell.energy-cell{height:78px!important;min-height:78px!important;max-height:78px!important}
}
@media(max-width:1100px) and (min-width:621px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{grid-template-rows:minmax(17px,auto) 7px minmax(17px,auto)!important;row-gap:2px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span,
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{font-size:16px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{font-size:15px!important}
}
@media(max-width:620px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{grid-template-columns:max-content minmax(0,1fr)!important;grid-template-rows:minmax(15px,auto) 7px!important;row-gap:2px!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergyFlow{display:none!important}
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>span,
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content>#rEnergy{font-size:12px!important}
}


/* ========================================================================
   v2026.09.17.05 — 頂端電能卡內容重排（不改資源卡尺寸）
   - 不調整 .resource-cell 的寬、高、padding 或資源列欄寬。
   - 第一列：電能名稱 + 充放電狀態。
   - 第二列：簡寫的「目前 / 容量」+ 每小時淨變化。
   - 第三列：橫向電池條。
   - 完整精確數值保留在 tooltip / aria-label。
   ======================================================================== */
html body.in-game #game .resource-cell.energy-cell>.top-energy-content{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto 8px!important;
  gap:3px!important;
  width:100%!important;
  min-width:0!important;
  align-content:center!important;
  overflow:hidden!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-head,
html body.in-game #game .resource-cell.energy-cell .top-energy-reading{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-width:0!important;
  width:100%!important;
  margin:0!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-head>span{
  flex:0 0 auto!important;
  min-width:max-content!important;
  white-space:nowrap!important;
  overflow:visible!important;
  line-height:1!important;
  margin:0!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-head>#rEnergyStatus{
  flex:0 1 auto!important;
  min-width:0!important;
  margin:0!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  line-height:1!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-reading>#rEnergy{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  text-align:left!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  line-height:1!important;
  font-variant-numeric:tabular-nums!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-reading>#rEnergyFlow{
  flex:0 0 auto!important;
  min-width:max-content!important;
  margin:0!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow:visible!important;
  line-height:1!important;
  font-variant-numeric:tabular-nums!important;
}
html body.in-game #game .resource-cell.energy-cell .top-energy-battery{
  grid-column:1!important;
  grid-row:3!important;
  width:100%!important;
  height:8px!important;
  min-height:8px!important;
  margin:0!important;
  align-self:center!important;
}
@media(min-width:1101px){
  html body.in-game #game .resource-cell.energy-cell :is(.top-energy-head>span,#rEnergyStatus,#rEnergy,#rEnergyFlow){font-size:20px!important}
}
@media(max-width:1100px) and (min-width:621px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{grid-template-rows:auto auto 7px!important;gap:2px!important}
  html body.in-game #game .resource-cell.energy-cell :is(.top-energy-head>span,#rEnergyStatus,#rEnergy,#rEnergyFlow){font-size:16px!important}
  html body.in-game #game .resource-cell.energy-cell .top-energy-battery{height:7px!important;min-height:7px!important}
}
@media(max-width:620px){
  html body.in-game #game .resource-cell.energy-cell>.top-energy-content{grid-template-rows:auto auto 7px!important;gap:2px!important}
  html body.in-game #game .resource-cell.energy-cell :is(.top-energy-head>span,#rEnergyStatus,#rEnergy,#rEnergyFlow){font-size:12px!important}
  html body.in-game #game .resource-cell.energy-cell .top-energy-head>#rEnergyStatus{display:none!important}
  html body.in-game #game .resource-cell.energy-cell .top-energy-battery{height:7px!important;min-height:7px!important}
}


/* v2026.09.18.01：戰鬥摘要的小型魚群縮圖只在自己的縮圖格內顯示，避免大型單位視覺倍率壓到名稱／數量。 */
body.in-game .battle-unit,
body.in-game .battle-result-unit-row,
body.in-game .fleet-composition-unit-head{overflow:hidden}
body.in-game .battle-unit img.battle-unit-thumb,
body.in-game .battle-result-unit-row img.battle-unit-thumb,
body.in-game .fleet-composition-unit-head img.battle-unit-thumb{
  display:block!important;
  margin:auto!important;
  object-fit:contain!important;
  object-position:center center!important;
  max-width:100%!important;
  max-height:100%!important;
}


/* v2026.09.18.02：手機版研究視窗將成本與操作往上，詳細資料改為可收合區塊。 */
body.in-game #helpModalBody .research-detail-disclosure{
  margin-top:14px;
  border:1px solid #31505c;
  background:linear-gradient(180deg,rgba(12,34,43,.95),rgba(7,23,30,.95));
  border-radius:12px;
  overflow:hidden;
}
body.in-game #helpModalBody .research-detail-toggle{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  color:#d7edf4;
  font-weight:700;
  user-select:none;
}
body.in-game #helpModalBody .research-detail-toggle::-webkit-details-marker{display:none}
body.in-game #helpModalBody .research-detail-toggle::before{
  content:'';
  width:20px;
  height:20px;
  flex:0 0 20px;
  background:url('/assets/icon_expand.png?v=2026091903') center/contain no-repeat;
}
body.in-game #helpModalBody .research-detail-disclosure[open] .research-detail-toggle::before{
  background-image:url('/assets/icon_collapse.png?v=2026091903');
}
body.in-game #helpModalBody .research-detail-body{
  padding:0 14px 14px;
  display:grid;
  gap:12px;
}
body.in-game #helpModalBody .research-detail-body > :first-child{margin-top:0}
body.in-game #helpModalBody .research-view-detail .help-action-row{margin:12px 0 0}
@media(max-width:760px){
  body.in-game #helpModalBody .research-view-detail .help-current,
  body.in-game #helpModalBody .research-view-detail .help-cost,
  body.in-game #helpModalBody .research-view-detail .requirement-ok,
  body.in-game #helpModalBody .research-view-detail .requirement-missing,
  body.in-game #helpModalBody .research-view-detail .help-action-row{
    margin-left:0!important;
    margin-right:0!important;
  }
  body.in-game #helpModalBody .research-view-detail .help-action-row .research-action-btn{
    width:100%;
  }
}



/* ========================================================================
   v2026.09.19.01 — 島際市場手機公開掛單交易區
   620px 以下保留賣家／資源／單價的精簡標籤排列，但「本次購買／本次支付／操作」
   改為完整寬度堆疊，避免固定標籤欄把輸入框與確認按鈕擠出畫面。
   ======================================================================== */
@media(max-width:620px){
  body.in-game #game .market-open-order-table td:nth-child(4),
  body.in-game #game .market-open-order-table td:nth-child(5),
  body.in-game #game .market-open-order-table td:nth-child(6){
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:6px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding:8px!important;
    border:1px solid rgba(68,112,125,.36)!important;
    border-radius:9px!important;
    background:rgba(3,25,31,.52)!important;
  }
  body.in-game #game .market-open-order-table td:nth-child(4)::before,
  body.in-game #game .market-open-order-table td:nth-child(5)::before,
  body.in-game #game .market-open-order-table td:nth-child(6)::before{
    display:block!important;
    margin:0!important;
    font-size:13px!important;
    line-height:1.2!important;
  }
  body.in-game #game .market-table-buy,
  body.in-game #game .market-table-buy-input,
  body.in-game #game .market-table-pay,
  body.in-game #game .market-table-action,
  body.in-game #game .market-confirm-buy{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  body.in-game #game .market-table-buy-input{grid-template-columns:minmax(0,1fr) 68px!important;gap:6px!important}
  body.in-game #game .market-table-buy-input input,
  body.in-game #game .market-table-buy-input button{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  body.in-game #game .market-table-pay{grid-template-columns:42px minmax(0,1fr)!important}
  body.in-game #game .market-table-pay>div{min-width:0!important}
  body.in-game #game .market-table-action{display:block!important;text-align:stretch!important}
  body.in-game #game .market-table-action .market-confirm-buy{display:block!important;margin:0!important}
}
@media(max-width:360px){
  body.in-game #game .market-open-order-table td:nth-child(4),
  body.in-game #game .market-open-order-table td:nth-child(5),
  body.in-game #game .market-open-order-table td:nth-child(6){grid-template-columns:minmax(0,1fr)!important}
  body.in-game #game .market-table-buy-input{grid-template-columns:minmax(0,1fr) 64px!important}
}


/* v2026.09.19.04：航隊動態／航海事件圖像化 */
body.in-game .fleet-visual-card{display:grid!important;grid-template-columns:minmax(0,1fr) 164px!important;gap:18px 16px;padding:16px 18px;border:1px solid #2f5b66;border-radius:14px;background:linear-gradient(135deg,rgba(7,30,39,.92),rgba(4,22,30,.95));margin-bottom:12px;align-items:start!important}
body.in-game .fleet-row-main{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto!important;gap:14px;min-width:0;align-items:start;width:100%}
body.in-game .fleet-row-summary{display:grid;gap:6px;min-width:0;align-self:start;padding-right:8px;width:100%}
body.in-game .fleet-row-progress-wrap{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;align-self:start;width:100%;max-width:none}
body.in-game .fleet-row-kicker{display:inline-flex;align-items:center;gap:6px;color:#8eced0;font-weight:800;font-size:15px}
body.in-game .fleet-row-summary>b{font-size:22px;line-height:1.35;color:#e8fbff;overflow-wrap:anywhere}
body.in-game .fleet-row-summary>small{font-size:15px;line-height:1.45;color:#99bcc2;overflow-wrap:anywhere}
body.in-game .fleet-row-side{display:grid;gap:10px;align-content:start;justify-items:stretch;min-width:0;width:100%}
body.in-game .fleet-row-countdown{display:flex;align-items:center;justify-content:flex-start}
body.in-game .fleet-row-countdown>b{min-width:96px;padding:7px 12px;border-radius:999px;background:rgba(10,54,69,.85);border:1px solid #397488;color:#ddfbff;text-align:center;font-weight:800;white-space:nowrap}
body.in-game .fleet-progress-shell{display:grid;gap:8px;width:100%;max-width:none}
body.in-game .fleet-progress-track{position:relative;height:16px;width:100%;border-radius:999px;border:1px solid #315f6b;background:linear-gradient(180deg,rgba(4,17,25,.95),rgba(12,38,49,.95));overflow:visible}
body.in-game .fleet-progress-fill{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#1f6d84,#59bac0);transition:width .28s linear}
body.in-game .fleet-progress-marker{position:absolute;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#164655,#0a2530);border:1px solid #60b8be;box-shadow:0 6px 14px rgba(0,0,0,.28);transition:left .28s linear}
body.in-game .fleet-progress-marker img{width:30px;height:30px;object-fit:contain}
body.in-game .fleet-progress-track.waiting{opacity:.92}
body.in-game .fleet-progress-marker.waiting{left:100%}
body.in-game .fleet-progress-labels{display:flex;justify-content:space-between;gap:12px;color:#7fa8b0;font-size:14px}
body.in-game .fleet-info-chips{display:flex;flex-wrap:wrap;gap:8px}
body.in-game .fleet-info-chip{display:inline-flex;align-items:center;min-height:30px;padding:4px 10px;border-radius:999px;border:1px solid #315560;background:rgba(10,29,39,.86);color:#c8e1e5;font-size:14px;line-height:1.3}
body.in-game .fleet-info-chip.accent{border-color:#4a8da8;color:#e2fbff;background:rgba(12,46,60,.9)}
body.in-game .fleet-row-actions-visual{display:grid;grid-template-columns:1fr;gap:8px;align-content:start;width:100%}
body.in-game .fleet-row-actions-visual .gal-act{width:100%;min-height:42px;justify-content:center;text-align:center}
@media(max-width:1280px){body.in-game .fleet-visual-card{grid-template-columns:minmax(0,1fr) 152px!important}body.in-game .fleet-progress-marker{width:40px;height:40px}body.in-game .fleet-progress-marker img{width:27px;height:27px}}
@media(max-width:1040px){body.in-game .fleet-visual-card{grid-template-columns:1fr!important}body.in-game .fleet-row-side{justify-items:start}body.in-game .fleet-row-actions-visual{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));width:100%}}
@media(max-width:820px){body.in-game .fleet-row-summary>b{font-size:20px}}
@media(max-width:620px){body.in-game .fleet-visual-card{padding:14px}body.in-game .fleet-row-summary>b{font-size:18px}body.in-game .fleet-row-countdown{justify-content:flex-start}body.in-game .fleet-progress-marker{width:34px;height:34px}body.in-game .fleet-progress-marker img{width:23px;height:23px}body.in-game .fleet-row-actions-visual{grid-template-columns:repeat(2,minmax(0,1fr))}body.in-game .fleet-row-actions-visual .gal-act{min-height:44px;padding-left:8px;padding-right:8px}}
@media(max-width:430px){body.in-game .fleet-row-actions-visual{grid-template-columns:1fr}}

/* v2026.09.19.14：航海事件魚群圖同步放大 */
body.in-game .event-drawer-item .fleet-progress-marker{width:38px;height:38px}
body.in-game .event-drawer-item .fleet-progress-marker img{width:25px;height:25px;object-fit:contain}
body.in-game .event-unit-preview{display:grid;gap:8px;margin-top:10px}
body.in-game .event-unit-chip{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:10px;padding:8px 10px;border:1px solid #315866;border-radius:10px;background:rgba(9,32,42,.82)}
body.in-game .event-unit-chip img{width:72px;height:72px;object-fit:contain;justify-self:center}
body.in-game .event-unit-chip>span{display:grid;gap:3px;min-width:0;color:#d8f2f5;line-height:1.35}
body.in-game .event-unit-chip>span b{display:block;color:#ffffff;font-size:18px;line-height:1.15}
@media(max-width:760px){body.in-game .event-drawer-item .fleet-progress-marker{width:34px;height:34px}body.in-game .event-drawer-item .fleet-progress-marker img{width:22px;height:22px}body.in-game .event-unit-chip{grid-template-columns:62px minmax(0,1fr);padding:7px 9px}body.in-game .event-unit-chip img{width:58px;height:58px}body.in-game .event-unit-chip>span b{font-size:16px}}

/* v2026.09.19.06：研究分類內的一次性研究分隔 */
body.in-game .research-group-divider{grid-column:1/-1;display:flex;align-items:center;gap:12px;min-height:44px;margin:8px 0 2px;padding:8px 12px;border-top:1px solid #406a75;border-bottom:1px solid #294d58;background:linear-gradient(90deg,rgba(23,63,73,.78),rgba(8,30,39,.35));border-radius:8px}
body.in-game .research-group-divider>span{font-weight:900;color:#d9f5f5;white-space:nowrap}
body.in-game .research-group-divider>small{color:#8fb4bb;line-height:1.4}
body.in-game .research-group-divider.one-time:before{content:'◆';color:#e0b963;font-size:13px;flex:0 0 auto}
@media(max-width:620px){body.in-game .research-group-divider{align-items:flex-start;gap:7px;flex-wrap:wrap;padding:8px 10px}body.in-game .research-group-divider>span{font-size:15px}body.in-game .research-group-divider>small{width:100%;padding-left:20px;font-size:12px}}


/* v2026.09.19.07：所有關閉叉叉統一白色文字樣式 */
html body.in-game :is(.ui-close-button,.mobile-nav-close,#chatCloseBtn,#eventDrawerClose,#helpModalClose,#battleReplayClose,#storyIntroClose,#allianceTechHistoryClose){
  color:#ffffff!important;
  background-image:none!important;
  text-shadow:none!important;
}


/* v2026.09.19.08：研究分類內固定顯示一次性／一般研究兩個區塊。 */
body.in-game .research-grouped-grid{
  display:block!important;
}
body.in-game .research-subgroup{
  display:block;
  width:100%;
  margin:0 0 16px;
}
body.in-game .research-subgroup:last-child{margin-bottom:0}
body.in-game .research-subgrid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  width:100%;
}
body.in-game .research-subgroup.one-time .research-group-divider{
  margin-top:0;
  border-color:#725d2d;
  background:linear-gradient(90deg,rgba(91,70,25,.72),rgba(35,29,15,.34));
}
body.in-game .research-subgroup.one-time .research-group-divider>span{color:#f0d48e}
body.in-game .research-group-divider.normal:before{content:'◆';color:#69c0d0;font-size:12px;flex:0 0 auto}
@media(max-width:1024px){
  body.in-game .research-subgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  body.in-game .research-subgrid{grid-template-columns:1fr}
  body.in-game .research-subgroup{margin-bottom:12px}
}


/* v2026.09.19.15：深海霸主分支選擇只局部更新航區，保留原內容高度避免畫面閃爍。 */
body.in-game [data-special-zone-content].boss-zone-partial-refresh{
  opacity:.82;
  transition:opacity .12s ease;
}


/* v2026.09.19.18：聯盟外交虛擬聯盟辨識 */
body.in-game .alliance-diplomacy-name,body.in-game .diplomacy-search-name{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
body.in-game .alliance-virtual-badge{display:inline-flex;align-items:center;padding:3px 8px;border:1px solid rgba(99,215,255,.5);border-radius:999px;background:rgba(41,108,126,.24);color:#b9efff;font-size:18px;line-height:1.25;white-space:nowrap}
@media(max-width:620px){body.in-game .alliance-virtual-badge{font-size:12px;padding:2px 6px}}


/* v2026.09.19.27：聯盟頁面改為可收合區塊 */
body.in-game .alliance-fold-section{margin:14px 0;border:1px solid rgba(87,153,169,.28);border-radius:14px;background:linear-gradient(180deg,rgba(8,34,43,.92),rgba(5,22,29,.92));overflow:hidden}
body.in-game .alliance-fold-summary{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:12px 14px;cursor:pointer;list-style:none;user-select:none;text-align:left;background:linear-gradient(180deg,rgba(12,50,63,.78),rgba(8,30,39,.78))}
body.in-game .alliance-fold-summary::-webkit-details-marker{display:none}
body.in-game .alliance-fold-summary::before{content:'';display:block;width:20px;height:20px;flex:0 0 20px;background:url('/assets/icon_expand.png?v=2026091929') center/contain no-repeat}
body.in-game .alliance-fold-section[open] .alliance-fold-summary::before{background-image:url('/assets/icon_collapse.png?v=2026091929')}
body.in-game .alliance-fold-title-wrap{display:grid;gap:4px;min-width:0;flex:1 1 auto;padding-left:0;text-align:left}
body.in-game .alliance-fold-title{display:block;color:#d8eef2;font-size:24px;line-height:1.25;text-align:left}
body.in-game .alliance-fold-note{display:block;color:#88aeb6;font-size:18px;line-height:1.45;text-align:left}
body.in-game .alliance-fold-toggle{display:none}
body.in-game .alliance-fold-body{padding:0 0 12px}
body.in-game .alliance-fold-body>.alliance-text-view,
body.in-game .alliance-fold-body>.alliance-text-editor,
body.in-game .alliance-fold-body>.alliance-supply-card,
body.in-game .alliance-fold-body>.alliance-diplomacy-card,
body.in-game .alliance-fold-body>.alliance-permission-card,
body.in-game .alliance-fold-body>.alliance-tech-section,
body.in-game .alliance-fold-body>.alliance-virtual-development{margin:0;border-left:0;border-right:0;border-bottom:0;border-radius:0}
body.in-game .alliance-fold-body>.alliance-members-heading{padding:0 14px 10px}
body.in-game .alliance-fold-body>.table-scroll{margin:0 14px}
body.in-game .alliance-fold-body>.empty-state{margin:12px 14px 0}
@media(max-width:620px){body.in-game .alliance-fold-summary{padding:10px 12px;gap:8px}body.in-game .alliance-fold-summary::before{width:18px;height:18px;flex-basis:18px}body.in-game .alliance-fold-title-wrap{padding-left:0}.alliance-fold-note{font-size:16px}.alliance-fold-body>.table-scroll{margin:0 10px}}


/* ========================================================================
   v2026.09.19.31 — 桌面聊天視窗放大，強化多人即時聊天感
   - 桌面聊天視窗放寬，保留左下浮動、不遮滿畫面。
   - 世界／聯盟／好友仍沿用 SSE 即時更新，不新增 polling。
   - 訊息改為更明確的左右聊天氣泡；Enter 送出、Shift+Enter 換行。
   ======================================================================== */
@media (min-width:1101px){
  html body.in-game .chat-drawer{
    width:clamp(560px,38vw,700px)!important;
    height:min(760px,calc(100dvh - 36px))!important;
  }
  html body.in-game .chat-head{padding:13px 16px!important}
  html body.in-game .chat-head-main{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important}
  html body.in-game .chat-head-main>div{display:grid!important;gap:2px!important;min-width:0!important}
  html body.in-game .chat-live-status{display:inline-flex!important;align-items:center!important;gap:6px!important;color:#83c8a7!important;font-size:15px!important;white-space:nowrap!important}
  html body.in-game .chat-live-status i{width:8px!important;height:8px!important;border-radius:50%!important;background:#62d79a!important;box-shadow:0 0 0 3px rgba(98,215,154,.12)!important}
  html body.in-game .chat-history{padding:14px 16px!important;gap:9px!important;background:linear-gradient(180deg,rgba(4,18,24,.35),rgba(3,13,18,.18))!important}
  html body.in-game .chat-message{max-width:78%!important;min-width:180px!important;padding:10px 12px!important;border-radius:14px 14px 14px 5px!important;box-shadow:0 3px 10px rgba(0,0,0,.18)!important}
  html body.in-game .chat-message.mine{align-self:flex-end!important;border-radius:14px 14px 5px 14px!important;background:linear-gradient(145deg,rgba(24,85,92,.96),rgba(14,62,71,.96))!important}
  html body.in-game .chat-message:not(.mine){align-self:flex-start!important}
  html body.in-game .chat-message-head{align-items:baseline!important;gap:14px!important}
  html body.in-game .chat-message-head b{font-size:18px!important;color:#e2f2f5!important}
  html body.in-game .chat-message-head time{font-size:14px!important;color:#7898a1!important;white-space:nowrap!important}
  html body.in-game .chat-message-body{font-size:18px!important;line-height:1.55!important}
  html body.in-game .chat-message-actions{margin-top:2px!important;opacity:.72!important}
  html body.in-game .chat-message-actions button{min-height:34px!important;font-size:14px!important;padding:4px 9px!important}
  html body.in-game .chat-composer{padding:10px 12px 12px!important;grid-template-columns:minmax(0,1fr) 92px!important;background:rgba(5,23,30,.96)!important}
  html body.in-game .chat-composer textarea{min-height:62px!important;max-height:170px!important;font-size:18px!important;line-height:1.45!important;padding:10px 12px!important}
  html body.in-game .chat-composer button{min-width:92px!important;min-height:62px!important;font-size:18px!important;font-weight:800!important}
  html body.in-game .chat-footnote{font-size:14px!important;padding:7px 12px 10px!important;color:#6f929a!important}
}
@media (min-width:621px) and (max-width:1100px){
  html body.in-game .chat-head-main{display:flex!important;align-items:center!important;gap:10px!important}
  html body.in-game .chat-live-status{display:inline-flex!important;align-items:center!important;gap:5px!important;color:#83c8a7!important;font-size:13px!important}
  html body.in-game .chat-live-status i{width:7px!important;height:7px!important;border-radius:50%!important;background:#62d79a!important}
}
@media (max-width:620px){html body.in-game .chat-live-status{display:none!important}}


/* ========================================================================
   v2026.09.19.32 — 手機公開市場掛單卡片防破版
   - 修正 320~430px 窄畫面中「本次購買」數字輸入框採 content-box 後，
     width:100% 再加 padding/border 導致實際寬度超過卡片、把「全部」按鈕推到畫面外。
   - 公開掛單卡片與交易控制統一 border-box / min-width:0，避免任何子項撐寬頁面。
   ======================================================================== */
@media(max-width:620px){
  html body.in-game #game .market-order-table-wrap,
  html body.in-game #game .market-open-order-table,
  html body.in-game #game .market-open-order-table tbody,
  html body.in-game #game .market-open-order-table tr,
  html body.in-game #game .market-open-order-table td,
  html body.in-game #game .market-open-order-table td>*{
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html body.in-game #game .market-open-order-table tbody,
  html body.in-game #game .market-open-order-table tr{width:100%!important}
  html body.in-game #game .market-open-order-table tr{overflow:hidden!important}
  html body.in-game #game .market-table-buy,
  html body.in-game #game .market-table-buy-input,
  html body.in-game #game .market-table-pay,
  html body.in-game #game .market-table-action{overflow:hidden!important}
  html body.in-game #game .market-table-buy-input{
    width:100%!important;
    grid-template-columns:minmax(0,1fr) 64px!important;
    gap:6px!important;
  }
  html body.in-game #game .market-table-buy-input input,
  html body.in-game #game .market-table-buy-input button{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }
  html body.in-game #game .market-table-buy-input input{
    padding-left:8px!important;
    padding-right:8px!important;
  }
  html body.in-game #game .market-table-pay>div{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  html body.in-game #game .market-table-pay :is(b,span,small),
  html body.in-game #game .market-table-rate :is(b,small){
    max-width:100%!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  html body.in-game #game .market-table-action .market-confirm-buy{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
}
@media(max-width:390px){
  html body.in-game #game .market-open-order-table tr{padding:8px!important}
  html body.in-game #game .market-open-order-table td:nth-child(4),
  html body.in-game #game .market-open-order-table td:nth-child(5),
  html body.in-game #game .market-open-order-table td:nth-child(6){padding:7px!important}
  html body.in-game #game .market-table-buy-input{grid-template-columns:minmax(0,1fr) 60px!important;gap:5px!important}
}
@media(max-width:340px){
  html body.in-game #game .market-table-buy-input{grid-template-columns:1fr!important}
  html body.in-game #game .market-table-buy-input .market-fill-all-btn{width:100%!important}
}


/* v2026.09.19.36：航隊派遣常用編成排序、複製與自動帶入 */
body.in-game .fleet-preset-panel{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(300px,1fr);gap:10px 16px;align-items:end;margin:12px 12px 14px;padding:12px 14px;border:1px solid rgba(86,158,177,.35);border-radius:12px;background:linear-gradient(145deg,rgba(7,35,44,.94),rgba(4,24,31,.94));box-sizing:border-box}
body.in-game .fleet-preset-panel.hidden{display:none!important}
body.in-game .fleet-preset-copy{display:grid;gap:4px;min-width:0}
body.in-game .fleet-preset-copy>b{font-size:22px;color:#d6edf2}
body.in-game .fleet-preset-copy>span{font-size:18px;color:#86a8b1;line-height:1.45}
body.in-game .fleet-preset-settings{display:grid;grid-template-columns:minmax(160px,220px) minmax(260px,1fr);gap:8px;align-items:end;min-width:0}
body.in-game .fleet-preset-settings>label:not(.fleet-preset-auto){display:grid;gap:5px;color:#8eabb4;min-width:0}
body.in-game .fleet-preset-settings select{width:100%;height:42px;box-sizing:border-box}
body.in-game .fleet-preset-auto{display:flex;align-items:center;gap:8px;min-height:42px;padding:7px 10px;border:1px solid rgba(82,143,158,.28);border-radius:8px;background:rgba(4,25,32,.58);box-sizing:border-box;color:#a9c6cd;cursor:pointer}
body.in-game .fleet-preset-auto input{width:20px;height:20px;flex:0 0 20px;margin:0}
body.in-game .fleet-preset-auto span{line-height:1.35}
body.in-game .fleet-preset-controls{grid-column:1/-1;display:grid;grid-template-columns:minmax(220px,1fr) auto auto auto auto;gap:8px;align-items:end;min-width:0}
body.in-game .fleet-preset-controls label{display:grid;gap:5px;min-width:0;color:#8eabb4}
body.in-game .fleet-preset-controls select{width:100%;min-width:0;height:42px;box-sizing:border-box}
body.in-game .fleet-preset-controls button{min-height:42px;white-space:nowrap}
body.in-game #fleetPresetStatus{grid-column:1/-1;color:#77a0aa;font-size:17px;line-height:1.4}
@media(max-width:1100px){body.in-game .fleet-preset-panel{grid-template-columns:1fr}body.in-game .fleet-preset-settings{grid-template-columns:minmax(160px,220px) minmax(0,1fr)}body.in-game .fleet-preset-controls{grid-template-columns:minmax(0,1fr) repeat(4,auto)}}
@media(max-width:760px){body.in-game .fleet-preset-panel{margin:9px 8px 11px;padding:10px}body.in-game .fleet-preset-settings{grid-template-columns:1fr}body.in-game .fleet-preset-controls{grid-template-columns:1fr 1fr}body.in-game .fleet-preset-controls label{grid-column:1/-1}body.in-game .fleet-preset-controls button{width:100%;white-space:normal}body.in-game .fleet-preset-copy>b{font-size:18px}body.in-game .fleet-preset-copy>span,body.in-game #fleetPresetStatus{font-size:14px}}
@media(max-width:390px){body.in-game .fleet-preset-controls{grid-template-columns:1fr}body.in-game .fleet-preset-controls label{grid-column:auto}body.in-game .fleet-preset-auto{align-items:flex-start}}

/* v2026.09.20.02：港灣整備場特殊設施／深潮捷流廊道 */
body.in-game .shipyard-special-panel .shipyard-special-body{padding:14px}
body.in-game .deep-tide-corridor-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);gap:14px;align-items:stretch;min-width:0}
body.in-game .deep-tide-corridor-building,
body.in-game .deep-tide-corridor-action-card{min-width:0;box-sizing:border-box}
body.in-game .deep-tide-corridor-action-card{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid rgba(78,157,176,.38);border-radius:12px;background:linear-gradient(145deg,rgba(6,37,47,.96),rgba(4,24,31,.96))}
body.in-game .deep-tide-corridor-action-card h3{margin:2px 0 4px;color:#d9f0f4;font-size:24px}
body.in-game .deep-tide-corridor-action-card p{margin:0;color:#9bbdc5;line-height:1.5}
body.in-game .deep-tide-corridor-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.in-game .deep-tide-corridor-stats>span{display:grid;gap:3px;padding:10px;border:1px solid rgba(75,143,158,.28);border-radius:8px;background:rgba(3,26,33,.72);color:#87aeb7}
body.in-game .deep-tide-corridor-stats b{color:#d9eff3;overflow-wrap:anywhere}
body.in-game .deep-tide-corridor-action-card>.big-action{width:100%;margin-top:auto}
body.in-game .deep-tide-corridor-action-card>small{color:#7fa4ad;line-height:1.45}
body.in-game .deep-tide-corridor-modal{display:grid;gap:12px;min-width:0}
body.in-game .deep-tide-corridor-route{display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);gap:10px;align-items:center}
body.in-game .deep-tide-corridor-route>div,
body.in-game .deep-tide-corridor-route>label{display:grid;gap:5px;min-width:0;padding:12px;border:1px solid rgba(75,143,158,.32);border-radius:10px;background:rgba(3,26,33,.72);box-sizing:border-box}
body.in-game .deep-tide-corridor-route>div>span,
body.in-game .deep-tide-corridor-route>label>span{color:#7fa8b1}
body.in-game .deep-tide-corridor-route b{overflow-wrap:anywhere}
body.in-game .deep-tide-corridor-route select{width:100%;min-width:0;box-sizing:border-box}
body.in-game .corridor-route-arrow{text-align:center!important;padding:0!important;border:0!important;background:none!important;color:#7dd1df;font-size:28px;font-weight:700}
body.in-game .deep-tide-corridor-capacity{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.in-game .deep-tide-corridor-capacity>span{display:grid;gap:4px;padding:10px;border:1px solid rgba(75,143,158,.28);border-radius:8px;background:rgba(4,28,36,.7);color:#85aab3}
body.in-game .deep-tide-corridor-capacity b{color:#d8eef2}
body.in-game .corridor-unit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
body.in-game .corridor-unit-row{display:grid;grid-template-columns:58px minmax(0,1fr) minmax(150px,.72fr);gap:10px;align-items:center;min-width:0;padding:9px;border:1px solid rgba(75,143,158,.25);border-radius:10px;background:rgba(2,23,30,.72);box-sizing:border-box;overflow:hidden}
body.in-game .corridor-unit-row img{display:block;width:54px;height:54px;max-width:100%;object-fit:contain;object-position:center}
body.in-game .corridor-unit-row>div{min-width:0}
body.in-game .corridor-unit-row b{display:block;color:#d6ebef;overflow-wrap:anywhere}
body.in-game .corridor-unit-row small{display:block;color:#7fa4ad;line-height:1.35;overflow-wrap:anywhere}
body.in-game .corridor-unit-input{display:grid;grid-template-columns:minmax(0,1fr) 62px;gap:6px;min-width:0}
body.in-game .corridor-unit-input input,
body.in-game .corridor-unit-input button{box-sizing:border-box;width:100%;min-width:0;margin:0}
body.in-game .deep-tide-corridor-confirm{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding-top:10px;border-top:1px solid rgba(75,143,158,.28)}
body.in-game .deep-tide-corridor-confirm>div{display:grid;gap:4px;min-width:0}
body.in-game .deep-tide-corridor-confirm small{color:#82a8b1;line-height:1.4}
body.in-game .deep-tide-corridor-confirm .big-action{min-width:190px}
@media(max-width:1024px){body.in-game .deep-tide-corridor-layout{grid-template-columns:1fr}body.in-game .corridor-unit-list{grid-template-columns:1fr 1fr}}
@media(max-width:760px){
  body.in-game .shipyard-special-panel .shipyard-special-body{padding:9px}
  body.in-game .deep-tide-corridor-action-card{padding:12px}
  body.in-game .deep-tide-corridor-action-card h3{font-size:20px}
  body.in-game .deep-tide-corridor-stats,
  body.in-game .deep-tide-corridor-capacity{grid-template-columns:1fr}
  body.in-game .deep-tide-corridor-route{grid-template-columns:1fr}
  body.in-game .corridor-route-arrow{transform:rotate(90deg)}
  body.in-game .corridor-unit-list{grid-template-columns:1fr}
  body.in-game .corridor-unit-row{grid-template-columns:48px minmax(0,1fr)}
  body.in-game .corridor-unit-row img{width:46px;height:46px}
  body.in-game .corridor-unit-input{grid-column:1/-1;grid-template-columns:minmax(0,1fr) 70px}
  body.in-game .deep-tide-corridor-confirm{grid-template-columns:1fr}
  body.in-game .deep-tide-corridor-confirm .big-action{width:100%;min-width:0}
}


/* ========================================================================
   v2026.09.20.03 — 航隊動態／航海事件緊湊顯示
   僅調整呈現密度與可視高度，不改航隊、事件、戰鬥、倒數或操作規則。
   ======================================================================== */
/* 航隊動態：大量航隊限制在自己的捲動區，不再把整頁撐得過長。 */
html body.in-game .fleet-live-panel{
  max-height:min(52vh,560px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
html body.in-game .fleet-live-panel .fleet-panel-title{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  padding:8px 12px!important;
}
html body.in-game .fleet-live-panel .fleet-panel-title .section-kicker{margin-bottom:0!important}

/* 桌面：摘要、進度、操作盡量橫向排，保留原有資訊但壓低單張高度。 */
@media (min-width:1101px){
  html body.in-game .fleet-visual-card{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px 12px!important;
    padding:8px 12px!important;
    margin-bottom:6px!important;
    border-radius:10px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-main{
    grid-template-columns:minmax(220px,.72fr) minmax(360px,1.28fr)!important;
    grid-template-rows:auto!important;
    gap:12px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-summary{gap:2px!important;padding-right:0!important}
  html body.in-game .fleet-row-progress-wrap{
    grid-template-columns:auto minmax(220px,1fr)!important;
    gap:5px 10px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-progress-wrap .fleet-row-countdown{grid-column:1!important;grid-row:1!important}
  html body.in-game .fleet-row-progress-wrap .fleet-progress-shell{grid-column:2!important;grid-row:1!important;gap:3px!important}
  html body.in-game .fleet-row-progress-wrap .fleet-info-chips{grid-column:1/-1!important;grid-row:2!important;gap:5px!important}
  html body.in-game .fleet-row-side{width:auto!important;min-width:0!important}
  html body.in-game .fleet-row-actions-visual{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
    gap:5px!important;
    width:auto!important;
  }
  html body.in-game .fleet-row-actions-visual .gal-act{
    width:auto!important;
    min-width:76px!important;
    min-height:36px!important;
    padding:5px 9px!important;
  }
  html body.in-game .fleet-row-countdown>b{min-width:82px!important;padding:5px 9px!important}
  html body.in-game .fleet-info-chip{min-height:26px!important;padding:3px 8px!important}
  html body.in-game .fleet-progress-track{height:12px!important}
  html body.in-game .fleet-progress-marker{width:36px!important;height:36px!important}
  html body.in-game .fleet-progress-marker img{width:24px!important;height:24px!important}
  html body.in-game .fleet-progress-labels{line-height:1.1!important}
}

/* 平板：資訊保持兩欄，操作列放下一排，避免每張卡變成高大的直式卡片。 */
@media (min-width:761px) and (max-width:1100px){
  html body.in-game .fleet-live-panel{max-height:min(48vh,520px)!important}
  html body.in-game .fleet-visual-card{
    grid-template-columns:1fr!important;
    gap:7px!important;
    padding:9px 11px!important;
    margin-bottom:6px!important;
  }
  html body.in-game .fleet-row-main{
    grid-template-columns:minmax(190px,.7fr) minmax(300px,1.3fr)!important;
    grid-template-rows:auto!important;
    gap:10px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-summary{gap:2px!important;padding-right:0!important}
  html body.in-game .fleet-row-progress-wrap{gap:5px!important}
  html body.in-game .fleet-row-actions-visual{
    display:flex!important;flex-wrap:wrap!important;gap:5px!important;width:100%!important;
  }
  html body.in-game .fleet-row-actions-visual .gal-act{width:auto!important;min-height:38px!important;padding:5px 9px!important}
  html body.in-game .fleet-info-chips{gap:5px!important}
  html body.in-game .fleet-info-chip{min-height:26px!important;padding:3px 8px!important}
  html body.in-game .fleet-progress-track{height:12px!important}
  html body.in-game .fleet-progress-marker{width:34px!important;height:34px!important}
  html body.in-game .fleet-progress-marker img{width:22px!important;height:22px!important}
}

/* 手機：卡片仍保留完整操作，但縮短內距、把輔助 chip 變成橫向滑動列。 */
@media (max-width:760px){
  html body.in-game .fleet-live-panel{max-height:min(44dvh,430px)!important}
  html body.in-game .fleet-visual-card{padding:8px 9px!important;gap:6px!important;margin-bottom:5px!important;border-radius:9px!important}
  html body.in-game .fleet-row-main{gap:6px!important}
  html body.in-game .fleet-row-summary{gap:2px!important;padding-right:0!important}
  html body.in-game .fleet-row-progress-wrap{gap:5px!important}
  html body.in-game .fleet-progress-shell{gap:3px!important}
  html body.in-game .fleet-progress-labels{display:none!important}
  html body.in-game .fleet-row-countdown>b{min-width:78px!important;padding:4px 8px!important}
  html body.in-game .fleet-info-chips{
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    gap:5px!important;
    padding-bottom:1px!important;
    scrollbar-width:thin!important;
  }
  html body.in-game .fleet-info-chip{flex:0 0 auto!important;min-height:25px!important;padding:3px 7px!important}
  html body.in-game .fleet-row-actions-visual{display:flex!important;flex-wrap:wrap!important;gap:5px!important;width:100%!important}
  html body.in-game .fleet-row-actions-visual .gal-act{width:auto!important;flex:1 1 110px!important;min-height:40px!important;padding:5px 8px!important}
  html body.in-game .fleet-progress-track{height:11px!important}
  html body.in-game .fleet-progress-marker{width:30px!important;height:30px!important}
  html body.in-game .fleet-progress-marker img{width:20px!important;height:20px!important}
}
@media (max-width:430px){
  html body.in-game .fleet-live-panel{max-height:min(42dvh,390px)!important}
  html body.in-game .fleet-row-actions-visual .gal-act{flex:1 1 calc(50% - 5px)!important;width:auto!important}
}

/* 航海事件：縮小開啟後佔用的視窗範圍，事件內容改為緊湊卡片。 */
@media (min-width:1101px){
  html body.in-game .event-drawer{
    width:min(400px,38vw)!important;
    height:min(52vh,520px)!important;
    max-height:min(52vh,520px)!important;
    top:auto!important;
    bottom:14px!important;
    border-radius:14px 0 0 14px!important;
  }
  html body.in-game .event-drawer-toggle{min-width:96px!important;min-height:44px!important;padding:6px 8px!important}
}
@media (min-width:761px) and (max-width:1100px){
  html body.in-game .event-drawer{
    width:min(380px,46vw)!important;
    height:min(54dvh,500px)!important;
    max-height:min(54dvh,500px)!important;
  }
  html body.in-game .event-drawer-toggle{min-width:92px!important;min-height:44px!important;padding:6px 8px!important}
}
html body.in-game .event-drawer-head{min-height:46px!important;padding:7px 48px 7px 10px!important}
html body.in-game .event-drawer-head>div{gap:1px!important}
html body.in-game .event-drawer-head .ui-close-button{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;top:6px!important;right:6px!important}
html body.in-game .event-drawer-list{padding:6px!important;gap:5px!important}
html body.in-game .event-drawer-item{
  gap:7px!important;
  padding:7px 8px!important;
  border-radius:9px!important;
}
html body.in-game .event-drawer-item p{
  margin:2px 0 0!important;
  line-height:1.35!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}
html body.in-game .event-drawer-item-side{gap:5px!important}
html body.in-game .event-drawer-action-btn{min-height:32px!important;padding:4px 8px!important}
html body.in-game .event-drawer-item .fleet-progress-shell{gap:3px!important;margin-top:4px!important}
html body.in-game .event-drawer-item .fleet-progress-track{height:10px!important}
html body.in-game .event-drawer-item .fleet-progress-labels{display:none!important}
html body.in-game .event-drawer-item .fleet-progress-marker{width:28px!important;height:28px!important}
html body.in-game .event-drawer-item .fleet-progress-marker img{width:18px!important;height:18px!important}
html body.in-game .event-unit-preview{
  display:flex!important;
  gap:5px!important;
  margin-top:5px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding-bottom:2px!important;
  scrollbar-width:thin!important;
}
html body.in-game .event-unit-chip{
  flex:0 0 150px!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  gap:6px!important;
  padding:5px 6px!important;
  border-radius:8px!important;
}
html body.in-game .event-unit-chip img{width:38px!important;height:38px!important}
html body.in-game .event-unit-chip>span{gap:1px!important;line-height:1.2!important}
html body.in-game .event-drawer-footer{padding:6px 8px!important}
html body.in-game .event-drawer-message-btn{min-height:38px!important;padding:6px 8px!important;gap:7px!important}
html body.in-game .event-drawer-message-btn img{width:22px!important;height:22px!important}
html body.in-game .event-drawer-message-btn>b{min-width:24px!important;height:24px!important;padding:0 6px!important}

/* 手機事件抽屜只佔約半個畫面；內容仍可在抽屜內捲動。 */
@media (max-width:760px){
  html body.in-game .event-drawer{
    height:min(54dvh,480px)!important;
    max-height:min(54dvh,480px)!important;
  }
  html body.in-game .event-drawer-toggle{min-width:86px!important;min-height:42px!important;padding:5px 7px!important}
  html body.in-game .event-drawer-head{min-height:44px!important;padding:6px 46px 6px 9px!important}
  html body.in-game .event-drawer-item{gap:4px!important;padding:6px 7px!important}
  html body.in-game .event-drawer-item-side{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;width:100%!important}
  html body.in-game .event-drawer-action-btn{min-height:34px!important;padding:4px 7px!important}
  html body.in-game .event-unit-chip{flex-basis:132px!important;grid-template-columns:36px minmax(0,1fr)!important}
  html body.in-game .event-unit-chip img{width:34px!important;height:34px!important}
  html body.in-game .event-drawer-footer{padding:5px 7px calc(5px + env(safe-area-inset-bottom))!important}
}
@media (max-width:430px){
  html body.in-game .event-drawer{height:min(50dvh,440px)!important;max-height:min(50dvh,440px)!important}
  html body.in-game .event-unit-chip{flex-basis:122px!important}
}

/* ========================================================================
   v2026.09.20.05 — 航隊動態對齊整理／航海事件桌面平板放寬
   僅調整桌面、平板的資訊排列與事件抽屜空間；手機維持既有緊湊版。
   ======================================================================== */
@media (min-width:1101px){
  /* 航隊動態：固定「任務/狀態」「目的地」「倒數/進度」「操作」視覺欄位，讓多列更整齊。 */
  html body.in-game .fleet-visual-card{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px 14px!important;
    padding:9px 12px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-main{
    grid-template-columns:minmax(420px,.95fr) minmax(470px,1.05fr)!important;
    gap:16px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-summary{
    display:grid!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:10px!important;
    row-gap:3px!important;
    align-items:center!important;
    padding-right:0!important;
  }
  html body.in-game .fleet-row-summary>.fleet-row-kicker{
    grid-column:1!important;
    grid-row:1!important;
    align-self:end!important;
    white-space:nowrap!important;
  }
  html body.in-game .fleet-row-summary>b{
    grid-column:2!important;
    grid-row:1 / span 2!important;
    align-self:center!important;
    font-size:18px!important;
    line-height:1.25!important;
  }
  html body.in-game .fleet-row-summary>small{
    grid-column:1!important;
    grid-row:2!important;
    align-self:start!important;
    font-size:14px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
  html body.in-game .fleet-row-progress-wrap{
    grid-template-columns:90px minmax(260px,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:10px!important;
    row-gap:5px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-progress-wrap .fleet-row-countdown{grid-column:1!important;grid-row:1!important}
  html body.in-game .fleet-row-progress-wrap .fleet-progress-shell{grid-column:2!important;grid-row:1!important}
  html body.in-game .fleet-row-progress-wrap .fleet-info-chips{grid-column:1/-1!important;grid-row:2!important}
  html body.in-game .fleet-row-countdown>b{width:90px!important;min-width:90px!important;padding:5px 6px!important}
  html body.in-game .fleet-row-actions-visual{justify-content:flex-end!important;align-items:center!important}

  /* 航海事件：保留緊湊高度，但放寬橫向空間，卡片回到主內容＋右側操作兩欄。 */
  html body.in-game .event-drawer{
    width:min(540px,40vw)!important;
    height:min(57vh,570px)!important;
    max-height:min(57vh,570px)!important;
  }
  html body.in-game .event-drawer-list{padding:8px!important;gap:7px!important}
  html body.in-game .event-drawer-item{
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:10px!important;
    padding:9px 10px!important;
  }
  html body.in-game .event-drawer-item p{-webkit-line-clamp:3!important;line-height:1.4!important}
  html body.in-game .event-drawer-item-side{
    align-self:center!important;
    justify-self:end!important;
    justify-content:flex-end!important;
    max-width:150px!important;
  }
  html body.in-game .event-drawer-action-btn{min-height:36px!important;padding:5px 10px!important}
  html body.in-game .event-unit-chip{flex-basis:168px!important;grid-template-columns:46px minmax(0,1fr)!important;padding:6px 8px!important}
  html body.in-game .event-unit-chip img{width:42px!important;height:42px!important}
}

@media (min-width:761px) and (max-width:1100px){
  /* 平板仍維持緊湊，但固定各資訊起點，避免不同航隊文字長度造成視覺漂移。 */
  html body.in-game .fleet-visual-card{padding:9px 10px!important;gap:7px!important}
  html body.in-game .fleet-row-main{
    grid-template-columns:minmax(300px,.9fr) minmax(320px,1.1fr)!important;
    gap:12px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-summary{
    display:grid!important;
    grid-template-columns:84px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:8px!important;
    row-gap:2px!important;
    align-items:center!important;
    padding-right:0!important;
  }
  html body.in-game .fleet-row-summary>.fleet-row-kicker{grid-column:1!important;grid-row:1!important;white-space:nowrap!important}
  html body.in-game .fleet-row-summary>b{grid-column:2!important;grid-row:1 / span 2!important;align-self:center!important;font-size:17px!important;line-height:1.25!important}
  html body.in-game .fleet-row-summary>small{grid-column:1!important;grid-row:2!important;font-size:13px!important;line-height:1.2!important;white-space:nowrap!important}
  html body.in-game .fleet-row-progress-wrap{
    grid-template-columns:86px minmax(200px,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:8px!important;
    row-gap:5px!important;
    align-items:center!important;
  }
  html body.in-game .fleet-row-progress-wrap .fleet-row-countdown{grid-column:1!important;grid-row:1!important}
  html body.in-game .fleet-row-progress-wrap .fleet-progress-shell{grid-column:2!important;grid-row:1!important}
  html body.in-game .fleet-row-progress-wrap .fleet-info-chips{grid-column:1/-1!important;grid-row:2!important}
  html body.in-game .fleet-row-countdown>b{width:86px!important;min-width:86px!important;padding:5px 6px!important}
  html body.in-game .fleet-row-actions-visual{justify-content:flex-end!important}

  /* 平板航海事件放寬，避免內容與按鈕都擠在狹窄單欄。 */
  html body.in-game .event-drawer{
    width:min(500px,64vw)!important;
    height:min(57dvh,540px)!important;
    max-height:min(57dvh,540px)!important;
  }
  html body.in-game .event-drawer-list{padding:7px!important;gap:6px!important}
  html body.in-game .event-drawer-item{
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    padding:8px 9px!important;
  }
  html body.in-game .event-drawer-item p{-webkit-line-clamp:3!important;line-height:1.38!important}
  html body.in-game .event-drawer-item-side{align-self:center!important;justify-self:end!important;justify-content:flex-end!important;max-width:140px!important}
  html body.in-game .event-drawer-action-btn{min-height:35px!important;padding:5px 9px!important}
  html body.in-game .event-unit-chip{flex-basis:154px!important;grid-template-columns:42px minmax(0,1fr)!important}
  html body.in-game .event-unit-chip img{width:38px!important;height:38px!important}
}


/* v2026.09.20.09：聯盟盟友戰況 */
body.in-game .alliance-combat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid rgba(85,158,171,.20)}
body.in-game .alliance-combat-toolbar>div{display:flex;gap:16px;flex-wrap:wrap}
body.in-game .alliance-combat-toolbar span{color:#9fc0c7}
body.in-game .alliance-combat-toolbar b{color:#d9f2f5}
body.in-game #allianceCombatStatusBody>h4{margin:14px 14px 8px;color:#d6edf1}
body.in-game .alliance-combat-list,body.in-game .alliance-combat-recent{display:grid;gap:8px;padding:0 14px}
body.in-game .alliance-combat-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid rgba(79,145,158,.24);border-radius:10px;background:rgba(3,29,38,.58);min-width:0}
body.in-game .alliance-combat-row.urgent{border-color:rgba(202,113,79,.52);background:rgba(58,27,24,.26)}
body.in-game .alliance-combat-main{display:grid;gap:3px;min-width:0}
body.in-game .alliance-combat-main b,body.in-game .alliance-combat-main span,body.in-game .alliance-combat-main small{overflow-wrap:anywhere}
body.in-game .alliance-combat-main span,body.in-game .alliance-combat-main small{color:#90b1b8}
body.in-game .alliance-combat-actions{display:flex;gap:8px;flex:0 0 auto}
@media(max-width:768px){body.in-game .alliance-combat-row{align-items:flex-start;flex-direction:column}body.in-game .alliance-combat-actions{width:100%}body.in-game .alliance-combat-actions button{flex:1 1 0}body.in-game .alliance-combat-toolbar{align-items:flex-start;flex-direction:column}body.in-game .alliance-combat-toolbar>button{width:100%}}
@media(max-width:430px){body.in-game .alliance-combat-list,body.in-game .alliance-combat-recent{padding:0 10px}body.in-game #allianceCombatStatusBody>h4{margin-left:10px;margin-right:10px}body.in-game .alliance-combat-row{padding:9px 10px}}


/* v2026.09.20.11：外海刷新券 */
body.in-game .special-zones-head{display:flex;align-items:flex-end;gap:14px}
body.in-game .special-zones-head>div:first-child{min-width:0}
body.in-game .special-zones-head-actions{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto}
body.in-game .special-zone-refresh-panel{margin:10px 0 14px;padding:12px;border:1px solid rgba(84,161,179,.3);border-radius:10px;background:rgba(4,25,32,.92)}
body.in-game .special-zone-refresh-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
body.in-game .special-zone-refresh-head>div{display:grid;gap:2px}
body.in-game .special-zone-refresh-head span{opacity:.72}
body.in-game .special-zone-refresh-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
body.in-game .special-zone-refresh-card{display:grid;gap:8px;min-width:0;padding:10px;border:1px solid rgba(86,149,164,.26);border-radius:8px;background:rgba(7,39,48,.72)}
body.in-game .special-zone-refresh-card-main{display:flex;align-items:center;gap:8px;min-width:0}
body.in-game .special-zone-refresh-card-main>div{display:grid;gap:2px;min-width:0}
body.in-game .special-zone-refresh-card-main b{white-space:normal;overflow-wrap:anywhere}
body.in-game .special-zone-refresh-card-main span,body.in-game .special-zone-refresh-card-main small{opacity:.78}
body.in-game .special-zone-refresh-item-art{width:42px;height:42px;object-fit:contain;flex:0 0 42px}
body.in-game .special-zone-refresh-card>button{width:100%}
body.in-game .zone-refresh-shop-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px}
body.in-game .zone-refresh-shop-card{min-width:0}
@media(max-width:1100px){body.in-game .special-zone-refresh-grid,body.in-game .zone-refresh-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){body.in-game .special-zones-head{align-items:flex-start;flex-wrap:wrap}body.in-game .special-zones-head-actions{width:100%;margin-left:0;justify-content:flex-end}body.in-game .special-zone-refresh-grid,body.in-game .zone-refresh-shop-grid{grid-template-columns:1fr}body.in-game .special-zone-refresh-panel{padding:10px}}


/* ========================================================================
   v2026.09.20.16 — 航隊動態倒數時間固定單行
   倒數欄位依內容自動取得寬度，不再以過窄固定寬度把 HH:MM:SS 拆成兩行。
   只調整前端排版，不增加 Server request / polling / timer。
   ======================================================================== */
html body.in-game #game .fleet-row-countdown{
  min-width:max-content!important;
  overflow:visible!important;
  flex:0 0 auto!important;
}
html body.in-game #game .fleet-row-countdown>b{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  min-width:108px!important;
  max-width:none!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  line-height:1.2!important;
  font-variant-numeric:tabular-nums!important;
  flex:0 0 auto!important;
}
@media (min-width:1101px){
  html body.in-game #game .fleet-row-progress-wrap{
    grid-template-columns:max-content minmax(260px,1fr)!important;
  }
}
@media (min-width:761px) and (max-width:1100px){
  html body.in-game #game .fleet-row-progress-wrap{
    grid-template-columns:max-content minmax(200px,1fr)!important;
  }
}
@media (max-width:760px){
  html body.in-game #game .fleet-row-countdown>b{
    min-width:96px!important;
  }
}

/* v2026.09.20.18 — 航隊動態「召回」與旁邊一般操作按鈕使用完全相同的盒尺寸。
   danger-act 的全域危險按鈕規則 specificity 較高，先前會把召回撐大；此處只覆寫航隊動態操作列。 */
html body.in-game #game .fleet-row-actions-visual .gal-act.danger-act{
  box-sizing:border-box!important;
  width:auto!important;
  min-width:76px!important;
  min-height:36px!important;
  height:auto!important;
  padding:5px 9px!important;
  line-height:1.35!important;
}
@media (min-width:761px) and (max-width:1100px){
  html body.in-game #game .fleet-row-actions-visual .gal-act.danger-act{min-height:38px!important;padding:5px 9px!important}
}
@media (max-width:760px){
  html body.in-game #game .fleet-row-actions-visual .gal-act.danger-act{min-height:40px!important;padding:5px 8px!important}
}


/* ========================================================================
   v2026.09.20.20 — 好友聊天未讀來源與桌面聊天放大
   - 好友聊天直接顯示哪些好友有未讀，可一鍵切換到該對話。
   - 桌面聊天整體再放大；只改前端呈現，不新增 polling / Timer。
   ======================================================================== */
.chat-friend-tools{display:grid;gap:8px;padding:0 12px 10px}
.chat-friend-tools .chat-friend-select{padding:0}
.chat-friend-unread{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:10px;padding:9px 10px;border:1px solid rgba(99,215,255,.22);border-radius:10px;background:rgba(15,54,65,.48)}
.chat-friend-unread>span{font-size:18px;color:#9fcbd2;white-space:nowrap;line-height:40px}
.chat-friend-unread>div{display:flex;gap:7px;flex-wrap:wrap;min-width:0}
.chat-friend-unread button{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:6px 10px;font-size:18px;border-radius:9px}
.chat-friend-unread button.active{outline:2px solid rgba(99,215,255,.45)}
.chat-friend-unread button b{font-size:inherit;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-friend-unread button em{display:grid;place-items:center;min-width:25px;height:25px;padding:0 6px;border-radius:999px;background:#a84343;color:#fff;font-size:15px;font-style:normal;font-weight:800}

@media (min-width:1101px){
  html body.in-game .chat-drawer{
    left:16px!important;
    bottom:16px!important;
    width:clamp(680px,44vw,860px)!important;
    height:min(820px,calc(100dvh - 32px))!important;
    max-height:calc(100dvh - 32px)!important;
    border-radius:15px!important;
  }
  html body.in-game .chat-head{padding:15px 18px!important}
  html body.in-game .chat-head b{font-size:25px!important}
  html body.in-game .chat-head span{font-size:20px!important}
  html body.in-game .chat-live-status{font-size:16px!important}
  html body.in-game .chat-tabs{padding:10px 12px!important;gap:8px!important}
  html body.in-game .chat-tabs button{min-height:50px!important;font-size:20px!important}
  html body.in-game .chat-friend-tools{padding:0 14px 12px!important;gap:9px!important}
  html body.in-game .chat-friend-select{font-size:20px!important;gap:12px!important}
  html body.in-game .chat-friend-select select{min-height:50px!important;font-size:20px!important;padding-left:10px!important}
  html body.in-game .chat-friend-unread{padding:10px 12px!important;gap:12px!important}
  html body.in-game .chat-friend-unread>span{font-size:19px!important;line-height:42px!important}
  html body.in-game .chat-friend-unread button{min-height:42px!important;font-size:18px!important;padding:7px 11px!important}
  html body.in-game .chat-history{padding:16px 18px!important;gap:11px!important}
  html body.in-game .chat-message{max-width:80%!important;min-width:220px!important;padding:12px 14px!important}
  html body.in-game .chat-message-head b{font-size:20px!important}
  html body.in-game .chat-message-head time{font-size:15px!important}
  html body.in-game .chat-message-body{font-size:20px!important;line-height:1.58!important}
  html body.in-game .chat-message-actions button{min-height:36px!important;font-size:15px!important;padding:5px 10px!important}
  html body.in-game .chat-composer{padding:12px 14px 14px!important;grid-template-columns:minmax(0,1fr) 104px!important;gap:10px!important}
  html body.in-game .chat-composer textarea{min-height:70px!important;max-height:190px!important;font-size:20px!important;line-height:1.5!important;padding:11px 13px!important}
  html body.in-game .chat-composer button{min-width:104px!important;min-height:70px!important;font-size:20px!important}
  html body.in-game .chat-footnote{font-size:15px!important;padding:8px 14px 11px!important}
  html body.in-game .chat-head .ui-close-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;font-size:22px!important}
}
@media(max-width:620px){
  html body.in-game .chat-friend-tools{padding:0 8px 8px!important}
  html body.in-game .chat-friend-unread{grid-template-columns:1fr!important;gap:5px!important;padding:8px!important}
  html body.in-game .chat-friend-unread>span{line-height:1.3!important;font-size:16px!important}
  html body.in-game .chat-friend-unread button{min-height:38px!important;font-size:16px!important}
}


/* ========================================================================
   v2026.09.20.21 — 航海事件內距／關閉鈕／迷霧海島事件資訊整理
   - 抽屜標題、事件清單、卡片與底部捷徑使用一致內距。
   - 關閉 × 固定在抽屜真正右上角，不受標題文字或 scrollbar 影響。
   - 迷霧海島大量魚群不在航海事件列出各自數量（由 app.js 控制）。
   ======================================================================== */
html body.in-game .event-drawer-head{
  position:relative!important;
  box-sizing:border-box!important;
  min-height:58px!important;
  padding:11px 58px 10px 14px!important;
  gap:8px!important;
}
html body.in-game .event-drawer-head>div{
  min-width:0!important;
  max-width:100%!important;
  gap:2px!important;
}
html body.in-game .event-drawer-head .ui-close-button,
html body.in-game #eventDrawerClose{
  position:absolute!important;
  top:9px!important;
  right:9px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
  z-index:6!important;
}
html body.in-game .event-drawer-list{
  padding:11px 12px 12px!important;
  gap:8px!important;
  box-sizing:border-box!important;
}
html body.in-game .event-drawer-item{
  padding:11px 12px!important;
  gap:12px!important;
  border-radius:10px!important;
  box-sizing:border-box!important;
}
html body.in-game .event-drawer-item p{
  margin:4px 0 0!important;
  line-height:1.42!important;
}
html body.in-game .event-drawer-item-side{
  gap:7px!important;
}
html body.in-game .event-drawer-footer{
  padding:9px 12px 11px!important;
  box-sizing:border-box!important;
}
html body.in-game .event-drawer-message-btn{
  padding:7px 10px!important;
}
@media (min-width:1101px){
  html body.in-game .event-drawer{
    width:min(560px,42vw)!important;
  }
  html body.in-game .event-drawer-item{
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
  }
  html body.in-game .event-drawer-item-side{
    align-self:center!important;
    justify-self:end!important;
    justify-content:flex-end!important;
    max-width:158px!important;
  }
}
@media (min-width:761px) and (max-width:1100px){
  html body.in-game .event-drawer-head{min-height:56px!important;padding:10px 56px 9px 12px!important}
  html body.in-game .event-drawer-head .ui-close-button,
  html body.in-game #eventDrawerClose{top:8px!important;right:8px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}
  html body.in-game .event-drawer-list{padding:9px 10px 10px!important;gap:7px!important}
  html body.in-game .event-drawer-item{padding:10px!important;gap:9px!important}
}
@media (max-width:760px){
  html body.in-game .event-drawer-head{min-height:50px!important;padding:7px 50px 7px 10px!important}
  html body.in-game .event-drawer-head .ui-close-button,
  html body.in-game #eventDrawerClose{top:7px!important;right:7px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}
  html body.in-game .event-drawer-list{padding:7px 8px 8px!important;gap:6px!important}
  html body.in-game .event-drawer-item{padding:8px 9px!important;gap:6px!important}
  html body.in-game .event-drawer-footer{padding:6px 8px calc(7px + env(safe-area-inset-bottom))!important}
}


/* v2026.09.21.01 — 聯盟等級與每日補給資訊 */
body.in-game .alliance-level-card .alliance-tech-card-head strong{background:rgba(109,91,29,.34);color:#f0d889}
body.in-game .alliance-level-next{display:flex;flex-wrap:wrap;gap:8px 14px;margin:0 0 12px;padding:10px 12px;border:1px solid rgba(177,145,61,.30);border-radius:10px;background:rgba(73,57,13,.18);color:#bcd6d8}
body.in-game .alliance-level-next span{display:inline-flex;align-items:center;gap:5px}
body.in-game .alliance-level-next b{color:#f0d889}
body.in-game .alliance-table td:nth-child(2) small{display:block;margin-top:3px;color:#7eaab4}
@media(max-width:650px){body.in-game .alliance-level-next{display:grid;grid-template-columns:1fr}}


/* ========================================================================
   v2026.09.21.03 — 排程目前項目可直接前往對應位置
   只把名稱變成文字型按鈕，不改排程高度；定位時給短暫外框提示。
   ======================================================================== */
body.in-game .queue-item-jump{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0 2px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  font:inherit!important;
  font-weight:800!important;
  line-height:inherit!important;
  text-align:left!important;
  vertical-align:baseline!important;
  cursor:pointer!important;
}
body.in-game .queue-lane>.queue-item-jump{
  color:#fff6d7!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.in-game .queue>span>.queue-item-jump{color:#d9eef4!important;}
body.in-game .queue-item-jump:hover,
body.in-game .queue-item-jump:focus-visible{
  color:#ffffff!important;
  text-decoration:underline!important;
  text-underline-offset:3px!important;
  outline:none!important;
}
body.in-game .queue-item-jump:focus-visible{box-shadow:0 0 0 2px rgba(103,226,240,.42)!important;}
body.in-game .queue-jump-focus{
  outline:3px solid rgba(94,238,210,.82)!important;
  outline-offset:4px!important;
  animation:queueJumpFocusPulse .78s ease-in-out 3!important;
}
@keyframes queueJumpFocusPulse{
  0%,100%{outline-color:rgba(94,238,210,.12);filter:none}
  32%,62%{outline-color:rgba(94,238,210,.98);filter:brightness(1.22)}
}
@media(prefers-reduced-motion:reduce){
  body.in-game .queue-jump-focus{animation:none!important;outline-color:rgba(94,238,210,.82)!important;}
}

/* v2026.09.21.07 — 訊息分類與深海霸主單則多關戰報 */
html body.in-game .message-category-tabs{
  display:flex!important;
  gap:8px!important;
  padding:10px 14px!important;
  overflow-x:auto!important;
  overscroll-behavior-inline:contain!important;
  border-top:1px solid rgba(101,154,165,.12)!important;
  border-bottom:1px solid rgba(101,154,165,.16)!important;
  background:rgba(8,29,37,.94)!important;
}
html body.in-game .message-category-tab{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:42px!important;
  padding:8px 12px!important;
  border:1px solid rgba(106,170,181,.28)!important;
  border-radius:5px!important;
  background:rgba(12,42,51,.82)!important;
  color:#dbeff2!important;
  font-size:20px!important;
  line-height:1.2!important;
}
html body.in-game .message-category-tab:hover{background:rgba(25,68,79,.9)!important}
html body.in-game .message-category-tab.active{
  border-color:rgba(111,202,216,.78)!important;
  background:rgba(28,91,103,.92)!important;
  box-shadow:inset 0 0 0 1px rgba(132,218,229,.28)!important;
}
html body.in-game .message-category-tab em{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:28px!important;
  min-height:26px!important;
  padding:2px 7px!important;
  border-radius:999px!important;
  background:rgba(114,166,176,.18)!important;
  color:#e9f7f8!important;
  font-style:normal!important;
  font-size:18px!important;
  white-space:nowrap!important;
}
html body.in-game .message-category-tab.has-unread{
  border-color:rgba(221,111,98,.72)!important;
  box-shadow:inset 0 0 0 1px rgba(221,111,98,.18)!important;
}
html body.in-game .message-category-tab.has-unread em{
  background:rgba(181,62,50,.92)!important;
  color:#fff!important;
}
html body.in-game .boss-message-row .message-row-preview{color:#bfe9ef!important;font-weight:700!important}
html body.in-game .boss-message-report-stack{
  margin:0 18px 18px!important;
  border:1px solid rgba(83,152,165,.3)!important;
  border-radius:8px!important;
  overflow:hidden!important;
  background:rgba(6,28,36,.72)!important;
}
html body.in-game .boss-message-report-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:14px 16px!important;
  border-bottom:1px solid rgba(92,158,169,.22)!important;
  background:rgba(18,58,68,.58)!important;
}
html body.in-game .boss-message-report-head>div:first-child{display:grid!important;gap:3px!important}
html body.in-game .boss-message-report-head span,
html body.in-game .boss-message-report-head small{font-size:18px!important;color:#a8cbd1!important}
html body.in-game .boss-message-report-head h4{margin:0!important;font-size:22px!important;color:#f0f8f9!important}
html body.in-game .boss-message-report-head>div:last-child{display:grid!important;justify-items:end!important;gap:2px!important}
html body.in-game .boss-message-report-head b{font-size:24px!important;color:#d9f4f7!important}
html body.in-game .boss-message-report-grid{display:grid!important;gap:0!important}
html body.in-game .boss-message-report-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:14px!important;
  padding:12px 14px!important;
  border-bottom:1px solid rgba(92,145,156,.14)!important;
}
html body.in-game .boss-message-report-row:last-child{border-bottom:0!important}
html body.in-game .boss-message-report-row>div:first-child{display:grid!important;gap:3px!important;min-width:0!important}
html body.in-game .boss-message-report-row span{font-size:18px!important;color:#8fc8d1!important}
html body.in-game .boss-message-report-row b{font-size:20px!important;line-height:1.3!important;color:#edf7f8!important;overflow-wrap:anywhere!important}
html body.in-game .boss-message-report-row small{font-size:17px!important;color:#91adb2!important}
html body.in-game .boss-message-report-actions{display:flex!important;gap:7px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
html body.in-game .boss-message-report-actions button{min-height:38px!important;padding:7px 10px!important;font-size:18px!important;white-space:nowrap!important}
@media(max-width:768px){
  html body.in-game .message-category-tabs{padding:8px 10px!important;gap:6px!important}
  html body.in-game .message-category-tab{min-height:36px!important;padding:7px 10px!important;font-size:14px!important}
  html body.in-game .message-category-tab em{min-height:22px!important;min-width:24px!important;font-size:12px!important}
  html body.in-game .boss-message-report-stack{margin:0 12px 14px!important}
  html body.in-game .boss-message-report-head{padding:11px 12px!important}
  html body.in-game .boss-message-report-head span,
  html body.in-game .boss-message-report-head small{font-size:13px!important}
  html body.in-game .boss-message-report-head h4{font-size:17px!important}
  html body.in-game .boss-message-report-head b{font-size:18px!important}
  html body.in-game .boss-message-report-row{grid-template-columns:1fr!important;padding:10px 12px!important;gap:9px!important}
  html body.in-game .boss-message-report-row span{font-size:13px!important}
  html body.in-game .boss-message-report-row b{font-size:15px!important}
  html body.in-game .boss-message-report-row small{font-size:12px!important}
  html body.in-game .boss-message-report-actions{justify-content:stretch!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html body.in-game .boss-message-report-actions button{width:100%!important;min-height:34px!important;padding:6px!important;font-size:12px!important}
}
html body.in-game .message-list-row.scouted-alert-row:not(.selected){box-shadow:inset 4px 0 0 rgba(214,96,84,.86)!important}
html body.in-game .message-list-row.scouted-alert-row .message-row-top>span{color:#ffd0ca!important;font-weight:800!important}

/* auth password toggle full-width fix v2026.09.21.09 */
html body .auth-shell .password-input-wrap{
  position:relative!important;
  display:flex!important;
  align-items:stretch!important;
  width:100%!important;
  border:1px solid #31505f!important;
  background:#040b10!important;
  overflow:hidden!important;
}
html body .auth-shell .password-input-wrap input{
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  padding:0 10px!important;
  padding-right:10px!important;
  box-shadow:none!important;
}
html body .auth-shell .password-input-wrap:focus-within{
  border-color:#6598ad!important;
  box-shadow:0 0 0 2px #4e91ad20!important;
}
html body .auth-shell .password-input-wrap input:focus{
  border:0!important;
  box-shadow:none!important;
}
html body .auth-shell .password-toggle{
  position:static!important;
  right:auto!important;
  top:auto!important;
  flex:0 0 44px!important;
  width:44px!important;
  min-width:44px!important;
  height:auto!important;
  min-height:38px!important;
  align-self:stretch!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  border:0!important;
  border-left:1px solid #294754!important;
  border-radius:0!important;
  background:#0a1921!important;
  padding:0!important;
}
html body .auth-shell .password-toggle:hover,
html body .auth-shell .password-toggle:focus-visible{
  background:#15313e!important;
  color:#d7edf5!important;
  outline:none!important;
}
html body .auth-shell .password-toggle .password-eye-icon{
  width:24px!important;
  height:24px!important;
  object-fit:contain!important;
  pointer-events:none!important;
}
@media (max-width: 620px){
  html body .auth-shell .password-input-wrap input{height:48px!important}
  html body .auth-shell .password-toggle{flex-basis:52px!important;width:52px!important;min-width:52px!important;min-height:48px!important}
  html body .auth-shell .password-toggle .password-eye-icon{width:21px!important;height:21px!important}
}

/* auth mobile title/subtitle overflow fix v2026.09.21.10 */
@media (max-width: 620px){
  html body .auth-shell .auth-card{
    width:min(100%, 430px)!important;
    max-width:calc(100vw - 16px)!important;
    padding:12px 12px 14px!important;
  }
  html body .auth-shell .auth-card .auth-brand{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:100%!important;
    margin:0 0 6px!important;
  }
  html body .auth-shell .auth-card .auth-brand > div{
    min-width:0!important;
    max-width:calc(100% - 44px)!important;
  }
  html body .auth-shell .auth-card .auth-brand b{
    font-size:16px!important;
    line-height:1.12!important;
    letter-spacing:.4px!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  html body .auth-shell .auth-card .auth-brand small{
    font-size:11px!important;
    line-height:1.12!important;
    letter-spacing:.6px!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  html body .auth-shell .auth-card .auth-subtitle{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 9px!important;
    padding:0 2px!important;
    font-size:10.5px!important;
    line-height:1.35!important;
    letter-spacing:0!important;
    text-align:center!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
}
@media (min-width: 621px) and (max-width: 1024px){
  html body .auth-shell .auth-card .auth-brand > div{min-width:0!important;max-width:calc(100% - 60px)!important}
  html body .auth-shell .auth-card .auth-subtitle{
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    letter-spacing:.2px!important;
  }
}


/* v2026.09.21.12 — 好友名稱欄位寬度與動作區防擠壓 */
/* 虛擬好友的操作鈕改放到第二列，避免按鈕／狀態把名稱與聯盟資訊擠成一字一行。 */
html body.in-game #game .virtual-friend-section .friend-person{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr) auto!important;
  grid-template-areas:
    "avatar main badge"
    ". actions actions"!important;
  align-items:start!important;
  column-gap:8px!important;
  row-gap:7px!important;
}
html body.in-game #game .virtual-friend-section .friend-person>.friend-avatar{
  grid-area:avatar!important;
}
html body.in-game #game .virtual-friend-section .friend-person>.friend-person-main{
  grid-area:main!important;
  min-width:0!important;
  width:100%!important;
}
html body.in-game #game .virtual-friend-section .friend-person>.relationship-badge{
  grid-area:badge!important;
  align-self:start!important;
  justify-self:end!important;
}
html body.in-game #game .virtual-friend-section .friend-person>.friend-direct-actions{
  grid-area:actions!important;
  grid-column:auto!important;
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-start!important;
  gap:7px!important;
}
html body.in-game #game .virtual-friend-section .friend-person>.friend-direct-actions>button{
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
}
html body.in-game #game .virtual-friend-section .friend-person-main>b,
html body.in-game #game .virtual-friend-section .friend-alliance-meta,
html body.in-game #game .virtual-friend-section .friend-alliance-meta>*{
  min-width:0!important;
}
html body.in-game #game .virtual-friend-section .friend-person-main>b{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.35!important;
}
html body.in-game #game .virtual-friend-section .friend-person-main>small{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
html body.in-game #game .virtual-friend-section .friend-alliance-meta{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:6px!important;
  width:100%!important;
}
html body.in-game #game .virtual-friend-section .friend-alliance-meta .alliance-rank-link{
  width:auto!important;
  max-width:100%!important;
  justify-self:start!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  text-align:left!important;
}

/* 一般好友也保護名稱欄位，不讓右側操作區把名字壓成直排。 */
html body.in-game #game .friend-person-main{
  min-width:0!important;
}
html body.in-game #game .friend-person-main>b{
  word-break:normal!important;
  overflow-wrap:anywhere!important;
}

@media (max-width:620px){
  html body.in-game #game .virtual-friend-section .friend-person{
    grid-template-columns:34px minmax(0,1fr)!important;
    grid-template-areas:
      "avatar main"
      ". badge"
      ". actions"!important;
    column-gap:7px!important;
    row-gap:6px!important;
  }
  html body.in-game #game .virtual-friend-section .friend-person>.relationship-badge{
    justify-self:start!important;
  }
  html body.in-game #game .virtual-friend-section .friend-person>.friend-direct-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  html body.in-game #game .virtual-friend-section .friend-person>.friend-direct-actions>button{
    width:100%!important;
    min-height:42px!important;
  }
}
@media (max-width:380px){
  html body.in-game #game .virtual-friend-section .friend-person>.friend-direct-actions{
    grid-template-columns:1fr!important;
  }
}

/* v2026.09.21.14 — 虛擬盟友名稱旁顯示排行榜名次與身分 */
body.in-game #game .alliance-virtual-development-name{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
  min-width:0!important;
  line-height:1.35!important;
}
body.in-game #game .alliance-virtual-rank{
  color:#86cbd5!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
body.in-game #game .alliance-virtual-kind{
  color:#77d7a7!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
body.in-game #game .alliance-virtual-member-name .alliance-virtual-rank{
  display:inline!important;
  margin-left:4px!important;
}
@media(max-width:620px){
  body.in-game #game .alliance-virtual-development-name{gap:4px!important}
  body.in-game #game .alliance-virtual-rank,
  body.in-game #game .alliance-virtual-kind{white-space:normal!important}
}

/* v2026.09.22.01 — 好友／盟友／虛擬玩家在線狀態 */
html body.in-game .player-presence-badge{
  display:inline-flex!important;align-items:center!important;gap:5px!important;min-width:0!important;
  padding:3px 8px!important;border:1px solid rgba(116,156,164,.34)!important;border-radius:999px!important;
  background:rgba(8,28,34,.72)!important;color:#9fb6ba!important;font-size:16px!important;line-height:1.2!important;
  font-weight:700!important;white-space:nowrap!important;vertical-align:middle!important;
}
html body.in-game .player-presence-badge i{width:8px!important;height:8px!important;border-radius:50%!important;background:#60767b!important;box-shadow:0 0 0 2px rgba(96,118,123,.15)!important;flex:0 0 auto!important}
html body.in-game .player-presence-badge.online{color:#8ee9b7!important;border-color:rgba(76,196,129,.38)!important;background:rgba(17,72,47,.42)!important}
html body.in-game .player-presence-badge.online i{background:#59dc93!important;box-shadow:0 0 0 2px rgba(89,220,147,.18),0 0 8px rgba(89,220,147,.34)!important}
html body.in-game .player-presence-badge.offline{color:#899ca0!important;opacity:.9!important}
html body.in-game .player-presence-badge.compact{padding:2px 6px!important;font-size:14px!important;gap:4px!important}
html body.in-game .player-presence-badge.compact i{width:7px!important;height:7px!important}
html body.in-game .friend-name-presence,html body.in-game .alliance-member-name-line{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;min-width:0!important}
html body.in-game .joint-attack-member-check>span{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;min-width:0!important}
html body.in-game .chat-head-main>div>div{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important}
html body.in-game .chat-friend-unread button{display:flex!important;align-items:center!important;gap:6px!important}
html body.in-game .virtual-search-result b{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important}
@media(max-width:768px){
  html body.in-game .player-presence-badge{font-size:12px!important;padding:2px 6px!important}
  html body.in-game .player-presence-badge.compact{font-size:12px!important}
}

/* v2026.09.22.04 — 戰報殘骸回收按鈕統一尺寸 */
body.in-game .battle-recovery-actions .quick-salvage-act,
body.in-game .battle-recovery-actions .soft-btn{
  min-height:44px!important;
  height:44px!important;
  padding:7px 12px!important;
  line-height:1.2!important;
  box-sizing:border-box!important;
}
@media(max-width:700px){
  body.in-game .battle-recovery-actions .quick-salvage-act,
  body.in-game .battle-recovery-actions .soft-btn{
    min-height:50px!important;
    height:50px!important;
  }
}


/* v2026.09.22.07 — 航隊進度魚群標記與聯盟戰況 */
body.in-game .fleet-progress-shell{
  padding-top:3px!important;
  box-sizing:border-box!important;
}
body.in-game .alliance-combat-report-preview{
  color:#b7d6db!important;
  line-height:1.45!important;
}
body.in-game .alliance-combat-recent .alliance-combat-actions{
  align-self:center!important;
}


/* v2026.09.22.08 — 航隊動態版面重新整理（桌面／平板／手機）
   - 改善航隊動態各列不整齊問題。
   - 桌面以「目的地摘要｜進度區｜操作」清楚分區。
   - 平板與手機依寬度改為上下堆疊，避免長文字把進度條與按鈕擠亂。 */
html body.in-game #game .fleet-live-panel .fleet-visual-card{
  grid-template-columns:minmax(0,1fr) 176px!important;
  gap:14px 16px!important;
  align-items:start!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-main{
  display:grid!important;
  grid-template-columns:minmax(240px,380px) minmax(0,1fr)!important;
  grid-template-rows:auto!important;
  gap:14px 18px!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-summary{
  gap:7px!important;
  padding-right:0!important;
  align-content:start!important;
  min-width:0!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-summary>b{
  line-height:1.4!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-summary>small{
  line-height:1.5!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-progress-wrap{
  grid-template-columns:max-content minmax(0,1fr)!important;
  column-gap:12px!important;
  row-gap:8px!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-countdown{
  align-self:center!important;
}
html body.in-game #game .fleet-live-panel .fleet-progress-shell,
html body.in-game #game .fleet-live-panel .fleet-info-chips{
  grid-column:2!important;
  min-width:0!important;
}
html body.in-game #game .fleet-live-panel .fleet-progress-labels{
  min-width:0!important;
}
html body.in-game #game .fleet-live-panel .fleet-progress-labels span{
  min-width:0!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-side{
  width:176px!important;
  min-width:176px!important;
  align-self:stretch!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-actions-visual{
  grid-template-columns:1fr!important;
  gap:8px!important;
  width:100%!important;
}
html body.in-game #game .fleet-live-panel .fleet-row-actions-visual .gal-act{
  width:100%!important;
  min-width:0!important;
}

@media (max-width:1180px){
  html body.in-game #game .fleet-live-panel .fleet-visual-card{
    grid-template-columns:minmax(0,1fr)!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-main{
    grid-template-columns:minmax(220px,320px) minmax(0,1fr)!important;
    gap:12px 14px!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-side{
    width:100%!important;
    min-width:0!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-actions-visual{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:900px){
  html body.in-game #game .fleet-live-panel .fleet-row-main{
    grid-template-columns:1fr!important;
    gap:10px!important;
    align-items:start!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-progress-wrap{
    grid-template-columns:max-content minmax(0,1fr)!important;
  }
}

@media (max-width:680px){
  html body.in-game #game .fleet-live-panel .fleet-visual-card{
    padding:14px 12px!important;
    gap:12px!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-progress-wrap{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-progress-shell,
  html body.in-game #game .fleet-live-panel .fleet-info-chips{
    grid-column:auto!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-countdown{
    justify-content:flex-start!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-actions-visual{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:460px){
  html body.in-game #game .fleet-live-panel .fleet-row-actions-visual{
    grid-template-columns:1fr!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-summary>b{
    font-size:17px!important;
  }
  html body.in-game #game .fleet-live-panel .fleet-row-summary>small,
  html body.in-game #game .fleet-live-panel .fleet-progress-labels,
  html body.in-game #game .fleet-live-panel .fleet-info-chip{
    font-size:13px!important;
  }
}


/* v2026.09.22.09 — 航海事件訊息捷徑移至事件清單上方 */
html body.in-game .event-drawer-message-topbar{
  order:0!important;
  padding:8px 12px 9px!important;
  border-top:0!important;
  border-bottom:1px solid #31515c!important;
  background:linear-gradient(180deg,rgba(7,29,38,.98),rgba(5,24,32,.99))!important;
  box-sizing:border-box!important;
}
html body.in-game .event-drawer-message-topbar .event-drawer-message-btn{
  width:100%!important;
}
@media(max-width:760px){
  html body.in-game .event-drawer-message-topbar{
    padding:6px 8px 7px!important;
  }
}


/* v2026.09.22.10 — 漂流商會預覽與中央提醒訊息框 */
/* 漂流商會的交易結果預覽只保留一組方向提示；上方數量編輯區已有交換圖示，結果區不再額外插第二個箭頭。 */
html body.in-game #game .merchant-live-preview{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  column-gap:28px!important;
  row-gap:10px!important;
  position:relative!important;
}
html body.in-game #game .merchant-live-preview::after{
  content:'';
  position:absolute;
  left:50%;
  top:50%;
  width:24px;
  height:24px;
  transform:translate(-50%,-72%);
  background:url('/assets/icon_route.png') center/contain no-repeat;
  pointer-events:none;
  opacity:.92;
}
html body.in-game #game .merchant-live-preview>p{
  grid-column:1/-1!important;
}
html body.in-game #game .merchant-live-preview>strong{display:none!important}

/* 所有既有 toast 改成畫面中央醒目的訊息框，不再躲在右下角。 */
html body #toast,
html body.in-game #toast{
  position:fixed!important;
  z-index:50000!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  width:min(620px,calc(100vw - 40px))!important;
  max-width:min(620px,calc(100vw - 40px))!important;
  min-height:72px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:18px 24px 18px 66px!important;
  border:2px solid #63c6d1!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,rgba(9,43,55,.985),rgba(4,25,34,.985))!important;
  color:#f2fdff!important;
  box-shadow:0 18px 60px rgba(0,0,0,.68),0 0 0 1px rgba(147,231,238,.16) inset!important;
  text-align:center!important;
  font-weight:800!important;
  font-size:20px!important;
  line-height:1.5!important;
  letter-spacing:.1px!important;
  opacity:0!important;
  transform:translate(-50%,calc(-50% + 16px)) scale(.97)!important;
  pointer-events:none!important;
  transition:opacity .18s ease,transform .18s ease!important;
  overflow-wrap:anywhere!important;
}
html body #toast::before,
html body.in-game #toast::before{
  content:'!';
  position:absolute!important;
  left:20px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:32px!important;
  height:32px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  border:1px solid #83d9df!important;
  background:rgba(31,111,129,.72)!important;
  color:#ffffff!important;
  font-size:22px!important;
  line-height:1!important;
  font-weight:900!important;
}
html body #toast.show,
html body.in-game #toast.show{
  opacity:1!important;
  transform:translate(-50%,-50%) scale(1)!important;
}

@media(max-width:620px){
  html body.in-game #game .merchant-live-preview{
    grid-template-columns:1fr!important;
    row-gap:18px!important;
  }
  html body.in-game #game .merchant-live-preview::after{
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-96%) rotate(90deg)!important;
    width:22px!important;
    height:22px!important;
  }
  html body #toast,
  html body.in-game #toast{
    width:calc(100vw - 28px)!important;
    max-width:calc(100vw - 28px)!important;
    min-height:68px!important;
    padding:15px 16px 15px 54px!important;
    font-size:15px!important;
    line-height:1.45!important;
  }
  html body #toast::before,
  html body.in-game #toast::before{
    left:14px!important;
    width:28px!important;
    height:28px!important;
    font-size:19px!important;
  }
}


/* v2026.09.22.14 — 中央提示框的驚嘆號改用正式 icon_event.png，避免字型驚嘆號視覺偏心。 */
html body #toast::before,
html body.in-game #toast::before{
  content:''!important;
  box-sizing:border-box!important;
  display:block!important;
  padding:0!important;
  text-indent:0!important;
  font-size:0!important;
  line-height:0!important;
  background-color:rgba(31,111,129,.72)!important;
  background-image:url('/assets/icon_event.png')!important;
  background-repeat:no-repeat!important;
  background-position:50% 50%!important;
  background-size:18px 18px!important;
}
@media(max-width:1024px){
  html body #toast::before,
  html body.in-game #toast::before{
    background-size:17px 17px!important;
  }
}
@media(max-width:620px){
  html body #toast::before,
  html body.in-game #toast::before{
    background-size:16px 16px!important;
  }
}


/* v2026.09.22.16 — 每日聯盟補給一次顯示全部獎勵 */
html body.in-game .alliance-supply-card{
  grid-template-columns:minmax(0,1fr) auto!important;
}
html body.in-game .alliance-supply-items{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:10px;
  width:100%;
}
html body.in-game .alliance-supply-item{
  display:grid;
  grid-template-columns:68px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-width:0;
  padding:10px;
  border:1px solid rgba(100,198,188,.26);
  border-radius:10px;
  background:rgba(4,29,36,.58);
}
html body.in-game .alliance-supply-item-art{
  display:flex;
  align-items:center;
  justify-content:center;
  width:68px;
  height:68px;
  border-radius:10px;
  background:radial-gradient(circle at 50% 42%,rgba(36,128,119,.25),rgba(4,24,31,.7) 72%);
}
html body.in-game .alliance-supply-item-img{
  max-width:58px;
  max-height:58px;
  width:auto;
  height:auto;
  object-fit:contain;
}
html body.in-game .alliance-supply-item-copy{
  display:grid;
  gap:2px;
  min-width:0;
}
html body.in-game .alliance-supply-item-copy span{
  color:#7fc7c0;
  font-size:.9em;
}
html body.in-game .alliance-supply-item-copy b{
  color:#effffb;
  overflow-wrap:anywhere;
}
html body.in-game .alliance-supply-item-copy small{
  color:#9fd0ca;
}
html body.in-game .alliance-supply-item.claimed{
  opacity:.62;
}
html body.in-game .alliance-supply-action{
  grid-column:1/-1!important;
  width:100%!important;
}
html body.in-game .alliance-supply-action>button{
  width:100%!important;
  min-width:0!important;
}
@media(max-width:834px){
  html body.in-game .alliance-supply-items{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  html body.in-game .alliance-supply-items{
    grid-template-columns:1fr;
  }
  html body.in-game .alliance-supply-item{
    grid-template-columns:58px minmax(0,1fr);
  }
  html body.in-game .alliance-supply-item-art{
    width:58px;
    height:58px;
  }
  html body.in-game .alliance-supply-item-img{
    max-width:50px;
    max-height:50px;
  }
}


/* v2026.09.23.02 — 窄畫面禁止升級資訊被壓成一個字一行；航圖社交按鈕同步手機／平板。 */
html body.in-game .galaxy-player-social{
  align-items:center;
}
html body.in-game .gal-social-btn,
html body.in-game .gal-social-state,
html body.in-game .gal-social-pair{
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
html body.in-game .gal-social-btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
}
@media(max-width:900px){
  html body.in-game .upgrade-preview .upgrade-effect-row,
  html body.in-game #helpModalBody .upgrade-preview .upgrade-effect-row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:4px!important;
    min-width:0!important;
  }
  html body.in-game .upgrade-preview .upgrade-effect-row>span,
  html body.in-game .upgrade-preview .upgrade-effect-row>b,
  html body.in-game .upgrade-preview .upgrade-effect-row>em,
  html body.in-game #helpModalBody .upgrade-preview .upgrade-effect-row>span,
  html body.in-game #helpModalBody .upgrade-preview .upgrade-effect-row>b,
  html body.in-game #helpModalBody .upgrade-preview .upgrade-effect-row>em{
    display:block!important;
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    writing-mode:horizontal-tb!important;
    text-orientation:mixed!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
    text-align:left!important;
  }
  html body.in-game .upgrade-preview .power-balance-row>em,
  html body.in-game #helpModalBody .upgrade-preview .power-balance-row>em{
    justify-self:start!important;
  }
  html body.in-game .galaxy-player-social{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;
    gap:7px!important;
  }
  html body.in-game .galaxy-player-social>.gal-social-pair{
    grid-column:span 2;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  html body.in-game .galaxy-player-social>.gal-social-state,
  html body.in-game .galaxy-player-social>.gal-social-btn,
  html body.in-game .galaxy-player-social>.gal-social-pair>.gal-social-btn{
    min-width:0!important;
    width:100%!important;
    justify-content:center!important;
    text-align:center!important;
  }
}
@media(max-width:620px){
  html body.in-game .upgrade-preview,
  html body.in-game #helpModalBody .upgrade-preview{
    min-width:0!important;
    width:100%!important;
    box-sizing:border-box!important;
  }
  html body.in-game .galaxy-player-social{
    grid-template-columns:1fr!important;
  }
  html body.in-game .galaxy-player-social>.gal-social-pair{
    grid-column:auto!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html body.in-game .galaxy-player-social :is(button,span){
    writing-mode:horizontal-tb!important;
    word-break:normal!important;
  }
}


/* v2026.09.23.03 — 資源生產卡直接顯示電能需求、目前餘量/缺口與蓄電可用量 */
html body.in-game .production-energy-demand-stat{
  display:grid!important;
  align-content:center!important;
  gap:5px!important;
  padding:8px 10px!important;
}
html body.in-game .production-energy-demand-row,
html body.in-game .production-energy-storage-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  min-width:0;
}
html body.in-game .production-energy-demand-row>span,
html body.in-game .production-energy-storage-row>span{
  min-width:0;
  color:#7897a2;
  white-space:normal!important;
  overflow-wrap:break-word;
  word-break:normal;
}
html body.in-game .production-energy-demand-row>b,
html body.in-game .production-energy-storage-row>b{
  text-align:right;
  white-space:nowrap!important;
}
html body.in-game .production-energy-storage-row{
  padding-top:4px;
  border-top:1px solid rgba(87,145,161,.12);
}
html body.in-game .production-energy-storage-row>b{
  color:#8fcbd6;
}

@media(max-width:760px){
  html body.in-game .production-energy-demand-stat{
    width:100%!important;
    min-width:0!important;
  }
  html body.in-game .production-energy-demand-row,
  html body.in-game .production-energy-storage-row{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
}
@media(max-width:430px){
  html body.in-game .production-energy-demand-row,
  html body.in-game .production-energy-storage-row{
    gap:8px!important;
  }
  html body.in-game .production-energy-demand-row>span,
  html body.in-game .production-energy-storage-row>span,
  html body.in-game .production-energy-demand-row>b,
  html body.in-game .production-energy-storage-row>b{
    font-size:13px!important;
    line-height:1.35!important;
  }
}


/* v2026.09.23.04 — 中央訊息框的驚嘆號改回真正置中的文字，不使用偏心貼圖。 */
html body #toast::before,
html body.in-game #toast::before{
  content:'!'!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  text-indent:0!important;
  background-image:none!important;
  background-color:rgba(31,111,129,.72)!important;
  background-position:center center!important;
  background-size:auto!important;
  color:#ffffff!important;
  font-family:'Segoe UI','Microsoft JhengHei',Arial,sans-serif!important;
  font-size:21px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:0!important;
}
@media(max-width:1024px){
  html body #toast::before,
  html body.in-game #toast::before{font-size:20px!important}
}
@media(max-width:620px){
  html body #toast::before,
  html body.in-game #toast::before{font-size:18px!important}
}


/* v2026.09.23.09｜戰鬥推演室桌面加寬、偵查情報帶入 */
@media(min-width:901px){
  body.in-game #helpModal.battle-sim-wide .help-modal-card{width:min(1480px,calc(100vw - 44px))!important;max-width:1480px!important;}
}
body.in-game .battle-sim-intel-import{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;align-items:end;padding:12px 14px;border:1px solid #3a6371;border-radius:12px;background:#0a1c24}
body.in-game .battle-sim-intel-import label{display:grid;gap:5px;min-width:0}
body.in-game .battle-sim-intel-import label>span{font-size:20px;color:#c7dbe1;font-weight:700}
body.in-game .battle-sim-intel-import select{width:100%;min-width:0;min-height:44px;font-size:20px}
body.in-game .battle-sim-intel-import button{min-height:44px;font-size:20px;white-space:nowrap}
body.in-game .battle-sim-intel-import small{grid-column:1/-1;font-size:20px;line-height:1.5;color:#9fb9c2}
body.in-game .intel-sim-btn{border-color:#6b789f!important;background:linear-gradient(180deg,#263957,#17283f)!important;color:#dceaff!important}
@media(max-width:900px){body.in-game .battle-sim-intel-import{grid-template-columns:1fr}body.in-game .battle-sim-intel-import small{grid-column:auto}body.in-game .battle-sim-intel-import button{width:100%}}


/* v2026.09.24.06 特殊航區情報網 */
.special-zone-intel-service-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid rgba(115,196,218,.28);border-radius:18px;background:rgba(8,36,49,.46)}
.special-zone-intel-service-card>div:first-child{display:grid;gap:7px;min-width:0}.special-zone-intel-service-card b{font-size:22px}.special-zone-intel-service-card span{font-size:20px}.special-zone-intel-service-card small{display:block;line-height:1.55;opacity:.82}
.special-zone-intel-service-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}.special-zone-intel-modal{display:grid;gap:16px}.special-zone-intel-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.special-zone-intel-summary>div{display:grid;gap:5px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.055)}.special-zone-intel-summary span,.special-zone-intel-summary small{opacity:.76}.special-zone-intel-summary b{font-size:20px}.special-zone-intel-counts{padding:10px 14px;border-radius:12px;background:rgba(74,173,202,.12);font-weight:700}.special-zone-intel-list{display:grid;gap:8px;max-height:min(58vh,640px);overflow:auto;padding-right:4px}.special-zone-intel-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.035)}.special-zone-intel-main{display:flex;align-items:center;gap:14px;min-width:0;flex:1 1 auto}.special-zone-intel-thumb{width:72px;height:72px;flex:0 0 72px;object-fit:contain;border-radius:14px;background:rgba(255,255,255,.06);padding:6px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}.special-zone-intel-copy{display:grid;gap:3px;min-width:0}.special-zone-intel-row span{font-weight:700}.special-zone-intel-row b{font-size:20px}.special-zone-intel-row small{opacity:.76}.special-zone-intel-note{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);opacity:.86}
@media(max-width:760px){.special-zone-intel-service-card{align-items:stretch;flex-direction:column}.special-zone-intel-service-actions{justify-content:stretch}.special-zone-intel-service-actions button{flex:1 1 auto}.special-zone-intel-summary{grid-template-columns:1fr}.special-zone-intel-row{align-items:stretch;flex-direction:column}.special-zone-intel-main{align-items:flex-start}.special-zone-intel-thumb{width:64px;height:64px;flex-basis:64px}.special-zone-intel-row button{width:100%}}

/* v2026.09.24.09 島政建築捷徑與特殊航區排序 */
body.in-game .governance-role-building-jump-wrap{display:flex;justify-content:flex-end;margin:-2px 0 10px}
body.in-game .governance-building-jump{width:112px;min-width:112px;padding:7px 8px 8px!important;border:1px solid rgba(114,210,226,.34)!important;border-radius:12px!important;background:rgba(5,29,38,.72)!important;display:grid!important;justify-items:center;gap:5px;cursor:pointer;box-shadow:0 7px 22px rgba(0,0,0,.16);transition:transform .16s ease,border-color .16s ease,background .16s ease}
body.in-game .governance-building-jump:hover,body.in-game .governance-building-jump:focus-visible{transform:translateY(-2px);border-color:rgba(121,233,247,.72)!important;background:rgba(11,50,62,.9)!important;outline:none}
body.in-game .governance-building-jump img{display:block;width:86px;height:66px;object-fit:contain;filter:drop-shadow(0 5px 7px rgba(0,0,0,.28));pointer-events:none}
body.in-game .governance-building-jump span{font-weight:800;font-size:16px;line-height:1.1;white-space:nowrap;color:var(--cyan2);pointer-events:none}
.special-zone-intel-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:10px 14px;border-radius:12px;background:rgba(255,255,255,.04)}
.special-zone-intel-toolbar label{display:grid;gap:6px;min-width:0;font-weight:700}
.special-zone-intel-toolbar select{width:100%;min-width:0;min-height:46px;background:var(--panel);color:var(--text);border:1px solid var(--line2);padding:6px 9px;font-size:20px}
@media(max-width:900px){.special-zone-intel-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){body.in-game .governance-role-building-jump-wrap{justify-content:flex-start}body.in-game .governance-building-jump{width:86px;min-width:86px;padding:5px!important}body.in-game .governance-building-jump img{width:70px;height:54px}body.in-game .governance-building-jump span{font-size:12px}.special-zone-intel-toolbar{grid-template-columns:1fr}.special-zone-intel-toolbar label{min-width:0;width:100%}}


/* ========================================================================
   v2026.09.24.12 — 港灣整備場戰鬥說明
   圖像優先、文字輔助；收合箭頭沿用研究詳細說明的 icon_expand / icon_collapse。
   ======================================================================== */
body.in-game .shipyard-summary-chip>span{flex:1 1 auto}
body.in-game .shipyard-battle-guide-btn{
  flex:0 0 auto;min-height:42px;padding:7px 14px!important;border:1px solid rgba(111,207,224,.55)!important;
  border-radius:10px!important;background:linear-gradient(180deg,#123f4d,#0a2934)!important;color:#dff8fb!important;
  font-size:20px!important;font-weight:800!important;white-space:nowrap!important;cursor:pointer
}
body.in-game .shipyard-battle-guide-btn:hover,body.in-game .shipyard-battle-guide-btn:focus-visible{border-color:#8ce7ef!important;background:linear-gradient(180deg,#195467,#0c3441)!important;outline:none}
body.in-game #helpModalBody .battle-guide{display:grid;gap:14px;max-width:100%}
body.in-game #helpModalBody .battle-guide-intro{padding:4px 2px 2px}
body.in-game #helpModalBody .battle-guide-intro h3{margin:2px 0 6px;color:#dff6f4;font-size:28px}
body.in-game #helpModalBody .battle-guide-intro p{margin:0;color:#a9c3ca;font-size:20px;line-height:1.55}
body.in-game #helpModalBody .battle-guide-stat-flow{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;padding:14px;border:1px solid #31505c;border-radius:14px;background:linear-gradient(180deg,rgba(12,40,49,.94),rgba(6,24,31,.96))}
body.in-game #helpModalBody .battle-guide-stat-card{min-width:0;min-height:128px;padding:12px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:rgba(255,255,255,.035);display:grid;place-items:center;align-content:center;gap:6px;text-align:center}
body.in-game #helpModalBody .battle-guide-stat-card img{width:54px;height:54px;object-fit:contain}
body.in-game #helpModalBody .battle-guide-stat-card span{font-size:20px;font-weight:800;color:#dceef2}
body.in-game #helpModalBody .battle-guide-stat-card b{font-size:20px;color:#9eb8c0;line-height:1.35}
body.in-game #helpModalBody .battle-guide-stat-card.attack{box-shadow:inset 0 0 0 1px rgba(224,145,119,.08)}
body.in-game #helpModalBody .battle-guide-stat-card.shield{box-shadow:inset 0 0 0 1px rgba(122,214,184,.08)}
body.in-game #helpModalBody .battle-guide-stat-card.hull{box-shadow:inset 0 0 0 1px rgba(118,184,218,.08)}
body.in-game #helpModalBody .battle-guide-flow-arrow,body.in-game #helpModalBody .battle-guide-versus{font-size:30px;font-weight:900;color:#7fc9d3;text-align:center}
body.in-game #helpModalBody .battle-guide-hero-note{display:grid;gap:4px;padding:12px 14px;border-left:4px solid #66c9d7;background:rgba(52,139,154,.10);border-radius:8px}
body.in-game #helpModalBody .battle-guide-hero-note b{font-size:20px;color:#d9f0f2}
body.in-game #helpModalBody .battle-guide-hero-note span{font-size:20px;color:#9fb9c1;line-height:1.55}
body.in-game #helpModalBody .battle-guide-fold{border:1px solid #31505c;background:linear-gradient(180deg,rgba(12,34,43,.97),rgba(7,23,30,.97));border-radius:12px;overflow:hidden}
body.in-game #helpModalBody .battle-guide-fold>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:13px 15px;color:#d7edf4;font-size:22px;font-weight:800;user-select:none}
body.in-game #helpModalBody .battle-guide-fold>summary::-webkit-details-marker{display:none}
body.in-game #helpModalBody .battle-guide-fold>summary::before{content:'';width:20px;height:20px;flex:0 0 20px;background:url('/assets/icon_expand.png?v=2026092412') center/contain no-repeat}
body.in-game #helpModalBody .battle-guide-fold[open]>summary::before{background-image:url('/assets/icon_collapse.png?v=2026092412')}
body.in-game #helpModalBody .battle-guide-fold-body{display:grid;gap:13px;padding:0 15px 15px}
body.in-game #helpModalBody .battle-guide-formation{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:stretch;gap:12px}
body.in-game #helpModalBody .battle-guide-side{display:grid;align-content:start;gap:10px;padding:12px;border:1px solid rgba(255,255,255,.09);border-radius:13px;background:rgba(255,255,255,.035)}
body.in-game #helpModalBody .battle-guide-side>span{font-size:20px;font-weight:800;color:#8fd9df}
body.in-game #helpModalBody .battle-guide-unit-line{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px}
body.in-game #helpModalBody .battle-guide-unit-example{min-width:0;display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;gap:8px;padding:7px;border-radius:10px;background:#071b23}
body.in-game #helpModalBody .battle-guide-unit-example img{display:block;width:78px;height:66px;object-fit:contain;overflow:hidden}
body.in-game #helpModalBody .battle-guide-unit-example div{display:grid;gap:2px;min-width:0}
body.in-game #helpModalBody .battle-guide-unit-example b{font-size:20px;color:#d4e7eb;line-height:1.25}
body.in-game #helpModalBody .battle-guide-unit-example strong{font-size:26px;color:#9ce6d0;font-variant-numeric:tabular-nums}
body.in-game #helpModalBody .battle-guide-plus{font-size:26px;color:#89b5bd;text-align:center}
body.in-game #helpModalBody .battle-guide-shot-total{display:flex;align-items:baseline;justify-content:center;gap:8px;padding:8px 10px;border-radius:9px;background:rgba(92,196,210,.10)}
body.in-game #helpModalBody .battle-guide-shot-total strong{font-size:30px;color:#9ce6d0}
body.in-game #helpModalBody .battle-guide-shot-total span{font-size:20px;color:#c6dce1}
body.in-game #helpModalBody .battle-guide-points{display:grid;gap:9px}
body.in-game #helpModalBody .battle-guide-points p{margin:0;padding:9px 11px;border-radius:9px;background:rgba(255,255,255,.03);font-size:20px;line-height:1.62;color:#b9ced4}
body.in-game #helpModalBody .battle-guide-points b{color:#e1f3f5}
body.in-game #helpModalBody .battle-guide-damage-examples{display:grid;gap:10px}
body.in-game #helpModalBody .battle-guide-damage-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:center}
body.in-game #helpModalBody .battle-guide-number{min-width:0;display:flex;align-items:center;justify-content:center;gap:7px;padding:11px 9px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:#071b23;font-size:20px}
body.in-game #helpModalBody .battle-guide-number img{width:31px;height:31px;object-fit:contain}.battle-guide-number b{font-size:22px}
body.in-game #helpModalBody .battle-guide-damage-row>span{font-size:25px;color:#79b7c0}
body.in-game #helpModalBody .battle-guide-multi-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;align-items:center;gap:7px}
body.in-game #helpModalBody .battle-guide-multi-flow>div{min-height:72px;display:grid;place-items:center;padding:9px;border-radius:10px;background:rgba(61,147,160,.10);border:1px solid rgba(93,180,193,.18);text-align:center;font-size:20px;font-weight:800}
body.in-game #helpModalBody .battle-guide-multi-flow>span{font-size:24px;color:#73bbc5}
body.in-game #helpModalBody .battle-guide-rf-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
body.in-game #helpModalBody .battle-guide-rf-grid>div{display:grid;gap:2px;padding:10px;border-radius:10px;background:#071b23;text-align:center}
body.in-game #helpModalBody .battle-guide-rf-grid b{font-size:27px;color:#f0c993}
body.in-game #helpModalBody .battle-guide-rf-grid span{font-size:18px;color:#a9c1c7}
body.in-game #helpModalBody .battle-guide-round-strip{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:8px;align-items:center}
body.in-game #helpModalBody .battle-guide-round-strip>div{display:grid;gap:3px;padding:11px;border-radius:10px;background:#071b23;text-align:center}
body.in-game #helpModalBody .battle-guide-round-strip b{font-size:20px;color:#d8ebef}.battle-guide-round-strip span{font-size:18px;color:#9eb6bd}
body.in-game #helpModalBody .battle-guide-round-strip>span{font-size:24px;color:#73bbc5}
body.in-game #helpModalBody .battle-guide-explosion{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px;align-items:center;padding:11px 13px;border-radius:11px;background:rgba(197,129,82,.10);border:1px solid rgba(220,159,111,.22)}
body.in-game #helpModalBody .battle-guide-explosion img{width:52px;height:52px;object-fit:contain}.battle-guide-explosion div{display:grid;gap:4px}.battle-guide-explosion b{font-size:21px;color:#f0d3af}.battle-guide-explosion span{font-size:20px;color:#bfcdd0}
body.in-game #helpModalBody .battle-guide-bonus-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
body.in-game #helpModalBody .battle-guide-bonus-grid>div{display:grid;grid-template-columns:42px minmax(0,1fr);gap:2px 8px;align-items:center;padding:11px;border-radius:11px;background:#071b23}
body.in-game #helpModalBody .battle-guide-bonus-grid img{grid-row:1/3;width:40px;height:40px;object-fit:contain}.battle-guide-bonus-grid b{font-size:20px;color:#d9ebef}.battle-guide-bonus-grid span{font-size:18px;color:#9db7bd}
body.in-game #helpModalBody .battle-guide-equation{display:grid;place-items:center;gap:3px;padding:12px;border-radius:11px;background:rgba(87,177,190,.10);text-align:center}
body.in-game #helpModalBody .battle-guide-equation b{font-size:22px;color:#dceff1}.battle-guide-equation span{font-size:24px;color:#99e1c8;font-weight:800}.battle-guide-equation small{font-size:18px;color:#9db4ba}
body.in-game #helpModalBody .battle-guide-puffer{display:grid;grid-template-columns:145px minmax(0,1fr);gap:16px;align-items:center;padding:13px;border-radius:13px;background:linear-gradient(135deg,rgba(32,84,91,.16),rgba(8,27,34,.9));border:1px solid rgba(105,200,207,.20)}
body.in-game #helpModalBody .battle-guide-puffer img{width:140px;height:140px;object-fit:contain}.battle-guide-puffer div{display:grid;gap:5px}.battle-guide-puffer span{font-size:19px;color:#8db2ba}.battle-guide-puffer b{font-size:28px;color:#e3f1f3}.battle-guide-puffer strong{font-size:30px;color:#9de5ca}.battle-guide-puffer small{font-size:19px;color:#a7bec4}
body.in-game #helpModalBody .battle-guide-large{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(220px,.8fr);gap:12px;align-items:center}
body.in-game #helpModalBody .battle-guide-large-icons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.battle-guide-large-icons .battle-guide-unit-example{grid-template-columns:64px minmax(0,1fr)}.battle-guide-large-icons .battle-guide-unit-example img{width:64px;height:56px}
body.in-game #helpModalBody .battle-guide-large-result{display:grid;gap:6px;padding:16px;border-radius:12px;background:rgba(87,177,190,.10);text-align:center}.battle-guide-large-result b{font-size:24px;color:#dff3f5}.battle-guide-large-result span{font-size:19px;color:#a9c0c6;line-height:1.45}
@media(max-width:900px){body.in-game #helpModalBody .battle-guide-formation{grid-template-columns:1fr}.battle-guide-versus{font-size:22px!important}.battle-guide-unit-line{grid-template-columns:1fr auto 1fr!important}.battle-guide-large{grid-template-columns:1fr!important}.battle-guide-large>.battle-guide-flow-arrow{transform:rotate(90deg)}body.in-game #helpModalBody .battle-guide-bonus-grid{grid-template-columns:1fr}}
@media(max-width:620px){body.in-game .shipyard-summary-chip{align-items:flex-start!important;flex-wrap:wrap!important}body.in-game .shipyard-battle-guide-btn{font-size:14px!important;min-height:38px!important;padding:6px 10px!important}body.in-game #helpModalBody .battle-guide-intro h3{font-size:20px}body.in-game #helpModalBody .battle-guide-intro p,body.in-game #helpModalBody .battle-guide-hero-note b,body.in-game #helpModalBody .battle-guide-hero-note span,body.in-game #helpModalBody .battle-guide-fold>summary,body.in-game #helpModalBody .battle-guide-points p{font-size:14px}body.in-game #helpModalBody .battle-guide-stat-flow{grid-template-columns:1fr}.battle-guide-stat-flow>.battle-guide-flow-arrow{transform:rotate(90deg);font-size:20px!important}body.in-game #helpModalBody .battle-guide-stat-card{min-height:92px}.battle-guide-stat-card img{width:42px!important;height:42px!important}.battle-guide-stat-card span,.battle-guide-stat-card b{font-size:14px!important}body.in-game #helpModalBody .battle-guide-unit-line{grid-template-columns:1fr}.battle-guide-plus{font-size:20px!important}.battle-guide-unit-example{grid-template-columns:68px minmax(0,1fr)!important}.battle-guide-unit-example img{width:68px!important;height:58px!important}.battle-guide-unit-example b{font-size:14px!important}.battle-guide-unit-example strong{font-size:20px!important}.battle-guide-shot-total strong{font-size:22px!important}.battle-guide-shot-total span{font-size:14px!important}body.in-game #helpModalBody .battle-guide-damage-row{grid-template-columns:1fr}.battle-guide-damage-row>span{transform:rotate(90deg);font-size:18px!important}.battle-guide-number{font-size:14px!important}.battle-guide-number b{font-size:16px!important}body.in-game #helpModalBody .battle-guide-multi-flow{grid-template-columns:1fr}.battle-guide-multi-flow>span{transform:rotate(90deg);font-size:18px!important}.battle-guide-multi-flow>div{min-height:48px;font-size:14px!important}body.in-game #helpModalBody .battle-guide-rf-grid{grid-template-columns:1fr 1fr}.battle-guide-rf-grid b{font-size:20px!important}.battle-guide-rf-grid span{font-size:12px!important}body.in-game #helpModalBody .battle-guide-round-strip{grid-template-columns:1fr}.battle-guide-round-strip>span{transform:rotate(90deg);font-size:18px!important}.battle-guide-round-strip b{font-size:14px!important}.battle-guide-round-strip span{font-size:12px!important}.battle-guide-explosion{grid-template-columns:44px minmax(0,1fr)!important}.battle-guide-explosion img{width:40px!important;height:40px!important}.battle-guide-explosion b,.battle-guide-explosion span{font-size:13px!important}.battle-guide-bonus-grid b{font-size:14px!important}.battle-guide-bonus-grid span{font-size:12px!important}.battle-guide-equation b,.battle-guide-equation span{font-size:15px!important}.battle-guide-equation small{font-size:12px!important}.battle-guide-puffer{grid-template-columns:92px minmax(0,1fr)!important}.battle-guide-puffer img{width:88px!important;height:88px!important}.battle-guide-puffer span,.battle-guide-puffer small{font-size:12px!important}.battle-guide-puffer b,.battle-guide-puffer strong{font-size:18px!important}body.in-game #helpModalBody .battle-guide-large-icons{grid-template-columns:1fr}.battle-guide-large-result b{font-size:17px!important}.battle-guide-large-result span{font-size:13px!important}}

/* v2026.09.24.15 航隊編成載貨資源 */
body.in-game #helpModalBody .fleet-composition-cargo{display:grid;gap:10px;padding:12px;border:1px solid rgba(86,190,210,.32);border-radius:10px;background:rgba(7,31,39,.72)}
body.in-game #helpModalBody .fleet-composition-cargo-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
body.in-game #helpModalBody .fleet-composition-cargo-head>span{font-weight:800;color:var(--cyan2);font-size:20px}
body.in-game #helpModalBody .fleet-composition-cargo-head>b{font-size:20px}
body.in-game #helpModalBody .fleet-composition-cargo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
body.in-game #helpModalBody .fleet-composition-cargo-item{display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-areas:"icon name" "icon value";align-items:center;column-gap:9px;min-width:0;padding:8px 10px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:rgba(255,255,255,.035)}
body.in-game #helpModalBody .fleet-composition-cargo-item img{grid-area:icon;width:34px;height:34px;object-fit:contain}
body.in-game #helpModalBody .fleet-composition-cargo-item span{grid-area:name;font-size:16px;opacity:.82}
body.in-game #helpModalBody .fleet-composition-cargo-item b{grid-area:value;font-size:20px;overflow-wrap:anywhere}
@media(max-width:900px){body.in-game #helpModalBody .fleet-composition-cargo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){body.in-game #helpModalBody .fleet-composition-cargo-grid{grid-template-columns:1fr}}

/* v2026.09.25.01：港灣特殊設施「潮癒所」與外海戰後魚群救援 */
body.in-game .shipyard-special-stack{display:grid;gap:18px;min-width:0}
body.in-game .tide-healing-center-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);gap:14px;align-items:stretch;min-width:0;padding-top:16px;border-top:1px solid rgba(85,155,169,.25)}
body.in-game .tide-healing-center-building,
body.in-game .tide-healing-center-action-card{min-width:0;box-sizing:border-box}
body.in-game .tide-healing-center-action-card{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid rgba(89,174,157,.4);border-radius:12px;background:linear-gradient(145deg,rgba(7,43,43,.96),rgba(4,27,32,.96))}
body.in-game .tide-healing-center-action-card h3{margin:2px 0 4px;color:#dcf2ed;font-size:24px}
body.in-game .tide-healing-center-action-card p{margin:0;color:#9fc6bd;line-height:1.5}
body.in-game .tide-healing-center-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.in-game .tide-healing-center-stats>span{display:grid;gap:3px;padding:10px;border:1px solid rgba(89,174,157,.27);border-radius:8px;background:rgba(3,30,32,.72);color:#8fb8af}
body.in-game .tide-healing-center-stats b{color:#dff4ef;overflow-wrap:anywhere}
body.in-game .tide-healing-center-stats small{color:#78a49a;line-height:1.3}
body.in-game .tide-healing-center-rule{display:grid;gap:5px;padding:12px;border:1px solid rgba(105,191,173,.32);border-radius:9px;background:rgba(19,65,59,.42)}
body.in-game .tide-healing-center-rule b{color:#a5e3d2;font-size:22px}
body.in-game .tide-healing-center-rule span,
body.in-game .tide-healing-center-action-card>small{color:#84ada4;line-height:1.5}

body.in-game .battle-fish-rescue{margin-top:10px;border:1px solid rgba(86,171,151,.42);background:linear-gradient(145deg,rgba(5,37,39,.94),rgba(5,24,30,.96));border-radius:10px;overflow:hidden}
body.in-game .battle-fish-rescue>header{display:flex;align-items:center;gap:12px;padding:11px 13px;border-bottom:1px solid rgba(86,171,151,.28)}
body.in-game .battle-fish-rescue>header img{width:68px;height:68px;object-fit:contain;flex:0 0 68px}
body.in-game .battle-fish-rescue>header>div{display:grid;gap:2px;min-width:0}
body.in-game .battle-fish-rescue>header span{color:#78aa9e}
body.in-game .battle-fish-rescue>header h3{margin:0;color:#d9f2ec;font-size:24px}
body.in-game .battle-fish-rescue>header small{color:#84a9a2;line-height:1.4}
body.in-game .battle-fish-rescue-list{display:grid;gap:1px}
body.in-game .battle-fish-rescue-row{display:grid;grid-template-columns:minmax(74px,.55fr) minmax(130px,.9fr) repeat(3,minmax(92px,.7fr)) minmax(60px,.45fr);gap:8px;align-items:center;padding:9px 12px;background:rgba(3,23,28,.52)}
body.in-game .battle-fish-rescue-row>span,
body.in-game .battle-fish-rescue-row>b,
body.in-game .battle-fish-rescue-row>em{min-width:0}
body.in-game .battle-fish-rescue-row>b{color:#cce9e1}
body.in-game .battle-fish-rescue-row>span:not(:first-child){display:grid;gap:2px}
body.in-game .battle-fish-rescue-row small{color:#718f8a}
body.in-game .battle-fish-rescue-row strong{color:#dbece8}
body.in-game .battle-fish-rescue-row .rescued strong{color:#8ee0bb}
body.in-game .battle-fish-rescue-row .lost strong{color:#e5a298}
body.in-game .battle-fish-rescue-row>em{font-style:normal;text-align:right;color:#9ed9c9;font-weight:800}
@media(max-width:1024px){body.in-game .tide-healing-center-layout{grid-template-columns:1fr}}
@media(max-width:760px){
  body.in-game .tide-healing-center-action-card{padding:12px}
  body.in-game .tide-healing-center-action-card h3{font-size:20px}
  body.in-game .tide-healing-center-stats{grid-template-columns:1fr}
  body.in-game .battle-fish-rescue>header img{width:54px;height:54px;flex-basis:54px}
  body.in-game .battle-fish-rescue-row{grid-template-columns:1fr 1fr;gap:7px 10px}
  body.in-game .battle-fish-rescue-row>em{text-align:left}
}


/* ========================================================================
   v2026.09.25.07 — 港灣整備場標題摘要寬度修正
   桌面版讓「整備場 Lv.XX / 類別與單位摘要」充分使用右側剩餘寬度，
   避免明明仍有空間卻被 320px 彈性上限擠成多行。
   ======================================================================== */
@media(min-width:1181px){
  body.in-game .scene-panel-head .shipyard-summary-chip{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:440px!important;
    max-width:min(52vw,620px)!important;
  }
  body.in-game .shipyard-summary-chip>span{
    flex:1 1 auto!important;
    min-width:max-content!important;
  }
  body.in-game .shipyard-summary-chip>span>b,
  body.in-game .shipyard-summary-chip>span>small{
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
}
@media(min-width:621px) and (max-width:1180px){
  body.in-game .shipyard-summary-chip>span>b,
  body.in-game .shipyard-summary-chip>span>small{white-space:nowrap!important}
}


/* ========================================================================
   v2026.09.25.08 — 手機戰鬥說明流程箭頭 + 島政任命動物圖片
   ======================================================================== */
body.in-game .governance-role-current-animal{
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-width:0;
}
body.in-game .governance-role-current-portrait{
  width:72px;
  height:72px;
  border:1px solid rgba(107,190,199,.32);
  border-radius:11px;
  background:rgba(3,23,30,.65);
  display:grid;
  place-items:center;
  overflow:hidden;
}
body.in-game .governance-role-current-portrait img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
body.in-game .governance-role-current-copy{
  display:grid;
  gap:5px;
  min-width:0;
}
body.in-game .governance-role-current-copy>b{
  line-height:1.25;
}
body.in-game .governance-role-current-animal.gov-gold .governance-role-current-copy>b{color:#f1d778}
body.in-game .governance-role-current-animal.gov-silver .governance-role-current-copy>b{color:#c6d8e1}
body.in-game .governance-role-current-animal.gov-bronze .governance-role-current-copy>b{color:#d59a69}

@media(max-width:620px){
  /* 手機版不要旋轉桌面用的「→」。transform 不佔版面高度，會讓箭頭視覺上
     穿進下一張卡片／下一個收合標題；改成真正有固定高度的「↓」。 */
  body.in-game #helpModalBody .battle-guide-fold-body{
    overflow:hidden!important;
  }
  body.in-game #helpModalBody .battle-guide-stat-flow,
  body.in-game #helpModalBody .battle-guide-damage-row,
  body.in-game #helpModalBody .battle-guide-multi-flow,
  body.in-game #helpModalBody .battle-guide-round-strip{
    row-gap:4px!important;
  }
  body.in-game #helpModalBody .battle-guide-stat-flow>.battle-guide-flow-arrow,
  body.in-game #helpModalBody .battle-guide-damage-row>span,
  body.in-game #helpModalBody .battle-guide-multi-flow>span,
  body.in-game #helpModalBody .battle-guide-round-strip>span{
    display:grid!important;
    place-items:center!important;
    width:100%!important;
    height:20px!important;
    min-height:20px!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
    overflow:hidden!important;
    font-size:0!important;
    line-height:1!important;
    color:#73bbc5!important;
  }
  body.in-game #helpModalBody .battle-guide-stat-flow>.battle-guide-flow-arrow::before,
  body.in-game #helpModalBody .battle-guide-damage-row>span::before,
  body.in-game #helpModalBody .battle-guide-multi-flow>span::before,
  body.in-game #helpModalBody .battle-guide-round-strip>span::before{
    content:'↓';
    display:block;
    font-size:16px!important;
    line-height:16px!important;
    font-weight:900;
    color:#73bbc5;
  }
  body.in-game .governance-role-current-animal{
    grid-template-columns:58px minmax(0,1fr);
    gap:8px;
  }
  body.in-game .governance-role-current-portrait{
    width:58px;
    height:58px;
    border-radius:9px;
  }
  body.in-game .governance-role-current-copy>b,
  body.in-game .governance-role-current-copy>span,
  body.in-game .governance-role-current-copy strong{
    font-size:13px!important;
  }
}
