:root {
  color-scheme: dark;
  --ink: #eee9dc;
  --muted: #ada793;
  --deep: #151712;
  --charcoal: #20221d;
  --stone: #777263;
  --stone-light: #a79f89;
  --timber: #4c3626;
  --timber-dark: #302319;
  --parchment: #c4b58f;
  --rust: #7d342c;
  --rust-light: #a54d3f;
  --gold: #c8a45f;
  --cyan: #68cee1;
  --ember: #e98243;
  --danger: #d65d55;
  --line: rgba(223, 211, 181, .22);
}

* { box-sizing: border-box; }
html, body, #game-shell { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #11130f; }
/* layouts ask the shell how big it is (container queries, cqw/cqh), not the window: the shell can lie sideways on a
   phone app that holds its screen upright (see html[data-turn] in mobile.css) */
#game-shell { container: app / size; }
body { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); user-select: none; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }
#game-canvas, #game-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#game-canvas::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 46%, transparent 48%, rgba(7,8,6,.24) 100%); }

/* --- Shared type and fields (the front door itself lives in menu.css) ------ */
.eyebrow { margin: 0 0 9px; color: #d5b76f; font-size: 10px; letter-spacing: .24em; font-weight: 900; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: .035em; }
h2 { margin: 4px 0 18px; font-size: clamp(31px, 4cqw, 46px); line-height: 1; }
.field-label { display: block; color: rgba(232,221,195,.7); font-size: 9px; letter-spacing: .18em; font-weight: 900; margin: 0 0 6px; }
.game-input { width: 100%; height: 43px; border: 1px solid rgba(206,190,154,.42); border-left: 3px solid #9e8450; border-radius: 0; background: rgba(27,29,24,.86); color: #f0eadb; padding: 10px 12px; outline: none; box-shadow: inset 0 1px rgba(255,255,255,.035); }
.game-input:focus { border-color: rgba(217,190,125,.8); border-left-color: var(--gold); }
.game-input::placeholder { color: rgba(224,216,195,.38); }
.error-copy { min-height: 18px; margin: 9px 0 0; color: #f29b8e; font-size: 11px; line-height: 1.35; text-shadow: 0 1px 2px #000; }
.code-button { border: 0; background: transparent; color: var(--gold); cursor: pointer; font: inherit; }
.small-copy { color: rgba(230,220,197,.43); font-size: 9px; line-height: 1.5; }
/* --- Gameplay HUD -------------------------------------------------------- */
.hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.match-info { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); padding: 7px 13px; background: rgba(22,22,18,.67); border-bottom: 1px solid rgba(210,197,163,.24); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.duel-score { position:absolute; top:54px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:10px; padding:4px 12px; background:rgba(22,22,18,.78); border-bottom:1px solid #b89b6355; font-size:10px; letter-spacing:.12em; }
.duel-score b { font-size:18px; line-height:1; font-variant-numeric:tabular-nums; color:#f0dca9; }
.duel-score i { font-style:normal; opacity:.5; }
.duel-score span { font-size:9px; }
.kill-feed { position: absolute; top: 22px; right: 22px; width: min(380px, 40cqw); text-align: right; font-size: 11px; overflow-wrap: anywhere; }
.feed-line { margin-bottom: 6px; padding: 6px 9px; white-space: normal; background: linear-gradient(90deg, transparent, rgba(15,16,13,.68)); text-shadow: 0 1px 2px #000; transition: opacity .6s; }
.feed-line.fade { opacity: 0; }
.feed-line.fire { color: #ffc08b; }
.feed-line.abyss { color: #c1c6d8; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%,-50%); filter: drop-shadow(0 1px 2px #000); }
.crosshair.recoil { transform: translate(-50%,-50%) scale(1.15); transition: transform .15s ease-out; }
.crosshair i { position:absolute; background:#eef0e8; transition:.08s; }
.crosshair i:nth-child(1){width:6px;height:1px;left:0;top:10px}.crosshair i:nth-child(2){width:6px;height:1px;right:0;top:10px}.crosshair i:nth-child(3){height:6px;width:1px;left:10px;top:0}.crosshair i:nth-child(4){height:6px;width:1px;left:10px;bottom:0}
.crosshair.hit i{background:#ffcf80;transform:scale(1.3)}.crosshair.glance i{background:#c9b99a;transform:scale(1.1)}.crosshair.kill i{background:#fff;box-shadow:0 0 8px #fff;transform:scale(1.7)}
.crosshair::before,.crosshair::after { content:""; position:absolute; left:-3px; top:10px; width:28px; height:2px; opacity:0; pointer-events:none; background:currentColor; }
.crosshair:is(.hit,.glance,.kill,.break)::before { opacity:1; transform:rotate(45deg); }
.crosshair:is(.hit,.glance,.kill,.break)::after { opacity:1; transform:rotate(-45deg); }
.crosshair.hit { color:#ffcf80; }.crosshair.glance { color:#c9b99a; }.crosshair.kill { color:#fff; }.crosshair.break { color:#ffc16a; }
.crosshair.glance::before,.crosshair.glance::after { height:1px; width:22px; left:0; }
.crosshair.block::before { opacity:1; left:-4px; top:-4px; width:28px; height:28px; background:transparent; border:2px solid #d3c7ac; border-top-color:transparent; border-radius:0 0 12px 12px; }
/* A deflected frost bolt: two brief reticle streaks, without the former shield emblem. */
.crosshair.parry i { background:#bff4ff; transform:scale(1.3); }
.crosshair.parry::before,.crosshair.parry::after { opacity:1; width:10px; height:2px; top:1px; background:#bff4ff; }
.crosshair.parry::before { left:-5px; transform:rotate(-45deg); }.crosshair.parry::after { left:17px; transform:rotate(45deg); }
/* Brief action/Ultimate notices belong CENTERED in the lower subtitle
   lane, not over the sword or crosshair. HUD measures the actual subtitle
   rectangle so two-line dialogue and mounted machines never overlap it. */
.status-flash {
  position: absolute; top: auto; left: 50%;
  bottom: var(--status-caption-bottom, 152px); z-index: 13;
  width: max-content; max-width: min(380px, 68cqw);
  padding: 5px 12px;
  border-bottom: 1px solid rgba(214,182,118,.72);
  background: linear-gradient(90deg,rgba(17,19,16,.35),rgba(17,19,16,.86) 24%,rgba(17,19,16,.86) 76%,rgba(17,19,16,.35));
  color: #f1e6cd; text-align: center; pointer-events: none;
  font-family: Georgia,serif; font-size: clamp(10px,.95cqw,13px);
  line-height: 1.2; font-weight: 700; letter-spacing: .06em;
  overflow-wrap: anywhere; text-shadow: 0 1px 3px #000;
  opacity: 0; transform: translate(-50%,5px);
  transition: opacity .12s ease, transform .12s ease;
}
.status-flash.show { opacity: 1; transform: translate(-50%,0); }
.status-flash.metal { color: #ffd897; }
.status-flash.parry { color: #6deaff; }
.status-flash.kill { color: #ffeab2; }
.status-flash.danger { color: #ff9c96; border-bottom-color: #db7773; }
.bottom-hud { position:absolute; left:24px; right:24px; bottom:22px; display:flex; align-items:flex-end; justify-content:space-between; gap:20px; }
.health-block { width:250px; }.health-label{font-family:Georgia,serif;font-size:19px;font-weight:900;margin-bottom:5px}.health-track{position:relative;height:12px;background:#171913;border:1px solid #5a574a;overflow:hidden}.health-fill,.health-trail{position:absolute;left:0;top:0;bottom:0}.health-trail{background:#ae5f55}.health-fill{background:linear-gradient(90deg,#9c352f,#d25743);box-shadow:0 0 12px rgba(224,68,61,.25)}
.guard-block { position:absolute; left:50%; transform:translateX(-50%); width:190px; transition:opacity .2s }.guard-block.faded{opacity:.72}.guard-block span{font-size:11px;letter-spacing:.15em;font-weight:900}.guard-track{height:7px;background:#111510;border:1px solid #48514a;margin-top:5px}.guard-fill{height:100%;background:#66c9dd;transition:width .08s}.guard-block.sprinting .guard-fill{background:#e6c46a}.guard-block.winded .guard-fill{background:#b0584e}.guard-block.winded span{color:#e0877c}
.abilities { display:flex; gap:9px; }.ability{position:relative;width:104px;height:62px;border:1px solid #585648;background:rgba(21,22,18,.86);padding:6px 8px;display:grid;grid-template-columns:26px 1fr;grid-template-rows:22px 15px 12px;overflow:hidden}.ability::after{content:"";position:absolute;inset:0;background:rgba(10,11,8,.62);transform:translateY(calc((1 - var(--cooldown,0))*100%));pointer-events:none}.ability.ready{border-color:#6b7770}.ability-icon{grid-row:1/3;font-size:21px;color:#ff9a4a}.ability:nth-child(2) .ability-icon{color:#72d8f0}.ability b{justify-self:end;font-size:11px}.ability em{font-size:8px;letter-spacing:.09em;font-style:normal;color:#a39f91}.ability strong{font-size:9px;color:#ddd6c8;z-index:1}.ability.cooling strong{color:#8f8b7f}
/* who felled you, low in the view, and how close it was: the one who did it stays in sight above it */
.death-card { position:absolute; left:50%; top:80%; transform:translate(-50%,-50%); display:grid; gap:4px; justify-items:center; white-space:nowrap; padding:9px 18px; background:rgba(20,18,15,.72); border-top:1px solid rgba(238,98,98,.35); border-bottom:1px solid rgba(238,98,98,.35) }.death-card > div{display:flex;align-items:baseline;gap:10px}.death-card small{color:#b3a5a5;font-size:9px;letter-spacing:.2em}.death-card strong{font-family:Georgia,serif;font-size:19px}.death-card b{color:#e8c07a;font-size:10px;letter-spacing:.14em}.death-card b::before{content:'\2014  ';color:#b3a5a5}.death-card em{font-style:normal;color:#cfc3b0;font-size:11px;letter-spacing:.06em}.death-card span{color:#d87575;font-weight:900;font-variant-numeric:tabular-nums;min-width:2.2em;text-align:right}
.pointer-hint{position:absolute;left:50%;top:70%;transform:translateX(-50%);padding:9px 12px;background:rgba(18,19,15,.72);font-size:9px;letter-spacing:.15em;color:#d2ccbc}
.debug{position:absolute;left:16px;top:16px;white-space:pre;background:rgba(10,12,9,.82);border:1px solid #4e4d42;padding:9px 11px;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;color:#9ce7f2}.scoreboard{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);width:min(460px,80cqw);padding:16px 20px;background:rgba(18,19,15,.93);border:1px solid #615d4e}.scoreboard h3{margin:0 0 10px}.scoreboard div{display:grid;grid-template-columns:1fr 40px 80px;border-top:1px solid #3b392f;padding:8px}.scoreboard em{font-style:normal;color:#9a9588;font-size:10px}

.practice-tools { position: absolute; z-index: 20; top: 18px; left: 18px; width: 185px; padding: 10px; pointer-events: auto; background: rgba(24,24,19,.89); border: 1px solid rgba(211,194,153,.28); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.practice-tools.hidden, .practice-tools[hidden] { display: none !important; }
.practice-tools > div { padding: 2px 2px 8px; border-bottom: 1px solid rgba(215,199,160,.18); margin-bottom: 5px; }
.practice-tools strong { display: block; font: 700 12px Georgia, serif; letter-spacing: .07em; }
.practice-tools small { display: block; margin-top: 3px; color: rgba(231,220,196,.48); font-size: 8px; line-height: 1.35; }
.practice-tools button { width: 100%; border: 0; border-bottom: 1px solid rgba(211,194,153,.12); background: transparent; padding: 7px 3px; color: rgba(241,233,216,.72); text-align: left; font-size: 8px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.practice-tools button:hover { color: var(--gold); background: rgba(199,164,95,.07); }
.practice-tools .practice-leave { margin-top: 4px; color: #d58b7d; }

/* --- Match end ----------------------------------------------------------- */
.end-screen { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, rgba(104,87,56,.22), rgba(14,15,12,.94) 62%); text-align: center; }
.end-screen > * { width: min(490px, calc(100cqw - 40px)); }
.end-medallion { width: 46px !important; height: 46px; display: grid; place-items: center; margin-bottom: 8px; border: 1px solid rgba(198,164,95,.48); color: var(--gold); transform: rotate(45deg); }
.final-scoreboard{border-top:1px solid var(--line);margin:10px 0 16px}.final-row{display:grid;grid-template-columns:24px 1fr 54px 54px 80px;gap:8px;align-items:center;min-height:42px;border-bottom:1px solid var(--line);text-align:left}.final-row.you{background:rgba(200,164,95,.08)}.final-row>span{color:#817b6d}.final-row strong{color:var(--gold)}.final-row em,.final-row small{color:#9d9789;font-style:normal;font-size:10px}
.end-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.took-steel::after{content:"";position:fixed;inset:0;z-index:50;pointer-events:none;box-shadow:inset 0 0 calc(40px + 70px * var(--steel-hit,1)) rgba(214,228,242,calc(.18 + .32 * var(--steel-hit,1)))}



/* On narrow non-touch viewports, keep the top status stack clear of readable feed entries. */
@container app (max-width: 900px) {
  .kill-feed { top: 96px; }
}

@container app (max-width: 640px) {
  .bottom-hud{left:12px;right:12px}.health-block{width:160px}.ability{width:82px}.guard-block{bottom:72px}.kill-feed{width:60cqw}.final-row{grid-template-columns:20px 1fr 40px 40px}.final-row small{display:none}
  .practice-tools { top: 54px; left: 10px; width: 170px; }
}


/* Practice tools share the menu's crimson cloth and brass fittings. */
.practice-tools { width: 224px; max-height: calc(100% - 36px); overflow-y: auto; display: flex; flex-direction: column; padding: 10px 12px; background: linear-gradient(180deg, rgba(119,35,29,.96), rgba(72,22,18,.96)); border: 1px solid #c99c52; box-shadow: inset 0 0 0 3px rgba(234,220,182,.1), 0 8px 30px rgba(0,0,0,.3); scrollbar-width: thin; scrollbar-color: #c99c52 #481612; }
.practice-tools > div { margin-bottom: 2px; }
.practice-tools-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; width: 100%; border-bottom: 1px solid rgba(215,199,160,.18); padding-bottom: 4px; }
.practice-role-hint { color: #f5d489 !important; font-size: 7.5px !important; margin-top: 3px !important; line-height: 1.25; }
.practice-drawer-close { width: auto !important; min-height: 22px !important; padding: 2px 7px !important; font-size: 8px !important; font-weight: 800 !important; color: #eadcb6 !important; background: rgba(0,0,0,.35) !important; border: 1px solid rgba(201,156,82,.5) !important; border-radius: 3px; cursor: pointer; flex-shrink: 0; }
.practice-drawer-close:hover { background: rgba(201,156,82,.2) !important; color: #fff !important; }
.practice-panel-toggle { width: auto !important; min-height: 22px !important; padding: 2px 7px !important; font-size: 8px !important; font-weight: 800 !important; color: #eadcb6 !important; background: rgba(0,0,0,.35) !important; border: 1px solid rgba(201,156,82,.5) !important; border-radius: 3px; cursor: pointer; flex-shrink: 0; }
.practice-panel-toggle:hover { background: rgba(201,156,82,.2) !important; color: #fff !important; }
.practice-panel-content { display: grid; grid-template-columns: 1fr 1fr; gap: 0 7px; width: 100%; margin-top: 4px; }
.practice-panel-content.hidden { display: none !important; }
.practice-panel-content > h3 { grid-column: 1 / -1; margin: 7px 0 2px; color: #ecc97f; font: 800 9px/1.1 var(--font-script); letter-spacing: .14em; }
.practice-panel-content > small { grid-column: 1 / -1; color: #eadcb6; font-size: 9px; }
.practice-panel-content > details { grid-column: 1 / -1; }
.hud.pointer-locked .practice-tools .practice-panel-content { display: none !important; }
.hud.pointer-locked .practice-tools .practice-drawer-close { display: none !important; }
.hud.pointer-locked .practice-tools .practice-panel-toggle { display: none !important; }
.hud.pointer-locked .practice-tools .practice-role-hint { display: none !important; }
.practice-tools h3 { grid-column: 1 / -1; margin: 7px 0 2px; color: #ecc97f; font: 800 9px/1.1 var(--font-script); letter-spacing: .14em; }
.practice-tools strong { color: #eadcb6; font-family: var(--font-inscription); }
.practice-tools button { font-size: 9px; letter-spacing: .035em; min-height: 28px; padding: 6px 3px; color: #eadcb6; transition: background .12s, transform .12s; }
.practice-tools button:active { transform: translateY(1px); }
.practice-tools button:focus-visible { outline: 1px solid #ecc97f; }
.practice-tools .practice-leave { margin-top: 0; color: #ffc9b6; }
@container app (max-height: 500px) { .practice-tools { top: 10px; width: 224px; max-height: calc(100% - 20px); padding: 8px 10px; } .practice-tools h3 { margin-top: 5px; } .practice-tools button { min-height: 25px; padding: 4px 3px; } }

/* One Hit of Wonders testing lives in the existing collapsible Practice drawer.
 * Each independently controlled tier remains usable on a narrow touch screen. */
.practice-tools #practice-one-hit[hidden] { display: none !important; }
.practice-tools #practice-one-hit {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 5px 0;
  padding: 6px 5px;
  border: 1px solid rgba(236,201,127,.4);
  border-radius: 3px;
  background: rgba(16,10,8,.24);
  font: 9px/1.45 var(--font-inscription, Georgia, serif);
  color: #e9dbbb;
}
.practice-tools #practice-one-hit > summary {
  cursor: pointer;
  color: #f6d994;
  font-weight: 800;
  letter-spacing: .03em;
  font-size: 9px;
  padding: 3px 0;
}
.practice-tools #practice-one-hit p { margin: 6px 0; color: #e9dbbb; font-size: 9px; }
.one-hit-practice-levels { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }
.one-hit-practice-levels label { min-width: 0; font: 700 9px/1.5 var(--font-inscription, Georgia, serif); }
.one-hit-practice-levels select {
  display: block; width: 100%; min-width: 0; padding: 5px 2px;
  margin-top: 2px; color: #f4e3bf; background: #481d17;
  border: 1px solid rgba(236,201,127,.5); border-radius: 2px;
  font: 700 9px var(--font-inscription, Georgia, serif);
}
.one-hit-practice-presets {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px;
  margin: 8px 0;
}
.practice-tools .one-hit-practice-presets button {
  min-width: 0; width: 100%; padding: 5px 3px;
  border: 1px solid rgba(236,201,127,.34);
  background: rgba(236,201,127,.05);
  text-align: center; line-height: 1.25;
  font-size: 8px; letter-spacing: 0;
  overflow-wrap: anywhere;
}
.practice-tools .one-hit-unlimited {
  display: flex; align-items: center; gap: 5px;
  margin: 8px 0; line-height: 1.35; cursor: pointer;
}
.practice-tools .one-hit-unlimited input {
  accent-color: #edc880; flex: 0 0 auto; width: 13px; height: 13px;
}
.practice-tools #practice-one-hit-status {
  display: block; margin-top: 7px; min-height: 22px;
  color: #f0ddb1; font-size: 8px; line-height: 1.35;
}
@media (max-width: 600px) {
  .practice-tools #practice-one-hit { padding: 5px 4px; }
  .one-hit-practice-levels select { font-size: 10px; min-height: 29px; }
  .practice-tools .one-hit-practice-presets button { min-height: 30px; }
}

/* Inspection controls share the Practice palette and remain available on small screens. */
.practice-tools #inspection-status { grid-column: 1 / -1; color: #eadcb6; font-size: 9px; }
.practice-tools button:disabled { opacity: .4; cursor: default; }
.practice-tools.inspection-frozen { border-color: #f5d489; }

.practice-tools #practice-play-frames { grid-column: 1 / -1; text-align: center; border: 1px solid rgba(236,201,127,.4); background: rgba(236,201,127,.06); margin-top: 4px; }
.practice-tools #practice-play-frames:not(:disabled):hover { background: rgba(236,201,127,.14); }
.practice-tools.hidden, .practice-tools[hidden] { display: none !important; }


/* --- Breakthrough Objective HUD, World Waypoint & Team End Screen --- */
.breakthrough-hud {
  width: min(330px, 100%); padding: 6px 9px;
  background: linear-gradient(180deg, rgba(22, 23, 19, .88), rgba(14, 15, 12, .92));
  border: 1px solid rgba(201, 156, 82, .45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  display: grid; gap: 3px; pointer-events: none;
}
.hud-status-stack { position: absolute; top: 14px; left: calc(50% - 64px); transform: translateX(-50%); width: min(380px, calc(100% - 24px)); display: grid; justify-items: center; gap: 5px; pointer-events: none; }
.hud-status-stack > .match-info, .hud-status-stack > .duel-score { position: static; transform: none; max-width: 100%; margin: 0; text-align: center; }
.hud-status-stack > .match-info { padding: 5px 10px; font-size: 9px; }
.hud-status-stack > .duel-score { padding: 3px 9px; }
.ballista-hud { width: min(330px, 100%); padding: 6px 9px; background: #191a15e8; border: 1px solid #a08a5677; border-top: 2px solid #b69b60; text-align: center; display: grid; gap: 3px; }
.ballista-hud[hidden] { display: none; }
.ballista-hud strong { font-size: 10px; letter-spacing: .06em; color: #e4ce98; }
.ballista-hud span { font-size: 12px; }
.ballista-hud small { font-size: 10px; line-height: 1.3; color: #c4bda8; }
.flight-hud { width: min(390px, calc(100% - 24px)); display: grid; gap: 3px; justify-items: center; pointer-events: none; }
.flight-hud[hidden] { display: none; }
.flight-hud-strip { display: flex; align-items: center; justify-content: space-around; width: 100%; padding: 3px 10px; background: linear-gradient(180deg, rgba(22, 23, 19, .72), rgba(14, 15, 12, .82)); border: 1px solid rgba(190, 155, 85, .38); border-radius: 7px; box-shadow: 0 3px 12px rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
.flight-metric { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.flight-metric label { font-size: 8px; font-weight: 800; letter-spacing: .08em; color: #c9b990; line-height: 1; }
.flight-metric b { font-size: 11px; font-variant-numeric: tabular-nums; color: #f5eedc; line-height: 1.1; }
.flight-metric small { font-size: 8px; color: #a8a08c; line-height: 1; }
.flight-metric.skill b.active { color: #ffcf68; text-shadow: 0 0 6px rgba(255, 207, 104, .7); }
.flight-metric.skill b { display: inline-flex; align-items: center; gap: 4px; max-width: 170px; }
.flight-metric.skill b svg { width: 17px; height: 17px; flex: 0 0 17px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.flight-metric.skill b span { overflow-wrap: anywhere; }
.flight-bar-wrap { display: flex; align-items: center; gap: 4px; }
.flight-bar-wrap progress { width: 48px; height: 6px; border-radius: 2px; }
.flight-metric.hull progress { accent-color: #e65245; }
.flight-metric.hull progress::-webkit-progress-value { background: linear-gradient(90deg, #b0342a, #e65245); border-radius: 2px; }
.flight-metric.hull progress::-moz-progress-bar { background: linear-gradient(90deg, #b0342a, #e65245); border-radius: 2px; }
.flight-metric.charge progress { accent-color: #f0c354; }
.flight-metric.charge progress::-webkit-progress-value { background: linear-gradient(90deg, #c99832, #f0c354); border-radius: 2px; }
.flight-metric.charge progress::-moz-progress-bar { background: linear-gradient(90deg, #c99832, #f0c354); border-radius: 2px; }
.flight-warning-banner { padding: 3px 12px; background: rgba(180, 42, 34, .82); border: 1px solid #ff7b72; border-radius: 4px; font-size: 9px; font-weight: 900; letter-spacing: .14em; color: #fff; text-shadow: 0 1px 2px #000; animation: pulse-warn 1s infinite alternate; }
@keyframes pulse-warn { from { opacity: .85; transform: scale(.98); } to { opacity: 1; transform: scale(1.02); } }
.flight-controls-hint { font-size: 9px; line-height: 1.25; color: #b8b09a; text-align: center; text-shadow: 0 1px 2px #000; }
.ballista-mounted:not(.flight-mounted) .guard-block,
.ballista-mounted:not(.flight-mounted) .abilities { display: none; }
.flight-mounted .bottom-hud { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.flight-mounted .guard-block { display: block !important; opacity: 1 !important; position: static; transform: none; width: 250px; margin-top: 6px; }
.guard-block.flight-persistent { opacity: 1 !important; display: block !important; }
.ballista-mounted.pointer-locked .practice-tools { display: none; }
.breakthrough-hud[data-team="ATTACKERS"] { border-top: 2px solid #5294ff; }
.breakthrough-hud[data-team="DEFENDERS"] { border-top: 2px solid #de4840; }
.bt-header { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 8px; font-weight: 800; letter-spacing: .06em; color: rgba(234, 220, 182, .75); }
.bt-team-badge { padding: 2px 6px; font-weight: 900; letter-spacing: .14em; background: rgba(61, 126, 237, .22); color: #8ec0ff; border: 1px solid rgba(116, 182, 255, .45); }
.breakthrough-hud[data-team="DEFENDERS"] .bt-team-badge { background: rgba(222, 56, 56, .22); color: #ff9c94; border-color: rgba(226, 106, 95, .45); }
.bt-clock { font-variant-numeric: tabular-nums; color: #f1dfae; font-size: 11px; }
.bt-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bt-obj-name { min-width: 0; font-family: Georgia, serif; font-size: 13px; line-height: 1.15; letter-spacing: .025em; color: #f4ead2; }
.bt-state-pill { flex: none; font-style: normal; font-size: 9px; font-weight: 900; letter-spacing: .04em; color: #d5b76f; }
.breakthrough-hud[data-state="capturing"] .bt-state-pill { color: #74b6ff; }
.breakthrough-hud[data-state="contested"] .bt-state-pill { color: #ff9a52; animation: bt-pulse .75s ease-in-out infinite alternate; }
.breakthrough-hud[data-state="overtime"] { border-top: 2px solid #ffbe4a; box-shadow: 0 0 18px rgba(255, 190, 74, .32); }
.breakthrough-hud[data-state="overtime"] .bt-clock { color: #ffbe4a; font-weight: 900; letter-spacing: .12em; animation: bt-pulse .6s ease-in-out infinite alternate; }
.breakthrough-hud[data-state="overtime"] .bt-state-pill { color: #ffbe4a; animation: bt-pulse .6s ease-in-out infinite alternate; }
.breakthrough-hud[data-state="overtime"] .bt-bar-fill { background: linear-gradient(90deg, #e98243, #ffbe4a); }
.bt-bar-track { height: 4px; background: #121410; border: 1px solid rgba(201, 156, 82, .38); overflow: hidden; }
.bt-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #3d7eed, #68cee1); transition: width .12s linear; }
.breakthrough-hud[data-state="contested"] .bt-bar-fill { background: linear-gradient(90deg, #c9564a, #e98243); }
.bt-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10px; color: rgba(234, 220, 182, .68); letter-spacing: .02em; }
.bt-footer small { min-width: 0; }
@keyframes bt-pulse { from { opacity: .65; } to { opacity: 1; } }

.objective-waypoint {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 2px;
  padding: 4px 8px; background: rgba(18, 20, 16, .78);
  border: 1px solid rgba(201, 156, 82, .65);
  pointer-events: none; transition: border-color .15s;
}
.objective-waypoint .wp-diamond {
  width: 8px; height: 8px; transform: rotate(45deg);
  background: #d5b76f; margin-bottom: 2px;
}
.objective-waypoint[data-state="capturing"] { border-color: #68cee1; }
.objective-waypoint[data-state="capturing"] .wp-diamond { background: #68cee1; }
.objective-waypoint[data-state="capturing"][data-team="DEFENDERS"] { border-color: #ff6e63; }
.objective-waypoint[data-state="capturing"][data-team="DEFENDERS"] .wp-diamond { background: #ff6e63; }
.objective-waypoint[data-clamped="true"] { opacity: 0.88; transform: translate(-50%, -50%) scale(0.92); }
.objective-waypoint[data-clamped="true"] .wp-diamond { transform: rotate(var(--wp-angle, 45deg)); }
.objective-waypoint[data-state="contested"] { border-color: #e98243; }
.objective-waypoint[data-state="contested"] .wp-diamond { background: #e98243; }
.objective-waypoint[data-state="overtime"] { border-color: #ffbe4a; }
.objective-waypoint[data-state="overtime"] .wp-diamond { background: #ffbe4a; }
.objective-waypoint b { font: 700 9px/1.1 Georgia, serif; letter-spacing: .12em; color: #f4ead2; white-space: nowrap; }
.objective-waypoint span { font: 800 9px/1 ui-sans-serif, system-ui, sans-serif; color: #d5b76f; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rival-waypoint {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 2px;
  padding: 3px 8px; background: rgba(18, 20, 16, .82);
  border: 1px solid rgba(201, 156, 82, .65);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  pointer-events: none; transition: opacity .15s ease-out, border-color .15s;
  z-index: 10;
}
.rival-waypoint.hidden { display: none; }
.rival-waypoint .rival-wp-pointer {
  display: block; width: 6px; height: 6px;
  background: #d5b76f; transform: rotate(45deg);
  margin-bottom: 1px; transition: transform .08s ease-out;
}
.rival-waypoint[data-clamped="true"] {
  opacity: 0.92; transform: translate(-50%, -50%) scale(0.95);
  border-color: rgba(226, 187, 108, .85);
}
.rival-waypoint[data-clamped="true"] .rival-wp-pointer {
  width: 0; height: 0; background: transparent;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid #e5c378;
  transform: rotate(calc(var(--wp-angle, 0deg) + 90deg));
}
.rival-waypoint[data-passage="true"] {
  border-color: rgba(235, 192, 107, .8);
  background: rgba(24, 20, 14, .88);
}
.rival-waypoint[data-passage="true"] .rival-wp-pointer {
  background: #ecc97f;
}
.rival-waypoint[data-passage="true"] b {
  color: #f7eedb;
  letter-spacing: .09em;
}
.rival-waypoint b {
  font: 700 8.5px/1.1 Georgia, serif; letter-spacing: .12em;
  color: #f4ead2; white-space: nowrap;
}
.rival-waypoint span {
  font: 800 8.5px/1 ui-sans-serif, system-ui, sans-serif;
  color: #d5b76f; font-variant-numeric: tabular-nums; white-space: nowrap;
}

.sb-team-head { margin: 10px 0 4px; font-size: 11px; letter-spacing: .16em; color: #8ec0ff; }
.sb-team-head.team-def { color: #ff9c94; }
.bt-end-summary { padding: 8px 12px; margin-bottom: 8px; background: rgba(28, 24, 19, .75); border: 1px solid rgba(201, 156, 82, .38); display: grid; gap: 3px; }
.bt-end-summary strong { font-family: Georgia, serif; font-size: 13px; letter-spacing: .1em; color: #f1dfae; }
.bt-end-summary small { font-size: 11px; color: rgba(234, 220, 182, .72); }
.bt-side-tag { font-size: 9px; font-weight: 900; letter-spacing: .1em; padding: 2px 4px; text-align: center; }
.bt-side-tag.att { color: #74b6ff; }
.bt-side-tag.def { color: #ff9c94; }

.practice-siege{grid-column:1/-1;border-top:1px solid rgba(236,201,127,.25);margin-top:8px;padding-top:8px}
.practice-siege summary{cursor:pointer;color:#ecc97f;font:800 10px/1.4 var(--font-script);letter-spacing:.09em;padding:4px 0}
.practice-siege h4{font:700 13px/1.3 var(--font-inscription);margin:10px 0 6px;color:#f0d79f}
.practice-siege p{font:12px/1.45 Georgia,serif;letter-spacing:normal;color:#eadcb6;white-space:normal;overflow-wrap:break-word;margin:5px 0 9px}
.practice-siege button{font-size:10px;line-height:1.4;white-space:normal;min-height:34px}
/* The Ultimate Knight's drill editor expands within the existing Practice
   scroll panel. Compact, separately scrollable when the viewport is short. */
#practice-ultimate-knight-config[hidden]{display:none!important}
.practice-knight-settings{
  display:grid;gap:8px;max-height:min(340px,50vh);
  overflow-y:auto;overscroll-behavior:contain;padding:6px 5px 8px 0;
  scrollbar-width:thin;scrollbar-color:#b59561 transparent;
}
.practice-knight-settings>label{display:block;color:#f0d79f;font:700 10px/1.5 var(--font-inscription,Georgia,serif)}
.practice-knight-settings>label select{
  display:block;width:100%;min-height:32px;margin-top:3px;padding:5px 7px;
  color:#f4e3bf;background:#481d17;border:1px solid rgba(236,201,127,.5);
  border-radius:2px;font:700 10px var(--font-inscription,Georgia,serif);
}
.practice-knight-settings>small{font:11px/1.4 Georgia,serif;color:#eadcb6;white-space:normal}


/* St. Perry the Prodigious dialogue card and practice controls */
.perry-dialogue {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 30;
  width: 360px;
  max-width: min(380px, calc(100vw - 48px));
  pointer-events: auto;
}
.perry-dialogue.hidden { display: none !important; }
.hud.pointer-locked .perry-dialogue { opacity: 0.92; pointer-events: none; }
/* Touch retains its on-screen controls instead of desktop pointer lock. Raise the
   active card above the full-screen touch surface and restore its hit targets. */
.touch-ui .hud.perry-dialogue-active { z-index: 13; }
.touch-ui .hud.pointer-locked .perry-dialogue { opacity: 1; pointer-events: auto; }
.touch-ui .perry-dialogue {
  top: calc(var(--safe-t, 0px) + 8px);
  bottom: auto;
  max-height: calc(100% - var(--safe-t, 0px) - var(--safe-b, 0px) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.perry-dialogue-card {
  background: linear-gradient(180deg, rgba(38, 26, 18, 0.96), rgba(20, 14, 10, 0.96));
  border: 1px solid #c99c52;
  box-shadow: inset 0 0 0 2px rgba(234, 220, 182, 0.1), 0 8px 30px rgba(0, 0, 0, 0.55);
  padding: 14px 16px;
  color: #eadcb6;
  font-family: var(--font-inscription, Georgia, serif);
}
.perry-dialogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(215, 199, 160, 0.2);
  padding-bottom: 7px;
  margin-bottom: 10px;
}
.perry-dialogue-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ecc97f;
}
.perry-dialogue-close {
  background: transparent;
  border: none;
  color: #d58b7d;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.perry-dialogue-close:hover { color: #ffc9b6; }
.perry-dialogue-body p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
  color: #fbf5e6;
}
.perry-dialogue-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.perry-dialogue-options[hidden],
.perry-dialogue-form[hidden],
.perry-dialogue-options.hidden,
.perry-dialogue-form.hidden {
  display: none !important;
}
.perry-option-btn {
  background: rgba(201, 156, 82, 0.08);
  border: 1px solid rgba(201, 156, 82, 0.32);
  color: #eadcb6;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  white-space: normal;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: normal;
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s;
}
.perry-option-btn:hover {
  background: rgba(201, 156, 82, 0.22);
  border-color: #ecc97f;
  color: #ffffff;
}
.perry-option-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.perry-dialogue-form {
  display: flex;
  gap: 8px;
}
.perry-dialogue-form input {
  flex: 1;
  background: rgba(10, 8, 6, 0.75);
  border: 1px solid rgba(201, 156, 82, 0.35);
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 2px;
}
.perry-dialogue-form button {
  background: #c99c52;
  border: none;
  color: #1a120b;
  font-weight: 800;
  font-size: 12px;
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 2px;
}
.perry-canonization-prompt {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(236, 201, 127, 0.3);
  text-align: center;
}
.perry-canonize-btn {
  background: linear-gradient(180deg, #ecc97f, #b3822e);
  border: 1px solid #ffd885;
  color: #1b1207;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  box-shadow: 0 0 12px rgba(236, 201, 127, 0.35);
}
.perry-canonize-btn:hover {
  background: linear-gradient(180deg, #ffd885, #c99c52);
  box-shadow: 0 0 18px rgba(236, 201, 127, 0.65);
}
#practice-canonization {
  color: #ecc97f;
  font-weight: 900;
  border-left: 2px solid #ecc97f;
}
@container app (max-width: 600px) {
  .perry-dialogue {
    top: auto;
    bottom: 84px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}
@media (max-width: 600px) {
  .perry-dialogue {
    top: auto;
    bottom: 84px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}
/* A mechanical siege sight. The open center keeps bolts and frost confirmations visible. */
.siege-sight{position:absolute;left:50%;top:50%;pointer-events:none;color:#d6bb80;filter:drop-shadow(0 1px 1px #161712);font-family:Georgia,serif}
.siege-sight[hidden],.siege-sight [hidden]{display:none}
.siege-primary{position:absolute;left:-20px;top:-20px;width:40px;height:40px}
.siege-primary svg{width:40px;height:40px;fill:none;stroke:#d6bb80;stroke-width:1.4;stroke-linejoin:miter;paint-order:stroke;filter:drop-shadow(1px 0 0 #302e27)}
.siege-primary b,.siege-primary small{position:absolute;top:41px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:9px;font-weight:600;letter-spacing:.12em;text-shadow:0 1px 2px #000}
.siege-primary small{top:55px;font-size:8px;color:#edce96}
.siege-sight[data-weapon="MAIN"] .upper-mark,.siege-sight[data-weapon="UPPER"] .main-mark{display:none}
.siege-primary.limited svg{stroke:#efc07d;stroke-width:2}
.siege-secondary{position:absolute;left:-5px;top:-9px;font:16px Georgia,serif;color:#dfd4b9}
.flight-sight{position:absolute;inset:0;pointer-events:none}
.flight-sight[hidden]{display:none}
.flight-aim-limit{position:absolute;left:50%;top:calc(50% + 22px);transform:translateX(-50%);display:inline-block;padding:2px 7px;font-size:8px;font-weight:800;letter-spacing:.14em;color:#f5b060;background:rgba(22,23,19,.72);border:1px solid rgba(245,176,96,.45);border-radius:3px;text-shadow:0 1px 2px #000;opacity:0;transition:opacity .1s ease;white-space:nowrap}
.flight-sight.limited .flight-aim-limit{opacity:1}
.flight-true-aim{position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;pointer-events:none;opacity:.85;filter:drop-shadow(0 1px 2px #000);transition:transform .04s linear}
.flight-true-aim[hidden]{display:none}
.crosshair.clear-reference:not(:is(.hit,.glance,.kill,.block,.break,.parry))>i{opacity:.28;transform:scale(.55)}

/* Inspection has one simulation and separately selectable actor/camera views. */
.inspection-camera-ui { position:absolute; inset:0; z-index:35; pointer-events:none; }
.inspection-camera-tools { position:absolute; right:calc(var(--safe-r, 0px) + 10px); top:calc(var(--safe-t, 0px) + 10px); width:min(340px,calc(100% - 20px)); max-height:calc(100vh - var(--safe-t, 0px) - var(--safe-b, 0px) - 20px); overflow-y:auto; padding:8px; border:1px solid #b29459; background:rgba(28,23,18,.96); color:#eadcb6; pointer-events:auto; font-size:11px; box-shadow:0 4px 16px rgba(0,0,0,.6); box-sizing:border-box; touch-action:pan-y; }
.inspection-camera-tools summary { cursor:pointer; min-height:26px; font-weight:800; letter-spacing:.06em; color:#dfc285; user-select:none; }
.inspection-camera-tools summary span { display:inline-block; color:#a9d6db; margin-left:8px; font-size:10px; font-weight:normal; }
.inspection-camera-tools p { margin:8px 0 4px; line-height:1.4; color:#ded5bf; }
.inspection-camera-tools small { color:#b8ab94; font-size:10px; line-height:1.35; display:block; margin-top:4px; }

.inspection-authoritative-readout { margin:6px 0; padding:4px 8px; background:rgba(15,12,10,.85); border:1px solid rgba(178,148,89,.4); border-radius:3px; font-family:monospace,Georgia,serif; font-size:11px; font-weight:bold; color:#78d4c8; text-align:center; letter-spacing:.05em; }
.inspection-authoritative-readout.frozen { color:#efc07d; border-color:rgba(239,192,125,.6); }

.inspection-toolbar-main { display:flex; flex-direction:column; gap:4px; margin:6px 0; padding:6px; background:rgba(20,16,12,.7); border:1px solid rgba(178,148,89,.35); border-radius:3px; }
.inspection-toolbar-row { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.inspection-pill-label { font-size:9.5px; font-weight:800; letter-spacing:.08em; color:#dfc285; margin-right:2px; }
.inspection-pill-sep { color:rgba(178,148,89,.4); font-size:10px; margin:0 3px; }

.inspection-subgroup { margin:6px 0 2px; border:1px solid rgba(178,148,89,.3); background:rgba(22,18,14,.5); border-radius:3px; padding:4px 6px; }
.inspection-subgroup summary { font-size:10px; font-weight:bold; letter-spacing:.08em; color:#e2bf70; cursor:pointer; padding:2px 0; user-select:none; }
.inspection-subgroup[open] summary { border-bottom:1px solid rgba(178,148,89,.2); margin-bottom:4px; }

.inspection-btn-freeze { background:#2f2b1d !important; border-color:#e2bf70 !important; color:#fff !important; font-weight:bold; }
.inspection-status-feedback { min-height:16px; font-size:9.5px; font-weight:bold; color:#78d4c8; margin:4px 0; text-align:center; font-family:monospace; }
.inspection-status-feedback.error { color:#e26e58; }

.inspection-section-label { font-size:9.5px; font-weight:800; letter-spacing:.09em; color:#b29459; margin:8px 0 4px; border-bottom:1px solid rgba(178,148,89,.25); padding-bottom:2px; }

.inspection-camera-buttons { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin:3px 0; }
.inspection-camera-buttons button, .inspection-view-label, .inspection-btn-group button { min-height:28px; padding:4px 6px; background:#2a2922; border:1px solid #7e704d; color:#eadcb6; font-size:10px; cursor:pointer; font-family:inherit; transition:background .15s, border-color .15s; }
.inspection-camera-buttons button:hover, .inspection-btn-group button:hover { background:#38362b; border-color:#d5b56e; }
.inspection-camera-ui button[aria-pressed=true] { background:#554329 !important; border-color:#e2bf70 !important; color:#fff !important; font-weight:bold; }
.inspection-camera-ui button:disabled { opacity:.35; cursor:default; pointer-events:none; }

.inspection-btn-highlight { background:#422218 !important; border-color:#d46a48 !important; color:#ffdfd2 !important; font-weight:bold; }
.inspection-btn-action { background:#302919 !important; border-color:#c89f55 !important; font-weight:bold; }
.inspection-btn-sequence { grid-column:1 / -1; background:#213324 !important; border-color:#539d61 !important; color:#d2f3d7 !important; font-weight:bold; }
.inspection-btn-sequence.recording { background:#5a1919 !important; border-color:#ff5555 !important; color:#fff !important; animation:inspection-pulse 1s infinite alternate; }
@keyframes inspection-pulse { from { opacity:1; } to { opacity:.75; } }

.inspection-control-row { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:4px 0; }
.inspection-row-title { font-size:10px; font-weight:bold; color:#eadcb6; min-width:54px; }
.inspection-btn-group { display:flex; gap:3px; flex:1; justify-content:flex-end; }
.inspection-fov-group { align-items:center; }
.inspection-val-display { display:inline-block; min-width:32px; text-align:center; font-family:monospace; font-size:11px; font-weight:bold; color:#a9d6db; }

.inspection-bookmark-list { display:flex; flex-direction:column; gap:3px; margin:4px 0; }
.inspection-bookmark-row { display:flex; align-items:center; gap:6px; padding:2px 4px; background:rgba(20,18,14,.6); border:1px solid rgba(126,112,77,.3); border-radius:2px; }
.inspection-bookmark-row.has-bookmark { border-color:rgba(226,191,112,.6); background:rgba(35,28,18,.6); }
.inspection-bookmark-check { display:flex; align-items:center; gap:4px; font-size:10px; color:#eadcb6; cursor:pointer; flex:1; }
.inspection-bookmark-row button { min-height:24px; padding:2px 8px; font-size:9.5px; }

.inspection-sequence-box { background:rgba(18,15,12,.75); border:1px solid rgba(126,112,77,.4); padding:6px; margin:4px 0; border-radius:3px; }
.inspection-sequence-progress { font-size:10px; color:#e2bf70; margin-top:4px; text-align:center; font-weight:bold; font-family:monospace; }
.inspection-select { background:#2a2922; border:1px solid #7e704d; color:#eadcb6; font-size:10px; padding:3px 6px; border-radius:2px; font-family:inherit; }

.inspection-restore-pill { position:fixed; top:12px; left:12px; z-index:9999; padding:6px 14px; background:rgba(28,23,18,.88); border:1px solid #b29459; color:#eadcb6; font-size:11px; font-weight:800; letter-spacing:.06em; border-radius:14px; cursor:pointer; pointer-events:auto; display:none; box-shadow:0 2px 8px rgba(0,0,0,.6); transition:background .15s, opacity .15s; }
.inspection-restore-pill:hover, .inspection-restore-pill:focus-visible { background:rgba(45,36,26,.98); border-color:#e2bf70; color:#fff; }

.inspection-grid { position:fixed; inset:0; pointer-events:none; z-index:10; }
.inspection-grid.hidden { display:none; }
.inspection-grid-line { position:absolute; pointer-events:none; }
.inspection-grid-line.v1 { top:0; bottom:0; left:33.333%; width:1px; background:rgba(255,255,255,.2); box-shadow:0 0 1px rgba(0,0,0,.6); }
.inspection-grid-line.v2 { top:0; bottom:0; left:66.667%; width:1px; background:rgba(255,255,255,.2); box-shadow:0 0 1px rgba(0,0,0,.6); }
.inspection-grid-line.h1 { left:0; right:0; top:33.333%; height:1px; background:rgba(255,255,255,.2); box-shadow:0 0 1px rgba(0,0,0,.6); }
.inspection-grid-line.h2 { left:0; right:0; top:66.667%; height:1px; background:rgba(255,255,255,.2); box-shadow:0 0 1px rgba(0,0,0,.6); }

/* UI Presentation States: Clean and Gameplay HUD */
body.inspection-ui-clean .inspection-camera-ui,
body.inspection-ui-clean .practice-tools,
body.inspection-ui-clean #hud,
body.inspection-ui-clean .hud,
body.inspection-ui-clean .touch-controls,
body.inspection-ui-clean #pointer-hint,
body.inspection-ui-gameplay #pointer-hint,
body.inspection-ui-full #pointer-hint,
body.inspection-ui-clean .crosshair,
body.inspection-ui-clean .inspection-view-labels,
body.inspection-ui-clean .inspection-grid { display:none !important; }
body.inspection-ui-clean .inspection-restore-pill { display:block !important; }

body.inspection-ui-gameplay .inspection-camera-ui,
body.inspection-ui-gameplay .practice-tools,
body.inspection-ui-gameplay .inspection-view-labels { display:none !important; }
body.inspection-ui-gameplay .inspection-restore-pill { display:block !important; }

.inspection-view-label { position:absolute; pointer-events:auto; min-width:72px; }
.hud.inspection-flying .bottom-hud,.hud.inspection-flying .hud-status-stack,.hud.inspection-flying .kill-feed,.hud.inspection-flying .subtitle { display:none; }
.touch-controls.inspection-flight .touch-attack,.touch-controls.inspection-flight .touch-guard,.touch-controls.inspection-flight .touch-spell,.touch-controls.inspection-flight .touch-dash,.touch-controls.inspection-flight .touch-gauntlet,.touch-controls.inspection-flight .touch-ultimate,.touch-controls.inspection-flight .touch-interact,.touch-controls.inspection-flight .touch-deploy,.touch-controls.inspection-flight .touch-siegeView,.touch-controls.inspection-flight .touch-siegeWeapon,.touch-controls.inspection-flight .touch-siegeSkill,.touch-controls.inspection-flight .touch-scores { display:none !important; }
.touch-controls.inspection-flight .touch-jump { right:22px; bottom:72px; }
.touch-controls.inspection-flight .touch-crouch { left:auto; right:112px; top:auto; bottom:38px; }
@container app (max-width:600px) { .inspection-camera-tools { top:48px; width:min(290px,calc(100% - 20px)); } }
.inspection-pane { position:absolute; border:1px solid rgba(223,194,133,.4); pointer-events:none; }
.hud.inspection-split .bottom-hud { inset:0; display:block; }
.hud.inspection-split .health-block { position:absolute; top:52px; left:12px; width:160px; }
.hud.inspection-split .guard-block { position:absolute; top:112px; left:12px; width:160px; transform:none; }
.hud.inspection-split .abilities { position:absolute; right:12px; bottom:12px; gap:3px; }
.hud.inspection-split .ability { width:65px; height:58px; padding:4px; grid-template-columns:19px 1fr; }
.hud.inspection-split .ability-icon { font-size:16px; }
.hud.inspection-split .hud-status-stack { top:12px; left:100px; right:12px; width:auto; transform:none; }
.hud.inspection-split.inspection-flying .bottom-hud { display:none; }
.touch-ui .inspection-camera-tools button,
.touch-ui .inspection-btn-group button,
.touch-ui .inspection-toolbar-row button,
.touch-ui .inspection-select {
  min-height: 34px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Compact room rules share the banner's metal and parchment controls. */
.lobby-config,.lobby-swap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.lobby-config label,.lobby-swap label{display:grid;gap:5px;min-width:0;font-size:11px;font-weight:800;letter-spacing:.1em;color:var(--cream,#eadbb6)}
.lobby-config .game-input,.lobby-swap .game-input{width:100%;min-width:0;padding:8px;font-size:16px;box-sizing:border-box}
.lobby-config button,.lobby-config small,.lobby-swap button{grid-column:1/-1}
.lobby-config small{font-size:12px;line-height:1.4;opacity:.8}
.lobby-config [hidden]{display:none}
.lobby-arrange summary{cursor:pointer;font-size:12px;letter-spacing:.12em;padding:8px 0;color:var(--gold,#d5b56e)}
#lobby-error:empty{display:none}
@media(max-width:380px){.lobby-config,.lobby-swap{grid-template-columns:minmax(0,1fr)}}

/* Narrow to One: light 2D hardware reticle attached to the actual locked enemy.
   No camera-centered false lock or large ability icon; touch doesn't intercept. */
.flight-target-marker { position:absolute; z-index:14; transform:translate(-50%,-50%); pointer-events:none;
  width:112px; text-align:center; color:#d7d1a7; text-shadow:0 1px 3px #000,0 0 4px #080e0e;
  font:700 9px/1.2 ui-sans-serif,system-ui,sans-serif; letter-spacing:.10em; }
.flight-target-marker[hidden] { display:none; }
.flight-target-brackets { position:relative; width:42px; height:47px; margin:0 auto 2px; }
.flight-target-brackets i { position:absolute; width:12px; height:12px; border-color:currentColor; border-style:solid; border-width:0; }
.flight-target-brackets i:nth-child(1) { top:0; left:0; border-top-width:2px; border-left-width:2px; }
.flight-target-brackets i:nth-child(2) { top:0; right:0; border-top-width:2px; border-right-width:2px; }
.flight-target-brackets i:nth-child(3) { bottom:0; left:0; border-bottom-width:2px; border-left-width:2px; }
.flight-target-brackets i:nth-child(4) { bottom:0; right:0; border-bottom-width:2px; border-right-width:2px; }
.flight-target-name { display:block; max-width:112px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.flight-target-state { display:block; color:#99c4b5; font-size:8px; letter-spacing:.08em; }
.flight-target-marker[data-state="locked"] { color:#bde3cd; }
.flight-target-marker[data-state="preview"] { color:#e6cc92; opacity:.91; }
.flight-target-marker[data-state="preview"] .flight-target-brackets i {
  border-style:dashed; border-color:#e6cc92;
}
.flight-target-marker[data-state="preview"] .flight-target-state { color:#f4dbac; }
.flight-target-marker[data-state="outOfTraverse"],
.flight-target-marker[data-state="noClearShot"] { color:#e4b779; }
.flight-target-marker[data-state="outOfTraverse"] .flight-target-state,
.flight-target-marker[data-state="noClearShot"] .flight-target-state { color:#edc38d; }
.flight-target-pointer { display:none; position:absolute; top:-11px; left:calc(50% - 5px);
  width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent;
  border-left:9px solid currentColor; transform:rotate(var(--target-angle,0deg)); }
.flight-target-marker[data-clamped="true"] .flight-target-pointer { display:block; }
.flight-target-marker[data-clamped="true"] .flight-target-brackets { width:25px; height:25px; }
@media(max-width:600px) {
  .flight-target-marker { width:90px; font-size:8px; }
  .flight-target-name { max-width:90px; font-size:8px; }
  .flight-target-brackets { width:33px; height:38px; }
}
