.rescue-hero { padding-block:21px 26px; background:linear-gradient(130deg,#f8fbff,#eaf4ff); }
.rescue-hero .breadcrumbs ol { margin-bottom:12px; }
.rescue-hero h1 { margin:4px 0 7px; }
.rescue-hero > .wrap > p:not(.kicker) { margin-top:6px; }
.rescue-content { margin-top:19px; }
.rescue-game {
  display:grid; grid-template-columns:minmax(0,1fr) 315px;
  grid-template-areas:"stage side" "buildings buildings";
  border:1px solid #d3e3f5; border-radius:13px; overflow:hidden; background:#fff;
}
.rescue-stage { grid-area:stage; position:relative; min-height:clamp(320px,34vw,425px); isolation:isolate; overflow:hidden; background:radial-gradient(ellipse at 45% 40%,#f8fcff,#eaf3fe); }
.rescue-stage canvas,.rescue-stage > svg { position:absolute; inset:0; width:100%; height:100%; }
.rescue-stage canvas { touch-action:pan-y pinch-zoom; cursor:grab; }
.rescue-stage canvas:active { cursor:grabbing; }
.rescue-stage > svg { pointer-events:none; }
.rescue-stage > svg rect { fill:#fff; stroke:#95b8dd; }
.rescue-stage > svg .is-online rect { fill:#eff7ff; stroke:#3180d6; }
.rescue-stage > svg text { fill:#204467; font:700 11px sans-serif; }
.rescue-flat { position:absolute; inset:0; display:grid; place-items:center; padding:15px; }
.rescue-map { width:100%; max-height:95%; }
.rescue-line { fill:none; stroke:#7897b8; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.rescue-line.is-spare:not(.is-placed) { stroke:#9cacc0; stroke-dasharray:7 6; }
.rescue-line.is-live { stroke:#1678e4; stroke-width:4; }
.rescue-line.is-cut,.rescue-line.is-broken { stroke:#bd6837; stroke-dasharray:7 6; }
.rescue-map-node rect { fill:#edf3fb; stroke:#8fabc9; stroke-width:1.5; }
.rescue-map-node.is-building rect { fill:#e4ebf4; stroke:#859db9; }
.rescue-map-node.is-online rect { fill:#d9eeff; stroke:#1b78df; }
.rescue-map text { fill:#234a70; font:700 15px sans-serif; }
.rescue-map .rescue-break-label { fill:#a75127; }
.rescue-view,.rescue-legend { position:absolute; display:flex; align-items:center; gap:8px; z-index:1; font-size:12px; color:#375e86; }
.rescue-view { top:9px; left:9px; }
.rescue-view button,.rescue-buttons button {
  min-height:39px; padding:5px 8px; border:1px solid #d6e7f8; border-radius:5px; background:#f4f9ff;
  color:#135cae; font-weight:700;
}
.rescue-view button:hover,.rescue-buttons button:hover { background:#e9f3ff; }
.rescue-legend { inset:auto 8px 8px; flex-wrap:wrap; justify-content:center; pointer-events:none; }
.rescue-legend span::before { content:""; display:inline-block; width:13px; height:3px; margin-right:4px; border-radius:2px; background:#1678e4; vertical-align:3px; }
.rescue-legend span:nth-child(2)::before { background:#93a8c0; }
.rescue-legend span:nth-child(3)::before { background:#bd6837; }
.rescue-side { grid-area:side; min-width:0; padding:16px; border-left:1px solid #d3e3f5; }
.rescue-tag { margin:0; color:#0866db; font-size:12px; font-weight:750; }
.rescue-side h2 { margin:4px 0 5px; color:#18344f; font-size:22px; }
.rescue-side p[data-rescue-instruction] { margin:0 0 10px; color:#395c7d; font-size:14px; line-height:1.6; }
.rescue-count { display:flex; justify-content:space-between; gap:6px; margin:0 0 6px; color:#335c86; font-size:13px; }
.rescue-options { display:grid; gap:5px; }
.rescue-options button {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:7px; align-items:center; text-align:left;
  min-height:53px; padding:5px 7px; border:1px solid #dbe8f8; border-radius:6px; background:#f6faff; color:#203f62;
}
.rescue-options button:hover { border-color:#a5caf5; }
.rescue-options button:disabled { cursor:default; opacity:.67; }
.rescue-options button[aria-pressed="true"] { border-color:#80b7f6; background:#eaf4ff; }
.rescue-options b { padding:2px 4px; color:#1764be; background:#e5f0ff; border-radius:3px; font:700 11px ui-monospace,monospace; }
.rescue-options strong,.rescue-options small { display:block; }
.rescue-options strong { font-size:13px; }
.rescue-options small { color:#4a6581; font-size:11px; }
.rescue-add { color:#135cae; font-size:12px; font-weight:700; }
.rescue-hint { min-height:38px; margin:9px 0 6px; color:#294d70; font-size:13px; }
.rescue-buttons { display:flex; flex-wrap:wrap; gap:5px; }
.rescue-buttons button:not([data-rescue-reset]) { border-color:#b7d6fa; background:#e9f3ff; }
.rescue-load { margin:5px 0 0; color:#4a6581; font-size:12px; }
.rescue-buildings { grid-area:buildings; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:8px; border-top:1px solid #d3e3f5; background:#f8fbff; }
.rescue-buildings > span { display:flex; align-items:center; justify-content:center; gap:5px 8px; flex-wrap:wrap; padding:5px 4px; border-radius:5px; color:#3a5879; background:#edf2f9; font-size:13px; }
.rescue-buildings i { width:7px; height:7px; border-radius:50%; background:#8295ae; }
.rescue-buildings .is-online { color:#085baf; background:#e6f3ff; }
.rescue-buildings .is-online i { background:#0879ef; }
.rescue-note { margin:7px 0 0; color:#4a6581; font-size:12px; }
.rescue-reading { padding-block:34px 47px; }
.rescue-reading h2 { margin:13px 0 5px; color:#18344f; font-size:clamp(20px,2.6vw,27px); }
.rescue-reading p,.rescue-reading li { max-width:54em; color:#395c7d; }
.rescue-reading li+li { margin-top:6px; }
@media (max-width:850px) {
  .rescue-game { grid-template-columns:minmax(0,1fr) 264px; }
  .rescue-side { padding:12px; }
}
@media (max-width:680px) {
  .rescue-hero { padding-block:13px 16px; }
  .rescue-content { margin-top:10px; }
  .rescue-game { grid-template-columns:minmax(0,1fr); grid-template-areas:"intro" "stage" "buildings" "actions" "load"; }
  .rescue-side { display:contents; }
  .rescue-objective { grid-area:intro; padding:11px 12px; }
  .rescue-side h2 { font-size:19px; }
  .rescue-side p[data-rescue-instruction] { margin:0 0 5px; }
  .rescue-stage { min-height:clamp(205px,55vw,315px); border-top:1px solid #d3e3f5; }
  .rescue-map text { font-size:19px; }
  .rescue-actions { grid-area:actions; padding:9px 11px 11px; border-top:1px solid #d3e3f5; }
  .rescue-load { grid-area:load; margin:0; padding:4px 11px; }
  .rescue-buildings { padding:5px; }
  .rescue-buildings > span { gap:3px 5px; font-size:12px; }
  .rescue-legend { font-size:10px; }
  .rescue-reading { padding-block:22px 36px; }
}
.rescue-test-pick { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:8px; margin:8px 0; color:#355b80; font-size:13px; }
.rescue-test-pick select { min-width:0; min-height:37px; padding:4px 6px; border:1px solid #c6dff6; border-radius:5px; color:#244b73; background:#fff; }
