.immune-arena {
  --ink: #121a24;
  --panel: #182630;
  --edge: #79c5c049;
  --quiet: #b5c8cb;
  --ally: #93e6d3;
  --hostile: #ffad9f;
  color: #f4f5f0;
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  background: var(--ink);
  overflow: hidden;
}
.immune-status, .immune-bottom {
  flex: none;
  background: linear-gradient(100deg,#172c33,#1b262e 50%,#31232e);
  position: relative;
  font-variant-numeric: tabular-nums;
}
.immune-status {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: clamp(5px,1.8vw,22px);
  padding: 7px clamp(7px,2vw,22px);
  border-bottom: 1px solid var(--edge);
  font-size: clamp(11px,1.7vw,15px);
}
.immune-base { display: flex; align-items: center; gap: .4em; line-height: 1.1; }
.immune-base b { min-width: 0; overflow-wrap: anywhere; }
.immune-base.hostile b { text-align: right; }
.immune-base.ally { color: var(--ally); }
.immune-base.hostile { color: var(--hostile); justify-content: flex-end; }
.immune-base span { font-weight: 800; }
.immune-clock { color: #f1deb7; font-weight: 750; }
.immune-field { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; isolation: isolate; touch-action: none; }
.immune-field canvas { display: block; cursor: crosshair; outline: none; }
.immune-notice {
  position: absolute;
  z-index: 2;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 20px);
  pointer-events: none;
  background: #152d36ed;
  border: 1px solid #77c7c485;
  border-radius: 12px;
  padding: 7px 13px;
  text-align: center; color: #ecf6f5;
  font-size: clamp(12px,1.6vw,16px); font-weight: 750;
}
.immune-lanes {
  position: absolute; left: 10px; bottom: 9px; z-index: 2;
  display: flex; gap: 4px; max-width: calc(100% - 20px);
}
.immune-lane { min-width: 0; overflow-wrap: anywhere; color: #e2eef0; background: #172732df; border: 1px solid #b4dde168; border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 750; cursor: pointer; }
.immune-lane.selected { background: #245353f0; border-color: var(--ally); }
.immune-lane.breached { border-color: #ffe5a5; color: #ffe5a5; }
.immune-arena:not(.immune-started) :is(.immune-status,.immune-bottom,.immune-lanes) { display: none; }
.immune-bottom { padding: 8px 12px; border-top: 1px solid var(--edge); }
.immune-hud { display: grid; grid-template-columns: auto auto minmax(110px,.65fr) minmax(240px,1.5fr) minmax(110px,.65fr); gap: 8px; align-items: center; }
.immune-map-button { display: grid; place-items: center; cursor: pointer; background: #142c34; border: 1px solid var(--edge); border-radius: 9px; padding: 3px; }
.immune-minimap { width: clamp(60px,10vw,116px); max-width: 100%; height: auto; }
.immune-portrait { display: grid; place-items: center; width: clamp(35px,6vw,74px); height: clamp(35px,6vw,74px); border-radius: 13px; background: #11212b; border: 1px solid var(--edge); }
.immune-portrait img { width: 94%; height: 94%; object-fit: contain; }
.immune-life { min-width: 0; display: grid; gap: 5px; }
.immune-name { color: #fff0cc; font-size: clamp(11px,1.7vw,16px); overflow-wrap: anywhere; }
.immune-hp,.immune-xp { display: block; position: relative; overflow: hidden; border-radius: 5px; background: #141c23; }
.immune-hp { height: 19px; border: 1px solid #7fd6cb61; }
.immune-hp i,.immune-xp i { display: block; height: 100%; }
.immune-hp i { background: linear-gradient(90deg,#227d72,#49aa84); }
.immune-hp span { position: absolute; inset: 0; display: grid; place-content: center; font-size: 11px; font-weight: 850; color: #effff4; }
.immune-xp { height: 5px; }
.immune-xp i { background: #dfbd80; }
.immune-skills { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
.immune-skill {
  position: relative; display: grid; grid-template-rows: auto 1fr; place-items: center; gap: 2px; min-width: 0; min-height: 68px;
  color: #d1f2ef; padding: 6px 3px 5px; background: linear-gradient(140deg,#284756,#172630);
  border: 1px solid #669fac; border-radius: 10px; cursor: pointer;
}
.immune-skill kbd { position: absolute; top: 3px; left: 5px; font-size: 10px; color: #a7bdc9; }
.immune-glyph { font-size: clamp(20px,3.2vw,30px); line-height: 1.04; font-family: system-ui,sans-serif; }
.immune-skill small { font-size: clamp(9px,1.36vw,12px); line-height: 1.05; font-weight: 750; overflow-wrap: anywhere; }
.immune-skill:disabled { opacity: .64; }
.immune-skill.aiming { outline: 2px solid #ffe3a4; }
.immune-skill.unlearned { border-color: #7d8180; color: #adb8c2; }
.immune-cooldown:not(:empty) { position: absolute; top: 3px; right: 3px; font-size: 10px; font-weight: 850; border-radius: 4px; padding: 1px 3px; color: #ffdaa4; background: #17232b; }
.immune-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.immune-action { background: #223441; color: #e9f3f5; border: 1px solid #6ba2ac80; border-radius: 9px; padding: 7px 6px; min-height: 34px; font-size: clamp(11px,1.55vw,14px); font-weight: 800; cursor: pointer; }
.immune-action:disabled { opacity: .65; cursor: default; }
.immune-action[hidden] { display: none; }
.immune-sheet {
  position: absolute; z-index: 4; inset: 0; display: flex; padding: clamp(8px,2.5vw,28px);
  overflow: auto; overscroll-behavior: contain; background: #0a1823e8;
  color: #f1f6f3;
}
.immune-picker {
  background: radial-gradient(ellipse at 45% 22%,#21414a35,#131324d4 82%), url('/bio-land/icons/immune-arena/terrain.webp?v=1') center/cover #192731;
}
.immune-panel {
  border: 1px solid #8fc9c77c; border-radius: 21px; background: #13252fec; padding: clamp(14px,3vw,28px);
  width: min(100%,850px); margin: auto; box-shadow: 0 25px 62px #030911a8;
}
.immune-panel h2 { font-size: clamp(23px,4.4vw,44px); line-height: 1.05; margin: 0 0 10px; color: #f4f0e4; }
.immune-intro p,.immune-controls-help,.immune-panel > p { color: #c8d6d7; font-size: clamp(13px,1.9vw,17px); line-height:1.42; margin: 0 0 12px; }
.immune-panel .immune-eyebrow { color: #a2dbd5; font-size: 11px; font-weight: 800; letter-spacing: .09em; margin-bottom: 8px; }
.immune-picks,.immune-shop-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.immune-pick,.immune-shop-item {
  display: grid; justify-items: center; align-content: start; min-width: 0; text-align: center; gap: 6px;
  padding: 10px; border-radius: 14px; border: 1px solid var(--accent,#8fc9c781); color: #f1f6f3; background: linear-gradient(145deg,#28414f,#192630); cursor: pointer;
}
.immune-pick img { width: 100%; height: clamp(80px,24vh,185px); object-fit: contain; }
.immune-pick strong,.immune-shop-item b { font-size: clamp(14px,2.4vw,22px); line-height: 1.04; }
.immune-pick .immune-role { color: var(--accent); font-size: 12px; font-weight: 850; }
.immune-pick > span:last-child,.immune-shop-item > span:not(.immune-shop-icon) { color: #d0dedf; font-size: clamp(11px,1.5vw,14px); line-height: 1.25; }
.immune-controls-help { margin: 14px 0 0; }
.immune-shop-list { margin: 12px 0; }
.immune-shop-item:disabled { opacity: .54; cursor: default; }
.immune-shop-icon { font-size: 29px; }
.immune-shop-item em { font-style: normal; color: #f5db9e; }
.immune-quiz-options { display: grid; gap: 8px; margin: 13px 0; }
.immune-quiz-options button { text-align: left; padding: 10px 12px; }
.immune-research .immune-panel,.immune-journal .immune-panel { max-width: 640px; }
.immune-milestones { display: grid; gap: 9px; padding-left: 22px; }
.immune-milestones :is(span,small) { display: block; color: var(--quiet); }
.immune-guide { margin: 12px 0; }
.immune-guide summary { cursor: pointer; font-weight: 750; }
.immune-guide dt { margin-top: 8px; font-weight: 750; }
.immune-guide dd { margin: 2px 0 0; color: var(--quiet); }
.immune-research h2,.immune-shop h2,.immune-journal h2 { font-size: clamp(20px,3.3vw,31px); }
.immune-arena button:focus-visible { outline: 2px solid #ffdd94; outline-offset: 2px; }
@media (max-width: 700px) {
  .immune-bottom { padding: 5px 6px; }
  .immune-hud { grid-template-columns: 62px 34px minmax(0,1fr); gap: 4px 6px; }
  .immune-portrait { width: 34px; height: 34px; }
  .immune-minimap { width: 54px; }
  .immune-skills,.immune-actions { grid-column: 1/-1; }
  .immune-skill { min-height: 51px; padding: 4px 2px; }
  .immune-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .immune-action { min-height: 29px; padding: 5px; }
  .immune-picks { grid-template-columns: 1fr; gap: 7px; }
  .immune-pick { grid-template-columns: 70px minmax(0,1fr); text-align: left; justify-items: start; align-content: center; gap: 3px 7px; padding: 7px; }
  .immune-pick img { grid-column: 1; grid-row: 1 / span 3; height: 62px; }
  .immune-pick strong,.immune-pick span { grid-column: 2; }
  .immune-lane { padding: 5px 8px; }
  .immune-lanes { bottom: 7px; left: 6px; }
}
@media (min-width: 650px) and (max-height: 490px) {
  .immune-hud { grid-template-columns: 55px 32px minmax(70px,.7fr) minmax(200px,1.6fr) minmax(100px,.7fr); gap: 5px; }
  .immune-skills,.immune-actions { grid-column: auto; }
  .immune-portrait { width: 32px; height: 32px; }
  .immune-skill { min-height: 45px; padding-block: 3px; }
  .immune-glyph { font-size: 22px; }
  .immune-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .immune-action { min-height: 23px; padding: 4px; }
  .immune-bottom { padding: 3px 6px; }
  .immune-picks { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .immune-pick { display: grid; grid-template-columns: none; text-align: center; justify-items: center; }
  .immune-pick img { height: 69px; grid-row: auto; grid-column: auto; }
  .immune-pick strong,.immune-pick span { grid-column: auto; }
  .immune-panel { padding: 12px; }
}
