:root {
  color-scheme: dark;
  --void: #070815;
  --void-deep: #03040a;
  --obsidian: #101329;
  --stone: #252842;
  --ivory: #e9e4d5;
  --cyan: #5de7ff;
  --violet: #8067ff;
  --magenta: #ff4fa3;
  --gold: #ffc857;
  --danger: #d92f5a;
  --muted: #9da2bc;
  --panel: rgba(8, 9, 22, 0.91);
  --line: rgba(233, 228, 213, 0.18);
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-right: max(18px, env(safe-area-inset-right));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --safe-left: max(18px, env(safe-area-inset-left));
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void-deep);
  color: var(--ivory);
  overscroll-behavior: none;
}

body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: -80px;
  left: 16px;
  padding: 12px 18px;
  background: var(--ivory);
  color: var(--void);
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100dvh;
  min-height: 420px;
  overflow: clip;
  contain: strict;
  background:
    radial-gradient(circle at 50% 42%, rgba(128, 103, 255, 0.12), transparent 32%),
    var(--void-deep);
}

.keyart,
.grain,
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.keyart {
  z-index: -3;
  background-image:
    linear-gradient(90deg, rgba(3, 4, 10, 0.8) 0%, rgba(3, 4, 10, 0.22) 45%, rgba(3, 4, 10, 0.36) 100%),
    linear-gradient(0deg, rgba(3, 4, 10, 0.78) 0%, transparent 45%, rgba(3, 4, 10, 0.25) 100%),
    url("assets/cathedral-keyart.png");
  background-size: cover;
  background-position: center;
  transition: opacity 1.4s ease, background-position 5s cubic-bezier(0.22, 1, 0.36, 1), filter 1.4s ease;
  animation: keyart-breathe 14s ease-in-out infinite alternate;
}

.app-shell.is-playing .keyart {
  opacity: 0;
  background-position: 50% 48%;
  filter: blur(10px);
  pointer-events: none;
}

.grain {
  z-index: 15;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

#game-canvas {
  z-index: -2;
  display: block;
  touch-action: none;
  cursor: none;
  opacity: 0;
  transition: opacity 900ms ease;
}

.app-shell.is-playing #game-canvas {
  z-index: 0;
  opacity: 1;
}

.app-shell.is-playing .grain {
  opacity: 0.018;
  mix-blend-mode: normal;
}

.boot-curtain {
  position: absolute;
  z-index: 300;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  background: var(--void-deep);
  transition: opacity 700ms ease, visibility 700ms ease;
}

.boot-curtain.is-ready {
  opacity: 0;
  visibility: hidden;
}

.boot-curtain p {
  margin: 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.boot-sigil {
  position: relative;
  width: 86px;
  height: 86px;
}

.boot-sigil span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(93, 231, 255, 0.5);
  border-radius: 50%;
  animation: sigil-load 2.4s linear infinite;
}

.boot-sigil span:nth-child(2) {
  inset: 13px;
  border-color: rgba(128, 103, 255, 0.75);
  animation-direction: reverse;
  animation-duration: 1.8s;
}

.boot-sigil span:nth-child(3) {
  inset: 32px;
  border-color: var(--ivory);
  box-shadow: 0 0 22px var(--cyan);
  animation-duration: 1s;
}

.screen {
  position: absolute;
  z-index: 20;
  inset: 0;
}

.title-screen {
  display: flex;
  flex-direction: column;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background:
    linear-gradient(90deg, rgba(3, 4, 10, 0.2), transparent 55%),
    radial-gradient(circle at 52% 54%, transparent 0 18%, rgba(3, 4, 10, 0.12) 60%, rgba(3, 4, 10, 0.58));
  transition: opacity 700ms ease, visibility 700ms ease, transform 700ms ease;
}

.title-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
}

.utility-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(233, 228, 213, 0.14);
  border-radius: 999px;
  background: rgba(7, 8, 21, 0.5);
  backdrop-filter: blur(14px);
  color: rgba(233, 228, 213, 0.82);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  border-color: rgba(93, 231, 255, 0.48);
  background: rgba(16, 19, 41, 0.78);
  color: white;
  transform: translateY(-1px);
}

.icon-button[aria-pressed="true"] {
  color: var(--danger);
}

.utility-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title-layout {
  display: grid;
  grid-template-columns: minmax(470px, 640px) minmax(240px, 300px);
  align-items: end;
  justify-content: space-between;
  gap: clamp(34px, 8vw, 140px);
  width: min(1220px, 100%);
  margin: auto;
  padding: 32px 34px 22px;
}

.title-copy {
  position: relative;
  animation: title-enter 1.2s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow,
.panel-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow span {
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.title-mark {
  position: absolute;
  z-index: -1;
  top: -82px;
  left: -70px;
  width: 210px;
  height: 210px;
  opacity: 0.45;
  animation: title-mark-turn 32s linear infinite;
}

.title-mark i,
.result-emblem i {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(93, 231, 255, 0.44);
}

.title-mark i:nth-child(1),
.result-emblem i:nth-child(1) {
  inset: 0;
  border-style: dashed;
}

.title-mark i:nth-child(2),
.result-emblem i:nth-child(2) {
  inset: 17%;
  border-color: rgba(255, 79, 163, 0.45);
  border-width: 2px;
}

.title-mark i:nth-child(3),
.result-emblem i:nth-child(3) {
  inset: 34%;
  border-color: rgba(233, 228, 213, 0.7);
}

.title-mark b,
.result-emblem b {
  position: absolute;
  inset: 46%;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 0 14px var(--cyan), 0 0 44px var(--violet);
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  color: white;
  font-size: clamp(48px, 6.2vw, 92px);
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-shadow: 0 3px 36px rgba(5, 6, 16, 0.9);
}

h1 span {
  letter-spacing: 0.04em;
}

h1 em {
  margin: 0 0.12em;
  color: var(--magenta);
  font-size: 0.6em;
  font-style: normal;
  letter-spacing: -0.3em;
  text-shadow: 0 0 18px rgba(255, 79, 163, 0.65);
}

.vow {
  max-width: 490px;
  margin: 24px 0 28px;
  color: rgba(233, 228, 213, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.4vw, 21px);
  font-style: italic;
  line-height: 1.55;
}

.difficulty-chooser {
  display: flex;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 5px;
  border: 1px solid rgba(233, 228, 213, 0.15);
  border-radius: 3px;
  background: rgba(5, 6, 16, 0.62);
  backdrop-filter: blur(14px);
}

.difficulty-chooser legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.difficulty-chooser label {
  cursor: pointer;
}

.difficulty-chooser input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.difficulty-chooser label > span {
  display: flex;
  min-width: 108px;
  flex-direction: column;
  padding: 9px 13px 8px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: 180ms ease;
}

.difficulty-chooser label:hover > span {
  color: var(--ivory);
  background: rgba(128, 103, 255, 0.08);
}

.difficulty-chooser input:checked + span {
  border-color: rgba(93, 231, 255, 0.35);
  background: linear-gradient(135deg, rgba(93, 231, 255, 0.12), rgba(128, 103, 255, 0.13));
  color: white;
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.difficulty-chooser input:focus-visible + span {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.difficulty-chooser b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.difficulty-chooser small {
  margin-top: 3px;
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  position: relative;
  display: inline-flex;
  min-width: 260px;
  min-height: 66px;
  align-items: center;
  gap: 15px;
  justify-content: center;
  padding: 12px 22px;
  overflow: hidden;
  border: 1px solid rgba(93, 231, 255, 0.62);
  border-radius: 2px;
  background:
    linear-gradient(110deg, rgba(93, 231, 255, 0.17), rgba(128, 103, 255, 0.28) 65%, rgba(255, 79, 163, 0.2)),
    rgba(7, 8, 21, 0.76);
  box-shadow: 0 12px 44px rgba(3, 4, 10, 0.5), inset 0 0 22px rgba(93, 231, 255, 0.05);
  color: white;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-button::before {
  content: "";
  position: absolute;
  inset: -100% 56% -100% -25%;
  transform: skewX(-18deg) translateX(-130%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: transform 650ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.6), 0 0 34px rgba(93, 231, 255, 0.18);
}

.primary-button:hover::before {
  transform: skewX(-18deg) translateX(330%);
}

.primary-button:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button b,
.primary-button small {
  display: block;
}

.primary-button b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.primary-button small {
  margin-top: 4px;
  color: rgba(233, 228, 213, 0.58);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button-glyph {
  color: var(--cyan);
  font-size: 25px;
  filter: drop-shadow(0 0 8px var(--cyan));
}

.primary-button.compact {
  min-width: 230px;
  min-height: 52px;
  padding: 10px 18px;
  text-align: center;
}

.text-button {
  padding: 8px 2px;
  border-bottom: 1px solid rgba(233, 228, 213, 0.3);
  background: transparent;
  color: rgba(233, 228, 213, 0.76);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease;
}

.text-button:hover {
  border-color: var(--cyan);
  color: white;
}

.secondary-button {
  min-height: 43px;
  padding: 10px 20px;
  border: 1px solid rgba(233, 228, 213, 0.22);
  background: rgba(16, 19, 41, 0.62);
  color: rgba(233, 228, 213, 0.88);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.secondary-button:hover {
  border-color: rgba(93, 231, 255, 0.65);
  background: rgba(93, 231, 255, 0.08);
  color: white;
}

.title-brief {
  position: relative;
  align-self: end;
  margin-bottom: 9px;
  padding: 24px 24px 22px;
  border-top: 1px solid rgba(93, 231, 255, 0.45);
  border-bottom: 1px solid rgba(233, 228, 213, 0.12);
  background: linear-gradient(135deg, rgba(7, 8, 21, 0.72), rgba(16, 19, 41, 0.38));
  backdrop-filter: blur(13px);
  animation: title-enter 1.2s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.title-brief::before,
.title-brief::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.title-brief::before {
  top: -4px;
  left: -4px;
}

.title-brief::after {
  right: -4px;
  bottom: -4px;
  border-color: var(--magenta);
}

.brief-number {
  margin: 0 0 20px;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.title-brief h2 {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.25;
}

.title-brief ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(233, 228, 213, 0.62);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.title-brief li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(233, 228, 213, 0.08);
}

.title-brief li span {
  width: 24px;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.best-line {
  display: flex;
  justify-content: space-between;
  margin: 21px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.best-line strong {
  color: var(--gold);
  font-weight: 400;
}

.title-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 16px 0;
  border-top: 1px solid rgba(233, 228, 213, 0.1);
  color: rgba(233, 228, 213, 0.58);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.title-footer p {
  margin: 0;
}

.title-footer i {
  margin: 0 8px;
  color: rgba(233, 228, 213, 0.2);
}

kbd {
  display: inline-flex;
  min-width: 22px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid rgba(233, 228, 213, 0.27);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: rgba(233, 228, 213, 0.06);
  color: rgba(233, 228, 213, 0.8);
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  font-weight: 400;
}

.panel-overlay {
  position: absolute;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow-y: auto;
  background:
    radial-gradient(circle at center, rgba(128, 103, 255, 0.09), transparent 46%),
    rgba(3, 4, 10, 0.86);
  backdrop-filter: blur(14px);
  animation: overlay-enter 260ms ease both;
}

.panel-card {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(233, 228, 213, 0.18);
  background:
    linear-gradient(145deg, rgba(16, 19, 41, 0.98), rgba(7, 8, 21, 0.96)),
    var(--panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.66), inset 0 0 80px rgba(128, 103, 255, 0.04);
  text-align: center;
  animation: panel-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel-card::before,
.panel-card::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.panel-card::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}

.panel-card::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--magenta);
  border-bottom: 1px solid var(--magenta);
}

.panel-card .panel-kicker,
.upgrade-shell .panel-kicker {
  justify-content: center;
  margin-bottom: 10px;
}

.panel-card h2,
.upgrade-shell h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: 0.015em;
}

.codex-card {
  width: min(760px, 100%);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 30px 0 24px;
}

.control-grid article {
  min-width: 0;
  padding: 18px 10px;
  border: 1px solid rgba(233, 228, 213, 0.11);
  background: rgba(233, 228, 213, 0.025);
}

.control-grid article > kbd {
  min-height: 34px;
  margin-bottom: 13px;
  border-color: rgba(93, 231, 255, 0.35);
  color: var(--cyan);
}

.control-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.control-grid p,
.codex-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.codex-note {
  margin-bottom: 22px;
}

.settings-card {
  width: min(620px, 100%);
}

.settings-list {
  display: grid;
  gap: 1px;
  margin: 26px 0;
  text-align: left;
}

.range-setting,
.toggle-setting {
  display: grid;
  align-items: center;
  min-height: 60px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(233, 228, 213, 0.08);
  background: rgba(233, 228, 213, 0.018);
}

.range-setting {
  grid-template-columns: 1fr minmax(100px, 180px) 46px;
  gap: 14px;
}

.toggle-setting {
  position: relative;
  grid-template-columns: 1fr 42px;
  cursor: pointer;
}

.range-setting b,
.range-setting small,
.toggle-setting b,
.toggle-setting small {
  display: block;
}

.range-setting b,
.toggle-setting b {
  color: rgba(233, 228, 213, 0.9);
  font-size: 12px;
  font-weight: 400;
}

.range-setting small,
.toggle-setting small {
  margin-top: 3px;
  color: rgba(157, 162, 188, 0.7);
  font-size: 9px;
}

.range-setting input[type="range"] {
  width: 100%;
  height: 3px;
  accent-color: var(--cyan);
}

.range-setting output {
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 10px;
  text-align: right;
}

.toggle-setting input {
  position: absolute;
  opacity: 0;
}

.toggle-setting i {
  position: relative;
  width: 38px;
  height: 20px;
  border: 1px solid rgba(233, 228, 213, 0.2);
  border-radius: 999px;
  background: rgba(3, 4, 10, 0.8);
  transition: 160ms ease;
}

.toggle-setting i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: 180ms ease;
}

.toggle-setting input:checked + i {
  border-color: rgba(93, 231, 255, 0.55);
  background: rgba(93, 231, 255, 0.11);
}

.toggle-setting input:checked + i::after {
  left: 21px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(93, 231, 255, 0.72);
}

.toggle-setting input:focus-visible + i {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.intro-screen {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  background: rgba(3, 4, 10, 0.5);
  text-align: center;
  animation: intro-reveal 3.8s ease both;
}

.intro-screen p {
  margin: 10px 0 0;
  color: rgba(233, 228, 213, 0.6);
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.intro-screen h2 {
  margin: 13px 0 0;
  font-size: clamp(38px, 7vw, 74px);
  font-weight: 400;
}

.intro-screen .text-button {
  margin-top: 50px;
  opacity: 0.65;
}

.intro-sigil {
  position: relative;
  width: 116px;
  height: 116px;
  margin-bottom: 22px;
}

.intro-sigil i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(93, 231, 255, 0.45);
  border-radius: 50%;
  animation: title-mark-turn 10s linear infinite;
}

.intro-sigil i:nth-child(2) {
  inset: 18px;
  border-style: dashed;
  border-color: rgba(255, 79, 163, 0.52);
  animation-direction: reverse;
}

.intro-sigil i:nth-child(3) {
  inset: 46px;
  background: var(--ivory);
  border: 0;
  box-shadow: 0 0 18px white, 0 0 56px var(--cyan), 0 0 110px var(--violet);
}

.hud {
  position: absolute;
  z-index: 30;
  inset: 0;
  pointer-events: none;
  font-family: "Courier New", monospace;
}

.hud-block {
  position: absolute;
  min-width: 170px;
  padding: 12px 14px;
  border-color: rgba(233, 228, 213, 0.16);
  background: linear-gradient(110deg, rgba(7, 8, 21, 0.76), rgba(16, 19, 41, 0.36));
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.hud-label {
  display: block;
  color: rgba(233, 228, 213, 0.52);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hud-block strong {
  display: block;
  margin-top: 5px;
  color: white;
  font-weight: 400;
}

.score-block {
  top: var(--safe-top);
  left: var(--safe-left);
  border-top: 1px solid rgba(93, 231, 255, 0.42);
  border-left: 1px solid rgba(233, 228, 213, 0.12);
}

.score-block strong {
  font-size: clamp(18px, 2.1vw, 28px);
  letter-spacing: 0.05em;
}

.score-block p {
  position: relative;
  margin: 6px 0 0;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.score-block p i {
  display: block;
  width: 0;
  height: 1px;
  margin-top: 5px;
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
  transition: width 100ms linear;
}

.wave-block {
  top: var(--safe-top);
  right: var(--safe-right);
  border-top: 1px solid rgba(255, 79, 163, 0.4);
  border-right: 1px solid rgba(233, 228, 213, 0.12);
  text-align: right;
}

.wave-block strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.wave-block p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.health-block {
  bottom: var(--safe-bottom);
  left: var(--safe-left);
  width: min(280px, calc(50vw - 28px));
  border-bottom: 1px solid rgba(93, 231, 255, 0.42);
  border-left: 1px solid rgba(233, 228, 213, 0.12);
}

.health-block > div:first-child {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.health-block strong {
  color: var(--ivory);
  font-size: 10px;
}

.meter {
  position: relative;
  height: 4px;
  overflow: hidden;
  background: rgba(233, 228, 213, 0.1);
}

.meter i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(90deg, var(--cyan), white);
  box-shadow: 0 0 9px var(--cyan);
  transform-origin: left;
  transition: width 180ms ease;
}

.health-meter {
  height: 7px;
  margin-top: 8px;
}

.health-meter b {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(7, 8, 21, 0.85) calc(10% - 1px) 10%);
}

.health-block.is-low .health-meter i {
  background: linear-gradient(90deg, var(--danger), var(--gold));
  box-shadow: 0 0 13px var(--danger);
  animation: low-life 700ms ease-in-out infinite alternate;
}

.power-block {
  right: var(--safe-right);
  bottom: var(--safe-bottom);
  display: grid;
  width: min(260px, calc(50vw - 28px));
  gap: 10px;
  border-right: 1px solid rgba(233, 228, 213, 0.12);
  border-bottom: 1px solid rgba(128, 103, 255, 0.45);
}

.power-row {
  display: grid;
  grid-template-columns: 1fr 52%;
  align-items: end;
  gap: 12px;
}

.power-row span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.power-row small {
  color: rgba(233, 228, 213, 0.62);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.power-row b {
  color: var(--violet);
  font-size: 8px;
  font-weight: 400;
}

.dash-meter i {
  background: var(--cyan);
}

.ability-meter i {
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  box-shadow: 0 0 9px var(--violet);
}

.pause-button {
  position: absolute;
  z-index: 3;
  top: calc(var(--safe-top) + 2px);
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translateX(-50%);
  border: 1px solid rgba(233, 228, 213, 0.16);
  border-radius: 50%;
  background: rgba(7, 8, 21, 0.58);
  color: rgba(233, 228, 213, 0.58);
  pointer-events: auto;
  cursor: pointer;
  transition: 160ms ease;
}

.pause-button:hover {
  border-color: var(--cyan);
  color: white;
}

.boss-hud {
  position: absolute;
  z-index: 35;
  top: calc(var(--safe-top) + 80px);
  left: 50%;
  width: min(620px, calc(100vw - 80px));
  transform: translateX(-50%);
  text-align: center;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.8));
}

.boss-hud > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 7px;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 0.11em;
}

.boss-hud small {
  color: var(--gold);
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.boss-meter {
  position: relative;
  height: 8px;
  padding: 2px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  background: rgba(3, 4, 10, 0.75);
}

.boss-meter i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--danger), var(--magenta), var(--gold));
  box-shadow: 0 0 12px rgba(255, 79, 163, 0.55);
  transition: width 180ms linear;
}

.boss-meter b {
  position: absolute;
  inset: 2px;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(3, 4, 10, 0.8) calc(10% - 1px) 10%);
}

.announcement {
  position: absolute;
  z-index: 70;
  top: 50%;
  left: 50%;
  width: min(720px, 90vw);
  padding: 25px 40px;
  transform: translate(-50%, -50%);
  border-top: 1px solid rgba(233, 228, 213, 0.24);
  border-bottom: 1px solid rgba(233, 228, 213, 0.24);
  background: linear-gradient(90deg, transparent, rgba(7, 8, 21, 0.8) 20% 80%, transparent);
  text-align: center;
  pointer-events: none;
  animation: announce 2.7s ease both;
}

.announcement span {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
}

.announcement strong {
  display: block;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 4vw, 47px);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.upgrade-overlay {
  background:
    radial-gradient(circle at center, rgba(128, 103, 255, 0.17), transparent 42%),
    rgba(3, 4, 10, 0.9);
}

.upgrade-shell {
  width: min(1040px, 100%);
  text-align: center;
}

.upgrade-shell > p:not(.panel-kicker) {
  margin: 10px 0 28px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
}

.upgrade-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 2vw, 22px);
}

.upgrade-card {
  position: relative;
  min-height: 310px;
  padding: 30px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(233, 228, 213, 0.17);
  background:
    radial-gradient(circle at 50% 20%, rgba(128, 103, 255, 0.13), transparent 38%),
    linear-gradient(160deg, rgba(16, 19, 41, 0.96), rgba(7, 8, 21, 0.98));
  color: var(--ivory);
  text-align: center;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.upgrade-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(233, 228, 213, 0.07);
  pointer-events: none;
}

.upgrade-card::after {
  content: attr(data-number);
  position: absolute;
  top: 14px;
  right: 17px;
  color: rgba(233, 228, 213, 0.24);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.upgrade-card:hover,
.upgrade-card:focus-visible {
  z-index: 2;
  transform: translateY(-9px);
  border-color: rgba(93, 231, 255, 0.66);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.52), 0 0 35px rgba(93, 231, 255, 0.09);
}

.upgrade-card.rare {
  border-color: rgba(255, 200, 87, 0.34);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 200, 87, 0.14), transparent 38%),
    linear-gradient(160deg, rgba(30, 24, 42, 0.98), rgba(7, 8, 21, 0.98));
}

.upgrade-card.rare:hover {
  border-color: var(--gold);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.52), 0 0 35px rgba(255, 200, 87, 0.12);
}

.upgrade-glyph {
  position: relative;
  display: grid;
  width: 102px;
  height: 102px;
  place-items: center;
  margin: 0 auto 28px;
  border: 1px solid rgba(93, 231, 255, 0.28);
  border-radius: 50%;
  color: var(--cyan);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 43px;
  text-shadow: 0 0 18px rgba(93, 231, 255, 0.65);
}

.upgrade-glyph::before,
.upgrade-glyph::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(128, 103, 255, 0.26);
  border-radius: 50%;
}

.upgrade-glyph::before {
  inset: 9px;
  border-style: dashed;
}

.upgrade-glyph::after {
  inset: 22px;
}

.rare .upgrade-glyph {
  border-color: rgba(255, 200, 87, 0.46);
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 200, 87, 0.55);
}

.upgrade-rarity {
  display: block;
  margin-bottom: 8px;
  color: var(--violet);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rare .upgrade-rarity {
  color: var(--gold);
}

.upgrade-card h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.upgrade-card p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.keyboard-hint {
  display: block;
  margin-top: 22px;
  color: rgba(233, 228, 213, 0.45);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pause-card {
  display: grid;
  justify-items: center;
  gap: 13px;
}

.pause-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 1px;
  margin: 14px 0;
  background: rgba(233, 228, 213, 0.08);
}

.pause-stats span {
  padding: 12px;
  background: var(--obsidian);
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pause-stats b {
  display: block;
  margin-top: 5px;
  color: var(--ivory);
  font-size: 13px;
  font-weight: 400;
}

.danger-text {
  border-color: rgba(217, 47, 90, 0.35);
  color: rgba(217, 47, 90, 0.75);
}

.danger-text:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.result-overlay {
  background:
    radial-gradient(circle at 50% 32%, rgba(93, 231, 255, 0.12), transparent 36%),
    rgba(3, 4, 10, 0.89);
}

.result-overlay.is-victory {
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 200, 87, 0.18), transparent 38%),
    rgba(3, 4, 10, 0.86);
}

.result-card {
  display: grid;
  width: min(620px, 100%);
  justify-items: center;
}

.result-emblem {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 22px;
  animation: title-mark-turn 24s linear infinite;
}

.is-victory .result-emblem i:nth-child(1),
.is-victory .result-emblem i:nth-child(2) {
  border-color: rgba(255, 200, 87, 0.6);
}

.is-victory .result-emblem b {
  box-shadow: 0 0 18px white, 0 0 45px var(--gold);
}

.result-cause {
  max-width: 440px;
  margin: 12px 0 20px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
}

.result-score {
  width: 100%;
  padding: 17px;
  border-top: 1px solid rgba(233, 228, 213, 0.13);
  border-bottom: 1px solid rgba(233, 228, 213, 0.13);
}

.result-score span,
.result-score small {
  display: block;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.result-score strong {
  display: block;
  margin: 5px 0;
  color: white;
  font-family: "Courier New", monospace;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.result-score small {
  color: var(--gold);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  margin: 16px 0 24px;
}

.result-stats div {
  padding: 10px 8px;
  border-right: 1px solid rgba(233, 228, 213, 0.09);
}

.result-stats div:last-child {
  border-right: 0;
}

.result-stats dt {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-stats dd {
  margin: 6px 0 0;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.result-card > .text-button {
  margin-top: 12px;
}

.touch-controls {
  position: absolute;
  z-index: 45;
  inset: 0;
  pointer-events: none;
}

.touch-stick {
  position: absolute;
  bottom: max(38px, env(safe-area-inset-bottom));
  width: 116px;
  height: 116px;
  border: 1px solid rgba(233, 228, 213, 0.13);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 32%, rgba(93, 231, 255, 0.055) 33% 35%, transparent 36%),
    rgba(7, 8, 21, 0.26);
  pointer-events: auto;
  touch-action: none;
}

.touch-stick::before,
.touch-stick::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(233, 228, 213, 0.11);
  transform: translate(-50%, -50%);
}

.touch-stick::before {
  width: 70%;
  height: 1px;
}

.touch-stick::after {
  width: 1px;
  height: 70%;
}

.touch-stick i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(93, 231, 255, 0.52);
  border-radius: 50%;
  background: rgba(16, 19, 41, 0.7);
  box-shadow: inset 0 0 18px rgba(93, 231, 255, 0.08);
}

.touch-stick span {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(233, 228, 213, 0.5);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.move-stick {
  left: max(20px, env(safe-area-inset-left));
}

.aim-stick {
  right: max(20px, env(safe-area-inset-right));
}

.aim-stick i {
  border-color: rgba(255, 79, 163, 0.52);
  box-shadow: inset 0 0 18px rgba(255, 79, 163, 0.08);
}

.touch-action {
  position: absolute;
  display: grid;
  width: 62px;
  height: 62px;
  place-content: center;
  border: 1px solid rgba(233, 228, 213, 0.2);
  border-radius: 50%;
  background: rgba(7, 8, 21, 0.57);
  color: var(--ivory);
  pointer-events: auto;
  touch-action: none;
}

.touch-action b {
  color: var(--cyan);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.touch-action span {
  color: rgba(233, 228, 213, 0.56);
  font-family: "Courier New", monospace;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.dash-action {
  right: max(154px, calc(env(safe-area-inset-right) + 134px));
  bottom: max(40px, env(safe-area-inset-bottom));
}

.ability-action {
  right: max(139px, calc(env(safe-area-inset-right) + 119px));
  bottom: max(113px, calc(env(safe-area-inset-bottom) + 93px));
}

.touch-action:active {
  transform: scale(0.94);
  border-color: var(--cyan);
  background: rgba(93, 231, 255, 0.12);
}

@media (pointer: coarse), (hover: none) {
  .utility-label {
    display: none;
  }

  .icon-button {
    width: 42px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 900px) {
  .title-layout {
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 16px;
  }

  .title-brief {
    display: none;
  }

  .title-copy {
    max-width: 610px;
  }

  .title-footer p:last-child {
    display: none;
  }

  .control-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .control-grid article:nth-child(n + 4) {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .app-shell {
    min-height: 0;
  }

  .keyart {
    background-position: 58% center;
  }

  .title-screen {
    overflow-y: auto;
  }

  .utility-nav {
    position: relative;
    z-index: 4;
  }

  .title-layout {
    width: 100%;
    min-height: calc(100% - 104px);
    margin: 0;
    padding: 14px 2px 16px;
  }

  .title-copy {
    align-self: center;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 8px;
    letter-spacing: 0.17em;
  }

  .eyebrow span {
    width: 18px;
  }

  h1 {
    font-size: clamp(42px, 14vw, 66px);
    line-height: 0.94;
  }

  h1 span {
    width: 100%;
  }

  h1 em {
    margin-left: 0;
  }

  .vow {
    max-width: 330px;
    margin: 18px 0 20px;
    font-size: 15px;
  }

  .difficulty-chooser {
    width: 100%;
  }

  .difficulty-chooser label {
    flex: 1;
  }

  .difficulty-chooser label > span {
    min-width: 0;
    padding: 9px 7px 8px;
  }

  .title-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .primary-button {
    width: 100%;
  }

  .text-button {
    align-self: center;
  }

  .title-footer {
    justify-content: center;
    color: rgba(233, 228, 213, 0.68);
    font-size: 10px;
    text-align: center;
  }

  .announcement {
    top: 43%;
    width: calc(100vw - 34px);
    padding: 14px 16px;
  }

  .announcement span {
    margin-bottom: 5px;
    font-size: 8px;
  }

  .announcement strong {
    font-size: clamp(21px, 7vw, 29px);
  }

  .title-footer kbd {
    display: none;
  }

  .title-footer i {
    display: inline;
    margin: 0 6px;
  }

  .control-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 50vh;
    overflow-y: auto;
  }

  .settings-card,
  .codex-card,
  .pause-card,
  .result-card {
    padding: 25px 18px;
  }

  .range-setting {
    grid-template-columns: 1fr 100px 39px;
  }

  .upgrade-overlay {
    place-items: start center;
  }

  .upgrade-shell {
    padding: 5px 0 20px;
  }

  .upgrade-shell > p:not(.panel-kicker) {
    margin-bottom: 16px;
  }

  .upgrade-cards {
    grid-template-columns: 1fr;
  }

  .upgrade-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    grid-template-rows: auto auto 1fr;
    min-height: 116px;
    align-items: center;
    padding: 17px 23px 17px 17px;
    text-align: left;
  }

  .upgrade-glyph {
    grid-row: 1 / 4;
    width: 56px;
    height: 56px;
    margin: 0;
    font-size: 25px;
  }

  .upgrade-glyph::before {
    inset: 6px;
  }

  .upgrade-glyph::after {
    inset: 14px;
  }

  .upgrade-rarity {
    margin: 0 0 3px;
  }

  .upgrade-card h3 {
    margin: 0 0 3px;
    font-size: 18px;
  }

  .upgrade-card p {
    width: 100%;
    font-size: 10px;
  }

  .hud-block {
    min-width: 130px;
    padding: 9px 10px;
  }

  .score-block strong {
    font-size: 17px;
  }

  .wave-block strong {
    font-size: 14px;
  }

  .health-block,
  .power-block {
    bottom: calc(var(--safe-bottom) + 142px);
    width: calc(50vw - 20px);
  }

  .power-row {
    display: block;
  }

  .power-row span {
    margin-bottom: 4px;
  }

  .boss-hud {
    top: calc(var(--safe-top) + 70px);
    width: calc(100vw - 34px);
  }

  .boss-hud > div:first-child {
    font-size: 8px;
  }

  .result-stats {
    grid-template-columns: 1fr 1fr;
  }

  .result-stats div:nth-child(2) {
    border-right: 0;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .title-layout {
    align-items: center;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .title-mark,
  .title-brief,
  .vow {
    display: none;
  }

  h1 {
    font-size: clamp(42px, 8vw, 68px);
  }

  .difficulty-chooser {
    margin: 20px 0 15px;
  }

  .title-footer {
    display: none;
  }

  .utility-nav {
    position: absolute;
    z-index: 4;
    top: var(--safe-top);
    right: var(--safe-right);
  }

  .touch-stick {
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 96px;
    height: 96px;
  }

  .touch-stick i {
    width: 40px;
    height: 40px;
  }

  .dash-action {
    right: max(125px, calc(env(safe-area-inset-right) + 105px));
    bottom: max(20px, env(safe-area-inset-bottom));
  }

  .ability-action {
    right: max(118px, calc(env(safe-area-inset-right) + 98px));
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 68px));
  }

  .health-block,
  .power-block {
    bottom: var(--safe-bottom);
    width: min(250px, calc(50vw - 120px));
  }

  .upgrade-card {
    min-height: 230px;
    padding-top: 20px;
  }

  .upgrade-glyph {
    width: 74px;
    height: 74px;
    margin-bottom: 15px;
    font-size: 33px;
  }

  .panel-card {
    padding-top: 22px;
    padding-bottom: 22px;
  }
}

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

html[data-flashes="reduced"] .grain {
  display: none;
}

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

@keyframes keyart-breathe {
  from { background-position: 49.5% 50.2%; filter: brightness(0.96); }
  to { background-position: 50.5% 49.8%; filter: brightness(1.04); }
}

@keyframes sigil-load {
  to { transform: rotate(360deg); }
}

@keyframes title-enter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes title-mark-turn {
  to { transform: rotate(360deg); }
}

@keyframes overlay-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes intro-reveal {
  0% { opacity: 0; }
  15%, 72% { opacity: 1; }
  100% { opacity: 0.94; }
}

@keyframes announce {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(0.72); filter: blur(8px); }
  17%, 72% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.08); filter: blur(3px); }
}

@keyframes low-life {
  from { opacity: 0.62; }
  to { opacity: 1; }
}
