:root {
  color-scheme: dark;
  --ink-950: #0a0b11;
  --ink-900: #11131d;
  --ink-850: #171a26;
  --ink-800: #202332;
  --ink-700: #2e3244;
  --paper: #f6ecd9;
  --paper-muted: #bdb5aa;
  --ember: #f09a54;
  --ember-bright: #ffc36d;
  --ember-deep: #b94f3d;
  --blood: #d65a60;
  --blood-deep: #872f42;
  --aether: #62c8ba;
  --aether-deep: #267f7a;
  --guard: #7ab6d8;
  --gold: #e4b85e;
  --shadow-lg: 0 24px 70px rgb(0 0 0 / 45%);
  --shadow-card: 0 12px 26px rgb(0 0 0 / 32%);
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink-950);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgb(185 79 61 / 24%), transparent 34rem),
    linear-gradient(165deg, #171621 0%, var(--ink-950) 72%);
  color: var(--paper);
  font-family:
    "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

button {
  color: inherit;
  font: inherit;
}

button,
.hand {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid var(--ember-bright);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ember {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ember-bright);
  box-shadow: 0 0 16px 4px rgb(240 154 84 / 35%);
  opacity: 0;
  animation: ember-rise 8s linear infinite;
}

.ember--one {
  bottom: 4%;
  left: 18%;
}

.ember--two {
  bottom: -4%;
  left: 72%;
  animation-delay: 2.6s;
  animation-duration: 10s;
}

.ember--three {
  bottom: 8%;
  left: 48%;
  animation-delay: 5.1s;
  animation-duration: 9s;
}

.game-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding:
    calc(10px + env(safe-area-inset-top))
    calc(12px + env(safe-area-inset-right))
    0
    calc(12px + env(safe-area-inset-left));
  background:
    linear-gradient(rgb(255 255 255 / 2%), rgb(255 255 255 / 0%)),
    var(--ink-900);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 3px 2px 10px;
  border-bottom: 1px solid rgb(246 236 217 / 9%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand__mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgb(240 154 84 / 55%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(240 154 84 / 22%), transparent 65%);
  color: var(--ember-bright);
  font-size: 22px;
}

.brand__eyebrow,
.combatant__role,
.section-heading__eyebrow,
.energy-panel__label,
.modal__eyebrow {
  margin: 0;
  color: var(--paper-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand h1 {
  margin: -1px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.turn-label {
  min-width: 68px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid rgb(246 236 217 / 10%);
  border-radius: 999px;
  background: rgb(255 255 255 / 3%);
  color: var(--paper-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(246 236 217 / 12%);
  border-radius: 50%;
  background: var(--ink-850);
  color: var(--paper-muted);
  cursor: pointer;
  font-size: 21px;
  touch-action: manipulation;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.icon-button:active {
  transform: scale(0.94);
}

.battlefield {
  display: grid;
  gap: 8px;
  padding-block: 10px 8px;
}

.combatant {
  position: relative;
  border: 1px solid rgb(246 236 217 / 9%);
  border-radius: var(--radius-md);
  background:
    linear-gradient(115deg, rgb(255 255 255 / 5%), transparent 45%),
    var(--ink-850);
  box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
}

.combatant--enemy {
  min-height: 176px;
  padding: 12px;
  overflow: hidden;
}

.combatant--enemy::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 74%, rgb(214 90 96 / 16%), transparent 36%),
    linear-gradient(90deg, transparent 58%, rgb(214 90 96 / 6%));
  content: "";
  pointer-events: none;
}

.combatant--player {
  padding: 10px 12px;
}

.combatant__heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.combatant__heading h2 {
  margin: 1px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.block-chip {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgb(122 182 216 / 40%);
  border-radius: 999px;
  background: rgb(38 127 122 / 18%);
  color: #b9e8ff;
  font-size: 12px;
  font-weight: 800;
}

.health-track {
  position: relative;
  z-index: 2;
  height: 9px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 999px;
  background: #090a0f;
}

.health-track__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: width 320ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.health-track--enemy .health-track__fill {
  background: linear-gradient(90deg, var(--blood-deep), var(--blood));
  box-shadow: 0 0 12px rgb(214 90 96 / 32%);
}

.health-track--player .health-track__fill {
  background: linear-gradient(90deg, var(--aether-deep), var(--aether));
  box-shadow: 0 0 12px rgb(98 200 186 / 28%);
}

.health-track.is-low .health-track__fill {
  animation: low-health-pulse 1.25s ease-in-out infinite;
}

.health-copy {
  position: relative;
  z-index: 2;
  margin: 3px 0 0;
  color: var(--paper-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.health-copy strong {
  color: var(--paper);
  font-size: 13px;
}

.enemy-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(92px, 0.9fr) minmax(142px, 1.15fr);
  align-items: end;
  gap: 12px;
  min-height: 88px;
  margin-top: -5px;
}

.enemy-portrait {
  position: relative;
  display: grid;
  width: 98px;
  height: 82px;
  place-items: center;
  justify-self: center;
}

.enemy-portrait__halo {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px solid rgb(214 90 96 / 28%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgb(214 90 96 / 16%), transparent 64%),
    conic-gradient(from 45deg, transparent, rgb(240 154 84 / 15%), transparent);
  animation: halo-turn 12s linear infinite;
}

.enemy-portrait__crest {
  position: relative;
  z-index: 2;
  display: grid;
  width: 52px;
  height: 58px;
  place-items: center;
  clip-path: polygon(20% 8%, 50% 0, 80% 8%, 100% 42%, 82% 100%, 18% 100%, 0 42%);
  background:
    linear-gradient(145deg, rgb(255 255 255 / 13%), transparent 48%),
    #292838;
  color: #d5c4b9;
  filter: drop-shadow(0 9px 8px rgb(0 0 0 / 45%));
  font-family: "Yu Mincho", serif;
  font-size: 25px;
}

.enemy-portrait__shadow {
  position: absolute;
  bottom: 1px;
  width: 84px;
  height: 12px;
  border-radius: 50%;
  background: rgb(0 0 0 / 40%);
  filter: blur(5px);
}

.intent-panel {
  align-self: center;
  padding: 9px 10px;
  border: 1px solid rgb(240 154 84 / 22%);
  border-radius: var(--radius-sm);
  background: rgb(10 11 17 / 58%);
  box-shadow: inset 3px 0 0 rgb(240 154 84 / 58%);
}

.intent-panel[data-kind="guard"] {
  border-color: rgb(122 182 216 / 25%);
  box-shadow: inset 3px 0 0 rgb(122 182 216 / 65%);
}

.intent-panel__label {
  margin: 0 0 4px;
  color: var(--paper-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.intent-panel__content {
  display: flex;
  align-items: center;
  gap: 9px;
}

.intent-panel__icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgb(214 90 96 / 15%);
  color: #ff9b83;
  font-size: 18px;
}

.intent-panel[data-kind="guard"] .intent-panel__icon {
  background: rgb(122 182 216 / 14%);
  color: #a8dafa;
}

.intent-panel strong {
  display: block;
  font-size: 14px;
}

.intent-panel p:last-child {
  margin: 0;
  color: var(--paper-muted);
  font-size: 13px;
}

.battle-feed {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 7px 10px;
  border-block: 1px solid rgb(246 236 217 / 8%);
}

.phase-label {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgb(98 200 186 / 11%);
  color: #94ded4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  white-space: nowrap;
}

.phase-label[data-phase="enemy"] {
  background: rgb(214 90 96 / 11%);
  color: #ef9298;
}

.phase-label[data-phase="result"],
.phase-label[data-phase="intro"] {
  background: rgb(228 184 94 / 10%);
  color: var(--gold);
}

.battle-feed p {
  margin: 0;
  color: #d8d1c7;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.hand-section {
  min-width: 0;
  padding-top: 3px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 3px 7px;
}

.section-heading h2 {
  margin: -1px 0 0;
  font-size: 17px;
}

.hand-hint {
  margin: 0;
  color: var(--paper-muted);
  font-size: 12px;
}

.hand {
  display: flex;
  min-height: 185px;
  gap: 9px;
  margin-inline: -12px;
  padding: 6px 22px 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 22px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgb(240 154 84 / 28%) transparent;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
}

.hand::after {
  width: 2px;
  flex: 0 0 2px;
  content: "";
}

.hand--empty {
  display: grid;
  margin-inline: 0;
  place-items: center;
}

.empty-hand {
  margin: 0;
  color: var(--paper-muted);
  font-size: 14px;
}

.card {
  position: relative;
  display: flex;
  width: clamp(112px, 31vw, 128px);
  min-width: clamp(112px, 31vw, 128px);
  height: 174px;
  flex-direction: column;
  padding: 11px 10px 10px;
  overflow: hidden;
  border: 1px solid rgb(246 236 217 / 21%);
  border-radius: 14px;
  background:
    linear-gradient(150deg, rgb(255 255 255 / 9%), transparent 36%),
    linear-gradient(180deg, #292b3a, #191b26);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  scroll-snap-align: center;
  text-align: left;
  touch-action: manipulation;
  transform: translateY(0);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--ember);
  content: "";
}

.card--guard::before {
  background: var(--guard);
}

.card--heavy::before {
  background: var(--gold);
}

.card:active:not(:disabled) {
  transform: translateY(-4px) scale(0.98);
}

.card:disabled {
  cursor: not-allowed;
}

.card.is-unaffordable {
  filter: saturate(0.35);
  opacity: 0.52;
}

.card.is-locked:not(.is-unaffordable) {
  opacity: 0.7;
}

.card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 5px;
}

.card__name {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.card__cost {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #9ee7df, var(--aether-deep));
  color: #081512;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 3px 10px rgb(0 0 0 / 28%);
}

.card__art {
  display: grid;
  min-height: 58px;
  margin: 8px 0 6px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 9px;
  background:
    radial-gradient(circle, rgb(240 154 84 / 18%), transparent 60%),
    rgb(0 0 0 / 12%);
}

.card--guard .card__art {
  background:
    radial-gradient(circle, rgb(122 182 216 / 17%), transparent 60%),
    rgb(0 0 0 / 12%);
}

.card--heavy .card__art {
  background:
    radial-gradient(circle, rgb(228 184 94 / 18%), transparent 60%),
    rgb(0 0 0 / 12%);
}

.card__symbol {
  color: var(--ember-bright);
  font-size: 29px;
  line-height: 1;
  text-shadow: 0 0 16px rgb(240 154 84 / 40%);
}

.card--guard .card__symbol {
  color: #a8dafa;
  text-shadow: 0 0 16px rgb(122 182 216 / 36%);
}

.card--heavy .card__symbol {
  color: #f1cd7b;
  text-shadow: 0 0 16px rgb(228 184 94 / 38%);
}

.card__effect {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.card__value {
  color: var(--paper);
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.card__effect-label {
  color: var(--paper-muted);
  font-size: 11px;
  font-weight: 800;
}

.card__description {
  margin: 5px 0 0;
  color: #d1cbc3;
  font-size: 13px;
  line-height: 1.35;
}

.card__unavailable {
  margin-top: auto;
  color: #f0a3a6;
  font-size: 11px;
  font-weight: 800;
}

.action-dock {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr minmax(128px, 1.1fr);
  align-items: center;
  gap: 9px;
  margin: 0 -4px;
  padding:
    10px 5px
    max(5px, env(safe-area-inset-bottom));
  border-top: 1px solid rgb(246 236 217 / 10%);
  background:
    linear-gradient(180deg, rgb(17 19 29 / 78%), var(--ink-900) 28%);
  backdrop-filter: blur(14px);
}

.energy-panel {
  display: flex;
  align-items: center;
  gap: 7px;
}

.energy-panel__orb {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border: 1px solid rgb(158 231 223 / 45%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #a4ebe4, transparent 18%),
    radial-gradient(circle, #419d95, #184f4e);
  color: #d9fffa;
  box-shadow:
    inset 0 0 12px rgb(255 255 255 / 18%),
    0 0 18px rgb(98 200 186 / 18%);
  font-size: 17px;
}

.energy-panel div {
  display: grid;
}

.energy-panel strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pile-counts {
  display: grid;
  gap: 1px;
  color: var(--paper-muted);
  font-size: 11px;
  text-align: center;
}

.pile-counts strong {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.end-turn-button,
.primary-button {
  min-height: 50px;
  border: 1px solid rgb(255 195 109 / 45%);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 10%), transparent),
    linear-gradient(135deg, #bd633e, #873645);
  box-shadow:
    inset 0 1px rgb(255 255 255 / 15%),
    0 8px 20px rgb(0 0 0 / 24%);
  color: #fff6e8;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.04em;
  touch-action: manipulation;
  transition:
    transform 150ms ease,
    filter 150ms ease,
    opacity 150ms ease;
}

.end-turn-button {
  display: grid;
  place-content: center;
}

.end-turn-button small {
  color: #f1cfc3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.end-turn-button:active:not(:disabled),
.primary-button:active {
  transform: scale(0.97);
}

.end-turn-button:disabled {
  cursor: not-allowed;
  filter: saturate(0.25);
  opacity: 0.48;
}

.orientation-note {
  display: none;
  margin: 7px 0 0;
  color: var(--paper-muted);
  font-size: 11px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  min-width: 320px;
  padding:
    calc(20px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgb(185 79 61 / 22%), transparent 35%),
    rgb(5 6 10 / 82%);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  width: min(100%, 390px);
  padding: 27px 22px 22px;
  max-height: calc(100vh - 40px);
  max-height: calc(
    100dvh - 40px - env(safe-area-inset-top) -
      env(safe-area-inset-bottom)
  );
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgb(240 154 84 / 30%);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgb(255 255 255 / 7%), transparent 34%),
    #171923;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: modal-enter 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal__panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  content: "";
}

.modal__mark {
  display: grid;
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgb(240 154 84 / 38%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(240 154 84 / 18%), transparent 66%);
  color: var(--ember-bright);
  font-size: 29px;
}

.modal[data-result="win"] .modal__mark {
  border-color: rgb(98 200 186 / 45%);
  background: radial-gradient(circle, rgb(98 200 186 / 18%), transparent 66%);
  color: #9ce6dc;
}

.modal[data-result="lose"] .modal__mark {
  border-color: rgb(214 90 96 / 45%);
  background: radial-gradient(circle, rgb(214 90 96 / 18%), transparent 66%);
  color: #ef9298;
}

.modal__panel h2 {
  margin: 4px 0 7px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(24px, 7vw, 31px);
  letter-spacing: 0.04em;
}

.modal__body {
  max-width: 30rem;
  margin: 0 auto;
  color: #d4cdc4;
  font-size: 14px;
}

.rule-list {
  display: grid;
  gap: 7px;
  margin: 19px 0 15px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.rule-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 39px;
  padding: 7px 10px;
  border: 1px solid rgb(246 236 217 / 8%);
  border-radius: 9px;
  background: rgb(255 255 255 / 3%);
  font-size: 12px;
}

.rule-list span {
  color: var(--paper-muted);
}

.modal__stats {
  margin: 12px 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  font-size: 16px;
}

.floating-number {
  position: absolute;
  z-index: 30;
  top: 48%;
  left: 50%;
  color: #ff9588;
  font-size: 26px;
  font-weight: 950;
  pointer-events: none;
  text-shadow: 0 3px 10px rgb(0 0 0 / 65%);
  transform: translate(-50%, -50%);
  animation: number-float 700ms ease-out both;
}

.floating-number--guard {
  color: #a8dafa;
  font-size: 18px;
}

.is-hit {
  animation: hit-shake 300ms ease-out;
}

.is-guarding {
  animation: guard-flash 360ms ease-out;
}

.noscript-message {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 100;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #7d2f3f;
  color: white;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover:not(:disabled) {
    z-index: 3;
    border-color: rgb(255 195 109 / 50%);
    transform: translateY(-7px);
  }

  .icon-button:hover {
    border-color: rgb(240 154 84 / 42%);
    color: var(--paper);
  }

  .end-turn-button:hover:not(:disabled),
  .primary-button:hover {
    filter: brightness(1.1);
  }
}

@media (min-width: 540px) {
  body {
    padding-block: 18px;
  }

  .game-shell {
    min-height: calc(100dvh - 36px);
    border: 1px solid rgb(246 236 217 / 9%);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 359px) {
  .game-shell {
    padding-right: calc(8px + env(safe-area-inset-right));
    padding-left: calc(8px + env(safe-area-inset-left));
  }

  .brand__mark {
    width: 32px;
    height: 32px;
  }

  .combatant--enemy {
    min-height: 165px;
  }

  .enemy-stage {
    grid-template-columns: 88px minmax(132px, 1fr);
    gap: 7px;
  }

  .hand {
    margin-inline: -8px;
    padding-inline: 16px;
  }

  .card {
    width: 108px;
    min-width: 108px;
  }

  .action-dock {
    grid-template-columns: auto 1fr 120px;
    gap: 5px;
  }

  .energy-panel {
    gap: 4px;
  }

  .energy-panel__orb {
    width: 37px;
    height: 37px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .orientation-note {
    display: block;
  }
}

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

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hit-shake {
  0%,
  100% {
    filter: brightness(1);
    transform: translateX(0);
  }
  25% {
    filter: brightness(1.45);
    transform: translateX(-5px);
  }
  55% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}

@keyframes guard-flash {
  0%,
  100% {
    box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
  }
  45% {
    border-color: rgb(122 182 216 / 68%);
    box-shadow:
      0 0 0 3px rgb(122 182 216 / 13%),
      0 0 28px rgb(122 182 216 / 18%);
  }
}

@keyframes number-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.75);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -115%) scale(0.95);
  }
}

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

@keyframes low-health-pulse {
  50% {
    filter: brightness(1.35);
  }
}

@keyframes ember-rise {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.7);
  }
  15% {
    opacity: 0.72;
  }
  75% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translateY(-92vh) translateX(42px) scale(1.2);
  }
}
