/* Operations shares the existing navy / pearl / coral game palette. */
#modal.operation-modal {width:min(1180px,97vw);max-width:97vw;max-height:94dvh;background:#0b1727;color:#ecf2fa;border:1px solid #344760;border-radius:20px;}
.operation-modal #modal-content{padding:18px;overflow:auto;max-height:calc(94dvh - 72px)}
.operation-modal button,.operation-modal select,.operation-modal input{font:inherit;color:inherit;background:#172b43;border:1px solid #425771;border-radius:10px;min-height:44px;padding:9px 14px;touch-action:manipulation;cursor:pointer}
.operation-modal button:hover:not(:disabled){background:#263e57;border-color:#91cad9}.operation-modal button:focus-visible{outline:3px solid #78e3db;outline-offset:2px}.operation-modal button:disabled{opacity:.45;cursor:default}
.operation-modal p{line-height:1.6}.operation-modal h3,.operation-modal h4{margin:6px 0 10px}.op-eyebrow,.op-setup-head small{font-size:11px;letter-spacing:.16em;color:#78d9d0}.op-hub h3{font-size:clamp(23px,3vw,36px)}
.op-hub-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin:20px 0}.op-hub-card{text-align:left;display:flex;flex-direction:column;gap:10px;min-height:175px!important;background:linear-gradient(140deg,#203852,#122235)!important}.op-hub-card strong{font-size:20px}.op-hub-card small{color:#a4bccf;font-size:11px;letter-spacing:.1em}.op-hub-card p{margin:0;font-size:13px}.op-hub-card b{align-self:flex-end;color:#7ef0cf}
.op-resume{display:flex;justify-content:space-between;gap:12px;width:100%;background:#24473f!important;border-color:#76bfa3!important}.op-setup-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.op-setup-head h3{font-size:24px}.op-setup-head span,.op-fine{font-size:12px;color:#b0c1d4}.op-lock-note{background:#172b42;padding:12px 15px;border-radius:10px;font-size:13px;border-left:3px solid #7ed7cd}
.op-team-grid{display:grid;grid-template-columns:repeat(var(--team-count),minmax(0,1fr));gap:12px;margin:16px 0}.op-team{border:1px solid #334960;border-radius:14px;padding:14px;background:#101f33}.op-team.current{border-color:#7ddfd2}.op-team>header{display:flex;justify-content:space-between;color:#a9bed2;font-size:12px;margin-bottom:10px}.op-team h4{font-size:17px}.op-enemy{font-size:12px;color:#ffbdac}.op-team details{font-size:12px;color:#c3d2e2;margin:8px 0}.op-team summary{cursor:pointer;min-height:32px}.op-role-chips,.op-synergies{display:flex;flex-wrap:wrap;gap:5px;font-size:10px}.op-role-chips span,.op-synergies span{border:1px solid #405169;border-radius:6px;padding:4px 7px;color:#a9bad0}.op-role-chips .ready{color:#95e9c9;border-color:#3e7061}.op-synergies{margin-top:10px}
.op-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:12px}.op-slots.raid-slots{grid-template-columns:repeat(5,minmax(0,1fr))}.op-slot{padding:6px!important;position:relative;display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;min-height:92px!important}.op-slot img{width:48px;height:48px;object-fit:cover;object-position:50% 20%;border-radius:8px}.op-slot>span{font-size:11px;overflow-wrap:anywhere}.op-slot small{display:block;font-size:10px;color:#bacbdb}.op-slot em{font-size:9px;position:absolute;right:3px;top:3px;background:#182a41;padding:2px;border-radius:3px;font-style:normal}.op-slot.selected{background:#294c4c!important;border:2px solid #8ae3cf!important;padding:5px!important}.op-slot>b{font-size:24px}
.op-weapons{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:12px}.op-weapons label{font-size:11px;min-width:0}.op-weapons select{width:100%;padding:6px!important;font-size:11px!important;margin-top:5px}.op-difficulty{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.op-difficulty [aria-pressed=true],.op-skill-select [aria-pressed=true]{border-color:#e5b47b!important;background:#463a30!important}.op-difficulty small{color:#bbcbda;font-size:12px}
.op-roster-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;margin:20px 0}.op-roster-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.op-roster-head strong{font-size:13px}.op-roster-head input{width:180px;max-width:50%;font-size:12px}.op-roster{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}.op-unit{display:flex;flex-direction:column;align-items:center;gap:5px;padding:9px 5px!important;position:relative}.op-unit img{width:60px;height:60px;object-fit:cover;border-radius:9px}.op-unit strong{font-size:12px}.op-unit small,.op-unit em{font-size:10px;text-align:center;line-height:1.4}.op-unit em{font-style:normal;color:#bad1df}.op-unit.unavailable{opacity:.65}.op-unit.focused{border-color:#88e3d0!important}.op-inspector{background:#13263a;border-radius:14px;padding:15px;font-size:12px;align-self:start;position:sticky;top:0}.op-person{display:flex;gap:12px;align-items:center}.op-person img{width:62px;height:70px;object-fit:cover;border-radius:8px}.op-person h3{font-size:21px}.op-skill-select{display:grid;grid-template-columns:1fr 1fr;gap:6px}.op-skill-select button{padding:8px!important;display:flex;flex-direction:column;text-align:left;font-size:11px!important;gap:5px}.op-skill-select small{color:#bbcddd}
.op-footer{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;padding:15px 0;border-top:1px solid #33485e}.op-footer p{flex:1;font-size:12px;min-width:180px}.operation-modal .op-primary{background:#86dfcb;color:#092333;border-color:#86dfcb;font-weight:800}.op-result{max-width:700px;text-align:center;margin:auto;padding:20px 8px}.op-result h3{font-size:26px}.op-result>small{letter-spacing:.2em;color:#8de0cb}.op-grade{display:block;font-size:64px;color:#f5d491;margin:16px}.op-result-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.op-confirm{max-width:680px;margin:auto;padding:20px}.op-confirm button{margin:5px}.op-records article{padding:15px 0;border-bottom:1px solid #3a4b60}.op-records article>span{display:block;margin:7px 0;color:#b0c5d8;font-size:13px}.op-records details{font-size:12px}
.operation-entry{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px auto 0;padding:10px 18px;border:1px solid #6e879f;border-radius:10px;background:#172c45;color:#f2f6fc;min-height:44px;cursor:pointer}.map-operations{margin:0 0 12px;width:100%}
.raid-play .swap-and-skill,.raid-play .crew-swap,.raid-play #formation-btn{display:none!important}.raid-play #party-slots{grid-template-columns:repeat(10,minmax(94px,1fr))!important;overflow-x:auto;scroll-snap-type:x proximity;max-width:100%;padding-bottom:5px}.raid-play .crew-card{scroll-snap-align:start;min-width:94px}.raid-play .party-strip{min-width:0}.raid-play .crew-card .skill-trigger{min-height:92px}.raid-targets{display:flex;gap:5px;pointer-events:auto;align-items:center}.raid-targets button{min-height:34px;padding:4px 9px;background:#152b42;border:1px solid #4e788f;color:#e9f6ff;border-radius:6px;font-size:11px}.raid-targets button[aria-pressed=true]{background:#285751;border-color:#89dbc9}.raid-targets button:disabled{opacity:.4}.raid-targets small{font-size:10px;color:#d1e5ed}.raid-targets[hidden]{display:none}.raid-play .arena-header{row-gap:3px}
@media(max-width:900px){.op-team-grid{display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:12px}.op-team{flex:0 0 min(320px,80vw);min-width:260px;scroll-snap-align:start}.op-team-grid>.op-team{flex-basis:300px}.op-roster-layout{grid-template-columns:minmax(0,1fr) 230px}.op-slot{min-height:92px!important}.op-footer{position:sticky;bottom:-18px;background:#0b1727;padding:10px 0}.op-footer p{flex-basis:100%;margin:0}.op-inspector{position:static}}
@media(max-width:600px){.operation-modal #modal-content{padding:12px}.op-roster-layout{grid-template-columns:1fr}.op-inspector{order:-1}.op-roster{grid-template-columns:repeat(4,minmax(0,1fr))}.op-unit img{width:45px;height:45px}.op-resume{flex-direction:column;text-align:left}.op-setup-head h3{font-size:20px}.op-footer{bottom:-12px}.op-footer button{flex:1;font-size:12px!important}.raid-targets{overflow-x:auto;max-width:100%}.raid-targets button{white-space:nowrap}.op-hub-cards{grid-template-columns:1fr}}
@media(orientation:landscape) and (max-height:500px){#modal.operation-modal{max-height:98dvh;border-radius:10px}.operation-modal #modal-content{max-height:calc(98dvh - 50px);padding:12px}.op-footer{position:static}.op-roster-layout{grid-template-columns:minmax(0,1fr) 250px}.op-team-grid{margin:8px 0}.raid-play #party-slots{grid-template-columns:repeat(10,minmax(112px,1fr))!important}.raid-targets button{min-height:28px}.op-setup-head h3{font-size:20px}}
.raid-targets{grid-column:1/-1;width:100%;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;min-width:0}.raid-targets small{display:none}.raid-targets button{flex:1;white-space:nowrap;padding:4px 7px}
.landscape-play.raid-play #party-slots{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(5,minmax(58px,1fr))!important;gap:4px;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y proximity}
.landscape-play.raid-play #party-slots .crew-card{display:flex!important;flex-direction:column!important;min-width:0;min-height:58px;grid-template-columns:none!important}
.landscape-play.raid-play #party-slots .skill-trigger{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;grid-template-rows:18px 15px minmax(22px,1fr)!important;min-height:58px!important;height:100%;padding:3px!important;gap:1px!important;align-items:center;text-align:left;justify-items:start}
.landscape-play.raid-play #party-slots .slot-art{grid-column:1!important;grid-row:1/4!important;width:38px!important;height:44px!important;min-width:0;object-fit:cover!important;border-radius:6px}
.landscape-play.raid-play #party-slots .skill-trigger strong{grid-column:2!important;grid-row:1!important;font-size:10px!important;line-height:17px;padding:0!important;max-width:100%}
.landscape-play.raid-play #party-slots .crew-role{display:none!important}.landscape-play.raid-play #party-slots .skill-status{position:static!important;grid-column:2!important;grid-row:2!important;font-size:9px;line-height:14px;padding:0;max-width:100%}
.landscape-play.raid-play #party-slots .unit-work{grid-column:2!important;grid-row:3!important;display:flex!important;flex-wrap:wrap;gap:0 3px;align-items:start;justify-content:flex-start;max-height:24px;min-height:20px;line-height:10px;font-size:8px!important;padding:0!important;text-align:left;white-space:normal}
.landscape-play.raid-play #crew-instruction{font-size:9px}.landscape-play.raid-play .party-caption{min-height:17px}
.neon-game.raid-play #party-slots .crew-swap{display:none!important}
.neon-game.raid-play:not(.landscape-play) #party-slots{width:100%!important;max-width:100%;min-width:0;box-sizing:border-box;overflow-x:auto!important;overflow-y:hidden!important}

/* A single large core HP bar doubles as the raid body target. */
#raid-body-focus{display:block;position:relative;width:100%;padding:0;min-height:0;opacity:1;cursor:default;appearance:none;line-height:0}
.raid-play #boss-hp{display:none}
.neon-game.raid-play #raid-body-focus{height:14px;min-height:14px;border:1px solid #8cb7cc;border-radius:6px;background:#091829;box-shadow:0 2px 8px #0005;cursor:pointer;pointer-events:auto;overflow:hidden}
.neon-game.raid-play #raid-body-focus #boss-fill{background:linear-gradient(90deg,#df6b91,#ee95bc);box-shadow:inset 0 1px #ffc8df70;transition:width .16s ease}
.neon-game.raid-play #raid-body-focus.is-targeted{outline:2px solid #71e7d1;outline-offset:2px;border-color:#71e7d1}
.neon-game.raid-play #raid-body-focus:focus-visible{outline:3px solid #fff0b8;outline-offset:3px}
.neon-game .raid-targets{gap:6px;padding-top:3px}
.neon-game .raid-targets .raid-part-target{display:flex;flex:1;min-width:0;min-height:38px;flex-direction:column;justify-content:center;gap:5px;padding:5px 8px;background:#0e2334;border:1px solid #426375;border-radius:7px;color:#d6e6ed}
.raid-part-name{font-size:10px;line-height:1.15;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.raid-part-hp{display:block;width:100%;height:6px;border-radius:3px;background:#030b15;overflow:hidden}.raid-part-hp i{display:block;height:100%;border-radius:3px;background:#ebc582;transition:width .16s ease}
.raid-part-target[data-kind=cannon] .raid-part-hp i{background:#f39aac}.raid-part-target[data-kind=relay] .raid-part-hp i{background:#7ed8d0}
.neon-game .raid-targets .raid-part-target[aria-pressed=true]{border-color:#87e7d2;background:#163b40;box-shadow:inset 0 0 0 1px #87e7d266}
@media(orientation:landscape) and (max-height:500px){.neon-game.raid-play #raid-body-focus{height:10px;min-height:10px}.neon-game .raid-targets .raid-part-target{min-height:28px;gap:3px;padding:3px 7px}.raid-part-name{font-size:9px}}

#raid-body-focus.has-phases:after{background:linear-gradient(90deg,transparent 29.7%,#07182bb3 29.7% 30.2%,transparent 30.2% 64.7%,#07182bb3 64.7% 65.2%,transparent 65.2%)}
.neon-game.raid-play #raid-body-focus[data-phase="2"] #boss-fill{background:linear-gradient(90deg,#dbac70,#efd290)}
.neon-game.raid-play #raid-body-focus[data-phase="3"] #boss-fill{background:linear-gradient(90deg,#e8776a,#f7b383)}

.raid-hub-tools,.raid-setup-tools,.raid-party-quick{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.raid-hub-tools p{font-size:12px;margin:0;color:#c3d2d9}.raid-setup-tools button{font-size:11px}
.op-hub-card .raid-purpose{color:#dfc38e!important;font-size:12px!important}.raid-party-editor>.op-slots{margin:12px 0}.raid-party-editor .op-slot{min-height:110px!important}.raid-party-editor .op-slot img{width:58px;height:64px}.raid-party-editor .op-slot>span{font-size:12px}
.raid-preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0}.raid-preset-grid article{padding:12px;background:#102733;border:1px solid #476170;border-radius:9px;display:grid;grid-template-columns:1fr 1fr;gap:7px}.raid-preset-grid strong{grid-column:1/-1;color:#e5d3af;font-size:14px}.raid-preset-grid small{grid-column:1/-1;color:#a9c7cc}.raid-preset-grid button{font-size:11px;padding:6px!important}
.raid-party-details{position:static;min-width:0}.raid-party-details>summary{cursor:pointer;min-height:44px;color:#e9d7ab}.raid-party-details .op-person{margin-top:10px}
.raid-unlock-banner{padding:12px;border:1px solid #d6b275;border-radius:11px;background:linear-gradient(110deg,#1d3a43,#152535);display:grid;gap:5px;margin:10px 0;text-align:left}.raid-unlock-banner small{font-size:9px;letter-spacing:.14em;color:#a8e3d3}.raid-unlock-banner strong{font-size:17px;color:#f5d495}.raid-unlock-banner p{font-size:12px;margin:0;color:#d2e0e2}.raid-unlock-banner button{min-height:44px;padding:8px;border:1px solid #d6b275;border-radius:8px;background:#cbb585;color:#10242e;font-weight:800;cursor:pointer}
.journey-mode.raids:has(small:first-child){overflow:hidden}
@media(max-width:600px){.raid-party-editor .op-slot{min-height:88px!important}.raid-party-editor .op-slot img{width:42px;height:45px}.raid-party-editor .op-slot>span{font-size:9px}.raid-preset-grid{grid-template-columns:1fr}.raid-preset-grid article{grid-template-columns:1fr auto auto;align-items:center;padding:9px}.raid-preset-grid strong{grid-column:1;grid-row:1;font-size:12px}.raid-preset-grid small{grid-column:1;grid-row:2;font-size:10px}.raid-preset-grid button{grid-row:1/3;min-width:80px}.raid-party-editor .op-roster-layout{grid-template-columns:1fr}.raid-party-editor .op-roster-layout>.raid-party-details{order:0}.raid-unlock-banner strong{font-size:15px}}

/* A persistent, optional rescue invitation after the third raid. */
.miryo-invitation{width:100%;display:grid;grid-template-columns:1fr auto;gap:7px 20px;text-align:left;padding:20px 24px;margin:12px 0 18px;border:1px solid #80e9d9;background:linear-gradient(90deg,rgba(5,25,35,.98),rgba(8,28,40,.72)),url("game_assets_v1/miryo_v41/lounge.webp") center/cover;border-radius:12px;color:#f0fff8;min-height:122px;cursor:pointer}
.miryo-invitation span{grid-column:1/-1;font-size:11px;letter-spacing:.15em;color:#8eead6}.miryo-invitation strong{font-size:22px}.miryo-invitation small{grid-column:1;color:#bed8dc;font-size:13px}.miryo-invitation b{grid-column:2;grid-row:2/4;align-self:center;border-bottom:1px solid #83eddf;padding:10px 0;color:#b5fff1}.miryo-invitation:hover{border-color:#eafff5;filter:brightness(1.12)}
@media(max-width:600px){.miryo-invitation{padding:14px;gap:6px 12px}.miryo-invitation strong{font-size:18px}.miryo-invitation small{font-size:12px}}
