/*
 * hud.css — permanent in-game HUD furniture: the match header (team score +
 * clock) at top centre, the kill feed at top right, and the ward pips beside the
 * ability bar.
 *
 * #ui-layer is a bottom-anchored flex column with pointer-events: none, so
 * anything that belongs at the TOP has to position itself out of that flow.
 * Everything here stays click-through — the HUD must never eat a right-click
 * meant for the ground underneath it.
 */

/* ---------- Match header: score | clock | score, your K/D/A underneath ---------- */
#match-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  pointer-events: none;
  font-variant-numeric: tabular-nums;   /* digits must not jiggle as they change */
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: rgba(8, 9, 18, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.mh-top { display: flex; align-items: stretch; }

.mh-score {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 7px 12px 8px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}
/* Team identity is a tinted seat plus a bar along the top edge, so the two
   scores stay readable while still being unmistakably blue-side and red-side. */
.mh-blue { background: rgba(90, 169, 255, 0.16); box-shadow: inset 0 3px 0 #5aa9ff; }
.mh-red  { background: rgba(255, 93, 93, 0.16);  box-shadow: inset 0 3px 0 #ff5d5d; }

.mh-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 14px 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(230, 230, 238, 0.72);
}

/* Your own K/D/A, in the same block as the score rather than off in its own
   corner: it is the personal half of the same question the score answers, and
   nobody should have to hold Tab to learn how their own game is going.
   Hidden until the board actually has a row for us — a "0 / 0 / 0" strip while
   still in champion select would be reporting a match we are not in yet. */
.mh-kda {
  display: none;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 3px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.mh-kda.is-live { display: flex; }
.mh-kda-label {
  margin-right: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: rgba(230, 230, 238, 0.35);
}
/* Kills / deaths / assists carry the colours they already have everywhere else
   in this UI, so the three numbers are told apart by hue before they are read. */
.mh-kda-k { color: #6ad4a0; }
.mh-kda-d { color: #ff8a8a; }
.mh-kda-a { color: #f0c040; }
.mh-kda-sep { color: rgba(230, 230, 238, 0.28); font-weight: 500; }

/* ---------- Kill feed ---------- */
#killfeed {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
  max-width: 40vw;
}

.kf-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(8, 9, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  /* Slide in from the right, then fade out where it sits — the row must not
     reflow the ones below it while it leaves. */
  animation: kf-in 0.16s ease-out;
}
.kf-row.is-fading { opacity: 0; transition: opacity 0.4s ease-in; }
@keyframes kf-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* A kill you were part of is the one you actually want to spot. */
.kf-row.is-mine {
  border-color: rgba(240, 192, 64, 0.55);
  background: rgba(30, 24, 8, 0.88);
}

/* A kill YOU got is louder again: it lands while you are mid-fight and looking
   at your champion, not at the corner of the screen, so it has to move to be
   seen at all. Three pulses and then it settles into a plain gold row — a
   permanent blink would still be flashing during the next fight. */
.kf-row.is-my-kill {
  border-color: rgba(255, 214, 92, 0.95);
  background: rgba(58, 42, 8, 0.94);
  font-size: 14px;
  padding: 6px 12px;
  color: #ffe9a8;
  /* kf-in is replaced rather than stacked: it animates `transform` too, and the
     later rule would simply win — kf-mine-pop does the entrance itself. */
  transform-origin: right center;
  animation: kf-mine-pop 0.34s cubic-bezier(0.2, 1.6, 0.4, 1),
             kf-mine-pulse 0.5s ease-in-out 0.34s 3;
}
.kf-row.is-my-kill .kf-name { color: #ffe9a8; }
.kf-row.is-my-kill .kf-name.is-blue { color: #a8d4ff; }
.kf-row.is-my-kill .kf-name.is-red  { color: #ffa0a0; }
.kf-row.is-my-kill .kf-weapon { color: rgba(255, 226, 150, 0.85); }

/* Scales from the right edge so the pop never pushes the row off-screen. */
@keyframes kf-mine-pop {
  0%   { opacity: 0; transform: translateX(14px) scale(0.9); }
  45%  { opacity: 1; transform: translateX(0) scale(1.14); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes kf-mine-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 200, 64, 0); border-color: rgba(255, 214, 92, 0.55); }
  50%      { box-shadow: 0 0 14px 2px rgba(255, 200, 64, 0.65); border-color: rgba(255, 236, 170, 1); }
}

.kf-badge {
  background: linear-gradient(180deg, #ffd54a, #f0a018);
  color: #2a1c02;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: none;
}

.kf-name { color: #e6e6ee; }
.kf-name.is-blue { color: #7cbcff; }
.kf-name.is-red  { color: #ff8080; }
/* The victim reads as gone: dimmed and struck through. */
.kf-victim { opacity: 0.75; text-decoration: line-through; text-decoration-thickness: 1px; }

.kf-weapon {
  color: rgba(230, 230, 238, 0.45);
  font-size: 13px;
  font-weight: 700;
}
.kf-env { color: rgba(230, 230, 238, 0.5); font-style: italic; font-weight: 500; }

/* ---------- Objective banner (dragon) ----------
   Centre screen and deliberately the loudest thing in the HUD — it fires twice
   a match at most, and both times everyone on the server needs to stop what
   they are doing and look at it.

   Sits at 28% height rather than dead centre: the middle of the screen is where
   your own champion is, and a banner over your own body during the fight the
   banner is announcing would be the worst possible place for it. Same reason it
   is pointer-events: none like everything else here — the pit is underneath. */
#objective-banner {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 42px;
  border-radius: 10px;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(10, 6, 20, 0.9), rgba(10, 6, 20, 0.62));
  border-top: 2px solid rgba(168, 85, 247, 0.9);
  border-bottom: 2px solid rgba(168, 85, 247, 0.9);
}
#objective-banner.is-live {
  display: flex;
  /* In fast, hold, then out slowly — the hold is what makes it readable mid-fight.
     Timing must stay in step with the 4600ms removal timer in hud.js. */
  animation: ob-in 0.32s cubic-bezier(0.2, 1.3, 0.4, 1);
}
/* Removing .is-live sets display:none, so the exit is handled by leaving the
   element up for the full timer and cutting it — a fade-out transition cannot
   run against a display change anyway. */

.ob-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #f3e8ff;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.85), 0 3px 6px rgba(0, 0, 0, 0.9);
}
/* The sudden-death countdown digit. Bigger than .ob-title and on its own line
   above the label, because for five seconds the number IS the message — and it
   re-pops on every tick (the element is replaced, which restarts the animation)
   so a digit that changes without moving cannot read as a frozen HUD. */
.ob-count {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;   /* 4 and 1 must not resize the plate */
  color: #fff2dc;
  text-shadow: 0 0 22px rgba(255, 176, 72, 0.95), 0 3px 6px rgba(0, 0, 0, 0.9);
  animation: ob-count-pop 0.28s cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes ob-count-pop {
  0%   { opacity: 0.35; transform: scale(1.35); }
  100% { opacity: 1;    transform: scale(1); }
}

.ob-sub {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: rgba(230, 220, 245, 0.72);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* The three tones the same banner has to carry: an unclaimed spawn, your team's
   win, and the other team's. Purple is the objective's own colour and stays on
   the spawn; the outcomes take the side colours already used everywhere else. */
#objective-banner.is-neutral { border-color: rgba(168, 85, 247, 0.9); }
#objective-banner.is-good {
  border-color: rgba(106, 212, 160, 0.9);
}
#objective-banner.is-good .ob-title {
  color: #d8ffe9;
  text-shadow: 0 0 18px rgba(106, 212, 160, 0.85), 0 3px 6px rgba(0, 0, 0, 0.9);
}
#objective-banner.is-bad {
  border-color: rgba(255, 93, 93, 0.9);
}
#objective-banner.is-bad .ob-title {
  color: #ffe2e2;
  text-shadow: 0 0 18px rgba(255, 93, 93, 0.85), 0 3px 6px rgba(0, 0, 0, 0.9);
}

@keyframes ob-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.86); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Sudden death gets its own tone: not an outcome, an alarm. Amber rather than
   either team colour, because it is happening to both sides at once, and it
   pulses because unlike the dragon banner this one is announcing that the rules
   of the match just changed. */
#objective-banner.is-urgent {
  border-color: rgba(255, 176, 72, 0.95);
}
#objective-banner.is-urgent .ob-title {
  color: #fff2dc;
  text-shadow: 0 0 22px rgba(255, 176, 72, 0.95), 0 3px 6px rgba(0, 0, 0, 0.9);
}
#objective-banner.is-urgent.is-live {
  animation: ob-in 0.32s cubic-bezier(0.2, 1.3, 0.4, 1), ob-pulse 1.1s ease-in-out 0.32s 3;
}
@keyframes ob-pulse {
  0%, 100% { border-color: rgba(255, 176, 72, 0.95); }
  50%      { border-color: rgba(255, 240, 200, 1); }
}

/* ---------- Your kill banner (centre) ----------
   Sits ABOVE the objective banner rather than below it. Both can be up at the
   same moment — a kill in the dragon pit is exactly that moment — and the dragon
   is the one that must not be covered.

   It used to sit below, at 38%, and that is the one band of the screen it cannot
   have: the camera holds your champion's FEET at 50% height and the overhead HP
   bar is drawn at y - y_offset_to_center * 2.8, which at the 454-world-px view
   height puts it at 37.4% for a champion with offset 20 (tonk, hand_fighter) and
   34.4% for one with offset 25. The banner was landing straight on your own
   health bar during the fight it was reporting on. There is no gap to slide into
   between the objective banner (28%, ~96px tall, so its underside already
   reaches ~34.7% on a short window) and the bar, so it goes over the top of
   both — clear of the match header above and of everything the champion draws
   below.

   Smaller type than the objective banner throughout, on purpose: that one fires
   twice a match and is allowed to stop you, this one fires whenever you get a
   kill and only has to be noticed. No plate at all on a single kill; the plate
   and the glow are what the multikills escalate into. */
#kill-banner {
  position: absolute;
  top: 17%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
#kill-banner.is-live { display: flex; }

/* One kill: an acknowledgement. Bare text, no plate — the plate is still what a
   multikill escalates INTO — but not a whisper either. At 15px, 80% opacity and
   gone in 1.3s it was losing to the world behind it often enough to read as
   "the banner only fires on a double", which is the bug this sizing fixes: the
   single was firing every time and simply was not being seen. It stays clearly
   below the 24px multikill title so the ladder still reads.
   The fade-out delays below are timed against KILL_BANNER_MS / MULTIKILL_BANNER_MS
   in hud.js — the element is cut at those, so the fade has to land first. */
.kb-single {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #f4f4fa;
  /* A dark halo rather than a plate: it separates the text from whatever it is
     over without drawing a box the multikill tier needs to itself. */
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(0, 0, 0, 0.95);
  animation: kb-rise 0.22s ease-out, kb-fade 0.35s ease-in 1.35s forwards;
}
.kb-name { color: #ffd54a; }

/* A chain: a plate, a glow, and a pop that scales from the centre. */
.kb-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 6px 24px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 11, 2, 0.9), rgba(18, 11, 2, 0.55));
  border-top: 2px solid rgba(255, 214, 92, 0.95);
  border-bottom: 2px solid rgba(255, 214, 92, 0.95);
  color: #ffe9a8;
  text-shadow: 0 0 16px rgba(255, 200, 64, 0.8), 0 3px 6px rgba(0, 0, 0, 0.9);
  animation: kb-pop 0.3s cubic-bezier(0.2, 1.5, 0.4, 1), kb-fade 0.4s ease-in 2.2s forwards;
}

/* Three tiers, not one colour per number: gold for the ones most matches see,
   orange from a quadra, red from a penta up — and only that last tier gets to
   pulse, so the rarest thing on the ladder still reads as the biggest. */
#kill-banner.is-big .kb-title {
  font-size: 28px;
  border-color: rgba(255, 154, 60, 0.95);
  color: #ffe0bd;
  text-shadow: 0 0 20px rgba(255, 154, 60, 0.85), 0 3px 6px rgba(0, 0, 0, 0.9);
}
#kill-banner.is-huge .kb-title {
  font-size: 31px;
  border-color: rgba(255, 96, 96, 1);
  color: #ffe6e6;
  text-shadow: 0 0 24px rgba(255, 96, 96, 0.9), 0 3px 6px rgba(0, 0, 0, 0.9);
  animation: kb-pop 0.3s cubic-bezier(0.2, 1.5, 0.4, 1),
             kb-glow 0.55s ease-in-out 0.3s 3,
             kb-fade 0.4s ease-in 2.2s forwards;
}

@keyframes kb-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes kb-pop {
  0%   { opacity: 0; transform: scale(0.7); }
  60%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes kb-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 96, 96, 0); }
  50%      { box-shadow: 0 0 26px 4px rgba(255, 96, 96, 0.5); }
}
@keyframes kb-fade {
  to { opacity: 0; }
}

/* ---------- Sudden death: the Dodge King duel bar ----------
   Top-left corner, in the one region of the HUD nothing else claims — the match
   header is centre-anchored and the kill feed is pinned right. It used to hang
   directly under the header, which put it in the middle of the screen at the
   exact moment the middle of the screen is a thirty-champion fight: the bar sat
   over the thing it was reporting on.

   Yours on the left and theirs on the right, both filling from the outside edge
   toward the centre, so "who is winning" is the one comparison the eye has to
   make and it can make it without reading a digit. */
#sudden-death {
  position: absolute;
  top: 10px;
  left: 12px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  background: rgba(8, 9, 18, 0.86);
  border: 1px solid rgba(255, 176, 72, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
#sudden-death.is-live { display: flex; }

.sd-side {
  display: grid;
  /* Label and percentage share a row above the track, pinned to opposite ends,
     so both sides are mirror images of each other around the VS. */
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 8px;
  /* Narrower than the 190px it used while centred. In the corner the whole
     widget has to stay clear of the centre-anchored match header on a small
     window: two sides plus the VS and the padding come to 2W + 64, so 150 keeps
     it under 370px and clear of the header down to about 1024px wide. */
  width: 150px;
}
.sd-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: rgba(230, 230, 238, 0.62);
}
.sd-pct {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}
.sd-track {
  grid-column: 1 / -1;
  display: flex;
  height: 9px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
.sd-fill {
  height: 100%;
  width: 100%;
  /* Short, not smooth: at thirty updates a second a long transition lags behind
     the health it is supposed to be reporting. */
  transition: width 0.12s linear;
}

/* Both bars are anchored at the OUTSIDE edge and reach in toward the VS, so at
   full health they read as one continuous bar and the gap that opens at the
   centre is the lead. Losing health pulls each side back toward its own corner. */
.sd-mine  .sd-fill  { background: linear-gradient(90deg, #2f7fd8, #6ab6ff); }
.sd-theirs .sd-track { justify-content: flex-end; }
.sd-theirs .sd-fill { background: linear-gradient(90deg, #d13a3a, #ff7a7a); }

/* Each side's label sits on its outer edge and its percentage beside the VS, so
   the two blocks mirror each other and the numbers being compared are adjacent. */
.sd-theirs { grid-template-columns: auto 1fr; }
.sd-theirs .sd-pct   { order: 1; }
.sd-theirs .sd-label { order: 2; text-align: right; }
.sd-mine  .sd-pct    { text-align: right; }

/* A king in the last quarter, on either side — you want to know you are about to
   win as much as you want to know you are about to lose. */
.sd-fill.is-critical { animation: sd-critical 0.7s ease-in-out infinite; }
@keyframes sd-critical {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.75); }
}

.sd-vs {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: rgba(255, 176, 72, 0.85);
}

/* ---------- Ward pips ---------- */
.ward-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(8, 8, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ward-pips { display: flex; gap: 4px; }
/* 32px = the ward art's native size and the same footprint as a summoner slot,
   so it reads as part of the ability row rather than a stray badge. */
.ward-pip {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #0c0e18;
  border: 1px solid rgba(90, 100, 140, 0.45);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ward-pip img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;   /* pixel art — never smooth it */
  /* Spent: drained of colour and dimmed, the same language the ability icons
     use for "on cooldown". */
  filter: grayscale(1) brightness(0.4);
  opacity: 0.75;
  transition: filter 0.15s, opacity 0.15s;
}
.ward-pip.is-ready {
  border-color: rgba(106, 212, 160, 0.8);
  box-shadow: 0 0 8px rgba(106, 212, 160, 0.45);
}
.ward-pip.is-ready img { filter: none; opacity: 1; }
/* Recharge countdown. Kept a fixed height so the panel does not resize as the
   text appears and disappears. */
.ward-timer {
  height: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(230, 230, 238, 0.5);
  font-variant-numeric: tabular-nums;
}
.ward-key {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(230, 230, 238, 0.35);
}

/* ---------- FPS / ping readout ---------- */
/* Top left, the one corner nothing else claims. Deliberately dim and small: it
   is a number you glance at when something feels wrong, not part of the game. */
#perf-hud {
  position: absolute;
  top: 8px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(230, 230, 238, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
#perf-hud[hidden] { display: none; }
/* Only the bad states get a colour — a green 40ms every frame is noise, a red
   one is the whole point of the readout. */
#perf-hud .is-warn { color: #f0c040; }
#perf-hud .is-bad  { color: #ff8a8a; }

/* ---------- Touch: phones and tablets ----------
   Scoped to body.touch-mode (set by touch.js at load), so desktop never sees any
   of it. touch.css owns the bottom of the screen and the top-left corner (the
   minimap at 150x124 with the Menu and TAB buttons beside it, ending ~252px in);
   these rules only move what would otherwise land on top of that, and shrink
   the top-of-screen furniture for a landscape phone. */

/* The duel bar's corner is the minimap's corner in touch mode. Under it is the
   next free spot: below the map and below the FPS readout that touch.css parks
   at 140px, and still clear of the stats panel at the bottom. */
body.touch-mode #sudden-death {
  top: calc(176px + env(safe-area-inset-top, 0px));
  left: calc(8px + env(safe-area-inset-left, 0px));
}

@media (max-height: 520px) {
  /* Match header: same block, roughly two-thirds the size. At 360px tall the
     desktop header is a seventh of the screen. */
  body.touch-mode .mh-score { min-width: 40px; padding: 4px 9px 5px; font-size: 16px; }
  body.touch-mode .mh-clock { min-width: 52px; padding: 4px 10px 5px; font-size: 13px; }
  body.touch-mode .mh-kda { padding: 2px 10px 3px; font-size: 11px; gap: 3px; }
  body.touch-mode .mh-kda-label { font-size: 8px; }

  /* Kill feed: still top-right, but it must stop short of the centred header —
     40vw reaches it on a 740px-wide phone — and three rows is all the corner
     can spare. Newest rows are appended last, so it is the oldest that go. */
  body.touch-mode #killfeed {
    top: calc(6px + env(safe-area-inset-top, 0px));
    right: calc(8px + env(safe-area-inset-right, 0px));
    max-width: calc(50vw - 110px);
    gap: 3px;
  }
  body.touch-mode .kf-row {
    gap: 5px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    max-width: 100%;
    overflow: hidden;
  }
  body.touch-mode .kf-row.is-my-kill { font-size: 11.5px; padding: 4px 8px; }
  body.touch-mode .kf-weapon { font-size: 11px; }
  body.touch-mode .kf-badge { font-size: 9px; padding: 1px 4px; }
  body.touch-mode .kf-row:nth-last-child(n+4) { display: none; }

  /* Kill banner: just under the (smaller) header rather than at 17%, which is
     ~61px here and on top of it. */
  body.touch-mode #kill-banner { top: calc(68px + env(safe-area-inset-top, 0px)); }
  body.touch-mode .kb-single { font-size: 14px; letter-spacing: 1.5px; }
  body.touch-mode .kb-title { font-size: 17px; letter-spacing: 2px; padding: 4px 16px; }
  body.touch-mode #kill-banner.is-big .kb-title { font-size: 19px; }
  body.touch-mode #kill-banner.is-huge .kb-title { font-size: 21px; }

  /* Objective banner: same 30%-ish slot, half the plate. */
  body.touch-mode #objective-banner { top: 30%; gap: 3px; padding: 8px 22px; }
  body.touch-mode .ob-title { font-size: 20px; letter-spacing: 1.5px; }
  body.touch-mode .ob-count { font-size: 36px; }
  body.touch-mode .ob-sub { font-size: 11px; letter-spacing: 1px; }

  /* Duel bar: narrower sides so the whole widget is ~250px. */
  body.touch-mode #sudden-death { gap: 6px; padding: 5px 8px; border-radius: 8px; }
  body.touch-mode .sd-side { width: 96px; gap: 1px 6px; }
  body.touch-mode .sd-label { font-size: 8.5px; letter-spacing: 1px; }
  body.touch-mode .sd-pct { font-size: 10px; }
  body.touch-mode .sd-track { height: 7px; }
  body.touch-mode .sd-vs { font-size: 10px; }
}
