:root {
  color-scheme: light;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: #07233a;
  color: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100svh;
  background-image:
    linear-gradient(rgba(4, 23, 39, 0.42), rgba(4, 23, 39, 0.42)),
    url("./title menu/title screen.jpg");
  background-position: center;
  background-size: cover;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.company-intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem;
  background: #ffffff;
  transition: opacity 620ms ease, visibility 620ms ease;
}

.company-intro.is-leaving {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.company-intro__logo {
  display: block;
  width: min(84vw, 650px);
  height: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: company-logo-enter 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: opacity 520ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes company-logo-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

.title-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 540px;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background-image: url("./title menu/title screen.jpg");
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 700ms ease, transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.title-screen.is-ready {
  opacity: 1;
  transform: scale(1);
}

.story-screen {
  position: fixed;
  inset-block: 0;
  left: 50%;
  z-index: 8;
  isolation: isolate;
  width: min(100%, 540px);
  min-height: 100svh;
  overflow: hidden;
  transform: translateX(-50%);
  background: #071b22;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 450ms ease;
}

.story-screen.is-active {
  opacity: 1;
}

.story-screen::before,
.story-screen::after {
  position: absolute;
  inset: -2%;
  z-index: -2;
  content: "";
  pointer-events: none;
}

.story-screen::before {
  background-position: center;
  background-size: cover;
  transition: filter 500ms ease, transform 700ms ease;
}

.story-screen::after {
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 12, 17, 0.2), rgba(3, 16, 21, 0.5));
  transition: background 500ms ease;
}

.story-screen[data-location="forest"]::before {
  background-image: url("./tutorial story/forest.jpg");
  filter: brightness(0.62) saturate(0.86);
  transform: scale(1.03);
}

.story-screen[data-location="forest"]::after {
  background:
    linear-gradient(180deg, rgba(1, 10, 14, 0.18), rgba(1, 11, 14, 0.48)),
    linear-gradient(110deg, rgba(0, 0, 0, 0.3), transparent 38%, rgba(0, 0, 0, 0.24));
}

.story-screen[data-location="meadow"]::before {
  background-image: url("./tutorial story/grassland.jpg");
  filter: brightness(0.94) saturate(0.94);
  transform: scale(1.03);
}

.story-screen[data-location="meadow"]::after {
  background: linear-gradient(180deg, rgba(11, 78, 101, 0.08), rgba(3, 30, 42, 0.4));
}

.story-screen__tap {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.story-screen__tap:focus-visible {
  outline: 3px solid #fff2a8;
  outline-offset: -6px;
}

.story-skip {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 5;
  display: inline-flex;
  min-width: 86px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 2px solid rgba(255, 250, 218, 0.92);
  border-radius: 999px;
  background: rgba(8, 55, 84, 0.78);
  box-shadow: 0 4px 10px rgba(0, 16, 27, 0.32);
  color: #ffffff;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.story-skip__icon {
  color: #ffe26e;
  font-size: 0.65rem;
}

.story-skip:focus-visible {
  outline: 3px solid #fff2a8;
  outline-offset: 3px;
}

.story-chapter {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 3;
  width: 88%;
  transform: translate(-50%, -50%);
  color: #fffdf0;
  text-align: center;
  text-shadow: 0 3px 9px rgba(0, 0, 0, 0.9);
  animation: story-content-enter 500ms ease both;
  pointer-events: none;
}

.story-chapter__label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffe78b;
}

.story-chapter h2 {
  margin: 0;
  font-size: clamp(1.45rem, 7vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.story-character {
  position: absolute;
  top: 17%;
  left: 50%;
  z-index: 1;
  width: min(94%, 500px);
  height: min(59svh, 560px);
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.3));
  animation: story-character-enter 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  pointer-events: none;
}

.story-character.needs-blend {
  mix-blend-mode: screen;
}

.story-dialogue {
  position: absolute;
  right: 1rem;
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  left: 1rem;
  z-index: 3;
  min-height: 150px;
  padding: 2rem 1.3rem 1.25rem;
  border: 3px solid #fff5c9;
  border-radius: 8px;
  background: rgba(6, 43, 63, 0.91);
  box-shadow:
    inset 0 0 0 2px rgba(79, 176, 226, 0.66),
    0 10px 28px rgba(0, 12, 20, 0.44);
  color: #ffffff;
  animation: story-content-enter 320ms ease both;
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.story-dialogue__speaker {
  position: absolute;
  top: -20px;
  left: 14px;
  min-width: 126px;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 2px solid #fff1af;
  border-radius: 8px 8px 8px 2px;
  background: linear-gradient(180deg, #4fb7e9, #247dbb);
  box-shadow: 0 4px 8px rgba(0, 20, 35, 0.3);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.story-dialogue.is-narration {
  padding-top: 1.25rem;
}

.story-dialogue__text {
  margin: 0;
  font-size: clamp(0.98rem, 4.3vw, 1.12rem);
  font-weight: 700;
  line-height: 1.85;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 3px rgba(0, 14, 24, 0.7);
}

.story-dialogue__next {
  position: absolute;
  right: 1rem;
  bottom: 0.7rem;
  color: #ffe775;
  font-size: 0.82rem;
  animation: story-next-bounce 900ms ease-in-out infinite;
}

@keyframes story-content-enter {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

@keyframes story-character-enter {
  from {
    transform: translate(-50%, 10px) scale(0.97);
    opacity: 0;
  }
}

@keyframes story-next-bounce {
  50% {
    transform: translateY(3px);
  }
}

.battle-cutin {
  position: fixed;
  inset-block: 0;
  left: 50%;
  z-index: 10;
  isolation: isolate;
  width: min(100%, 540px);
  min-height: 100svh;
  overflow: hidden;
  transform: translateX(-50%);
  background: #07171d;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
}

.battle-cutin::before,
.battle-cutin::after {
  position: absolute;
  inset: -3%;
  z-index: -2;
  content: "";
}

.battle-cutin::before {
  background-image: url("./tutorial story/forest.jpg");
  background-position: center;
  background-size: cover;
  filter: brightness(0.3) saturate(0.72);
  transform: scale(1.08);
}

.battle-cutin::after {
  z-index: -1;
  background: linear-gradient(115deg, rgba(2, 15, 23, 0.88), rgba(6, 67, 94, 0.28), rgba(2, 14, 22, 0.9));
}

.battle-cutin.is-active {
  animation: battle-cutin-screen 2500ms ease both;
}

.battle-cutin__flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}

.battle-cutin.is-active .battle-cutin__flash {
  animation: battle-cutin-flash 2500ms ease both;
}

.battle-cutin__bands {
  position: absolute;
  top: 18%;
  right: -38%;
  left: -38%;
  z-index: 0;
  height: 54%;
  transform: translateX(-70%) skewY(-9deg);
  border-block: 4px solid #ffe680;
  background:
    linear-gradient(90deg, rgba(30, 164, 224, 0.18), rgba(19, 119, 182, 0.94) 20%, rgba(9, 71, 128, 0.96) 78%, rgba(20, 165, 225, 0.18));
  box-shadow: 0 0 24px rgba(93, 205, 255, 0.58);
}

.battle-cutin.is-active .battle-cutin__bands {
  animation: battle-cutin-bands 2500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.battle-cutin__character {
  position: absolute;
  top: 12%;
  left: -2%;
  z-index: 1;
  width: 90%;
  height: 69%;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(12px 15px 14px rgba(0, 0, 0, 0.46));
  opacity: 0;
  pointer-events: none;
}

.battle-cutin__character.needs-blend {
  mix-blend-mode: screen;
}

.battle-cutin.is-active .battle-cutin__character {
  animation: battle-cutin-character 2500ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

.battle-cutin__title {
  position: absolute;
  right: 6%;
  bottom: 13%;
  z-index: 3;
  display: grid;
  justify-items: end;
  color: #fffced;
  text-align: right;
  text-shadow:
    0 3px 0 #135d91,
    0 7px 15px rgba(0, 9, 18, 0.72);
  opacity: 0;
  pointer-events: none;
}

.battle-cutin.is-active .battle-cutin__title {
  animation: battle-cutin-title 2500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.battle-cutin__eyebrow {
  margin-bottom: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #f2b92e;
  color: #0a4a78;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: none;
}

.battle-cutin__title strong {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 3rem;
  line-height: 0.86;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 1px #fff4b8;
}

.battle-cutin__jp {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffe875;
}

@keyframes battle-cutin-screen {
  0% {
    opacity: 0;
  }
  8%, 88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes battle-cutin-flash {
  0%, 5% {
    opacity: 1;
  }
  17%, 78% {
    opacity: 0;
  }
  88% {
    opacity: 0.88;
  }
  100% {
    opacity: 0;
  }
}

@keyframes battle-cutin-bands {
  0% {
    transform: translateX(-70%) skewY(-9deg);
  }
  18%, 82% {
    transform: translateX(0) skewY(-9deg);
  }
  100% {
    transform: translateX(70%) skewY(-9deg);
  }
}

@keyframes battle-cutin-character {
  0% {
    transform: translateX(-42%) scale(1.08);
    opacity: 0;
  }
  17%, 78% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(25%) scale(1.03);
    opacity: 0;
  }
}

@keyframes battle-cutin-title {
  0%, 18% {
    transform: translateX(48%);
    opacity: 0;
  }
  31%, 79% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(22%);
    opacity: 0;
  }
}

@media (max-width: 360px) {
  .battle-cutin__title strong {
    font-size: 2.5rem;
  }
}

.title-screen__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 48, 91, 0.2) 0%, transparent 30%),
    linear-gradient(0deg, rgba(3, 23, 38, 0.72) 0%, transparent 28%);
  pointer-events: none;
}

.settings-button {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 2px solid #fff8d8;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 253, 240, 0.96), rgba(255, 233, 166, 0.96));
  box-shadow:
    inset 0 0 0 2px #2a83c2,
    0 4px 0 #165582,
    0 7px 14px rgba(0, 35, 65, 0.3);
  color: #2478b6;
  font-family: Arial, sans-serif;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms ease, filter 140ms ease;
}

.settings-button:hover {
  filter: brightness(1.06);
}

.settings-button:active {
  transform: translateY(3px);
}

.settings-button:focus-visible,
.settings-panel__close:focus-visible {
  outline: 3px solid #fff2a8;
  outline-offset: 3px;
}

.settings-dialog {
  width: min(88vw, 430px);
  max-width: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #174d78;
}

.settings-dialog::backdrop {
  background: rgba(4, 28, 50, 0.62);
  backdrop-filter: blur(2px);
}

.settings-panel {
  overflow: hidden;
  border: 3px solid #fff8d8;
  border-radius: 8px;
  background: #fffdf2;
  box-shadow:
    inset 0 0 0 3px #2a83c2,
    0 14px 40px rgba(0, 27, 52, 0.42);
}

.settings-panel__header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem 0.65rem 1.2rem;
  background: linear-gradient(180deg, #59b8ed, #2d87c8);
  color: #ffffff;
  text-shadow: 0 2px 3px rgba(0, 47, 87, 0.35);
}

.settings-panel__header h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.settings-panel__close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: rgba(18, 91, 145, 0.55);
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.setting-row {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #eadca8;
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row--stacked {
  display: grid;
  align-items: stretch;
}

.setting-row__copy {
  display: grid;
  gap: 0.18rem;
}

.setting-row__title {
  font-size: 0.98rem;
  font-weight: 800;
}

.setting-row__note {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7b8c97;
}

.toggle-control {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 30px;
  cursor: pointer;
}

.toggle-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-control__track {
  position: absolute;
  inset: 0;
  border: 2px solid #9eabb4;
  border-radius: 999px;
  background: #d8dfe3;
  transition: background 160ms ease, border-color 160ms ease;
}

.toggle-control__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 33, 61, 0.28);
  content: "";
  transition: transform 160ms ease;
}

.toggle-control input:checked + .toggle-control__track {
  border-color: #217dbb;
  background: #49b4e9;
}

.toggle-control input:checked + .toggle-control__track::after {
  transform: translateX(24px);
}

.toggle-control input:focus-visible + .toggle-control__track {
  outline: 3px solid #f0b72d;
  outline-offset: 3px;
}

.volume-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.85rem;
}

.volume-control input[type="range"] {
  width: 100%;
  accent-color: #2b91d0;
  cursor: pointer;
}

.volume-control input[type="range"]:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.volume-control output {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: right;
  color: #ba7620;
}

.start-area {
  position: absolute;
  right: 0;
  bottom: max(3svh, env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  justify-items: center;
  padding: 0 1.25rem;
  animation: start-enter 700ms 450ms ease-out both;
}

.start-button {
  position: relative;
  width: min(88%, 390px);
  min-height: 68px;
  display: grid;
  place-content: center;
  gap: 0.15rem;
  overflow: hidden;
  border: 3px solid #fff8d8;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fffdf0 0%, #fff0bd 100%);
  box-shadow:
    inset 0 0 0 3px #267fc0,
    inset 0 -5px 0 rgba(224, 166, 49, 0.22),
    0 7px 0 #145584,
    0 12px 22px rgba(0, 35, 65, 0.38);
  color: #1769a5;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.start-button::before,
.start-button::after {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 2px solid #edb327;
  border-right: 0;
  border-bottom: 0;
  content: "";
  opacity: 0.72;
}

.start-button::before {
  left: 18px;
  transform: translateY(-50%) rotate(-45deg) scale(0.55);
}

.start-button::after {
  right: 18px;
  transform: translateY(-50%) rotate(135deg) scale(0.55);
}

.start-button:hover {
  filter: brightness(1.12);
  box-shadow:
    inset 0 0 0 3px #2c8bcf,
    inset 0 -5px 0 rgba(224, 166, 49, 0.2),
    0 7px 0 #145584,
    0 13px 28px rgba(0, 35, 65, 0.46),
    0 0 22px rgba(255, 239, 151, 0.5);
}

.start-button:active {
  transform: translateY(5px) scale(0.99);
  box-shadow:
    inset 0 0 0 3px #267fc0,
    inset 0 -3px 0 rgba(224, 166, 49, 0.22),
    0 2px 0 #145584,
    0 7px 14px rgba(0, 35, 65, 0.35);
}

.start-button:focus-visible {
  outline: 3px solid #fff2a8;
  outline-offset: 4px;
}

.start-button__label {
  position: relative;
  z-index: 1;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: clamp(1rem, 4.7vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 #ffffff;
}

.start-button__sub {
  position: relative;
  z-index: 1;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #bd7921;
}

.start-button__shine {
  position: absolute;
  top: -70%;
  left: -30%;
  width: 18%;
  height: 240%;
  transform: rotate(18deg);
  background: rgba(255, 255, 255, 0.42);
  filter: blur(1px);
  animation: button-shine 3.2s 1.4s ease-in-out infinite;
}

.start-area__version {
  margin: 0.55rem 0 0;
  font-family: "Arial Rounded MT Bold", "Yu Gothic", Meiryo, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.loading-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  visibility: hidden;
  background: rgba(5, 32, 54, 0.72);
  opacity: 0;
  backdrop-filter: blur(2px);
  transition: opacity 360ms ease, visibility 360ms ease;
}

.loading-cover.is-visible {
  visibility: visible;
  opacity: 1;
}

.loading-cover__mark {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff5ad;
  transform: rotate(45deg);
  animation: loading-spin 900ms linear infinite;
}

.loading-cover__text {
  font-family: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

@keyframes start-enter {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}

@keyframes button-shine {
  0%, 55% {
    left: -30%;
    opacity: 0;
  }
  66% {
    opacity: 0.85;
  }
  82%, 100% {
    left: 125%;
    opacity: 0;
  }
}

@keyframes loading-spin {
  to {
    transform: rotate(405deg);
  }
}

@media (min-width: 541px) {
  .title-screen {
    border-inline: 1px solid rgba(255, 255, 255, 0.18);
  }
}

@media (max-height: 650px) {
  .start-button {
    min-height: 60px;
  }
}

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

  .battle-cutin.is-active {
    animation: none !important;
    opacity: 1;
  }

  .battle-cutin.is-active .battle-cutin__flash {
    animation: none !important;
    opacity: 0;
  }

  .battle-cutin.is-active .battle-cutin__bands {
    animation: none !important;
    transform: translateX(0) skewY(-9deg);
  }

  .battle-cutin.is-active .battle-cutin__character,
  .battle-cutin.is-active .battle-cutin__title {
    animation: none !important;
    opacity: 1;
  }
}

.battle-screen {
  position: fixed;
  inset-block: 0;
  left: 50%;
  z-index: 9;
  isolation: isolate;
  width: min(100%, 540px);
  min-height: 100svh;
  overflow: hidden;
  transform: translateX(-50%);
  background: #10272b url("./tutorial story/forest.jpg") center / cover no-repeat;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 380ms ease;
}

.battle-screen.is-active {
  opacity: 1;
}

.battle-hud,
.battle-console,
.hp-display {
  transition: opacity 260ms ease, transform 360ms ease, visibility 260ms ease;
}

.battle-screen.is-ultimate-cinematic .battle-hud,
.battle-screen.is-ultimate-cinematic .battle-console,
.battle-screen.is-ultimate-cinematic .hp-display,
.battle-screen.is-ultimate-cinematic .battle-tutorial {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.battle-screen.is-ultimate-cinematic .battle-hud {
  transform: translateY(-18px);
}

.battle-screen.is-ultimate-cinematic .battle-console {
  transform: translateY(28px);
}

.battle-screen.is-ultimate-cinematic .battle-screen__shade {
  background:
    linear-gradient(180deg, rgba(0, 8, 24, 0.78), rgba(12, 70, 94, 0.16) 46%, rgba(0, 7, 24, 0.82)),
    repeating-linear-gradient(112deg, transparent 0 24px, rgba(68, 199, 255, 0.08) 25px 27px);
}

.combatant--ally,
.combatant--enemy {
  transition: transform 520ms cubic-bezier(0.18, 0.82, 0.24, 1), opacity 320ms ease, filter 320ms ease;
}

.battle-screen.is-ultimate-focus .combatant--ally {
  z-index: 8;
  transform: translate(64%, -4%) scale(1.62);
}

.battle-screen.is-ultimate-focus .combatant--enemy {
  transform: translateX(18%) scale(0.88);
  filter: brightness(0.25) blur(2px);
  opacity: 0.16;
}

.battle-screen__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 23, 29, 0.38), rgba(7, 33, 38, 0.04) 42%, rgba(2, 19, 25, 0.75)),
    linear-gradient(90deg, rgba(14, 73, 78, 0.18), rgba(67, 112, 64, 0.08));
  pointer-events: none;
}

.battle-hud {
  position: absolute;
  top: max(0.7rem, env(safe-area-inset-top));
  right: 0.8rem;
  left: 0.8rem;
  z-index: 7;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.action-points {
  min-height: 60px;
  border: 2px solid #fff4c1;
  border-radius: 7px;
  background: rgba(5, 42, 61, 0.9);
  box-shadow:
    inset 0 0 0 2px rgba(70, 169, 217, 0.68),
    0 5px 12px rgba(0, 11, 19, 0.35);
  color: #ffffff;
}

.ultimate-meter {
  position: relative;
  display: grid;
  width: 78px;
  justify-items: center;
  filter: drop-shadow(0 5px 8px rgba(0, 12, 22, 0.48));
}

.ultimate-orb {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border: 4px solid #fff5c4;
  border-radius: 50%;
  background: #082b43;
  box-shadow:
    inset 0 0 0 3px #267fb8,
    inset 0 0 18px rgba(0, 10, 28, 0.9),
    0 0 0 2px #ba791e;
}

.ultimate-orb__liquid {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0;
  background: linear-gradient(180deg, #86f2ff 0%, #25bde9 35%, #176bc5 100%);
  box-shadow: 0 -4px 12px rgba(129, 240, 255, 0.85);
  transition: height 540ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ultimate-orb__liquid::before,
.ultimate-orb__liquid::after {
  position: absolute;
  top: -7px;
  left: -22%;
  width: 145%;
  height: 15px;
  border-radius: 48%;
  background: rgba(156, 247, 255, 0.92);
  content: "";
  animation: ultimate-water-wave 1.6s linear infinite;
}

.ultimate-orb__liquid::after {
  top: -4px;
  left: -38%;
  background: rgba(43, 176, 228, 0.72);
  animation-duration: 2.1s;
  animation-direction: reverse;
}

.ultimate-orb__liquid span {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 68%, rgba(255, 255, 255, 0.58) 0 3px, transparent 4px);
  animation: ultimate-water-bubbles 2s ease-in-out infinite;
}

.ultimate-orb__gloss {
  position: absolute;
  top: 10px;
  left: 13px;
  width: 16px;
  height: 8px;
  transform: rotate(-35deg);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.ultimate-orb strong {
  position: relative;
  z-index: 2;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.75rem;
  color: #ffffff;
  text-shadow: 0 2px 3px rgba(0, 21, 45, 0.9);
}

.ultimate-meter__label {
  margin-top: -5px;
  min-width: 46px;
  padding: 0.18rem 0.45rem;
  border: 2px solid #fff2b5;
  border-radius: 5px;
  background: linear-gradient(180deg, #e6ad32, #b5671d);
  box-shadow: 0 3px 0 rgba(69, 35, 11, 0.48);
  color: #ffffff;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  text-align: center;
}

.ultimate-meter.is-ready .ultimate-orb {
  animation: ultimate-orb-ready 900ms ease-in-out infinite;
  box-shadow:
    inset 0 0 0 3px #2abce2,
    inset 0 0 18px rgba(0, 10, 28, 0.7),
    0 0 0 2px #e4a82e,
    0 0 20px #ffe96b;
}

.ultimate-meter.is-ready .ultimate-orb__liquid {
  background: linear-gradient(180deg, #fffbd0 0%, #6de8f4 25%, #278ee1 100%);
}

.ultimate-meter.is-gaining .ultimate-orb {
  animation: ultimate-meter-gain 520ms ease-out;
}

.hp-display__track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(0, 12, 21, 0.75);
}

.hp-display__track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transition: width 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.action-points {
  justify-self: end;
  width: 126px;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 45px;
  padding: 0.4rem 0.45rem 0.4rem 0.7rem;
}

.action-points span {
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.25;
}

.action-points strong {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid #fff3ae;
  border-radius: 50%;
  background: linear-gradient(180deg, #57c4f1, #237cbd);
  box-shadow: inset 0 -3px 0 rgba(0, 56, 102, 0.3);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.25rem;
  color: #ffffff;
}

.action-points strong.is-spent {
  animation: action-points-spent 480ms ease-out;
}

.action-points strong.is-restored {
  animation: action-points-restored 520ms ease-out;
}

.battlefield {
  position: absolute;
  inset: 6.15rem 0 34svh;
  z-index: 1;
  overflow: hidden;
}

.combatant {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
}

.combatant--ally {
  left: 0;
}

.combatant--enemy {
  right: 0;
}

.combatant img {
  position: absolute;
  right: 0;
  bottom: 4%;
  left: 0;
  display: block;
  width: 92%;
  height: 63%;
  margin: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 9px rgba(0, 0, 0, 0.42));
  transition: filter 140ms ease;
  animation: combatant-idle 2.8s ease-in-out infinite;
}

.combatant--ally img {
  right: auto;
  left: -7%;
  width: 78%;
  transform-origin: 55% 82%;
}

.combatant--enemy img {
  right: -7%;
  left: auto;
  width: 72%;
  height: 53%;
  transform-origin: 50% 75%;
  animation-delay: -1.1s;
}

.combatant img.needs-blend {
  mix-blend-mode: screen;
}

.hp-display {
  position: absolute;
  top: 0.75rem;
  z-index: 3;
  width: 88%;
  color: #ffffff;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.85);
}

.hp-display--ally {
  left: 0.7rem;
}

.hp-display--enemy {
  right: 0.7rem;
}

.hp-display__name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.28rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.hp-display__name small {
  flex: 0 0 auto;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.58rem;
}

.hp-display__track span {
  background: linear-gradient(90deg, #43d17d, #a4ef76);
}

.hp-display--enemy .hp-display__track span {
  background: linear-gradient(90deg, #ef536d, #ffb052);
}

.combatant.is-hit img {
  animation: combatant-hit 340ms ease;
}

.combatant--ally.is-rushing {
  z-index: 5;
  animation: ally-rush 1s cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

.combatant--ally.is-striking img {
  animation: ally-strike 320ms ease;
}

.combatant--ally.is-casting img {
  animation: ally-cast 440ms ease-in-out infinite;
}

.combatant--ally.is-ultimate-casting {
  z-index: 6;
}

.combatant--ally.is-ultimate-casting img {
  animation: ally-ultimate-cast 240ms ease-in-out infinite alternate;
  filter:
    drop-shadow(0 0 8px #ffffff)
    drop-shadow(0 0 20px #37c9ff)
    drop-shadow(0 12px 9px rgba(0, 0, 0, 0.42));
}

.combatant--enemy.is-attacking {
  z-index: 5;
  animation: enemy-attack 780ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.combatant.is-defeated img {
  animation: combatant-defeat 700ms ease forwards;
}

.battle-charge {
  position: absolute;
  bottom: 22%;
  left: 37%;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 4px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: #54dcff;
  box-shadow:
    0 0 12px 6px #39bff1,
    0 0 32px 16px rgba(43, 158, 255, 0.65);
  opacity: 0;
  pointer-events: none;
}

.battle-charge.is-active {
  animation: charge-skill 700ms ease-in both;
}

.battle-charge.is-ultimate {
  width: 54px;
  height: 54px;
  background: #ffffff;
  box-shadow:
    0 0 18px 8px #64e7ff,
    0 0 48px 24px #168bea,
    0 0 88px 45px rgba(255, 222, 74, 0.46);
  animation: charge-ultimate 950ms ease-in both;
}

.impact-effect {
  position: absolute;
  right: 8%;
  bottom: 17%;
  z-index: 7;
  width: 82px;
  height: 82px;
  transform: scale(0.2) rotate(0);
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 9%, #ffe86f 10% 18%, #ff8f32 19% 25%, transparent 27%),
    conic-gradient(from 8deg, transparent 0 7%, #fff5a1 8% 11%, transparent 12% 24%, #54dfff 25% 29%, transparent 30% 45%, #fff5a1 46% 50%, transparent 51% 67%, #54dfff 68% 72%, transparent 73%);
  opacity: 0;
  filter: drop-shadow(0 0 10px #ffffff) drop-shadow(0 0 15px #ffc43d);
  pointer-events: none;
}

.impact-effect::before,
.impact-effect::after {
  position: absolute;
  inset: 15%;
  transform: rotate(45deg);
  border: 3px solid rgba(255, 255, 255, 0.9);
  content: "";
}

.impact-effect::after {
  inset: 30%;
  border-color: #43d8ff;
}

.impact-effect.is-active {
  animation: impact-burst 430ms cubic-bezier(0.1, 0.7, 0.2, 1) both;
}

.impact-effect.is-heavy {
  width: 116px;
  height: 116px;
  animation-duration: 620ms;
  filter: drop-shadow(0 0 13px #ffffff) drop-shadow(0 0 25px #39cfff);
}

.enemy-slash {
  position: absolute;
  bottom: 20%;
  left: 8%;
  z-index: 7;
  width: 44%;
  height: 14px;
  transform: translateX(85%) rotate(-24deg) scaleX(0);
  transform-origin: right center;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #d983ff 22%, #ffffff 62%, transparent);
  box-shadow: 0 0 12px #ad43e6, 0 0 26px rgba(140, 51, 223, 0.72);
  opacity: 0;
  pointer-events: none;
}

.enemy-slash::before {
  position: absolute;
  inset: -17px 8% -17px 22%;
  border-block: 2px solid rgba(224, 154, 255, 0.76);
  border-radius: 50%;
  content: "";
}

.enemy-slash.is-active {
  animation: enemy-slash 800ms ease-out both;
}

.skill-callout {
  position: absolute;
  top: 22%;
  left: 50%;
  z-index: 10;
  width: max-content;
  max-width: 88%;
  padding: 0.42rem 1.25rem;
  transform: translate(-50%, 12px) scale(0.85);
  border-block: 2px solid #fff1a3;
  background: linear-gradient(90deg, transparent, rgba(8, 77, 123, 0.92) 18%, rgba(8, 77, 123, 0.92) 82%, transparent);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 3px #003753;
  opacity: 0;
  pointer-events: none;
}

.skill-callout.is-ultimate {
  border-color: #ffe66b;
  background: linear-gradient(90deg, transparent, rgba(122, 55, 14, 0.94) 18%, rgba(122, 55, 14, 0.94) 82%, transparent);
  color: #fff6b2;
  font-size: 1.22rem;
}

.skill-callout.is-active {
  animation: skill-callout 760ms ease-out both;
}

.skill-callout.is-active.is-ultimate {
  animation-duration: 1200ms;
}

.beam-effect {
  position: absolute;
  left: 39%;
  z-index: 4;
  width: 58%;
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
}

.beam-effect::before,
.beam-effect::after {
  position: absolute;
  content: "";
}

.beam-effect--skill {
  bottom: 25%;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #5ee5ff 35%, #1f8ff0 72%, #ffffff);
  box-shadow:
    0 0 8px #ffffff,
    0 0 18px #2ec7ff,
    0 0 30px rgba(30, 128, 255, 0.72);
}

.beam-effect--skill::before {
  top: -22px;
  right: 5%;
  left: 0;
  height: 68px;
  background: repeating-linear-gradient(9deg, transparent 0 10px, rgba(115, 225, 255, 0.65) 11px 13px, transparent 14px 22px);
  filter: blur(1px);
}

.beam-effect--skill.is-active {
  animation: skill-beam 660ms ease-out both;
}

.beam-effect--ultimate {
  bottom: 20%;
  left: 31%;
  z-index: 6;
  width: 78%;
  height: 92px;
  border: 5px solid #fff6a9;
  border-radius: 48% 12% 12% 48%;
  background:
    linear-gradient(180deg, #2aa8ff 0%, #a9f7ff 22%, #ffffff 43%, #fff7b0 52%, #ffffff 61%, #54dcff 82%, #1675e7 100%);
  box-shadow:
    0 0 10px 4px #ffffff,
    0 0 30px 14px #28bfff,
    0 0 70px 25px rgba(255, 217, 52, 0.68);
}

.beam-effect--ultimate::before {
  inset: -58px -10% -58px 0;
  background: repeating-linear-gradient(7deg, transparent 0 17px, rgba(110, 228, 255, 0.82) 18px 22px, transparent 23px 35px);
  filter: blur(2px);
}

.beam-effect--ultimate::after {
  inset: -18px 0;
  border-block: 3px solid rgba(255, 245, 132, 0.9);
  filter: blur(1px);
}

.beam-effect--ultimate.is-active {
  animation: ultimate-beam 2s ease-out both;
}

.battlefield.is-ultimate-charging::after,
.battlefield.is-ultimate-firing::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 36% 75%, rgba(47, 196, 255, 0.2), rgba(2, 10, 29, 0.88) 70%);
  content: "";
  pointer-events: none;
}

.battlefield.is-ultimate-firing {
  animation: battlefield-shake 110ms linear infinite;
}

.battle-flash {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}

.battle-flash.is-impact {
  animation: impact-flash 260ms ease-out;
}

.battle-flash.is-skill-flash {
  animation: skill-flash 660ms ease-out;
}

.battle-flash.is-ultimate-flash {
  animation: ultimate-flash 2s ease-in-out;
}

.battle-flash.is-enemy-hit {
  background: #ff5e72;
  animation: impact-flash 360ms ease-out;
}

.damage-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  overflow: hidden;
  pointer-events: none;
}

.damage-number {
  position: absolute;
  top: 47%;
  transform: translateX(calc(-50% + var(--damage-shift)));
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    -2px -2px 0 #6e1932,
    2px -2px 0 #6e1932,
    -2px 2px 0 #6e1932,
    2px 2px 0 #6e1932,
    0 4px 7px rgba(0, 0, 0, 0.7);
  animation: damage-pop 850ms ease-out forwards;
}

.damage-number--ally {
  left: 24%;
  color: #ffced1;
}

.damage-number--enemy {
  left: 76%;
  color: #fff2a2;
}

.damage-number--small {
  font-size: 1.1rem;
}

.damage-number--medium {
  font-size: 1.55rem;
}

.damage-number--large {
  font-size: 2rem;
  color: #ffffff;
  text-shadow:
    -3px -3px 0 #b05500,
    3px -3px 0 #b05500,
    -3px 3px 0 #b05500,
    3px 3px 0 #b05500,
    0 0 12px #ffe65e;
}

.damage-number--ultimate {
  top: calc(40% + var(--damage-shift));
  font-size: 1.18rem;
  color: #ffffff;
  animation-duration: 1050ms;
}

.battle-tutorial {
  position: absolute;
  right: 0.6rem;
  bottom: calc(34svh + 0.7rem);
  left: 0.6rem;
  z-index: 14;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 108px;
  align-items: end;
  opacity: 0;
  pointer-events: none;
}

.battle-tutorial.is-visible {
  animation: battle-tutorial-enter 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.battle-tutorial img {
  position: relative;
  z-index: 2;
  display: block;
  width: 102px;
  height: 102px;
  margin-right: -14px;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0, 15, 25, 0.42));
}

.battle-tutorial img.needs-blend {
  mix-blend-mode: screen;
}

.battle-tutorial__message {
  position: relative;
  min-height: 96px;
  padding: 1.7rem 0.75rem 0.65rem 1rem;
  border: 3px solid #fff4bb;
  border-radius: 7px;
  background: rgba(248, 253, 244, 0.96);
  box-shadow:
    inset 0 0 0 2px #48a8d2,
    0 7px 16px rgba(0, 17, 29, 0.38);
  color: #164f6d;
}

.battle-tutorial__heading {
  position: absolute;
  top: -10px;
  right: 9px;
  left: 9px;
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.55rem;
  border: 2px solid #fff1ad;
  border-radius: 5px;
  background: linear-gradient(180deg, #4bb9e7, #287eb7);
  box-shadow: 0 3px 0 rgba(16, 72, 107, 0.32);
  color: #ffffff;
}

.battle-tutorial__heading strong {
  font-size: 0.76rem;
}

.battle-tutorial__heading span {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.58rem;
  color: #fff2a0;
}

.battle-tutorial__message p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.55;
}

.battle-tutorial__next {
  display: block;
  min-width: 96px;
  min-height: 32px;
  margin: 0.45rem 0 0 auto;
  padding: 0.28rem 0.7rem;
  border: 2px solid #fff0a6;
  border-radius: 6px;
  background: linear-gradient(180deg, #58bee9, #2d83bd);
  box-shadow: 0 3px 0 #15567f;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
}

.battle-tutorial__next:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #15567f;
}

.battle-tutorial__next:focus-visible {
  outline: 3px solid #ffe86d;
  outline-offset: 2px;
}

.battle-tutorial__pointer {
  position: absolute;
  bottom: -13px;
  left: 25%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-top: 14px solid #fff4bb;
  border-right: 11px solid transparent;
  border-left: 11px solid transparent;
  filter: drop-shadow(0 3px 1px rgba(0, 26, 40, 0.32));
}

.battle-tutorial[data-target="skill"] .battle-tutorial__pointer {
  left: 75%;
}

.battle-tutorial[data-target="ultimate"] .battle-tutorial__pointer {
  left: 50%;
}

.battle-tutorial[data-target="action"] {
  top: max(6.6rem, calc(env(safe-area-inset-top) + 6.1rem));
  bottom: auto;
}

.battle-tutorial[data-target="action"] .battle-tutorial__pointer {
  top: -13px;
  right: 35px;
  bottom: auto;
  left: auto;
  transform: none;
  border-top: 0;
  border-right: 11px solid transparent;
  border-bottom: 14px solid #fff4bb;
  border-left: 11px solid transparent;
  filter: drop-shadow(0 -2px 1px rgba(0, 26, 40, 0.25));
}

.action-points.is-tutorial-target {
  position: relative;
  z-index: 8;
  opacity: 1;
  animation: tutorial-command-target 920ms ease-in-out infinite;
}

.action-points.is-tutorial-target::after {
  position: absolute;
  inset: -6px;
  border: 3px solid #fff06d;
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(255, 231, 68, 0.9);
  content: "";
  pointer-events: none;
}

.command-button.is-tutorial-target {
  z-index: 2;
  opacity: 1;
  animation: tutorial-command-target 920ms ease-in-out infinite;
}

.command-button.is-tutorial-target::after {
  position: absolute;
  inset: -6px;
  border: 3px solid #fff06d;
  border-radius: 7px;
  box-shadow: 0 0 16px rgba(255, 231, 68, 0.82);
  content: "";
  pointer-events: none;
}

.battle-console {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  min-height: 34svh;
  padding: 0.65rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: 3px solid #fff2b8;
  background: rgba(5, 35, 53, 0.96);
  box-shadow:
    inset 0 3px 0 rgba(59, 159, 211, 0.72),
    0 -8px 22px rgba(0, 15, 25, 0.38);
}

.battle-log {
  position: relative;
  min-height: 86px;
  padding: 1.15rem 0.75rem 0.45rem;
  border: 2px solid #9edbf0;
  border-radius: 6px;
  background: rgba(1, 20, 34, 0.84);
  color: #ffffff;
}

.battle-log__label {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: #e2a92a;
  color: #173d5b;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
}

.battle-log__entries {
  display: grid;
  gap: 0.18rem;
}

.battle-log__entries p {
  margin: 0;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: log-enter 180ms ease-out;
}

.battle-log__entries p[data-tone="damage"],
.battle-log__entries p[data-tone="skill"] {
  color: #aeeaff;
}

.battle-log__entries p[data-tone="danger"] {
  color: #ffc1c7;
}

.battle-log__entries p[data-tone="ultimate"],
.battle-log__entries p[data-tone="victory"] {
  color: #ffe875;
}

.battle-log__entries p[data-tone="turn"] {
  color: #baf2cc;
}

.battle-commands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.command-button {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 26px;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.45rem;
  border: 2px solid #fff5c7;
  border-radius: 7px;
  background: linear-gradient(180deg, #fdfcf1, #e4f3f5);
  box-shadow:
    inset 0 0 0 2px #4cadd9,
    0 4px 0 #145779;
  color: #165779;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.command-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: inset 0 0 0 2px #4cadd9, 0 1px 0 #145779;
}

.command-button:focus-visible {
  outline: 3px solid #ffed75;
  outline-offset: 2px;
}

.command-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.48;
}

.command-button__icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #2b8fc8;
  color: #ffffff;
  font-size: 0.9rem;
}

.command-button__copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

.command-button__copy strong {
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-button__copy small {
  margin-top: 0.15rem;
  font-size: 0.56rem;
  font-weight: 700;
  color: #63808e;
}

.command-button__cost {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #1f83bd;
  color: #ffffff;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
}

.command-button--skill .command-button__icon {
  background: #a45fc7;
}

.command-button--skill .command-button__cost {
  background: #8753af;
}

.command-button--ultimate {
  grid-column: 1 / -1;
  grid-template-columns: 36px minmax(0, 1fr) 54px;
  min-height: 50px;
  background: linear-gradient(180deg, #fff6c3, #f1c44c);
  box-shadow:
    inset 0 0 0 2px #dd8621,
    0 4px 0 #8f4c18;
  color: #783d13;
}

.command-button--ultimate.is-ready {
  animation: ultimate-ready 1s ease-in-out infinite;
}

.command-button--ultimate .command-button__icon {
  width: 34px;
  height: 34px;
  background: #e06429;
}

.command-button__ready {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  color: #9d4b13;
  text-align: center;
}

.battle-result {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 2rem;
  background: rgba(3, 25, 38, 0.8);
  color: #ffffff;
  text-align: center;
  opacity: 0;
  backdrop-filter: blur(5px);
  transition: opacity 340ms ease;
}

.battle-result.is-visible {
  opacity: 1;
}

.battle-result__eyebrow {
  margin-bottom: 0.55rem;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffe570;
}

.battle-result strong {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 2.45rem;
  line-height: 1;
  color: #fff7c4;
  text-shadow: 0 3px 0 #267fb7, 0 8px 20px rgba(0, 0, 0, 0.65);
}

.battle-result p {
  margin: 1rem 0 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.battle-result button {
  min-width: 170px;
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  border: 3px solid #fff7ca;
  border-radius: 7px;
  background: linear-gradient(180deg, #55bdec, #287fc0);
  box-shadow: 0 5px 0 #15547f;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.ultimate-cutin {
  position: absolute;
  inset: 0;
  z-index: 19;
  isolation: isolate;
  overflow: hidden;
  background: #06172b;
  opacity: 0;
  pointer-events: none;
}

.ultimate-cutin::before,
.ultimate-cutin::after {
  position: absolute;
  z-index: -2;
  content: "";
}

.ultimate-cutin::before {
  inset: -20% -55%;
  transform: translateX(-42%) rotate(-11deg);
  border-block: 6px solid #ffe473;
  background:
    linear-gradient(90deg, transparent 3%, #126da9 20%, #31c6ee 48%, #11558e 80%, transparent 97%);
  box-shadow:
    0 0 34px rgba(48, 208, 255, 0.75),
    inset 0 18px 34px rgba(255, 255, 255, 0.18);
}

.ultimate-cutin::after {
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(1, 12, 32, 0.98) 0 18%, transparent 48%, rgba(2, 12, 32, 0.82) 84%),
    repeating-linear-gradient(112deg, transparent 0 35px, rgba(255, 224, 89, 0.16) 36px 38px);
}

.ultimate-cutin.is-active {
  animation: ultimate-cutin-screen 1550ms ease both;
}

.ultimate-cutin.is-active::before {
  animation: ultimate-cutin-band 1550ms cubic-bezier(0.16, 0.84, 0.25, 1) both;
}

.ultimate-cutin__flash {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #ffffff;
  opacity: 0;
}

.ultimate-cutin.is-active .ultimate-cutin__flash {
  animation: ultimate-cutin-flash 1550ms ease both;
}

.ultimate-cutin__speedlines {
  position: absolute;
  inset: -25%;
  z-index: 1;
  transform: rotate(-10deg);
  background: repeating-linear-gradient(90deg, transparent 0 20px, rgba(255, 255, 255, 0.55) 21px 23px, transparent 24px 41px);
  mix-blend-mode: screen;
  opacity: 0;
}

.ultimate-cutin.is-active .ultimate-cutin__speedlines {
  animation: ultimate-speedlines 1550ms linear both;
}

.ultimate-cutin__crest {
  position: absolute;
  top: 11%;
  right: 8%;
  z-index: 3;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  transform: rotate(-18deg) scale(0.2);
  border: 3px solid #fff2a7;
  color: #ffe66f;
  font-size: 2.4rem;
  text-shadow: 0 0 12px #ffffff;
  opacity: 0;
}

.ultimate-cutin.is-active .ultimate-cutin__crest {
  animation: ultimate-crest 1550ms ease-out both;
}

.ultimate-cutin__character {
  position: absolute;
  top: 5%;
  left: -22%;
  z-index: 2;
  width: 114%;
  height: 79%;
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(14px 15px 12px rgba(0, 0, 0, 0.48))
    drop-shadow(0 0 15px rgba(79, 211, 255, 0.42));
  opacity: 0;
}

.ultimate-cutin__character.needs-blend {
  mix-blend-mode: screen;
}

.ultimate-cutin.is-active .ultimate-cutin__character {
  animation: ultimate-cutin-character 1550ms cubic-bezier(0.16, 0.84, 0.22, 1) both;
}

.ultimate-cutin__copy {
  position: absolute;
  right: 5%;
  bottom: 13%;
  left: 7%;
  z-index: 4;
  display: grid;
  justify-items: end;
  color: #ffffff;
  text-align: right;
  opacity: 0;
}

.ultimate-cutin__copy span {
  margin-bottom: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: #e5a72f;
  color: #124c78;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.58rem;
  font-weight: 900;
}

.ultimate-cutin__copy strong {
  max-width: 100%;
  font-size: 1.65rem;
  line-height: 1.25;
  color: #fff6b7;
  text-shadow:
    0 3px 0 #176da1,
    0 6px 16px rgba(0, 0, 0, 0.8);
}

.ultimate-cutin.is-active .ultimate-cutin__copy {
  animation: ultimate-cutin-copy 1550ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.character-join {
  position: fixed;
  inset-block: 0;
  left: 50%;
  z-index: 18;
  isolation: isolate;
  width: min(100%, 540px);
  min-height: 100svh;
  overflow: hidden;
  transform: translateX(-50%);
  background: #1d5549 url("./tutorial story/forest.jpg") center / cover no-repeat;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
}

.character-join::before,
.character-join::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
}

.character-join::before {
  background:
    linear-gradient(180deg, rgba(10, 64, 74, 0.42), rgba(17, 82, 60, 0.08) 52%, rgba(4, 33, 43, 0.72)),
    rgba(28, 102, 76, 0.12);
}

.character-join::after {
  inset: -36%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 240, 139, 0.24) 0 7deg, transparent 8deg 19deg);
  opacity: 0;
}

.character-join.is-active {
  animation: character-join-screen 700ms ease-out both;
}

.character-join.is-active::after {
  animation: character-join-rays 9s linear infinite, character-join-rays-enter 900ms ease-out both;
}

.character-join__rays {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 0;
  width: 82%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.25);
  border: 4px solid rgba(255, 244, 172, 0.86);
  box-shadow:
    0 0 0 14px rgba(63, 184, 133, 0.22),
    0 0 42px rgba(255, 239, 126, 0.62);
  opacity: 0;
}

.character-join.is-active .character-join__rays {
  animation: character-join-frame 900ms 180ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

.character-join__sparkles {
  position: absolute;
  inset: 8% 7% 24%;
  z-index: 3;
  background:
    linear-gradient(45deg, transparent 47%, #fff2a0 48% 52%, transparent 53%) 8% 18% / 22px 22px no-repeat,
    linear-gradient(-45deg, transparent 47%, #ffffff 48% 52%, transparent 53%) 88% 27% / 28px 28px no-repeat,
    linear-gradient(45deg, transparent 47%, #ffe56e 48% 52%, transparent 53%) 78% 74% / 18px 18px no-repeat,
    linear-gradient(-45deg, transparent 47%, #ffffff 48% 52%, transparent 53%) 18% 67% / 16px 16px no-repeat;
  opacity: 0;
  pointer-events: none;
}

.character-join.is-active .character-join__sparkles {
  animation: character-join-sparkles 1.3s 450ms ease-in-out infinite alternate;
}

.character-join img {
  position: absolute;
  top: 12%;
  left: 50%;
  z-index: 2;
  width: 84%;
  height: 58%;
  transform: translate(-50%, 18px) scale(0.72);
  object-fit: contain;
  filter:
    drop-shadow(0 14px 12px rgba(0, 30, 29, 0.4))
    drop-shadow(0 0 16px rgba(255, 240, 145, 0.38));
  opacity: 0;
}

.character-join img.needs-blend {
  mix-blend-mode: screen;
}

.character-join.is-active img {
  animation: character-join-character 850ms 260ms cubic-bezier(0.16, 0.84, 0.23, 1) both;
}

.character-join__copy {
  position: absolute;
  right: 1rem;
  bottom: 13%;
  left: 1rem;
  z-index: 4;
  display: grid;
  justify-items: center;
  color: #ffffff;
  text-align: center;
  opacity: 0;
}

.character-join.is-active .character-join__copy {
  animation: character-join-copy 700ms 650ms ease-out both;
}

.character-join__copy span {
  padding: 0.28rem 0.85rem;
  border: 2px solid #fff0a7;
  background: #2e8e72;
  color: #fff4a4;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
}

.character-join__copy strong {
  margin-top: 0.42rem;
  font-size: 2.2rem;
  line-height: 1;
  color: #fff9ce;
  text-shadow: 0 3px 0 #267b68, 0 7px 16px rgba(0, 20, 22, 0.62);
}

.character-join__copy p {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 24, 24, 0.78);
}

.character-join > button {
  position: absolute;
  right: 50%;
  bottom: max(2.6%, env(safe-area-inset-bottom));
  z-index: 5;
  min-width: 156px;
  min-height: 44px;
  transform: translateX(50%);
  border: 3px solid #fff5ba;
  border-radius: 7px;
  background: linear-gradient(180deg, #5cc59d, #2d8b70);
  box-shadow: 0 5px 0 #17604e;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
}

.character-join.is-active > button {
  animation: character-join-button 500ms 1.15s ease-out both;
}

.character-join > button:focus-visible {
  outline: 3px solid #ffe870;
  outline-offset: 3px;
}

@keyframes character-join-screen {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes character-join-rays {
  to { transform: rotate(360deg); }
}

@keyframes character-join-rays-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes character-join-frame {
  0% { transform: translate(-50%, -50%) rotate(20deg) scale(0.2); opacity: 0; }
  68% { transform: translate(-50%, -50%) rotate(48deg) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(1); opacity: 1; }
}

@keyframes character-join-sparkles {
  from { transform: scale(0.86); opacity: 0.42; }
  to { transform: scale(1.06); opacity: 1; }
}

@keyframes character-join-character {
  0% { transform: translate(-50%, 22px) scale(0.68); opacity: 0; }
  68% { transform: translate(-50%, -4px) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

@keyframes character-join-copy {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes character-join-button {
  from { transform: translateX(50%) translateY(8px); opacity: 0; }
  to { transform: translateX(50%) translateY(0); opacity: 1; }
}

@keyframes ultimate-cutin-screen {
  0% { opacity: 0; }
  7%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes ultimate-cutin-band {
  0% { transform: translateX(-42%) rotate(-11deg) scaleY(0.35); }
  18%, 82% { transform: translateX(0) rotate(-11deg) scaleY(1); }
  100% { transform: translateX(38%) rotate(-11deg) scaleY(0.72); }
}

@keyframes ultimate-cutin-flash {
  0%, 5% { opacity: 1; }
  16%, 83% { opacity: 0; }
  91% { opacity: 0.76; }
  100% { opacity: 0; }
}

@keyframes ultimate-speedlines {
  0%, 10% { transform: translateX(-22%) rotate(-10deg); opacity: 0; }
  22%, 82% { opacity: 0.62; }
  100% { transform: translateX(24%) rotate(-10deg); opacity: 0; }
}

@keyframes ultimate-crest {
  0%, 20% { transform: rotate(-50deg) scale(0.2); opacity: 0; }
  38%, 78% { transform: rotate(-12deg) scale(1); opacity: 0.9; }
  100% { transform: rotate(10deg) scale(1.25); opacity: 0; }
}

@keyframes ultimate-cutin-character {
  0%, 7% { transform: translateX(-32%) scale(1.12); opacity: 0; }
  25%, 78% { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(18%) scale(1.04); opacity: 0; }
}

@keyframes ultimate-cutin-copy {
  0%, 24% { transform: translateX(40%); opacity: 0; }
  40%, 80% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(16%); opacity: 0; }
}

@keyframes ultimate-water-wave {
  to { transform: translateX(18%) rotate(8deg); }
}

@keyframes ultimate-water-bubbles {
  50% { transform: translateY(-7px); opacity: 0.72; }
}

@keyframes ultimate-orb-ready {
  50% { transform: scale(1.055); filter: brightness(1.2); }
}

@keyframes ultimate-meter-gain {
  28% { transform: scale(1.1) rotate(-4deg); filter: brightness(1.35); }
  58% { transform: scale(0.96) rotate(3deg); }
}

@keyframes action-points-spent {
  30% { transform: scale(1.18); background: linear-gradient(180deg, #ff8d8d, #c7435c); }
}

@keyframes action-points-restored {
  35% { transform: scale(1.2); background: linear-gradient(180deg, #8af1b0, #2ba96b); box-shadow: 0 0 16px #75e9a0; }
}

@keyframes combatant-idle {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-4px) rotate(0.8deg); }
}

@keyframes combatant-hit {
  20% { transform: translateX(8px) rotate(3deg); filter: brightness(2); }
  45% { transform: translateX(-6px) rotate(-2deg); }
  70% { transform: translateX(4px); }
}

@keyframes ally-rush {
  0% { transform: translateX(0); }
  42%, 74% { transform: translateX(68%); }
  100% { transform: translateX(0); }
}

@keyframes ally-strike {
  40% { transform: rotate(10deg) scale(1.06); }
}

@keyframes ally-cast {
  50% { transform: translateY(-5px) rotate(-2deg); }
}

@keyframes ally-ultimate-cast {
  from { transform: translateY(-3px) scale(1.02); }
  to { transform: translateY(3px) scale(1.06); }
}

@keyframes enemy-attack {
  0%, 100% { transform: translateX(0); }
  48%, 72% { transform: translateX(-64%); }
}

@keyframes impact-burst {
  0% { transform: scale(0.15) rotate(-25deg); opacity: 0; }
  22% { transform: scale(1.18) rotate(8deg); opacity: 1; }
  68% { transform: scale(0.9) rotate(28deg); opacity: 0.9; }
  100% { transform: scale(1.35) rotate(50deg); opacity: 0; }
}

@keyframes enemy-slash {
  0% { transform: translateX(85%) rotate(-24deg) scaleX(0); opacity: 0; }
  25% { transform: translateX(15%) rotate(-24deg) scaleX(1); opacity: 1; }
  66% { transform: translateX(-24%) rotate(-24deg) scaleX(0.75); opacity: 0.9; }
  100% { transform: translateX(-55%) rotate(-24deg) scaleX(0.3); opacity: 0; }
}

@keyframes skill-callout {
  0% { transform: translate(-50%, 12px) scale(0.85); opacity: 0; }
  18%, 72% { transform: translate(-50%, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -8px) scale(1.04); opacity: 0; }
}

@keyframes combatant-defeat {
  to { transform: translateY(30px) scale(0.72); filter: grayscale(0.7); opacity: 0; }
}

@keyframes charge-skill {
  0% { transform: scale(0.2) rotate(0); opacity: 0; }
  40%, 100% { opacity: 1; }
  100% { transform: scale(1.15) rotate(270deg); }
}

@keyframes charge-ultimate {
  0% { transform: scale(0.1) rotate(0); opacity: 0; }
  25%, 100% { opacity: 1; }
  100% { transform: scale(1.35) rotate(540deg); }
}

@keyframes skill-beam {
  0% { transform: scaleX(0); opacity: 0; }
  16%, 72% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1.08); opacity: 0; }
}

@keyframes ultimate-beam {
  0% { transform: scaleX(0.05) scaleY(0.4); opacity: 0; }
  8% { transform: scaleX(1) scaleY(1.12); opacity: 1; }
  15%, 88% { transform: scaleX(1) scaleY(0.96); opacity: 1; }
  100% { transform: scaleX(1.05) scaleY(0.25); opacity: 0; }
}

@keyframes impact-flash {
  0%, 100% { opacity: 0; }
  35% { opacity: 0.62; }
}

@keyframes skill-flash {
  0%, 100% { opacity: 0; }
  18% { opacity: 0.55; }
}

@keyframes ultimate-flash {
  0%, 100% { opacity: 0; }
  5% { opacity: 0.95; }
  15%, 85% { opacity: 0.12; }
  92% { opacity: 0.65; }
}

@keyframes battlefield-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(2px, -1px); }
  50% { transform: translate(-2px, 1px); }
  75% { transform: translate(1px, 2px); }
}

@keyframes damage-pop {
  0% { transform: translateX(calc(-50% + var(--damage-shift))) translateY(10px) scale(0.45); opacity: 0; }
  24% { transform: translateX(calc(-50% + var(--damage-shift))) translateY(-7px) scale(1.16); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateX(calc(-50% + var(--damage-shift))) translateY(-42px) scale(0.92); opacity: 0; }
}

@keyframes log-enter {
  from { transform: translateX(7px); opacity: 0; }
}

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

@keyframes tutorial-command-target {
  50% { transform: translateY(-2px); filter: brightness(1.16); }
}

@keyframes ultimate-ready {
  50% { filter: brightness(1.2); box-shadow: inset 0 0 0 2px #dd8621, 0 4px 0 #8f4c18, 0 0 18px rgba(255, 229, 70, 0.8); }
}

@media (max-width: 380px) {
  .battle-hud {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .action-points {
    width: 112px;
    grid-template-columns: 1fr 38px;
  }

  .action-points strong {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .command-button__copy strong {
    font-size: 0.74rem;
  }

  .hp-display__name small {
    display: none;
  }

  .battle-tutorial {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .battle-tutorial img {
    width: 86px;
    height: 86px;
  }

  .battle-tutorial__message p {
    font-size: 0.67rem;
  }
}

@media (max-height: 680px) {
  .battlefield {
    bottom: 38svh;
  }

  .battle-console {
    min-height: 38svh;
  }

  .battle-tutorial {
    bottom: calc(38svh + 0.55rem);
  }

  .battle-log {
    min-height: 74px;
  }

  .command-button {
    min-height: 48px;
  }

  .command-button--ultimate {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .battlefield.is-ultimate-firing,
  .combatant,
  .combatant img,
  .beam-effect,
  .battle-charge,
  .damage-number {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .ultimate-cutin.is-active {
    animation: none !important;
    opacity: 1;
  }

  .ultimate-cutin.is-active::before {
    animation: none !important;
    transform: translateX(0) rotate(-11deg);
  }

  .ultimate-cutin.is-active .ultimate-cutin__character,
  .ultimate-cutin.is-active .ultimate-cutin__copy,
  .ultimate-cutin.is-active .ultimate-cutin__crest {
    animation: none !important;
    transform: none;
    opacity: 1;
  }

  .ultimate-cutin.is-active .ultimate-cutin__flash,
  .ultimate-cutin.is-active .ultimate-cutin__speedlines {
    animation: none !important;
    opacity: 0;
  }

  .character-join.is-active {
    animation: none !important;
    opacity: 1;
  }

  .character-join.is-active::after,
  .character-join.is-active .character-join__rays,
  .character-join.is-active .character-join__sparkles {
    animation: none !important;
    opacity: 0.55;
  }

  .character-join.is-active img,
  .character-join.is-active .character-join__copy,
  .character-join.is-active > button {
    animation: none !important;
    opacity: 1;
  }

  .character-join.is-active img {
    transform: translate(-50%, 0);
  }
}
