/* ==========================================================================
   Voxel Fight Night — interface layer.

   One stylesheet for the whole 2D shell. It is deliberately a single file: the
   shell is linked as one <link> and the cascade order is then unambiguous.

   Design language: fight poster. Heavy condensed caps, hard square edges, hard
   drop shadows instead of soft blur, bloodied off-white on deep ink, ring-rope
   gold and blood red. Nothing is rounded and nothing glows softly.
   ========================================================================== */

/* --------------------------------------------------------------- 1. tokens */

.vfn {
  --ink: #f7f2e6;
  --ink-2: #c4bcab;
  --ink-3: #948b7c;
  --void: #06060a;
  --pit: #0b0b12;
  --steel: #1b1b26;
  --edge: #33323f;
  --blood: #c1121f;
  --blood-2: #e8452f;
  --gold: #d6c06a;
  --rope: #b2913a;
  --good: #57b06b;
  --bad: #c1121f;
  --warn: #e0a33a;

  --panel: rgba(9, 9, 15, 0.9);
  --panel-2: rgba(16, 16, 25, 0.94);
  --shadow: 5px 5px 0 rgba(0, 0, 0, 0.72);
  --shadow-sm: 3px 3px 0 rgba(0, 0, 0, 0.7);

  --font-poster: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Franklin Gothic Heavy', 'Arial Black', sans-serif;
  --font-head: 'Arial Narrow', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-num: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --pad: clamp(0.75rem, 2.2vw, 1.6rem);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: var(--font-body);
  font-size: clamp(13px, 0.55vw + 11.5px, 17px);
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.vfn.is-large-text {
  font-size: clamp(15px, 0.7vw + 13px, 21px);
}

.vfn.is-contrast {
  --ink-2: #e6e0d2;
  --ink-3: #cdc5b5;
  --panel: rgba(0, 0, 0, 0.96);
  --panel-2: rgba(0, 0, 0, 0.98);
  --edge: #6d6a7d;
}

.vfn.is-cb-safe {
  --blood: #2f7fd1;
  --blood-2: #4aa3e8;
  --good: #3f9fd6;
  --bad: #e08a1e;
  --warn: #e8b23c;
}

.vfn__screen,
.vfn__overlays,
.vfn__touch {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vfn__overlays > *,
.vfn__touch > * {
  pointer-events: auto;
}

/* `hidden` must win. Several components below set `display` on the same element
   they toggle `hidden` on, and a `display` declaration outranks the user-agent
   `[hidden] { display: none }` rule. Stated once, here, for the whole shell.
   The `#render-failure` line is a defensive guard for the shipped shell markup,
   which has the identical collision (`.render-failure { display: grid }` beats
   its own `hidden` attribute); the real fix belongs in `styles.css`. */
.vfn [hidden],
.vfn__touch[hidden],
#render-failure[hidden] {
  display: none !important;
}

.vfn-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------- 2. screen scaffold */

.vfn-screen {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: var(--pad);
  padding: calc(var(--pad) + var(--safe-t)) calc(var(--pad) + var(--safe-r))
    calc(var(--pad) + var(--safe-b)) calc(var(--pad) + var(--safe-l));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(193, 18, 31, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(6, 6, 10, 0.9) 0%, rgba(6, 6, 10, 0.72) 42%, rgba(6, 6, 10, 0.94) 100%);
}

.vfn-screen--fight,
.vfn-screen--gym {
  background: none;
  pointer-events: none;
  overflow: hidden;
  padding: 0;
}

.vfn-screen * {
  min-width: 0;
}

/* ------------------------------------------------------------ 3. type + bits */

.vfn-head {
  display: flex;
  align-items: flex-start;
  gap: var(--pad);
  flex: 0 0 auto;
}

.vfn-head__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 0.95;
  text-shadow: var(--shadow-sm);
}

.vfn-head__sub {
  margin: 0.35rem 0 0;
  color: var(--ink-2);
  font-size: 0.92em;
}

.vfn-panel {
  background: var(--panel);
  border: 2px solid var(--edge);
  box-shadow: var(--shadow);
  padding: clamp(0.7rem, 1.6vw, 1.1rem);
  min-width: 0;
}

.vfn-panel__title {
  margin: 0 0 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 3px solid var(--blood);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.02em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.vfn-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.vfn-note,
.vfn-empty {
  margin: 0.6rem 0 0;
  color: var(--ink-3);
  font-size: 0.85em;
}

.vfn-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------- 4. buttons/menus */

.vfn-btn,
.vfn-back,
.vfn-cta,
.vfn-menu__item,
.vfn-card,
.vfn-choice,
.vfn-seg__btn,
.vfn-toggle,
.vfn-swatch,
.vfn-hud__btn {
  font: inherit;
  color: inherit;
  background: var(--steel);
  border: 2px solid var(--edge);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  transition: transform 0.08s steps(2), background-color 0.12s linear, border-color 0.12s linear;
}

.vfn-btn,
.vfn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.vfn-back {
  flex: 0 0 auto;
  min-width: 5.5rem;
}

.vfn-btn:hover,
.vfn-back:hover,
.vfn-choice:hover,
.vfn-menu__item:hover,
.vfn-card:hover {
  background: #262636;
  border-color: var(--gold);
}

.vfn-btn:active,
.vfn-back:active,
.vfn-cta:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.vfn :focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.vfn-cta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1.2rem;
  background: var(--blood);
  border-color: #f2e8c9;
  box-shadow: var(--shadow);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.vfn-cta:hover {
  background: var(--blood-2);
}

.vfn-cta__label {
  font-weight: 800;
  font-size: 1.15em;
  line-height: 1.05;
}

.vfn-cta__sub {
  font-family: var(--font-body);
  font-size: 0.78em;
  letter-spacing: 0.04em;
  color: rgba(255, 245, 230, 0.82);
  text-transform: none;
}

.vfn-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0;
}

.vfn-menu__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 0.8rem;
  padding: 0.5rem 0.9rem;
  background: rgba(12, 12, 19, 0.88);
  border-left: 5px solid var(--edge);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: var(--shadow-sm);
}

.vfn-menu__item.is-primary {
  border-left-color: var(--blood);
  background: rgba(30, 12, 15, 0.9);
}

.vfn-menu__item:hover,
.vfn-menu__item:focus-visible {
  border-left-color: var(--gold);
  background: rgba(28, 26, 20, 0.94);
}

.vfn-menu__label {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: min(clamp(1rem, 2.4vw, 1.35rem), 4.2vh);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.1;
}

.vfn-menu__hint {
  grid-column: 1;
  color: var(--ink-2);
  font-size: 0.84em;
}

.vfn-menu__mark {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--blood);
  font-size: 1.1em;
}

.vfn-menu__item:hover .vfn-menu__mark,
.vfn-menu__item:focus-visible .vfn-menu__mark {
  color: var(--gold);
}

/* ----------------------------------------------------------- 5. key chips */

.vfn-keys {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78em;
  color: var(--ink-2);
}

.vfn-key {
  display: inline-block;
  padding: 0.16em 0.45em;
  background: #14141d;
  border: 2px solid var(--edge);
  border-bottom-width: 4px;
  font-family: var(--font-num);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.vfn-key--hot {
  background: var(--blood);
  border-color: #f2e8c9;
  color: #fff6e8;
}

/* ----------------------------------------------------------- 6. form bits */

.vfn-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vfn-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.vfn-field__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.vfn-field__value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 0.9em;
  color: var(--gold);
}

.vfn-field__hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.8em;
}

.vfn-input {
  font: inherit;
  padding: 0.5rem 0.6rem;
  min-height: 44px;
  color: var(--ink);
  background: #101018;
  border: 2px solid var(--edge);
  border-radius: 0;
  width: 100%;
}

.vfn-input:focus {
  border-color: var(--gold);
  outline: none;
}

.vfn-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

.vfn-slider::-webkit-slider-runnable-track {
  height: 10px;
  background: #101018;
  border: 2px solid var(--edge);
}

.vfn-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 26px;
  margin-top: -10px;
  background: var(--blood);
  border: 2px solid #f2e8c9;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
}

.vfn-slider::-moz-range-track {
  height: 10px;
  background: #101018;
  border: 2px solid var(--edge);
}

.vfn-slider::-moz-range-thumb {
  width: 18px;
  height: 24px;
  border-radius: 0;
  background: var(--blood);
  border: 2px solid #f2e8c9;
}

.vfn-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.vfn-seg__btn {
  flex: 1 1 auto;
  min-width: 3.2rem;
  padding: 0.45rem 0.6rem;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88em;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: #101018;
}

.vfn-seg__btn[aria-pressed='true'] {
  background: var(--blood);
  border-color: #f2e8c9;
  color: #fff6e8;
}

.vfn-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  width: 100%;
  background: #101018;
}

.vfn-toggle__body {
  display: flex;
  flex-direction: column;
}

.vfn-toggle__label {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9em;
}

.vfn-toggle__hint {
  color: var(--ink-3);
  font-size: 0.78em;
}

.vfn-toggle__track {
  position: relative;
  width: 46px;
  height: 24px;
  background: #06060a;
  border: 2px solid var(--edge);
  flex: 0 0 auto;
}

.vfn-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--ink-3);
  transition: transform 0.1s steps(3), background-color 0.1s linear;
}

.vfn-toggle[aria-pressed='true'] .vfn-toggle__knob {
  transform: translateX(22px);
  background: var(--gold);
}

.vfn-toggle[aria-pressed='true'] .vfn-toggle__track {
  border-color: var(--gold);
}

/* The switch and `aria-pressed` already say on or off; the word is kept for
   assistive tech without stealing a column from the label. */
.vfn-toggle__state {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.vfn-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.vfn-swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--swatch);
  border: 3px solid #05050a;
  box-shadow: var(--shadow-sm);
}

.vfn-swatch[aria-pressed='true'] {
  border-color: var(--gold);
  outline: 2px solid #05050a;
}

/* ------------------------------------------------------------ 7. stat bars */

.vfn-stat {
  display: grid;
  grid-template-columns: 4.6rem 1fr 2rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8em;
}

.vfn-stat__label {
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.vfn-stat__track {
  position: relative;
  height: 9px;
  background: #05050a;
  border: 1px solid var(--edge);
  overflow: hidden;
}

.vfn-stat__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
  background: linear-gradient(90deg, var(--rope), var(--gold));
}

.vfn-stat__value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

/* --------------------------------------------------------- 8. title screen */

.vfn-screen--title {
  align-items: center;
  /* No `justify-content: center`: a centred flex child cannot be scrolled back
     into view when it overflows. `margin: auto` on the child centres safely. */
}

.vfn-attract {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.vfn-attract__beam {
  position: absolute;
  top: -30%;
  width: 42vmax;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(214, 192, 106, 0.09), transparent);
  transform-origin: 50% 0;
  animation: vfn-sweep 13s ease-in-out infinite alternate;
}

.vfn-attract__beam--b {
  animation-duration: 19s;
  animation-direction: alternate-reverse;
  background: linear-gradient(90deg, transparent, rgba(193, 18, 31, 0.12), transparent);
}

.vfn-attract__grain {
  position: absolute;
  inset: -50%;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  animation: vfn-grain 5s steps(6) infinite;
}

@keyframes vfn-sweep {
  from {
    transform: translateX(-30vw) rotate(-14deg);
  }
  to {
    transform: translateX(70vw) rotate(10deg);
  }
}

@keyframes vfn-grain {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-2%, 3%, 0);
  }
}

.vfn-title {
  position: relative;
  width: min(100%, 46rem);
  margin: auto;
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.6rem);
}

/* Wide enough for a poster layout: brand left, card right. This is also what
   keeps the whole screen inside 720p and inside a landscape phone. */
@media (min-width: 800px) {
  .vfn-title {
    width: min(100%, 66rem);
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.85fr);
    align-items: center;
    gap: clamp(1.2rem, 4vw, 3rem);
  }

  .vfn-title__word {
    font-size: min(clamp(3rem, 9vw, 6.4rem), 22vh);
  }
}

.vfn-title__side {
  min-width: 0;
}

.vfn-title__menu-shim {
  margin: 0;
}

.vfn-title__kicker {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 0.78em;
  color: var(--gold);
}

.vfn-title__word {
  margin: 0.25rem 0 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-poster);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  font-size: min(clamp(2.9rem, 13vw, 7rem), 19vh);
  text-shadow: 6px 6px 0 rgba(0, 0, 0, 0.85);
}

.vfn-title__line--1 {
  color: var(--ink);
  animation: vfn-drift 7s ease-in-out infinite alternate;
}

.vfn-title__line--2 {
  color: var(--blood);
  margin-left: 0.06em;
  animation: vfn-drift 9s ease-in-out infinite alternate-reverse;
}

.vfn-title__line--3 {
  color: var(--gold);
  animation: vfn-drift 11s ease-in-out infinite alternate;
}

@keyframes vfn-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0.7%, 0, 0);
  }
}

.vfn-title__tagline {
  margin: 0.9rem 0 0;
  max-width: 32rem;
  color: var(--ink-2);
  border-left: 4px solid var(--blood);
  padding-left: 0.7rem;
}

.vfn-title__saved {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0.7rem;
  background: rgba(214, 192, 106, 0.1);
  border-left: 4px solid var(--gold);
}

.vfn-title__saved-tag {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76em;
  color: var(--gold);
}

.vfn-title__continue {
  margin: 0;
  font-size: 0.92em;
}

.vfn-title__foot {
  margin: 1rem 0 0;
  color: var(--ink-3);
  font-size: 0.8em;
}

/* -------------------------------------------------------- 9. roster screen */

.vfn-roster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
  gap: var(--pad);
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
}

.vfn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.7rem;
}

.vfn-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem;
  background: var(--panel);
  border: 2px solid var(--edge);
  border-top: 5px solid var(--edge);
  box-shadow: var(--shadow-sm);
}

.vfn-card[aria-selected='true'] {
  border-color: var(--gold);
  border-top-color: var(--blood);
  background: var(--panel-2);
  box-shadow: 5px 5px 0 var(--blood);
}

.vfn-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.vfn-card__sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.vfn-card__tier {
  font-family: var(--font-poster);
  font-size: 1.5em;
  line-height: 1;
  color: var(--blood);
}

.vfn-card__id {
  display: flex;
  flex-direction: column;
}

.vfn-card__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.12em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.05;
}

.vfn-card__nick {
  color: var(--gold);
  font-size: 0.82em;
  font-style: italic;
}

.vfn-card__record {
  font-family: var(--font-num);
  font-size: 0.78em;
  color: var(--ink-2);
  white-space: nowrap;
}

.vfn-card__meta {
  margin: 0;
  font-size: 0.76em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-card__style {
  margin: 0;
  font-size: 0.86em;
  color: var(--ink-2);
}

.vfn-card__stats {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}

.vfn-card__tells-tag {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.72em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blood-2);
}

.vfn-tells {
  margin: 0.2rem 0 0;
  padding-left: 1rem;
  font-size: 0.82em;
  color: var(--ink-2);
}

.vfn-card__taunt {
  margin: 0;
  padding-left: 0.6rem;
  border-left: 3px solid var(--rope);
  font-size: 0.84em;
  font-style: italic;
  color: var(--ink);
}

.vfn-roster__options {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: clamp(0.7rem, 1.6vw, 1.1rem);
  background: var(--panel-2);
  border: 2px solid var(--edge);
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------- 10. creator screen */

/* The creator shares the screen with the live turntable behind it: the stage is
   an empty lane the panels may never enter. On a phone the lane becomes a band
   across the top, which is why the JS anchors him centre there. */
.vfn-creator {
  display: grid;
  grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
  gap: var(--pad);
  align-items: start;
}

.vfn-creator__stage {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-end;
  min-height: 24rem;
  height: calc(100vh - 12rem);
  max-height: 34rem;
  pointer-events: none;
}

.vfn-creator__caption {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.7rem;
  background: rgba(6, 6, 11, 0.82);
  border-left: 4px solid var(--gold);
  color: var(--ink-2);
  font-size: 0.92em;
  max-width: 20rem;
}

.vfn-creator__caption-tag {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.66em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.vfn-creator__panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--pad);
  align-items: start;
}

.vfn-creator__foot {
  display: flex;
  justify-content: flex-end;
}

/* Phone and small tablet: he gets a band across the top and the panels stack. */
@media (max-width: 899px) {
  .vfn-creator {
    grid-template-columns: minmax(0, 1fr);
  }

  .vfn-creator__stage {
    position: static;
    height: 34vh;
    min-height: 12rem;
    max-height: none;
    justify-content: center;
    text-align: center;
  }

  .vfn-creator__caption {
    align-items: center;
    border-left: 0;
    border-top: 3px solid var(--gold);
  }
}

/* ---------------------------------------------- 10a. creator stage lighting */

/* The creator is the one screen whose whole point is looking at the 3D behind
   it, so the usual heavy scrim is replaced by a wipe: light over the turntable
   lane on the left, dark under the panels on the right. */
.vfn-screen--creator {
  background:
    radial-gradient(90% 70% at 82% -10%, rgba(193, 18, 31, 0.14), transparent 60%),
    linear-gradient(
      90deg,
      rgba(6, 6, 10, 0.16) 0%,
      rgba(6, 6, 10, 0.2) 26%,
      rgba(6, 6, 10, 0.82) 40%,
      rgba(6, 6, 10, 0.94) 100%
    );
}

@media (max-width: 899px) {
  .vfn-screen--creator {
    background:
      linear-gradient(
        180deg,
        rgba(6, 6, 10, 0.2) 0%,
        rgba(6, 6, 10, 0.26) 22%,
        rgba(6, 6, 10, 0.88) 38%,
        rgba(6, 6, 10, 0.96) 100%
      );
  }
}

/* Four panels, two by two, so Colours is not pushed below the fold. */
@media (min-width: 900px) {
  .vfn-creator__panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .vfn-creator__panels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* On a touch device the keyboard label under a touch button is noise: the
   finger is the input. The full name stays on the accessible name. */
@media (pointer: coarse) {
  .vfn-tbtn__key,
  .vfn-glove__hint {
    display: none;
  }

  .vfn-tbtn {
    min-height: 52px;
  }
}

.vfn-pool {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem;
  background: rgba(214, 192, 106, 0.08);
  border-left: 4px solid var(--gold);
}

.vfn-pool__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.vfn-pool__label {
  font-family: var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.82em;
  color: var(--ink-2);
}

.vfn-pool__value {
  font-family: var(--font-num);
  font-size: 1.35em;
  color: var(--gold);
}

.vfn-pool__value.is-empty {
  color: var(--blood-2);
}

.vfn-pool__track {
  position: relative;
  display: block;
  height: 10px;
  background: #05050a;
  border: 1px solid var(--edge);
  overflow: hidden;
}

.vfn-pool__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
  background: linear-gradient(90deg, var(--rope), var(--blood));
}

.vfn-pool__note {
  margin: 0;
  font-size: 0.78em;
  color: var(--ink-3);
}

/* -------------------------------------------------------- 11. career screen */

.vfn-career {
  display: flex;
  flex-direction: column;
  gap: var(--pad);
}

.vfn-career__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--pad);
  align-items: start;
}

.vfn-career__side {
  display: flex;
  flex-direction: column;
  gap: var(--pad);
}

.vfn-career__empty {
  padding: var(--pad);
  background: var(--panel);
  border: 2px solid var(--edge);
  box-shadow: var(--shadow);
}

.vfn-career__empty-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-head);
  font-size: 1.4em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vfn-career__empty-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.vfn-next {
  position: relative;
  padding: clamp(0.9rem, 2.4vw, 1.5rem);
  background: linear-gradient(135deg, rgba(30, 10, 12, 0.95), rgba(8, 8, 14, 0.95));
  border: 2px solid var(--edge);
  border-left: 8px solid var(--blood);
  box-shadow: var(--shadow);
}

.vfn-next--title {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, rgba(46, 36, 8, 0.95), rgba(10, 8, 4, 0.96));
}

.vfn-next--title::after {
  content: 'WORLD TITLE';
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.3rem 0.7rem;
  background: var(--gold);
  color: #16130a;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.2em;
  font-size: 0.72em;
}

.vfn-next--champion {
  border-left-color: var(--gold);
}

.vfn-next__kicker {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.76em;
  color: var(--gold);
}

.vfn-next__name {
  margin: 0.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.9rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.vfn-next__nick {
  font-size: 0.42em;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-transform: none;
}

.vfn-next__meta {
  margin: 0.4rem 0 0;
  font-size: 0.82em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-next__taunt {
  margin: 0.7rem 0 0;
  padding-left: 0.8rem;
  border-left: 3px solid var(--rope);
  font-style: italic;
  color: var(--ink);
}

.vfn-next__rivalry {
  margin: 0.5rem 0 0;
  color: var(--blood-2);
  font-size: 0.88em;
}

.vfn-next__acts {
  margin-top: 1rem;
  display: flex;
}

.vfn-rungs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.vfn-rung {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  background: #0f0f18;
  border-left: 4px solid var(--edge);
}

.vfn-rung.is-beaten {
  border-left-color: var(--good);
  opacity: 0.72;
}

.vfn-rung.is-next {
  border-left-color: var(--blood);
  background: rgba(40, 12, 16, 0.9);
}

.vfn-rung__no {
  font-family: var(--font-poster);
  font-size: 1.4em;
  color: var(--ink-3);
}

.vfn-rung.is-next .vfn-rung__no {
  color: var(--blood-2);
}

.vfn-rung__body {
  display: flex;
  flex-direction: column;
}

.vfn-rung__name {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vfn-rung__meta {
  font-size: 0.76em;
  color: var(--ink-3);
}

.vfn-rung__state {
  font-size: 0.72em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.vfn-heat {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}

.vfn-heat__bar {
  width: 4px;
  height: 100%;
  background: #23232f;
}

.vfn-heat__bar.is-on {
  background: var(--blood-2);
}

.vfn-record {
  margin: 0;
  font-family: var(--font-poster);
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1;
  color: var(--ink);
}

.vfn-record__note,
.vfn-belts {
  margin: 0.3rem 0 0;
  font-size: 0.82em;
  color: var(--ink-2);
}

.vfn-belts {
  color: var(--gold);
  font-family: var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vfn-belts.is-empty {
  color: var(--ink-3);
}

.vfn-hists {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vfn-hist {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  background: #0f0f18;
  font-size: 0.85em;
}

.vfn-hist__mark {
  font-family: var(--font-poster);
  text-align: center;
  color: var(--ink-3);
}

.vfn-hist.is-win .vfn-hist__mark {
  color: var(--good);
}

.vfn-hist.is-loss .vfn-hist__mark {
  color: var(--bad);
}

.vfn-hist__how {
  font-size: 0.86em;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ------------------------------------------------------------- 12. the HUD */

.vfn-hud {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.4rem;
  padding: calc(0.6rem + var(--safe-t)) calc(0.6rem + var(--safe-r)) calc(0.6rem + var(--safe-b))
    calc(0.6rem + var(--safe-l));
  pointer-events: none;
}

.vfn.is-hud-hidden .vfn-hud__top,
.vfn.is-hud-hidden .vfn-hud__bottom {
  opacity: 0;
}

.vfn-hud__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
}

.vfn-hud__mid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
}

.vfn-hud__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

.vfn-hud__chrome {
  display: flex;
  gap: 0.4rem;
  pointer-events: auto;
}

/* Hidden chrome must not still be clickable: during a count the only thing a
   thumb may hit is the get-up beat. */
.vfn-screen--fight.is-quiet .vfn-hud__bottom {
  visibility: hidden;
}

.vfn-hud__icon {
  display: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.vfn-hud__icon-frame {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.vfn-hud__btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.6rem;
  background: rgba(9, 9, 15, 0.88);
  font-family: var(--font-head);
  font-size: 0.8em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* corners */

.vfn-corner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem 0.45rem;
  background: rgba(6, 6, 11, 0.94);
  border: 2px solid #3a3947;
  border-top: 5px solid var(--blood);
  box-shadow: var(--shadow-sm);
  max-width: 24rem;
}

.vfn-corner--opponent {
  border-top-color: #2b4fa0;
  margin-left: auto;
  text-align: right;
}

.vfn-corner--opponent .vfn-corner__id,
.vfn-corner--opponent .vfn-corner__foot {
  flex-direction: row-reverse;
}

.vfn-corner--opponent .vfn-corner__names {
  align-items: flex-end;
}

.vfn-corner__id {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.vfn-corner__flag {
  width: 10px;
  height: 24px;
  background: var(--blood);
  flex: 0 0 auto;
}

.vfn-corner--opponent .vfn-corner__flag {
  background: #2b4fa0;
}

.vfn-corner__names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vfn-corner__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1rem, 2.3vw, 1.4rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vfn-corner__nick {
  font-size: 0.74em;
  font-style: italic;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vfn-corner__record {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 0.72em;
  color: var(--ink-3);
}

.vfn-corner--opponent .vfn-corner__record {
  margin-left: 0;
  margin-right: auto;
}

.vfn-corner__bars {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.vfn-bar {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}

.vfn-corner--opponent .vfn-bar {
  grid-template-columns: minmax(0, 1fr) 2.8rem;
}

.vfn-corner--opponent .vfn-bar__label {
  order: 2;
  text-align: right;
}

.vfn-bar__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.vfn-bar__short {
  display: none;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-2);
  text-align: center;
}

.vfn-bar__track {
  position: relative;
  height: 14px;
  background: #05050a;
  border: 2px solid #3a3947;
  overflow: hidden;
}

.vfn-bar__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--fill, 1));
  transition: transform 0.12s linear;
}

.vfn-corner--opponent .vfn-bar__fill {
  transform-origin: right center;
}

.vfn-bar--head .vfn-bar__fill {
  background: linear-gradient(90deg, #8f2b1e, var(--blood-2));
}

.vfn-bar--body .vfn-bar__fill {
  background: linear-gradient(90deg, #7a5a1c, var(--gold));
}

.vfn-bar--stamina .vfn-bar__fill {
  background: linear-gradient(90deg, #1d6f7a, #63d0d8);
}

.vfn-bar.is-low .vfn-bar__fill {
  background: linear-gradient(90deg, #a34f12, var(--warn));
}

.vfn-bar.is-critical .vfn-bar__track {
  border-color: var(--blood-2);
}

.vfn-bar.is-critical .vfn-bar__fill {
  background: var(--blood-2);
  animation: vfn-blink 0.6s steps(2) infinite;
}

.vfn.is-calm .vfn-bar.is-critical .vfn-bar__fill {
  animation: none;
}

@keyframes vfn-blink {
  50% {
    opacity: 0.45;
  }
}

.vfn-corner__foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vfn-corner__downs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.vfn-corner--opponent .vfn-corner__downs {
  flex-direction: row-reverse;
}

.vfn-corner__kd {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.66em;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.vfn-corner__downs.is-scored .vfn-corner__kd {
  color: var(--blood-2);
}

.vfn-corner__pips {
  display: flex;
  gap: 3px;
}

.vfn-pip {
  width: 11px;
  height: 11px;
  background: #191922;
  border: 1px solid #2e2d3a;
}

.vfn-pip.is-on {
  background: var(--blood-2);
  border-color: #f2e8c9;
}

.vfn-corner__state {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.72em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warn);
}

.vfn-corner.is-down .vfn-corner__state,
.vfn-corner.is-hurt .vfn-corner__state {
  color: var(--blood-2);
}

/* clock */

.vfn-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.9rem 0.5rem;
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-bottom: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
  min-width: 7.5rem;
}

.vfn-clock__rounds {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.vfn-clock__label {
  font-family: var(--font-head);
  font-size: 0.66em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-clock__round {
  font-family: var(--font-poster);
  font-size: 1.5em;
  line-height: 1;
  color: var(--gold);
}

.vfn-clock__of {
  font-family: var(--font-num);
  font-size: 0.74em;
  color: var(--ink-3);
}

.vfn-clock__face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vfn-clock__time {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.7rem, 5.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
}

.vfn-clock.is-warning .vfn-clock__time {
  color: var(--blood-2);
  animation: vfn-pulse 1s steps(2) infinite;
}

.vfn.is-calm .vfn-clock.is-warning .vfn-clock__time {
  animation: none;
}

@keyframes vfn-pulse {
  50% {
    opacity: 0.5;
  }
}

.vfn-clock__warn {
  margin-top: 0.15rem;
  padding: 0.1rem 0.4rem;
  background: var(--blood);
  color: #fff6e8;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.66em;
  letter-spacing: 0.2em;
}

.vfn-clock__phase {
  font-family: var(--font-head);
  font-size: 0.68em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  min-height: 1em;
}

.vfn-screen--fight.is-title .vfn-clock {
  border-bottom-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm);
}

/* legend */

.vfn-legend {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.4rem 0.55rem;
  background: rgba(6, 6, 11, 0.9);
  border-left: 4px solid var(--gold);
  max-width: 18rem;
}

.vfn-legend__head {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.vfn-legend__tag {
  font-family: var(--font-head);
  font-size: 0.64em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-legend__camera {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.vfn-legend__rows {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.12rem;
}

.vfn-legend__row {
  display: grid;
  grid-template-columns: 1rem auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78em;
}

.vfn-legend__glyph {
  color: var(--blood-2);
  text-align: center;
}

.vfn-legend__label {
  color: var(--ink-2);
}

.vfn-legend__hint {
  font-size: 0.72em;
  color: var(--ink-3);
  text-wrap: balance;
}

.vfn-legend__rows--wide {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.35rem;
}

.vfn-legend__rows--wide .vfn-legend__row {
  font-size: 0.85em;
}

/* banners */

.vfn-banners {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  pointer-events: none;
}

.vfn-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.28rem 0.9rem;
  background: rgba(6, 6, 11, 0.9);
  border-left: 5px solid var(--ink-3);
  box-shadow: var(--shadow-sm);
  animation: vfn-banner-in 0.16s steps(3);
}

.vfn-banner.is-leaving {
  opacity: 0.35;
}

.vfn-banner__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(0.95rem, 2.6vw, 1.35rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.1;
}

.vfn-banner__note {
  font-size: 0.76em;
  color: var(--ink-2);
}

.vfn-banner--hit { border-left-color: var(--blood); }
.vfn-banner--counter { border-left-color: var(--gold); }
.vfn-banner--warn { border-left-color: var(--warn); }
.vfn-banner--blood { border-left-color: #7a1420; }
.vfn-banner--ref { border-left-color: #f0efe8; }
.vfn-banner--down { border-left-color: var(--blood-2); }
.vfn-banner--bell { border-left-color: var(--rope); }
.vfn-banner--announce { border-left-color: #2b4fa0; }
.vfn-banner--down .vfn-banner__title { color: var(--blood-2); }
.vfn-banner--counter .vfn-banner__title { color: var(--gold); }

@keyframes vfn-banner-in {
  from {
    transform: translateY(-6px);
    opacity: 0;
  }
}

/* hurt / tunnel vision */

.vfn-hurt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s linear;
}

.vfn-hurt.is-on {
  opacity: 1;
}

.vfn-hurt__ring {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 52%,
    transparent calc(46% - var(--hurt, 0) * 30%),
    rgba(30, 2, 5, calc(var(--hurt, 0) * 0.86)) calc(70% - var(--hurt, 0) * 26%),
    rgba(6, 0, 1, calc(var(--hurt, 0) * 0.98)) 100%
  );
}

.vfn-hurt__pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 52%, transparent 40%, rgba(120, 8, 14, 0.3) 100%);
  opacity: calc(var(--hurt, 0) * 0.8);
  animation: vfn-heartbeat 1.15s ease-in-out infinite;
}

.vfn.is-calm .vfn-hurt__pulse {
  animation: none;
  opacity: calc(var(--hurt, 0) * 0.35);
}

@keyframes vfn-heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.05); }
  28% { transform: scale(1); }
}

/* Degrade, but never past legible: the numbers still have to be readable in a
   hundredth of a second when the player is the one in trouble. */
.vfn-screen--fight.is-hurt .vfn-hud {
  filter: saturate(0.78);
}

.vfn-screen--fight.is-reeling .vfn-hud {
  filter: saturate(0.6);
}

/* Nothing competes with the count or with the corner. */
.vfn-screen--fight.is-quiet .vfn-banners,
.vfn-screen--fight.is-quiet .vfn-hud__bottom {
  opacity: 0;
}

/* The middle of the screen has exactly one owner per frame — see `_centre()` in
   `screens/fight.js`. Without this the round card and the round callout land on
   the same pixels and neither can be read. */
.vfn-screen--fight[data-centre='count'] .vfn-inter,
.vfn-screen--fight[data-centre='count'] .vfn-banners,
.vfn-screen--fight[data-centre='inter'] .vfn-banners {
  display: none;
}

/* interstitials */

.vfn-inter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 6, 10, 0.55), rgba(6, 6, 10, 0.1) 40%, rgba(6, 6, 10, 0.55));
}

.vfn-inter__card {
  padding: clamp(0.8rem, 3vw, 1.6rem) clamp(1.2rem, 6vw, 3.2rem);
  text-align: center;
  background: rgba(6, 6, 11, 0.86);
  border-top: 4px solid var(--blood);
  border-bottom: 4px solid var(--blood);
  box-shadow: var(--shadow);
  max-width: min(92vw, 44rem);
}

.vfn-inter.is-in .vfn-inter__card {
  animation: vfn-slam 0.28s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes vfn-slam {
  from {
    transform: scale(1.14);
    opacity: 0;
  }
}

.vfn-inter__kicker {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 0.72em;
  color: var(--gold);
}

.vfn-inter__title {
  margin: 0.2rem 0;
  font-family: var(--font-poster);
  font-size: clamp(1.8rem, 8vw, 4.2rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.85);
}

.vfn-inter__note {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.88em;
}

/* count + get up */

.vfn-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(60, 2, 6, 0.5), rgba(3, 3, 6, 0.9));
}

.vfn-count__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: min(92vw, 34rem);
  padding: 0 1rem;
  text-align: center;
}

.vfn-count__number {
  font-family: var(--font-poster);
  font-size: clamp(5rem, 26vw, 14rem);
  line-height: 0.85;
  color: var(--ink);
  text-shadow: 8px 8px 0 rgba(0, 0, 0, 0.85);
}

.vfn-count.is-player .vfn-count__number {
  color: var(--blood-2);
}

.vfn-count__number.is-tick {
  animation: vfn-count-tick 0.3s steps(4);
}

.vfn.is-calm .vfn-count__number.is-tick {
  animation: none;
}

@keyframes vfn-count-tick {
  from {
    transform: scale(1.25);
  }
}

.vfn-count__who {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.86em;
  color: var(--gold);
}

.vfn-rise {
  pointer-events: auto;
  touch-action: none;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.7rem;
  background: rgba(6, 6, 11, 0.9);
  border: 2px solid var(--edge);
  border-top: 4px solid var(--good);
}

.vfn-rise__call {
  margin: 0 0 0.5rem;
  font-family: var(--font-poster);
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  line-height: 1;
  color: var(--good);
}

.vfn-rise__bar {
  position: relative;
  height: 34px;
  background: #05050a;
  border: 2px solid var(--edge);
  overflow: hidden;
}

.vfn-rise__track {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, #0d0d15 0 8px, #12121b 8px 16px);
}

.vfn-rise__zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--start, 0.4) * 100%);
  width: calc(var(--span, 0.2) * 100%);
  background: rgba(87, 176, 107, 0.34);
  border-left: 2px solid var(--good);
  border-right: 2px solid var(--good);
}

.vfn-rise__marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: calc(var(--at, 0.5) * 100%);
  width: 6px;
  margin-left: -3px;
  background: var(--ink);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.8);
}

.vfn-rise__marker.is-hot {
  background: var(--good);
}

.vfn-rise__how {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.84em;
  color: var(--ink-2);
}

.vfn-rise__beats {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.vfn-beat {
  width: 26px;
  height: 10px;
  background: #1a1a24;
  border: 1px solid var(--edge);
}

.vfn-beat.is-on {
  background: var(--good);
  border-color: #d8f0dd;
}

/* ------------------------------------------------------------ 13. overlays */

.vfn-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--pad) + var(--safe-t)) calc(var(--pad) + var(--safe-r))
    calc(var(--pad) + var(--safe-b)) calc(var(--pad) + var(--safe-l));
  background: rgba(4, 4, 8, 0.82);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.vfn-overlay__card {
  width: min(100%, 34rem);
  max-height: 100%;
  padding: clamp(1rem, 3vw, 1.8rem);
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-top: 6px solid var(--blood);
  box-shadow: var(--shadow);
}

.vfn-overlay__card--wide {
  position: relative;
  width: min(100%, 68rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
}

.vfn-overlay__kicker {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.72em;
  color: var(--gold);
}

.vfn-overlay__title {
  margin: 0.1rem 0 0.5rem;
  font-family: var(--font-poster);
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.vfn-overlay__foot {
  margin: 0.9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82em;
  color: var(--ink-3);
}

.vfn-pause__line {
  margin: 0;
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 0.88em;
}

/* controls sheet */

.vfn-controls__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vfn-controls__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
}

.vfn-controls__frame {
  padding: 0.45rem 0.7rem 0.5rem;
  background: rgba(214, 192, 106, 0.07);
  border-left: 4px solid var(--gold);
}

.vfn-controls__frame-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.vfn-controls__camera {
  font-size: 0.8em;
  color: var(--gold);
}

/* Scroll affordance: the twelve punches live below the fold on a laptop. */
.vfn-controls__body::after {
  content: '';
  display: block;
  height: 0.6rem;
}

.vfn-overlay__card--wide::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3.1rem;
  height: 2.4rem;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 16, 25, 0), rgba(16, 16, 25, 0.96));
}

.vfn-controls__foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding-top: 0.6rem;
  border-top: 2px solid var(--edge);
  font-size: 0.82em;
  color: var(--ink-3);
}

.vfn-sheet {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.vfn-sheet__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.1rem;
}

.vfn-sheet__heading {
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--blood);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.94em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.vfn-sheet__lede {
  margin: 0 0 0.6rem;
  color: var(--ink-3);
  font-size: 0.84em;
}

.vfn-bind-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vfn-bind {
  display: grid;
  grid-template-columns: minmax(6rem, auto) minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.45rem;
  padding: 0.3rem 0.4rem;
  background: #0f0f18;
  border-left: 3px solid var(--edge);
}

.vfn-bind__text {
  display: flex;
  flex-direction: column;
}

.vfn-bind__name {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.92em;
}

.vfn-bind__detail {
  color: var(--ink-2);
  font-size: 0.8em;
  line-height: 1.32;
}

.vfn-bind__mode {
  font-size: 0.68em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-punches {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.45rem;
}

.vfn-punch {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem;
  background: #0f0f18;
  border-left: 4px solid var(--blood);
}

.vfn-punch--body {
  border-left-color: var(--gold);
}

.vfn-punch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.vfn-punch__name {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.96em;
}

.vfn-punch__meta {
  margin: 0;
  font-size: 0.74em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-punch__recipe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* corner break */

.vfn-overlay--break {
  background: linear-gradient(180deg, rgba(4, 4, 8, 0.78), rgba(4, 4, 8, 0.96));
  align-items: end;
}

/* A phone gives the corner the whole screen: start-aligned so a tall card can
   scroll from its head, and filled so there is never a dead half below it. */
@media (max-width: 860px) {
  .vfn-overlay--break {
    align-items: start;
  }

  .vfn-break {
    min-height: 100%;
  }
}

.vfn-break {
  width: min(100%, 52rem);
  padding: clamp(0.8rem, 2.4vw, 1.4rem);
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-left: 8px solid var(--blood);
  box-shadow: var(--shadow);
}

.vfn-break__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vfn-break__timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.vfn-break__clock {
  font-family: var(--font-poster);
  font-size: clamp(2.4rem, 9vw, 4rem);
  color: var(--gold);
}

.vfn-overlay--break.is-urgent .vfn-break__clock {
  color: var(--blood-2);
}

.vfn-break__timer-tag {
  font-family: var(--font-head);
  font-size: 0.66em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-break__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--pad);
  margin-top: 0.8rem;
}

.vfn-break__say {
  margin: 0;
  padding-left: 0.7rem;
  border-left: 4px solid var(--gold);
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  font-style: italic;
  color: var(--ink);
}

.vfn-break__round {
  margin: 0.6rem 0 0;
  font-family: var(--font-num);
  font-size: 0.8em;
  color: var(--ink-2);
}

.vfn-break__bars {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.7rem 0;
}

.vfn-break__damage {
  margin: 0;
  font-size: 0.84em;
  color: var(--blood-2);
}

.vfn-break__options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vfn-choice {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  background: #101018;
  border-left: 4px solid var(--edge);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}

.vfn-choice:hover,
.vfn-choice:focus-visible {
  border-left-color: var(--gold);
  background: #1d1c26;
}

.vfn-choice__label {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vfn-choice__detail {
  font-size: 0.82em;
  color: var(--ink-2);
}

.vfn-break__chosen {
  margin: 0.6rem 0 0;
  min-height: 1.2em;
  font-family: var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.84em;
  color: var(--gold);
}

.vfn-overlay--break.is-chosen .vfn-break__options {
  opacity: 0.55;
}

/* ------------------------------------------------------------- 14. gym */

/* How much of the bottom of the screen the touch pad owns. The gym panel and
   anything else anchored low is told to stop above it. */
.vfn.is-touch {
  --pad-h: 15.5rem;
}

@media (min-width: 660px) {
  .vfn.is-touch {
    --pad-h: 9rem;
  }
}

.vfn-gym__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 calc(0.6rem + var(--safe-r)) calc(0.6rem + var(--safe-b)) calc(0.6rem + var(--safe-l));
  pointer-events: none;
}

.vfn.is-touch .vfn-gym__panel {
  bottom: var(--pad-h);
}

.vfn-coach {
  pointer-events: auto;
  width: min(100%, 40rem);
  /* Leave the fighter's own numbers visible above the coaching. */
  max-height: min(100%, 58vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(0.7rem, 2vw, 1.1rem);
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-top: 5px solid var(--gold);
  box-shadow: var(--shadow);
}

.vfn-coach__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.vfn-coach__tag {
  font-family: var(--font-head);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.7em;
  color: var(--gold);
}

.vfn-coach__step {
  font-family: var(--font-num);
  font-size: 0.78em;
  color: var(--ink-3);
}

.vfn-coach__title {
  margin: 0.2rem 0 0.3rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.1rem, 3.4vw, 1.7rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.05;
}

.vfn-coach__instruction {
  margin: 0;
  font-size: 1.02em;
}

.vfn-coach__hint {
  margin: 0.4rem 0 0;
  color: var(--ink-3);
  font-size: 0.84em;
}

.vfn-coach.is-done {
  border-top-color: var(--good);
}

.vfn-prompts {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.35rem;
}

.vfn-prompt {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.45rem;
  background: #0f0f18;
  border-left: 3px solid var(--blood);
}

.vfn-prompt__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.86em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vfn-prompt__detail {
  font-size: 0.78em;
  color: var(--ink-3);
}

.vfn-track {
  position: relative;
  height: 8px;
  margin-top: 0.7rem;
  background: #05050a;
  border: 1px solid var(--edge);
  overflow: hidden;
}

.vfn-track__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
  background: linear-gradient(90deg, var(--rope), var(--gold));
}

.vfn-coach__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

/* -------------------------------------------------------- 15. post-fight */

.vfn-post {
  display: flex;
  flex-direction: column;
  gap: var(--pad);
}

.vfn-verdict {
  padding: clamp(1rem, 3vw, 1.8rem);
  text-align: center;
  background: linear-gradient(180deg, rgba(30, 8, 10, 0.94), rgba(6, 6, 11, 0.94));
  border-top: 6px solid var(--blood);
  border-bottom: 6px solid var(--blood);
  box-shadow: var(--shadow);
}

.vfn-verdict.is-win {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(44, 34, 8, 0.94), rgba(6, 6, 11, 0.94));
}

.vfn-verdict.is-draw {
  border-color: var(--ink-3);
}

.vfn-verdict__kicker {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 0.76em;
  color: var(--gold);
}

.vfn-verdict__word {
  margin: 0.2rem 0;
  font-family: var(--font-poster);
  font-size: clamp(2.2rem, 11vw, 6rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 6px 6px 0 rgba(0, 0, 0, 0.85);
}

.vfn-verdict.is-win .vfn-verdict__word {
  color: var(--gold);
}

.vfn-verdict.is-loss .vfn-verdict__word {
  color: var(--blood-2);
}

.vfn-verdict__line {
  margin: 0;
  color: var(--ink);
}

.vfn-verdict__bout {
  margin: 0.3rem 0 0;
  font-size: 0.8em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 0.82em;
}

.vfn-table th,
.vfn-table td {
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--edge);
  text-align: center;
  white-space: nowrap;
}

.vfn-table thead th {
  background: #14141d;
  font-family: var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.vfn-table tbody th {
  text-align: left;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.vfn-cell.is-player {
  background: rgba(193, 18, 31, 0.22);
}

.vfn-cell.is-opponent {
  background: rgba(43, 79, 160, 0.22);
}

.vfn-cell--total {
  background: #14141d;
  color: var(--gold);
  font-weight: 700;
}

.vfn-cell__sep {
  color: var(--ink-3);
  padding: 0 0.15em;
}

.vfn-stats2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--pad);
}

.vfn-side__name {
  margin: 0 0 0.2rem;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.05em;
}

.vfn-side__top {
  margin: 0 0 0.6rem;
  font-family: var(--font-num);
  color: var(--gold);
}

.vfn-splits {
  margin: 0 0 0.7rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vfn-split {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 3.4rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82em;
}

.vfn-split__label {
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.vfn-split__track {
  position: relative;
  height: 9px;
  background: #05050a;
  border: 1px solid var(--edge);
  overflow: hidden;
}

.vfn-split__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
  background: linear-gradient(90deg, #8f2b1e, var(--blood-2));
}

.vfn-split__value {
  font-family: var(--font-num);
  text-align: right;
  color: var(--ink);
}

.vfn-post__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ------------------------------------------------------------- 16. settings */

.vfn-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--pad);
  align-items: start;
}

.vfn-settings__foot {
  display: flex;
  justify-content: flex-end;
}

.vfn-panel--a11y {
  border-left: 6px solid var(--gold);
}

/* ---------------------------------------------------------- 17. touch layer */

.vfn__touch[hidden] {
  display: none;
}

/* The pad owns the bottom band of the screen; the HUD is told to stay above it
   by `.vfn.is-touch` further down. Three areas: feet, defence, gloves. */
.vfn-touch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto;
  grid-template-areas:
    '. . .'
    'def def def'
    'feet . gloves';
  align-items: end;
  gap: 0.35rem;
  padding: 0 calc(0.5rem + var(--safe-r)) calc(0.6rem + var(--safe-b)) calc(0.5rem + var(--safe-l));
}

.vfn-touch__left {
  grid-area: feet;
  pointer-events: auto;
}

.vfn-touch__defence {
  grid-area: def;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem;
  pointer-events: auto;
}

.vfn-touch__defence > .vfn-tbtn {
  flex: 0 1 calc(25% - 0.28rem);
  max-width: 7rem;
}

.vfn-touch__right {
  grid-area: gloves;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  pointer-events: auto;
}

/* Landscape and desktop-with-touch: one strip of chips between feet and gloves. */
@media (min-width: 660px) {
  .vfn-touch {
    grid-template-areas:
      '. . .'
      '. . .'
      'feet def gloves';
    align-items: end;
  }

  .vfn-touch__defence {
    align-self: end;
    padding-bottom: 0.1rem;
  }

  .vfn-touch__defence > .vfn-tbtn {
    flex: 0 0 auto;
    min-width: 4.4rem;
  }
}

.vfn-touch__gloves {
  display: flex;
  gap: 0.35rem;
}

.vfn-stick {
  position: relative;
  width: clamp(7rem, 26vw, 9.5rem);
  height: clamp(7rem, 26vw, 9.5rem);
  background: rgba(6, 6, 11, 0.6);
  border: 2px solid var(--edge);
  touch-action: none;
}

.vfn-stick.is-active {
  border-color: var(--gold);
}

.vfn-stick__ring {
  position: absolute;
  inset: 12%;
  border: 2px dashed rgba(214, 192, 106, 0.35);
}

.vfn-stick__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  height: 34%;
  margin: -17% 0 0 -17%;
  background: var(--blood);
  border: 2px solid #f2e8c9;
  transform: translate(calc(var(--dx, 0) * 100%), calc(var(--dy, 0) * 100%));
}

.vfn-stick__caption {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.66em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.vfn-tbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 44px;
  min-height: 48px;
  padding: 0.3rem 0.35rem;
  background: rgba(9, 9, 15, 0.86);
  border: 2px solid var(--edge);
  color: var(--ink);
  font: inherit;
  text-align: center;
  touch-action: none;
  cursor: pointer;
}

.vfn-tbtn__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.7em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.05;
}

.vfn-tbtn__key {
  font-family: var(--font-num);
  font-size: 0.58em;
  color: var(--ink-3);
}

.vfn-tbtn.is-on {
  background: var(--blood);
  border-color: #f2e8c9;
}

.vfn-glove {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: clamp(4.6rem, 17vw, 6.2rem);
  height: clamp(4.6rem, 17vw, 6.2rem);
  padding: 0.3rem;
  background: rgba(122, 20, 32, 0.85);
  border: 3px solid #f2e8c9;
  color: #fff6e8;
  font: inherit;
  text-align: center;
  touch-action: none;
  cursor: pointer;
}

.vfn-glove--rear {
  background: rgba(43, 58, 99, 0.88);
}

.vfn-glove.is-on {
  background: var(--blood-2);
  transform: scale(0.95);
}

.vfn-glove__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.82em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.vfn-glove__hint {
  font-size: 0.56em;
  line-height: 1.15;
  color: rgba(255, 246, 232, 0.78);
}

/* With the pad on screen the legend and chrome move up under the corners, so
   nothing important sits beneath a thumb. */
.vfn.is-touch .vfn-hud {
  grid-template-rows: auto auto 1fr;
}

.vfn.is-touch .vfn-hud__bottom {
  order: 2;
}

.vfn.is-touch .vfn-hud__mid {
  order: 3;
}

.vfn.is-touch .vfn-legend__hint {
  display: none;
}

.vfn.is-touch .vfn-hud__bottom {
  align-items: flex-start;
}

/* --------------------------------------------------- 18. responsive rules */

@media (max-width: 860px) {
  .vfn-career__cols {
    grid-template-columns: minmax(0, 1fr);
  }

}

/* The corner is a timed decision, and the roster's bell is the point of the
   screen: keep both two-column for as long as there is width for it. */
@media (max-width: 700px) {
  .vfn-break__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On a phone the choice comes first: options and the bell, then the card. */
  .vfn-roster {
    display: flex;
    flex-direction: column;
  }

  .vfn-roster__options {
    position: static;
    order: -1;
  }
}

/* Small screens: the ring is the point, so the HUD gives up its height. The two
   corners become slim bars either side of the clock, flush with the top edge.
   Portrait phones and short landscape phones want exactly the same strip. */
@media (max-width: 640px), (max-height: 560px) and (orientation: landscape) {
  .vfn-hud {
    gap: 0.3rem;
    padding: calc(0.25rem + var(--safe-t)) calc(0.4rem + var(--safe-r)) calc(0.5rem + var(--safe-b))
      calc(0.4rem + var(--safe-l));
  }

  .vfn-hud__top {
    gap: 0.3rem;
  }

  /* Name and knockdowns on one line, the three pools on the next. Nothing else
     survives: a record and a nickname are for a screen with room. */
  .vfn-corner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'id foot'
      'bars bars';
    align-items: center;
    gap: 0.1rem 0.45rem;
    padding: 0.2rem 0.4rem 0.28rem;
    border-width: 1px;
    border-top-width: 3px;
    max-width: none;
  }

  .vfn-corner--opponent {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'foot id'
      'bars bars';
  }

  .vfn-corner__id {
    grid-area: id;
    gap: 0.3rem;
    min-width: 0;
    overflow: hidden;
  }

  .vfn-corner__names {
    min-width: 0;
    flex: 0 1 auto;
  }

  .vfn-corner__foot {
    grid-area: foot;
    gap: 0.35rem;
  }

  /* Three empty slots are a promise nobody has broken yet. On a strip this
     narrow the width belongs to the name until a fighter is actually put down. */
  .vfn-corner__downs:not(.is-scored) {
    display: none;
  }

  .vfn-corner__bars {
    grid-area: bars;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.05rem 0.25rem;
  }

  .vfn-corner__record,
  .vfn-corner__nick {
    display: none;
  }

  .vfn-corner__flag {
    width: 4px;
    height: 13px;
  }

  .vfn-corner__name {
    font-size: 0.82em;
    letter-spacing: 0.03em;
  }

  .vfn-corner__state {
    font-size: 0.58em;
    letter-spacing: 0.08em;
  }

  .vfn-corner__kd {
    font-size: 0.54em;
    letter-spacing: 0.08em;
  }

  .vfn-pip {
    width: 8px;
    height: 8px;
  }

  /* A letter, a colour and a bar. The word stays in the DOM, read out but not
     drawn, so nothing is lost to a screen reader. Scoped to the corner strip:
     the same classes carry the corner-break card, which has room for words. */
  .vfn-corner .vfn-bar,
  .vfn-corner--opponent .vfn-bar {
    grid-template-columns: 0.7rem minmax(0, 1fr);
    gap: 0.15rem;
  }

  .vfn-corner .vfn-bar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .vfn-corner .vfn-bar__short {
    display: block;
    font-size: 0.6em;
  }

  .vfn-corner .vfn-bar__track {
    height: 8px;
    border-width: 1px;
  }

  /* The clock keeps the number and loses the furniture around it. */
  .vfn-clock {
    gap: 0;
    padding: 0.1rem 0.45rem 0.25rem;
    border-width: 1px;
    border-bottom-width: 3px;
    min-width: 4.4rem;
  }

  .vfn-clock__label {
    display: none;
  }

  .vfn-clock__round {
    font-size: 1.15em;
  }

  .vfn-clock__time {
    font-size: clamp(1.4rem, 6.6vw, 2rem);
  }

  .vfn-clock__phase {
    font-size: 0.56em;
    letter-spacing: 0.1em;
  }

  .vfn-clock__warn {
    margin-top: 0.1rem;
    padding: 0.05rem 0.3rem;
    font-size: 0.54em;
    letter-spacing: 0.12em;
  }
}


/* Narrow screens only: a keyboard legend that still fits on one line, and the
   list layouts that have no second column left to give. */
@media (max-width: 640px) {
  .vfn-bind {
    grid-template-columns: minmax(0, 1fr);
  }

  .vfn-hud__bottom {
    flex-direction: column;
    align-items: stretch;
  }

  /* One row of glyphs and keys instead of four rows of sentences. Scoped to the
     HUD legend: the controls reference renders the same rows on their own and
     has a whole sheet of room for the words. */
  .vfn-legend {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    max-width: none;
    padding: 0.3rem 0.5rem;
  }

  .vfn-legend__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .vfn-legend .vfn-legend__rows {
    grid-template-columns: repeat(4, max-content);
    gap: 0 0.55rem;
  }

  .vfn-legend .vfn-legend__row {
    grid-template-columns: 0.8rem auto;
  }

  .vfn-legend .vfn-legend__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .vfn-legend__hint {
    display: none;
  }

  .vfn-stat {
    grid-template-columns: 3.8rem 1fr 1.8rem;
  }

  .vfn-count__number {
    font-size: clamp(6rem, 36vw, 14rem);
  }
}

/* A thumb is holding the screen. The stick already teaches direction and there
   is no keyboard to name, so the legend goes and the two chrome buttons become
   icons. The callout stack shares its band with them, which is why a banner
   costs the ring nothing. */
@media (pointer: coarse) {
  .vfn-legend {
    display: none;
  }

  .vfn-hud,
  .vfn.is-touch .vfn-hud {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .vfn-hud__top {
    grid-row: 1;
  }

  .vfn-hud__mid,
  .vfn.is-touch .vfn-hud__mid,
  .vfn-hud__bottom,
  .vfn.is-touch .vfn-hud__bottom {
    grid-row: 2;
    grid-column: 1;
    order: 0;
    align-items: flex-start;
  }

  .vfn-hud__bottom {
    flex-direction: row;
    justify-content: flex-end;
  }

  /* The callout stack shares its row with the chrome pair, so it keeps a lane
     clear on both sides: centred, and never printed under an icon button. */
  .vfn-banners {
    margin-top: 0;
    max-width: calc(100% - 12rem);
  }

  .vfn-banner {
    text-align: center;
  }

  .vfn-banner__title {
    letter-spacing: 0.08em;
  }

  .vfn-hud__btn {
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.4rem;
    gap: 0;
  }

  .vfn-hud__btn > span {
    display: none;
  }

  .vfn-hud__icon {
    display: block;
  }
}

/* Landscape phones: the HUD must not eat the ring. */
@media (max-height: 520px) and (orientation: landscape) {
  /* The reference sheet gives its whole height to the sheet, not the masthead. */
  .vfn-overlay {
    padding: calc(0.4rem + var(--safe-t)) calc(0.5rem + var(--safe-r)) calc(0.4rem + var(--safe-b))
      calc(0.5rem + var(--safe-l));
  }

  .vfn-overlay__card--wide {
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
  }

  .vfn-overlay__card--wide .vfn-overlay__kicker,
  .vfn-controls__frame .vfn-sheet__lede {
    display: none;
  }

  .vfn-overlay__card--wide .vfn-overlay__title {
    margin: 0;
    font-size: 1.5rem;
  }

  .vfn-controls__frame {
    padding: 0.35rem 0.6rem;
  }

  .vfn-overlay__card--wide::after {
    bottom: 2.4rem;
    height: 1.6rem;
  }

  .vfn-controls__foot {
    padding-top: 0.35rem;
  }

  .vfn-sheet {
    gap: 0.7rem;
  }

  .vfn-corner {
    padding: 0.25rem 0.45rem 0.3rem;
  }

  .vfn-corner__nick {
    display: none;
  }

  .vfn-corner__name {
    font-size: 1rem;
  }

  .vfn-corner__bars {
    gap: 0.12rem;
  }

  /* One horizontal strip, not a four-row block. */
  .vfn-legend {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    max-width: none;
    padding: 0.25rem 0.5rem;
  }

  .vfn-legend__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .vfn-legend .vfn-legend__rows {
    grid-template-columns: repeat(2, max-content);
    gap: 0 0.8rem;
  }

  .vfn-legend .vfn-legend__row {
    font-size: 0.72em;
  }

  /* One callout at a time; there is no room for a stack. */
  .vfn-banner:nth-child(n + 2) {
    display: none;
  }

  .vfn-touch__defence {
    flex-wrap: nowrap;
  }

  /* Share the strip evenly instead of overflowing over the stick. */
  .vfn-touch__defence > .vfn-tbtn {
    flex: 1 1 0;
    min-width: 3rem;
    max-width: 6rem;
    min-height: 44px;
    padding: 0.15rem 0.2rem;
  }

  .vfn-tbtn__name {
    font-size: 0.62em;
  }

  .vfn-tbtn__key {
    font-size: 0.52em;
  }

  .vfn-touch__mods .vfn-tbtn {
    min-height: 44px;
  }

  .vfn-break {
    padding: 0.6rem 0.8rem;
  }

  .vfn-break__grid {
    margin-top: 0.5rem;
    gap: 0.9rem;
  }

  .vfn-break__clock {
    font-size: 2.2rem;
  }

  .vfn-break .vfn-overlay__kicker {
    display: none;
  }

  .vfn-break .vfn-overlay__title {
    margin: 0;
    font-size: 1.5rem;
  }

  .vfn-break__say {
    font-size: 0.95rem;
  }

  /* The count sits beside the beat bar instead of on top of the clock. */
  .vfn-count__stack {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'num rise'
      'who rise';
    align-items: center;
    gap: 0 1.2rem;
    width: min(96vw, 48rem);
    text-align: left;
  }

  .vfn-count__number {
    grid-area: num;
    font-size: clamp(3.4rem, 24vh, 6.5rem);
  }

  .vfn-count__who,
  .vfn-count__live {
    grid-area: who;
  }

  .vfn-rise {
    grid-area: rise;
    margin-top: 0;
  }

  .vfn-rise__call {
    margin-bottom: 0.35rem;
  }

  /* The drill card keeps its instruction and its exits; the prose goes. */
  .vfn-coach {
    padding: 0.5rem 0.7rem;
  }

  .vfn-coach__title {
    margin: 0.1rem 0 0.2rem;
    font-size: 1.1rem;
  }

  .vfn-coach__hint,
  .vfn-prompt__detail {
    display: none;
  }

  .vfn-prompts {
    margin-top: 0.4rem;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  }

  .vfn-coach__acts {
    margin-top: 0.5rem;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .vfn-hud {
    gap: 0.2rem;
    padding: calc(0.35rem + var(--safe-t)) calc(0.5rem + var(--safe-r)) calc(0.35rem + var(--safe-b))
      calc(0.5rem + var(--safe-l));
  }

  .vfn-corner__bars .vfn-bar__track {
    height: 9px;
  }

  .vfn-clock {
    padding: 0.2rem 0.6rem 0.3rem;
    min-width: 6rem;
  }

  .vfn-clock__phase {
    display: none;
  }

  .vfn-legend {
    max-width: 15rem;
  }

  .vfn-legend__hint {
    display: none;
  }

  .vfn-title__word {
    font-size: clamp(2.4rem, 11vh, 4.4rem);
  }

  .vfn-count__number {
    font-size: clamp(3.4rem, 22vh, 7rem);
  }

  .vfn-stick {
    width: clamp(5.5rem, 22vh, 7rem);
    height: clamp(5.5rem, 22vh, 7rem);
  }

  .vfn-glove {
    width: clamp(3.6rem, 15vh, 5rem);
    height: clamp(3.6rem, 15vh, 5rem);
  }

  .vfn-glove__hint {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .vfn *,
  .vfn *::before,
  .vfn *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
