:root {
  color-scheme: light;
  --ink: #382719;
  --muted: #8c7158;
  --cream: #fff7df;
  --card: rgba(255, 255, 255, 0.86);
  --line: #382719;
  --sun: #ffd858;
  --orange: #ff8f5a;
  --rose: #ffb8a6;
  --mint: #a9efd0;
  --blue: #7fd5ff;
  --green: #58cfa1;
  --lavender: #cbb7ff;
  --danger: #ff6b6b;
  --shadow: 0 8px 0 rgba(56, 39, 25, 0.14);
  --soft-shadow: 0 18px 38px rgba(112, 78, 45, 0.18);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #f5d99a;
}

body {
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.7) 0 9%, transparent 10%),
    radial-gradient(circle at 82% 16%, rgba(255, 216, 88, 0.45) 0 8%, transparent 9%),
    linear-gradient(155deg, #ffe3ac 0%, #bcefff 48%, #d9ffd6 100%);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 143, 90, 0.9);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100vh;
  place-items: center;
  padding: 12px;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.7) 0 9%, transparent 10%),
    radial-gradient(circle at 82% 16%, rgba(255, 216, 88, 0.45) 0 8%, transparent 9%),
    linear-gradient(155deg, #ffe3ac 0%, #bcefff 48%, #d9ffd6 100%);
}

.app-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(56, 39, 25, 0.06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  content: "";
}

.phone-frame {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(100%, 430px);
  height: min(100vh, 932px);
  max-height: 100vh;
  overflow: hidden;
  border: 4px solid rgba(56, 39, 25, 0.9);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    #fff0c9;
  box-shadow: 0 24px 80px rgba(56, 39, 25, 0.28);
}

.phone-frame::before {
  position: absolute;
  z-index: 8;
  top: 9px;
  left: 50%;
  width: 112px;
  height: 24px;
  border: 3px solid rgba(56, 39, 25, 0.7);
  border-radius: 999px;
  background: #21170f;
  content: "";
  transform: translateX(-50%);
}

.phone-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 18px 6px;
}

.mini-label {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.phone-top h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.battle-top {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 26px 18px 8px;
  border-bottom: 3px solid rgba(56, 39, 25, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
    #fff0c9;
}

.battle-top h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.battle-top small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-action {
  display: grid;
  place-items: center;
  min-width: 62px;
  min-height: 44px;
  padding: 5px 9px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--sun);
  box-shadow: 0 5px 0 #b98520;
  color: var(--ink);
  font-weight: 900;
}

.round-action span {
  font-size: 11px;
}

.round-action strong {
  font-size: 16px;
}

.resource-rail {
  z-index: 4;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 12px 7px;
  scrollbar-width: none;
}

.resource-rail::-webkit-scrollbar {
  display: none;
}

.resource-rail article {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px 8px 5px 5px;
  border: 2px solid rgba(56, 39, 25, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  text-align: center;
  box-shadow: 0 4px 0 rgba(56, 39, 25, 0.08);
}

.resource-rail span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.resource-rail b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.resource-rail small {
  overflow: hidden;
  color: var(--muted);
  display: none;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.art-slot {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  place-items: center;
  transform-origin: center;
}

.spine-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.has-spine > .vector-icon {
  opacity: 0;
}

.vector-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.art-ground {
  opacity: 0.7;
}

.art-slot .art-sway,
.scene-emblem .art-sway,
.nav-item .art-sway,
.utility-chip .art-sway {
  transform-box: fill-box;
  transform-origin: center;
  animation: artSway 2.8s ease-in-out infinite;
}

.art-slot .art-wiggle,
.scene-emblem .art-wiggle {
  transform-box: fill-box;
  transform-origin: center;
  animation: artWiggle 2.1s ease-in-out infinite;
}

.art-slot .art-pulse,
.scene-emblem .art-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: artPulse 2.2s ease-in-out infinite;
}

.art-slot .art-spark,
.scene-emblem .art-spark,
.environment-svg .art-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: artSpark 1.8s ease-in-out infinite;
}

.art-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: artSpin 5.2s linear infinite;
}

.art-motion-float {
  animation: artSlotFloat 3.2s ease-in-out infinite;
}

.art-motion-pulse {
  animation: artSlotPulse 2.6s ease-in-out infinite;
}

.art-motion-spark {
  animation: artSlotSpark 2.4s ease-in-out infinite;
}

.art-motion-still *,
.art-motion-still {
  animation: none !important;
}

.resource-art {
  padding: 1px;
}

.screen-dense .resource-rail article {
  padding: 4px 7px 4px 4px;
}

.screen-dense .resource-rail span {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  font-size: 10px;
}

.screen-dense .resource-rail b {
  font-size: 12px;
}

.phone-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 12px calc(108px + var(--safe-bottom));
  scroll-padding-bottom: calc(108px + var(--safe-bottom));
  scrollbar-width: none;
}

.phone-scroll::-webkit-scrollbar {
  display: none;
}

.cat-stage {
  position: sticky;
  z-index: 3;
  top: 0;
  margin-bottom: 8px;
  padding: 8px;
  border: 3px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)),
    linear-gradient(165deg, #b5eeff, #fff1b7 58%, #c9f6c9);
  box-shadow: var(--shadow);
  transition: padding 0.24s ease, border-radius 0.24s ease, transform 0.24s ease;
}

.sky-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 14px;
  padding: 5px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
}

.stage-toggle {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 12px;
  min-height: 30px;
  padding: 4px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.16);
}

.cat-world {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-radius: 24px;
}

.campus-cloud {
  position: absolute;
  width: 74px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  animation: drift 8s ease-in-out infinite;
}

.campus-cloud::before,
.campus-cloud::after {
  position: absolute;
  bottom: 7px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  content: "";
}

.campus-cloud::before {
  left: 10px;
}

.campus-cloud::after {
  right: 12px;
}

.cloud-a {
  top: 38px;
  right: 22px;
}

.cloud-b {
  top: 82px;
  left: 22px;
  width: 54px;
  transform: scale(0.8);
  animation-delay: -3s;
}

.schoolhouse {
  position: absolute;
  right: 20px;
  bottom: 26px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.schoolhouse span {
  display: block;
  width: 40px;
  border: 3px solid var(--line);
  border-radius: 12px 12px 4px 4px;
  background: #ffbe75;
  box-shadow: inset 0 -14px rgba(255, 255, 255, 0.22);
}

.schoolhouse span:nth-child(1) {
  height: 58px;
}

.schoolhouse span:nth-child(2) {
  height: 78px;
  background: #ff9f78;
}

.schoolhouse span:nth-child(3) {
  height: 48px;
  background: #ffd66f;
}

.mini-cat-face {
  display: none;
}

.cat-character {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 20px;
  width: 142px;
  height: 174px;
  --cat-scale: 1;
  transform: translateX(-50%);
  animation: catIdle 2.5s ease-in-out infinite;
}

.cat-ear {
  position: absolute;
  z-index: 1;
  top: 18px;
  width: 44px;
  height: 54px;
  border: 4px solid var(--line);
  background: #fffaf0;
}

.cat-ear.left {
  left: 18px;
  border-radius: 12px 32px 12px 20px;
  transform: rotate(-24deg);
}

.cat-ear.right {
  right: 18px;
  border-radius: 32px 12px 20px 12px;
  transform: rotate(24deg);
}

.cat-hardhat {
  position: absolute;
  z-index: 4;
  top: 2px;
  left: 39px;
  width: 68px;
  height: 42px;
  border: 4px solid var(--line);
  border-radius: 24px 24px 12px 12px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(56, 39, 25, 0.28) 47% 53%, transparent 54%),
    var(--sun);
}

.cat-hardhat::after {
  position: absolute;
  right: -16px;
  bottom: 3px;
  width: 38px;
  height: 12px;
  border: 4px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  content: "";
}

.cat-head {
  position: absolute;
  z-index: 3;
  top: 35px;
  left: 13px;
  width: 118px;
  height: 104px;
  border: 4px solid var(--line);
  border-radius: 45% 45% 48% 48%;
  background: #fffaf0;
}

.eye {
  position: absolute;
  top: 43px;
  width: 13px;
  height: 18px;
  border-radius: 999px;
  background: var(--line);
  animation: blink 4s infinite;
}

.eye.left {
  left: 34px;
}

.eye.right {
  right: 34px;
}

.blush {
  position: absolute;
  top: 65px;
  width: 20px;
  height: 10px;
  border-radius: 999px;
  background: #ffb5a1;
}

.blush.left {
  left: 20px;
}

.blush.right {
  right: 20px;
}

.mouth {
  position: absolute;
  top: 64px;
  left: 50%;
  width: 18px;
  height: 10px;
  border-bottom: 4px solid var(--line);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.cat-body {
  position: absolute;
  z-index: 1;
  left: 35px;
  bottom: 8px;
  width: 74px;
  height: 78px;
  border: 4px solid var(--line);
  border-radius: 30px 30px 24px 24px;
  background: #72b5ff;
}

.scarf {
  position: absolute;
  top: 13px;
  left: 15px;
  width: 45px;
  height: 16px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #ff6b6b;
}

.cat-paw {
  position: absolute;
  z-index: 4;
  bottom: 26px;
  width: 32px;
  height: 36px;
  border: 4px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
}

.cat-paw.left {
  left: 24px;
  transform: rotate(10deg);
}

.cat-paw.right {
  right: 24px;
  transform: rotate(-10deg);
  animation: pawWave 2.2s ease-in-out infinite;
}

.cat-tail {
  position: absolute;
  z-index: 0;
  right: 10px;
  bottom: 34px;
  width: 54px;
  height: 26px;
  border: 4px solid var(--line);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  background: #fffaf0;
  transform-origin: left center;
  animation: tailWag 2s ease-in-out infinite;
}

.speech-bubble {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 10px;
  left: 14px;
  max-width: none;
  padding: 9px 11px;
  border: 3px solid var(--line);
  border-radius: 18px 18px 18px 5px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.12);
}

.cat-summary {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 8px 2px;
}

.field-label {
  grid-row: span 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.cat-name {
  width: 100%;
  padding: 8px 10px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 900;
}

.cat-summary p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.cat-stage.is-compact {
  padding: 8px;
  border-radius: 24px;
}

.cat-stage.is-compact .cat-world {
  height: 132px;
}

.cat-stage.is-compact .cat-character {
  bottom: 50px;
  --cat-scale: 0.56;
  transform-origin: bottom center;
}

.cat-stage.is-compact .schoolhouse {
  right: 16px;
  bottom: 13px;
  transform: scale(0.72);
  transform-origin: bottom right;
}

.cat-stage.is-compact .speech-bubble {
  right: 10px;
  bottom: 8px;
  left: 10px;
  max-width: none;
  padding: 6px 8px;
  font-size: 10px;
}

.cat-stage.is-compact .cat-summary {
  display: none;
}

.cat-stage.is-compact .cloud-b {
  display: none;
}

.cat-stage.is-collapsed {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 52px;
  padding: 5px 7px;
  border-radius: 18px;
}

.cat-stage.is-collapsed .sky-badge {
  position: static;
  grid-column: 2;
  width: max-content;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  padding: 3px 7px;
  border-width: 1px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-stage.is-collapsed .stage-toggle {
  position: static;
  grid-column: 3;
  grid-row: 1 / span 2;
  min-height: 28px;
  min-width: 68px;
  padding: 3px 8px;
  font-size: 10px;
}

.cat-stage.is-collapsed .cat-world {
  grid-row: 1 / span 2;
  width: 46px;
  height: 42px;
  overflow: visible;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 78%, rgba(169, 239, 208, 0.8) 0 42%, transparent 43%);
}

.cat-stage.is-collapsed .cat-world::after {
  display: none;
}

.cat-stage.is-collapsed .cat-character {
  display: none;
}

.cat-stage.is-collapsed .campus-cloud,
.cat-stage.is-collapsed .schoolhouse {
  display: none;
}

.cat-stage.is-collapsed .cat-body,
.cat-stage.is-collapsed .cat-paw,
.cat-stage.is-collapsed .cat-tail,
.cat-stage.is-collapsed .scarf {
  display: none;
}

.cat-stage.is-collapsed .cat-ear {
  top: 18px;
}

.cat-stage.is-collapsed .cat-hardhat {
  top: 0;
}

.cat-stage.is-collapsed .cat-head {
  top: 34px;
}

.cat-stage.is-collapsed .mini-cat-face {
  position: absolute;
  left: 50%;
  top: 2px;
  display: block;
  width: 36px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 45% 45% 48% 48%;
  background: #fffaf0;
  transform: translateX(-50%);
}

.mini-ear {
  position: absolute;
  top: -10px;
  width: 17px;
  height: 20px;
  border: 3px solid var(--line);
  background: #fffaf0;
}

.cat-stage.is-collapsed .mini-ear {
  top: -7px;
  width: 13px;
  height: 16px;
  border-width: 2px;
}

.mini-ear.left {
  left: 2px;
  border-radius: 6px 14px 6px 8px;
  transform: rotate(-24deg);
}

.cat-stage.is-collapsed .mini-ear.left {
  left: 2px;
}

.mini-ear.right {
  right: 2px;
  border-radius: 14px 6px 8px 6px;
  transform: rotate(24deg);
}

.cat-stage.is-collapsed .mini-ear.right {
  right: 2px;
}

.mini-hat {
  position: absolute;
  z-index: 2;
  top: -14px;
  left: 10px;
  width: 28px;
  height: 17px;
  border: 3px solid var(--line);
  border-radius: 12px 12px 6px 6px;
  background: var(--sun);
}

.cat-stage.is-collapsed .mini-hat {
  top: -10px;
  left: 8px;
  width: 21px;
  height: 13px;
  border-width: 2px;
  border-radius: 9px 9px 5px 5px;
}

.mini-hat::after {
  position: absolute;
  right: -9px;
  bottom: 0;
  width: 17px;
  height: 6px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  content: "";
}

.cat-stage.is-collapsed .mini-hat::after {
  right: -7px;
  width: 13px;
  height: 4px;
  border-width: 2px;
}

.mini-eye {
  position: absolute;
  top: 18px;
  width: 6px;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.cat-stage.is-collapsed .mini-eye {
  top: 15px;
  width: 5px;
  height: 7px;
}

.mini-eye.left {
  left: 14px;
}

.cat-stage.is-collapsed .mini-eye.left {
  left: 10px;
}

.mini-eye.right {
  right: 14px;
}

.cat-stage.is-collapsed .mini-eye.right {
  right: 10px;
}

.mini-mouth {
  position: absolute;
  top: 29px;
  left: 50%;
  width: 12px;
  height: 7px;
  border-bottom: 3px solid var(--line);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.cat-stage.is-collapsed .mini-mouth {
  top: 25px;
  width: 10px;
  height: 5px;
  border-bottom-width: 2px;
}

.cat-stage.is-collapsed .speech-bubble {
  position: static;
  grid-column: 2;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.cat-stage.is-collapsed .cat-summary {
  display: none;
}

.scene-panel {
  margin-bottom: 12px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.scene-panel.is-focus-mode {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.scene-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-bottom: 8px;
}

.scene-emblem {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: var(--sun);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.15);
}

.utility-dock {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: -2px -2px 10px;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

.utility-dock::-webkit-scrollbar {
  display: none;
}

.utility-chip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 4px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.utility-chip span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 8px;
  font-size: 10px;
}

.utility-chip.is-active {
  background: var(--sun);
  color: var(--ink);
}

.scene-visual,
.campus-map {
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0)),
    #dff3ff;
  box-shadow: 0 6px 0 rgba(56, 39, 25, 0.1);
}

.scene-visual__canvas,
.campus-map__canvas {
  display: grid;
  min-height: 86px;
  place-items: center;
}

.environment-svg {
  display: block;
  width: 100%;
  height: 112px;
}

.scene-object-row {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: auto;
  display: inline-flex;
  gap: 5px;
  max-width: calc(100% - 14px);
}

.scene-object {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 3px;
  border: 2px solid rgba(56, 39, 25, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.08);
}

.scene-object small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.scene-object__art {
  width: 27px;
  height: 27px;
}

.campus-map {
  height: 176px;
  margin-bottom: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0)),
    #d9ffd6;
}

.campus-map__meta {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: grid;
  gap: 1px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.08);
  pointer-events: none;
}

.campus-map__meta span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.campus-map__meta b {
  font-size: 12px;
  line-height: 1.1;
}

.campus-map__canvas {
  height: 100%;
}

.campus-map__canvas .environment-svg {
  height: 100%;
}

.campus-map__rooms {
  position: absolute;
  inset: 0;
}

.map-room {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  padding: 4px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent), white 70%);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.16);
  transform: translate(-50%, -50%);
}

.map-room.can-upgrade {
  animation: mapRoomReady 2.1s ease-in-out infinite;
}

.map-room__art {
  width: 38px;
  height: 38px;
}

.map-room b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.map-room small {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  min-width: 25px;
  height: 22px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.coach-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 216, 88, 0.72), rgba(255, 255, 255, 0.86));
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.12);
}

.coach-card span {
  display: grid;
  min-width: 38px;
  min-height: 24px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.coach-card b {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.coach-action {
  min-height: 30px;
  padding: 4px 9px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--mint);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.18);
}

.scene-heading h2 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.08;
}

.scene-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.screen-dense .phone-top {
  padding-bottom: 3px;
}

.screen-dense .resource-rail {
  padding-bottom: 5px;
}

.screen-dense .cat-stage {
  margin-bottom: 5px;
  border-radius: 17px;
}

.screen-dense .scene-panel {
  padding: 9px;
  border-radius: 20px;
}

.screen-dense .scene-heading {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 7px;
}

.screen-dense .scene-emblem {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.screen-dense .scene-heading .mini-label {
  display: none;
}

.screen-dense .scene-heading h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.18;
}

.screen-dense .scene-tip {
  display: none;
}

.screen-dense .scene-visual {
  margin-bottom: 7px;
  border-radius: 16px;
}

.screen-dense .scene-visual__canvas {
  min-height: 60px;
}

.screen-dense .environment-svg {
  height: 78px;
}

.screen-dense .scene-object-row {
  right: 6px;
  bottom: 6px;
  gap: 5px;
}

.screen-dense .scene-object {
  width: 29px;
  height: 29px;
  padding: 2px;
  border-radius: 10px;
}

.screen-dense .scene-object__art {
  width: 23px;
  height: 23px;
}

.screen-dense .campus-map {
  height: 154px;
  border-radius: 16px;
}

.screen-dense .map-room {
  width: 46px;
  height: 46px;
  padding: 3px;
  border-radius: 15px;
}

.screen-dense .map-room__art {
  width: 34px;
  height: 34px;
}

.screen-dense .utility-dock {
  margin-bottom: 7px;
  padding-bottom: 3px;
}

.screen-dense .quick-action,
.screen-dense .course-status,
.screen-dense .deck-status,
.screen-dense .battle-ready,
.screen-dense .task-summary {
  padding: 9px;
}

.screen-dense .quick-action p,
.screen-dense .course-status span {
  display: none;
}

.screen-dense .big-cta {
  min-height: 46px;
  border-radius: 16px;
}

.screen-dense .mobile-card,
.screen-dense .stage-card,
.screen-dense .friend-card,
.screen-dense .task-card {
  padding: 9px;
  border-radius: 18px;
}

.screen-dense .card-icon,
.screen-dense .friend-avatar,
.screen-dense .stage-art {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 18px;
}

.screen-dense .mobile-card p,
.screen-dense .stage-card p,
.screen-dense .friend-card p,
.screen-dense .task-card p {
  margin-bottom: 2px;
}

.screen-dense .mobile-card small,
.screen-dense .stage-card small,
.screen-dense .friend-card small {
  display: none;
}

.screen-dense .card-info p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.screen-dense .deck-status small,
.screen-dense .battle-ready small {
  -webkit-line-clamp: 1;
}

.screen-dense .deck-prep__stage {
  height: 104px;
}

.screen-dense .battle-guide {
  padding: 9px;
}

.screen-dense .battle-guide__lead p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.screen-dense .battle-guide__steps article {
  padding: 6px;
}

.screen-dense .deck-prep__actor,
.screen-dense .deck-prep__target {
  top: 21px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.screen-dense .deck-slot {
  flex-basis: 94px;
  min-height: 68px;
  padding: 7px;
}

.bottom-nav {
  position: absolute;
  z-index: 9;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 7px 7px calc(7px + var(--safe-bottom));
  border: 3px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 235, 0.94);
  box-shadow: 0 -12px 34px rgba(56, 39, 25, 0.18);
  backdrop-filter: blur(12px);
}

.nav-item {
  position: relative;
  display: grid;
  gap: 2px;
  place-items: center;
  min-width: 0;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.utility-chip .nav-badge {
  position: static;
  margin-left: 2px;
  min-width: 16px;
  height: 16px;
  border-width: 1px;
  font-size: 9px;
}

.nav-item span {
  display: grid;
  width: 24px;
  height: 22px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 10px;
  font-size: 12px;
}

.nav-item b {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  border-color: var(--line);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 4px 0 #b98520;
  transform: translateY(-3px);
}

.mini-metrics,
.screw-hud,
.stat-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 9px;
}

.mini-metrics article,
.screw-hud article,
.stat-chip-grid article,
.reward-card,
.empty,
.course-status {
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.mini-metrics article,
.screw-hud article {
  padding: 8px 5px;
  text-align: center;
}

.mini-metrics span,
.screw-hud span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mini-metrics b,
.screw-hud b {
  font-size: 16px;
}

.battle-prep-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 19px;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, 0.9), transparent 24%),
    #fffdf4;
  box-shadow: 0 6px 0 rgba(56, 39, 25, 0.12);
}

.battle-prep-link.is-charged {
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, #fff6d7, #edfff5);
}

.battle-prep-link.is-high {
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(135deg, #fff0a8, #dff3ff);
}

.battle-prep-link div {
  min-width: 0;
}

.battle-prep-link span,
.battle-prep-link strong,
.battle-prep-link p {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-prep-link span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
  white-space: nowrap;
}

.battle-prep-link strong {
  margin: 2px 0;
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}

.battle-prep-link p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.32;
}

.battle-prep-link > i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.battle-prep-link > i em {
  display: block;
  height: 100%;
  border-right: 2px solid rgba(56, 39, 25, 0.42);
  background: linear-gradient(90deg, var(--orange), var(--sun), var(--green));
}

.battle-prep-link .soft-button {
  width: 88px;
  min-height: 40px;
  padding-right: 8px;
  padding-left: 8px;
}

.battle-prep-link--compact {
  margin-top: -2px;
}

.deck-status,
.battle-ready,
.task-summary,
.reward-summary,
.rarity-meter article {
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.deck-status,
.battle-ready,
.task-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
}

.deck-status.is-ready,
.battle-ready.is-ready {
  background: linear-gradient(135deg, rgba(169, 239, 208, 0.86), rgba(255, 255, 255, 0.88));
}

.deck-status span,
.battle-ready span,
.task-summary span,
.reward-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.deck-status strong,
.battle-ready strong,
.task-summary strong,
.reward-summary b {
  display: block;
  margin: 2px 0;
  font-size: 15px;
  line-height: 1.2;
}

.deck-status small,
.battle-ready small,
.task-summary small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.building-list,
.course-list,
.stage-list,
.park-list,
.task-list,
.card-list {
  display: grid;
  gap: 8px;
}

.screen-dense .card-list {
  gap: 7px;
}

.mobile-card,
.stage-card,
.friend-card,
.task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 6px 0 rgba(56, 39, 25, 0.11);
}

.building-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent), white 78%), rgba(255, 255, 255, 0.9));
}

.card-icon,
.friend-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid var(--line);
  border-radius: 17px;
  background: var(--accent, var(--mint));
  font-size: 20px;
  font-weight: 900;
}

.card-icon .art-slot,
.friend-avatar .art-slot,
.stage-art .art-slot {
  width: 100%;
  height: 100%;
}

.stage-art {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 17px;
  background: var(--blue);
}

.stat-chip-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.stat-art {
  width: 28px;
  height: 28px;
  padding: 2px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.mobile-card h3,
.stage-card h3,
.friend-card h3,
.task-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.mobile-card p,
.stage-card p,
.friend-card p,
.task-card p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mobile-card small,
.stage-card small,
.friend-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.progress {
  overflow: hidden;
  height: 10px;
  margin: 8px 0;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff8e8;
}

.progress span {
  display: block;
  height: 100%;
  border-right: 2px solid var(--line);
  background: linear-gradient(90deg, var(--orange), var(--sun));
}

.pill-button,
.soft-button,
.danger-button,
.big-cta,
.chip,
.tiny {
  border: 3px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.pill-button:active,
.soft-button:active,
.danger-button:active,
.big-cta:active,
.chip:active,
.tiny:active,
.coach-action:active,
.filter-chip:active,
.nav-item:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(56, 39, 25, 0.2);
}

.pill-button {
  min-width: 48px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 15px;
  background: var(--mint);
}

.soft-button {
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 14px;
  background: #fff;
}

.danger-button {
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 14px;
  background: #ffd8d2;
}

.big-cta {
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--sun);
  box-shadow: 0 7px 0 #b98520;
}

.full {
  width: 100%;
  margin-bottom: 10px;
}

.quick-action,
.course-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
  padding: 10px;
}

.quick-action h3,
.course-status b {
  display: block;
  margin: 0 0 5px;
  font-size: 16px;
}

.quick-action p,
.course-status span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.reward-card {
  margin-bottom: 12px;
  padding: 12px;
  font-weight: 900;
}

.screw-preview {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 24px 0 12px;
}

.screw-preview span {
  width: 44px;
  height: 44px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 43%, var(--line) 43% 57%, transparent 57%),
    #f5e6c7;
  animation: bob 1.6s ease-in-out infinite;
}

.screw-preview .art-slot {
  width: 44px;
  height: 44px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: #fff8e8;
  animation: bob 1.6s ease-in-out infinite;
}

.screw-preview span:nth-child(2n) {
  background:
    linear-gradient(90deg, transparent 43%, var(--line) 43% 57%, transparent 57%),
    var(--sun);
  animation-delay: 0.18s;
}

.screw-preview .art-slot:nth-child(2n) {
  background: #fff2b0;
  animation-delay: 0.18s;
}

.workbench {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px) 0 0 / 22px 22px,
    #8fd1c7;
}

.screw {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: #f7f1df;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.15);
}

.screw__slot {
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 43%, var(--line) 43% 57%, transparent 57%),
    linear-gradient(#d9dde1, #f6f0da);
  transform: rotate(24deg);
}

.screw__slot .vector-icon {
  transform: rotate(-24deg);
}

.screw small {
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 2px 6px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.screw.is-gold {
  background: #ffe789;
}

.screw.is-crooked {
  background: #ffd2c4;
  transform: rotate(-2deg);
}

.screw.is-chain {
  background: #d9ffd9;
}

.screw.is-done {
  background: var(--mint);
}

.stat-chip-grid {
  grid-template-columns: repeat(2, 1fr);
}

.stat-chip-grid article {
  padding: 11px;
}

.stat-chip-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.stat-chip-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
}

.deck-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 900;
}

.deck-toolbar > span {
  min-width: 0;
  line-height: 1.25;
}

.deck-toolbar > div {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
}

.filter-bar {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: -2px 0 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 32px;
  padding: 5px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-chip.is-active {
  background: var(--sun);
  color: var(--ink);
}

.chip {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
}

.chip.is-active {
  background: var(--sun);
}

.deck-lab {
  display: grid;
  gap: 9px;
}

.deck-prep {
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.82), transparent 20%),
    linear-gradient(180deg, #dff3ff 0%, #fff7df 72%);
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.12);
}

.deck-prep.is-ready {
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.82), transparent 20%),
    linear-gradient(180deg, #dff3ff 0%, #d9ffd6 72%);
}

.deck-prep__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px 7px;
}

.deck-prep__head span {
  display: inline-grid;
  width: max-content;
  margin-bottom: 3px;
  padding: 2px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.deck-prep__head strong,
.deck-prep__head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-prep__head strong {
  font-size: 16px;
}

.deck-prep__head small {
  color: var(--muted);
  font-size: 11px;
}

.deck-prep__stage {
  position: relative;
  height: 118px;
  margin: 0 10px 8px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(56, 39, 25, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
    radial-gradient(ellipse at 50% 110%, rgba(88, 207, 161, 0.55) 0 46%, transparent 47%),
    rgba(255, 255, 255, 0.58);
}

.deck-prep__actor,
.deck-prep__target {
  position: absolute;
  top: 23px;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.12);
  animation: battleIdle 2.4s ease-in-out infinite;
}

.deck-prep__actor {
  left: 26px;
}

.deck-prep__target {
  right: 26px;
  background: rgba(255, 240, 168, 0.82);
  animation-delay: -0.8s;
}

.deck-prep__path {
  position: absolute;
  inset: 0;
}

.deck-prep__path i {
  position: absolute;
  top: 50%;
  left: 31%;
  width: 16px;
  height: 16px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--sun);
  animation: deckPrepDot 2.2s ease-in-out infinite;
}

.deck-prep__path i:nth-child(2) {
  left: 48%;
  animation-delay: 0.18s;
}

.deck-prep__path i:nth-child(3) {
  left: 65%;
  animation-delay: 0.36s;
}

.deck-management-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin: 0 10px 10px;
  padding: 8px 10px;
  border: 2px dashed rgba(56, 39, 25, 0.36);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.deck-management-note b {
  display: inline-grid;
  padding: 3px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
  white-space: nowrap;
}

.deck-management-note span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.deck-slots {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 8px 10px;
  scrollbar-width: none;
}

.deck-slots::-webkit-scrollbar {
  display: none;
}

.deck-slot {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 0 6px;
  align-items: center;
  flex: 0 0 94px;
  min-height: 74px;
  padding: 9px 7px 31px;
  border: 3px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 0 rgba(56, 39, 25, 0.1);
  cursor: grab;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.deck-slot.is-filled {
  background: #fff6d7;
}

.deck-slot.is-drop-target {
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(255, 216, 88, 0.38), 0 4px 0 rgba(56, 39, 25, 0.1);
  transform: translateY(-2px);
}

.deck-slot.is-broken {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 107, 107, 0.16) 0 8px, transparent 8px 16px),
    #fff6d7;
}

.deck-slot__index {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.deck-slot__art {
  grid-row: 1 / span 3;
  align-self: start;
  width: 32px;
  height: 36px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
}

.deck-slot b,
.deck-slot small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-slot b {
  font-size: 12px;
}

.deck-slot small {
  color: var(--muted);
  font-size: 10px;
}

.deck-slot__moves {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.deck-slot__moves .tiny {
  min-width: 0;
  min-height: 25px;
  padding: 0;
  border-width: 2px;
  border-radius: 9px;
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.16);
}

.deck-toolbar--compact {
  margin-bottom: 0;
}

.deck-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -2px 12px;
  padding: 2px 2px 9px;
  scrollbar-width: none;
}

.deck-strip::-webkit-scrollbar {
  display: none;
}

.deck-card {
  flex: 0 0 112px;
  padding: 8px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff6d7;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.12);
}

.deck-card span {
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
}

.deck-card__art {
  width: 58px;
  height: 46px;
  margin: -30px 0 6px auto;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.deck-card strong,
.deck-card small {
  display: block;
}

.deck-card strong {
  font-size: 14px;
}

.deck-card small {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.tiny {
  min-width: 28px;
  min-height: 28px;
  border-radius: 10px;
  background: #fff;
}

.card-tile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: var(--card-tone);
  box-shadow: 0 6px 0 rgba(56, 39, 25, 0.12);
}

.card-tile.is-draggable {
  cursor: grab;
}

.card-tile.is-draggable:active,
.deck-slot:active {
  cursor: grabbing;
}

.card-tile.is-dragging,
.deck-slot.is-dragging,
.battle-pool-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.card-tile.is-locked {
  opacity: 0.5;
}

.card-tile.is-in-deck {
  box-shadow: 0 6px 0 rgba(24, 169, 153, 0.24);
}

.card-tile.is-broken {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 107, 107, 0.16) 0 8px, transparent 8px 16px),
    var(--card-tone);
}

.card-art {
  display: grid;
  width: 48px;
  height: 70px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, #fff, rgba(255, 255, 255, 0.35));
  color: var(--rarity-text);
  font-size: 28px;
  font-weight: 900;
}

.card-art-slot {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
}

.card-art-slot::before {
  position: absolute;
  inset: 4px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.75), transparent 18%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.68), transparent 58%);
  content: "";
}

.card-art-slot .vector-icon {
  position: relative;
  z-index: 1;
}

.card-art-rarity {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--rarity-text);
}

.card-art-slot.is-compact .card-art-rarity {
  width: 7px;
  height: 7px;
  border-width: 1px;
}

.card-info {
  min-width: 0;
}

.card-info span,
.card-info small {
  color: var(--muted);
  font-size: 10px;
}

.card-info b {
  color: var(--rarity-text);
  font-size: 11px;
}

.card-info h3 {
  margin: 3px 0 4px;
  font-size: 14px;
}

.card-info p {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.card-state {
  display: inline-grid;
  width: max-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 3px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--rarity-text);
  font-size: 10px;
  font-weight: 900;
}

.card-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.screen-dense .card-actions {
  grid-column: 2;
  margin-top: 2px;
}

.screen-dense .card-actions .pill-button,
.screen-dense .card-actions .danger-button,
.screen-dense .card-actions .soft-button {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 12px;
}

.battle-shell {
  display: grid;
  gap: 9px;
}

.battle-focus-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.86), transparent 24%),
    linear-gradient(135deg, #dff3ff, #fff6d7 58%, #d9ffd6);
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.12);
}

.battle-focus-head span {
  display: inline-grid;
  margin-bottom: 4px;
  padding: 3px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-focus-head h2 {
  overflow: hidden;
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-focus-head p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-focus-head small {
  grid-column: 1 / -1;
  display: block;
  padding: 7px 9px;
  border: 2px dashed rgba(56, 39, 25, 0.36);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.battle-focus-head__cta {
  min-width: 76px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 17px;
}

.battle-flow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.battle-flow-steps span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 4px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  text-align: center;
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.08);
}

.battle-flow-steps span.is-active {
  background: var(--sun);
  color: var(--ink);
  transform: translateY(-2px);
}

.battle-flow-steps span.is-done {
  background: var(--mint);
  color: var(--ink);
}

.battle-flow-steps i {
  display: grid;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
}

.battle-flow-steps b {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-draft,
.battle-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 216, 88, 0.74), rgba(255, 255, 255, 0.88)),
    #fff;
  box-shadow: 0 6px 0 rgba(56, 39, 25, 0.12);
}

.battle-draft {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.battle-draft.is-locked {
  background:
    linear-gradient(135deg, rgba(223, 243, 255, 0.82), rgba(255, 255, 255, 0.9)),
    #fff;
}

.battle-draft.is-ready,
.battle-plan.is-ready {
  background:
    linear-gradient(135deg, rgba(169, 239, 208, 0.86), rgba(255, 255, 255, 0.9)),
    #fff;
}

.battle-plan__main,
.battle-plan__tactic {
  min-width: 0;
}

.battle-plan__main span {
  display: inline-grid;
  margin-bottom: 4px;
  padding: 3px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-plan__main strong,
.battle-plan__tactic b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-plan__main strong {
  font-size: 16px;
  line-height: 1.15;
}

.battle-plan__main p,
.battle-plan__tactic small {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.battle-plan__chips {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.battle-plan__chips article {
  min-width: 0;
  padding: 6px 4px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.battle-plan__chips span,
.battle-plan__chips b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-plan__chips span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.battle-plan__chips b {
  margin-top: 1px;
  font-size: 13px;
}

.battle-plan__tactic {
  grid-column: 1 / -1;
  padding: 8px 9px;
  border: 2px dashed rgba(56, 39, 25, 0.36);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.battle-plan__cta {
  min-width: 74px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 17px;
}

.battle-draft__slots {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 10px;
  scrollbar-width: none;
}

.battle-draft__slots::-webkit-scrollbar {
  display: none;
}

.battle-draft__slots .deck-slot {
  flex: 0 0 96px;
  min-height: 90px;
}

.battle-phase-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.battle-phase-actions .soft-button,
.battle-phase-actions .big-cta {
  min-width: 88px;
}

.battle-phase-actions--after-slots {
  display: none;
}

.battle-match-panel__stats + .battle-phase-actions {
  display: none;
}

.battle-card-pool {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.battle-card-pool__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.battle-card-pool__head span {
  display: inline-grid;
  padding: 3px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff6d7;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-card-pool__head b {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-card-pool__list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 9px;
  scrollbar-width: none;
}

.battle-card-pool__list::-webkit-scrollbar {
  display: none;
}

.battle-pool-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 2px 7px;
  align-items: center;
  flex: 0 0 172px;
  min-height: 86px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 0 rgba(56, 39, 25, 0.1);
}

.battle-pool-card.is-selected {
  background: #fff6d7;
}

.battle-pool-card.is-broken {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 107, 107, 0.16) 0 8px, transparent 8px 16px),
    rgba(255, 255, 255, 0.78);
}

.battle-pool-card.is-draggable {
  cursor: grab;
}

.battle-pool-card__art {
  grid-row: 1 / span 3;
  width: 40px;
  height: 48px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.battle-pool-card b,
.battle-pool-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-pool-card b {
  font-size: 12px;
}

.battle-pool-card small {
  color: var(--muted);
  font-size: 10px;
}

.battle-pool-card button {
  justify-self: start;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 12px;
}

.battle-match-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.82), transparent 25%),
    linear-gradient(135deg, #dff3ff, #fff6d7);
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.12);
}

.battle-match-panel.is-matching .battle-match-panel__versus span {
  animation: artSlotPulse 0.9s ease-in-out infinite;
}

.battle-match-panel__copy {
  order: 1;
}

.battle-match-panel > .battle-phase-actions {
  order: 2;
}

.battle-match-panel__versus {
  order: 3;
}

.battle-match-panel__stats {
  order: 4;
}

.battle-match-panel__versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.battle-match-panel__versus article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.battle-match-panel__versus .vector-icon,
.battle-match-panel__versus .art-slot {
  width: 54px;
  height: 54px;
  margin: 0 auto;
}

.battle-match-panel__versus span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.16);
}

.battle-match-panel__versus b,
.battle-match-panel__versus small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-match-panel__versus b {
  font-size: 13px;
}

.battle-match-panel__versus small {
  color: var(--muted);
  font-size: 10px;
}

.battle-match-panel__copy {
  padding: 8px 9px;
  border: 2px dashed rgba(56, 39, 25, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.battle-match-panel__copy span,
.battle-match-panel__copy strong,
.battle-match-panel__copy p {
  display: block;
}

.battle-match-panel__copy span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-match-panel__copy strong {
  margin: 2px 0;
  font-size: 15px;
}

.battle-match-panel__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
}

.battle-match-panel__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.battle-match-panel__stats span {
  display: block;
  min-width: 0;
  padding: 6px 7px;
  overflow: hidden;
  border: 2px solid rgba(56, 39, 25, 0.38);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-match-panel__stats b {
  color: var(--ink);
}

.battle-guide {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.battle-guide__lead {
  min-width: 0;
}

.battle-guide__lead span {
  display: inline-grid;
  margin-bottom: 4px;
  padding: 2px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff6d7;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-guide__lead strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.battle-guide__lead p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.battle-guide__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.battle-guide__steps article {
  min-width: 0;
  padding: 7px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 246, 215, 0.72);
}

.battle-guide__steps i {
  display: grid;
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  font-style: normal;
  font-weight: 1000;
}

.battle-guide__steps b,
.battle-guide__steps small,
.battle-guide__focus b,
.battle-guide__focus small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-guide__steps b {
  font-size: 12px;
  white-space: nowrap;
}

.battle-guide__steps small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.battle-guide__focus {
  padding: 8px 9px;
  border: 2px dashed rgba(56, 39, 25, 0.34);
  border-radius: 16px;
  background: rgba(217, 255, 214, 0.52);
}

.battle-guide__focus b {
  font-size: 12px;
  white-space: nowrap;
}

.battle-guide__focus small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.battle-theater {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.82), transparent 20%),
    linear-gradient(180deg, #dff3ff 0%, #ecfff4 58%, #fff6d7 100%);
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.12);
}

.battle-theater.is-ready {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.82), transparent 20%),
    linear-gradient(180deg, #dff3ff 0%, #d9ffd6 58%, #fff6d7 100%);
}

.battle-theater.is-ended {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.84), transparent 22%),
    linear-gradient(180deg, #fff6d7 0%, #edfff5 58%, #fff 100%);
}

.battle-theater.is-ended .battle-actor__sprite,
.battle-theater.is-ended .battle-projectile,
.battle-theater.is-ended .battle-impact,
.battle-theater.is-ended .battle-float,
.battle-theater.is-ended .battle-spine-stage [class*="art-"] {
  animation: none !important;
}

.battle-theater.is-ended .battle-projectile,
.battle-theater.is-ended .battle-impact {
  opacity: 0;
}

.battle-theater.is-ended .battle-float,
.battle-theater.is-ended .battle-round-focus {
  animation: battleStatusFade 5s ease forwards;
}

.battle-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px 7px;
}

.battle-command span {
  display: inline-grid;
  width: max-content;
  margin-bottom: 3px;
  padding: 2px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.battle-command strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-command small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-spine-stage {
  position: relative;
  height: 222px;
  margin: 0 10px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(56, 39, 25, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(ellipse at 50% 95%, rgba(88, 207, 161, 0.64) 0 36%, transparent 37%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(127, 213, 255, 0.32));
}

.battle-spine-stage::before {
  position: absolute;
  inset: 58% 8% 14%;
  border: 3px solid rgba(56, 39, 25, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  content: "";
}

.battle-lane {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.battle-lane__line {
  position: absolute;
  top: 47%;
  right: 27%;
  left: 27%;
  border-top: 3px dashed rgba(56, 39, 25, 0.28);
}

.battle-projectile {
  position: absolute;
  z-index: 4;
  top: 28%;
  left: 27%;
  display: grid;
  width: 48px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  animation: battleCardFly 2.6s ease-in-out infinite;
}

.battle-projectile.is-enemy {
  right: 27%;
  left: auto;
  animation-name: battleCardFlyBack;
}

.battle-projectile.is-tool-hit {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff8e8;
  animation-duration: 0.5s;
}

.battle-projectile.is-card-skill {
  width: 54px;
  height: 54px;
  aspect-ratio: 1;
  border-width: 3px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 246, 215, 0.92)),
    #fff6d7;
  box-shadow:
    0 0 0 5px rgba(255, 216, 88, 0.22),
    0 8px 0 rgba(56, 39, 25, 0.12);
  animation-duration: 5s;
}

.battle-projectile.is-card-skill .card-art-slot {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}

.battle-projectile.is-card-skill .card-art-slot::before {
  border-radius: 5px;
}

.battle-projectile.is-paused {
  opacity: 0;
  animation: none;
}

.battle-end-overlay {
  position: absolute;
  z-index: 8;
  top: 12px;
  left: 50%;
  display: grid;
  min-width: 168px;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff3ec;
  text-align: center;
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.16);
  transform: translateX(-50%);
}

.battle-end-overlay.is-win {
  background: #edfff5;
}

.battle-end-overlay span,
.battle-end-overlay strong,
.battle-end-overlay small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-end-overlay span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-end-overlay strong {
  font-size: 22px;
  line-height: 1.05;
}

.battle-end-overlay small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.battle-impact {
  position: absolute;
  z-index: 3;
  top: 32%;
  right: 22%;
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--sun);
  opacity: 0;
  animation: battleImpact 2.6s ease-in-out infinite;
}

.battle-impact.is-player-side {
  right: auto;
  left: 22%;
}

.battle-float {
  position: absolute;
  z-index: 6;
  top: 16%;
  min-width: 52px;
  padding: 4px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  box-shadow: 0 4px 0 rgba(56, 39, 25, 0.12);
  pointer-events: none;
  animation: battleFloat 2.6s ease-in-out infinite;
}

.battle-float--enemy {
  right: 12%;
}

.battle-float--player {
  left: 12%;
}

.battle-float--damage,
.battle-float--break {
  background: #fff0e8;
  color: #d95030;
}

.battle-float--heal {
  background: #e8fff1;
  color: #238c61;
}

.battle-float--shield {
  background: #e8f5ff;
  color: #2271b1;
}

.battle-float--recoil,
.battle-float--miss {
  background: #f6f0ff;
  color: #6f55a6;
}

.battle-actor {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  display: grid;
  width: 118px;
  gap: 6px;
}

.battle-actor--player {
  left: 12px;
}

.battle-actor--enemy {
  right: 12px;
}

.battle-actor__sprite {
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 6px 0 rgba(56, 39, 25, 0.14);
  animation: battleIdle 2.3s ease-in-out infinite;
}

.battle-actor__sprite.is-enemy {
  background: rgba(255, 240, 168, 0.78);
  animation-delay: -0.6s;
}

.battle-actor.is-defeated .battle-actor__sprite {
  opacity: 0.58;
  filter: grayscale(0.8);
  transform: translateY(10px) rotate(-4deg);
  animation: none;
}

.battle-actor.is-defeated .battle-actor__hud {
  background: #fff3ec;
}

.battle-actor__hud {
  min-height: 47px;
  padding: 5px 6px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.08);
}

.battle-actor__hud b,
.battle-actor__hud small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-actor__hud b {
  font-size: 11px;
}

.battle-actor__hud small {
  color: var(--muted);
  font-size: 9px;
}

.battle-hp {
  overflow: hidden;
  height: 8px;
  margin: 4px 0 3px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff0e8;
}

.battle-hp span {
  display: block;
  height: 100%;
  border-right: 2px solid var(--line);
  background: linear-gradient(90deg, var(--green), var(--mint));
  transition: width 0.3s ease;
}

.battle-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
  margin: 0 10px 8px;
  padding: 7px 9px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -3px 0 rgba(56, 39, 25, 0.06);
}

.battle-progress.is-playing {
  background: #fff6d7;
}

.battle-progress.is-ended {
  background: #fff3ec;
}

.battle-progress.is-ended.is-win {
  background: #edfff5;
}

.battle-progress span {
  display: inline-grid;
  min-width: 68px;
  padding: 3px 7px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  font-size: 10px;
  font-weight: 1000;
}

.battle-progress b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-progress i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.battle-progress em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--sun));
  transition: width 0.3s ease;
}

.battle-round-focus {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 5px 8px;
  align-items: center;
  min-height: 70px;
  margin: 8px 10px 0;
  padding: 7px 9px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 -3px 0 rgba(56, 39, 25, 0.06);
}

.battle-round-focus.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.battle-round-focus > span {
  display: inline-grid;
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 72px;
  padding: 3px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff6d7;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
  text-align: center;
}

.battle-round-focus b,
.battle-round-focus small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-round-focus b {
  font-size: 12px;
}

.battle-round-focus small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

.battle-round-card {
  display: grid;
  grid-row: 2 / span 2;
  width: 44px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.battle-round-focus.is-damage,
.battle-round-focus.is-break {
  background: #fff3ec;
}

.battle-round-focus.is-basic {
  background: rgba(255, 255, 255, 0.86);
}

.battle-round-focus.is-card {
  border-width: 3px;
  background: #fff6d7;
  box-shadow: inset 0 -3px 0 rgba(56, 39, 25, 0.06), 0 0 0 4px rgba(255, 216, 88, 0.18);
}

.battle-round-focus.is-heal,
.battle-round-focus.is-shield {
  background: #edfff5;
}

.battle-queue {
  display: grid;
  gap: 7px;
  padding: 8px 10px 10px;
}

.battle-queue__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
}

.battle-queue__head span {
  display: inline-grid;
  padding: 3px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-queue__head b,
.battle-queue__head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-queue__head b {
  font-size: 12px;
}

.battle-queue__head small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.battle-queue__cards {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: none;
}

.battle-queue__cards::-webkit-scrollbar {
  display: none;
}

.battle-queue-card {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1px 6px;
  align-items: center;
  flex: 0 0 118px;
  min-height: 70px;
  padding: 10px 8px 13px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.08);
}

.battle-queue-card.is-used {
  background: var(--mint);
}

.battle-queue-card.is-current {
  background: var(--sun);
  transform: translateY(-2px);
}

.battle-queue-card > span {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 1000;
}

.battle-queue-card > div {
  grid-row: 1 / span 3;
  align-self: start;
  width: 30px;
  height: 36px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.battle-queue-card > b,
.battle-queue-card > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-queue-card > b {
  font-size: 11px;
}

.battle-queue-card > small {
  color: var(--muted);
  font-size: 9px;
}

.battle-queue-card > em {
  position: absolute;
  z-index: 2;
  right: 4px;
  bottom: 4px;
  min-width: 26px;
  max-width: 52px;
  padding: 2px 4px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff0e8;
  color: #d95030;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.battle-queue-card > em.is-heal,
.battle-queue-card > em.is-shield {
  background: #e8fff1;
  color: #238c61;
}

.battle-queue-card > em.is-break {
  background: #fff6d7;
  color: #ad6b00;
}

.battle-queue-card > em.is-miss,
.battle-queue-card > em.is-recoil {
  background: #f6f0ff;
  color: #6f55a6;
}

.battle-event-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 0 10px 10px;
}

.battle-event-rail > span {
  padding-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.battle-event-rail > b {
  padding: 7px 9px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 11px;
}

.battle-event-rail > div {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: none;
}

.battle-event-rail > div::-webkit-scrollbar {
  display: none;
}

.battle-event-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 6px;
  align-items: center;
  flex: 0 0 154px;
  min-height: 48px;
  padding: 6px 7px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 0 rgba(56, 39, 25, 0.08);
}

.battle-event-chip i {
  display: grid;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: #fff6d7;
  color: var(--orange);
  font-style: normal;
  font-weight: 1000;
}

.battle-event-chip b,
.battle-event-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-event-chip b {
  font-size: 10px;
}

.battle-event-chip small {
  color: var(--muted);
  font-size: 9px;
}

.battle-event-chip.is-enemy {
  background: #fff9dc;
}

.battle-event-chip.is-damage,
.battle-event-chip.is-break {
  border-color: #be5a37;
}

.battle-event-chip.is-heal,
.battle-event-chip.is-shield {
  border-color: #2d9e71;
}

.battle-stage-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 9px;
  scrollbar-width: none;
}

.battle-stage-rail::-webkit-scrollbar {
  display: none;
}

.battle-stage-chip {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 1px 6px;
  align-items: center;
  flex: 0 0 168px;
  min-height: 74px;
  padding: 7px;
  border: 3px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 4px 0 rgba(56, 39, 25, 0.1);
}

.battle-stage-chip.is-active {
  background: #fff0a8;
  transform: translateY(-2px);
}

.battle-stage-chip__art {
  grid-row: 1 / span 4;
  width: 34px;
  height: 34px;
}

.battle-stage-chip span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
}

.battle-stage-chip b {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-stage-chip small,
.battle-stage-chip em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-stage-chip em {
  color: #238c61;
}

.battle-empty {
  padding: 10px;
  border: 2px dashed rgba(56, 39, 25, 0.38);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.battle-log-panel {
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.battle-log-panel summary {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.battle-log-panel .battle-log {
  max-height: 180px;
  border: 0;
  border-top: 2px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.stage-list {
  margin-bottom: 12px;
}

.stage-card {
  margin-bottom: 10px;
}

.stage-card.is-active {
  background: #fff0a8;
  transform: rotate(-0.4deg);
}

.battle-result {
  display: grid;
  gap: 10px;
}

.battle-report {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.86), transparent 22%),
    #fff3ec;
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.12);
}

.battle-report.is-win {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.86), transparent 22%),
    #edfff5;
}

.battle-report__head span,
.battle-report__head strong,
.battle-report__head small {
  display: block;
}

.battle-report__head span {
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-report__head strong {
  margin: 5px 0 3px;
  font-size: 20px;
  line-height: 1.12;
}

.battle-report__head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.battle-report__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.battle-report__metrics article {
  min-width: 0;
  padding: 7px 5px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.battle-report__metrics span,
.battle-report__metrics b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-report__metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.battle-report__metrics b {
  margin-top: 2px;
  font-size: 12px;
}

.battle-report__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.battle-report__actions .soft-button,
.battle-report__actions .big-cta {
  width: 100%;
}

.battle-impact-report {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fffdf4;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.battle-impact-report div {
  min-width: 0;
  padding: 8px 7px;
  border: 2px dashed rgba(56, 39, 25, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.battle-impact-report span,
.battle-impact-report b,
.battle-impact-report small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-impact-report span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
  white-space: nowrap;
}

.battle-impact-report b {
  margin: 2px 0;
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}

.battle-impact-report small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
}

.battle-prize-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(56, 39, 25, 0.36);
  backdrop-filter: blur(4px);
}

.battle-prize-card {
  position: relative;
  display: grid;
  width: min(100%, 340px);
  max-height: calc(100% - 28px);
  gap: 9px;
  overflow-y: auto;
  padding: 20px 16px 16px;
  border: 4px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.92), transparent 22%),
    linear-gradient(180deg, #fff6d7, #edfff5 70%, #fff);
  box-shadow: 0 16px 0 rgba(56, 39, 25, 0.2);
  text-align: center;
  animation: prizeCardIn 0.24s ease both;
}

.battle-prize-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 4px 0 rgba(56, 39, 25, 0.16);
}

.battle-prize-card__icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin: 0 auto 2px;
  border: 4px solid var(--line);
  border-radius: 26px;
  background: var(--sun);
  box-shadow: 0 7px 0 rgba(56, 39, 25, 0.16);
  animation: prizePop 0.72s ease both;
}

.battle-prize-card__icon .vector-icon {
  width: 58px;
  height: 58px;
}

.battle-prize-card > span,
.battle-prize-card > strong,
.battle-prize-card > small,
.battle-prize-card > p {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.battle-prize-card > span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 1000;
}

.battle-prize-card > strong {
  font-size: 24px;
  line-height: 1.12;
}

.battle-prize-card > small,
.battle-prize-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
}

.battle-prize-card__rewards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.battle-prize-card__rewards span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 10px 8px;
  border: 3px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.battle-prize-card__rewards small,
.battle-prize-card__rewards b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-prize-card__rewards small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
}

.battle-prize-card__rewards b {
  color: #238c61;
  font-size: 18px;
}

.battle-prize-card .big-cta {
  width: 100%;
}

.battle-report__cards {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 2px dashed rgba(56, 39, 25, 0.36);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.58);
}

.battle-report__cards > span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 1000;
}

.battle-report__cards > div {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.battle-report__cards > div::-webkit-scrollbar {
  display: none;
}

.battle-report__cards article {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 6px;
  align-items: center;
  flex: 0 0 136px;
  min-height: 54px;
  padding: 7px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.76);
}

.battle-report__cards article > i {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 4px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
}

.battle-report__cards .card-art-slot,
.battle-report__cards .vector-icon {
  grid-row: 1 / span 2;
  width: 32px;
  height: 38px;
}

.battle-report__cards article > b,
.battle-report__cards article > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-report__cards article > b {
  font-size: 11px;
}

.battle-report__cards article > small {
  color: var(--muted);
  font-size: 9px;
}

.battle-verdict {
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff3ec;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.1);
}

.battle-verdict.is-win {
  background: #edfff5;
}

.battle-verdict span,
.battle-verdict b,
.battle-verdict small {
  display: block;
}

.battle-verdict span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 1000;
}

.battle-verdict b {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.35;
}

.battle-verdict small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.battle-ready .big-cta {
  min-width: 76px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 17px;
}

.versus {
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  gap: 8px;
  align-items: center;
}

.versus article,
.versus b {
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.11);
}

.versus article {
  padding: 10px 6px;
}

.versus b {
  display: grid;
  min-height: 58px;
  place-items: center;
  background: var(--orange);
  color: #fff;
}

.versus span,
.versus small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.versus strong {
  display: block;
  margin: 3px 0;
  font-size: 16px;
}

.reward-summary {
  padding: 9px 11px;
  background: linear-gradient(135deg, rgba(255, 216, 88, 0.64), rgba(255, 255, 255, 0.9));
}

.battle-log {
  max-height: 210px;
  margin: 0;
  padding: 12px 12px 12px 28px;
  overflow: auto;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  line-height: 1.65;
}

.screen-dense .battle-log {
  max-height: 180px;
  font-size: 11px;
}

.friend-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  text-align: left;
}

.task-card {
  display: block;
  margin-bottom: 10px;
}

.task-card__head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.task-art {
  width: 38px;
  height: 38px;
  padding: 2px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.task-summary {
  background: linear-gradient(135deg, rgba(255, 184, 166, 0.72), rgba(255, 255, 255, 0.9));
}

.task-summary strong {
  font-size: 22px;
}

.task-card .pill-button {
  min-height: 34px;
}

.seven-day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.seven-day-strip::-webkit-scrollbar {
  display: none;
}

.day-card {
  flex: 0 0 118px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(56, 39, 25, 0.12);
}

.day-card.is-locked {
  opacity: 0.55;
}

.day-card span {
  display: inline-grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.day-art {
  display: block;
  width: 54px;
  height: 46px;
  margin: -30px 0 8px auto;
}

.day-card p {
  min-height: 54px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.rarity-meter {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.rarity-meter article {
  padding: 9px;
  background: var(--card-tone);
}

.rarity-meter span {
  color: var(--rarity-text);
  font-size: 11px;
  font-weight: 900;
}

.rarity-meter b {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}

.codex-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.codex-list span {
  padding: 7px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.codex-list span.owned {
  background: var(--mint);
  color: var(--ink);
}

.empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

@keyframes catIdle {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-1deg) scale(var(--cat-scale, 1));
  }
  50% {
    transform: translateX(-50%) translateY(-6px) rotate(1deg) scale(var(--cat-scale, 1));
  }
}

@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

@keyframes pawWave {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  45% {
    transform: rotate(-28deg) translateY(-4px);
  }
}

@keyframes tailWag {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(12deg);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(14px);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(8deg);
  }
}

@keyframes artSway {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-2px) rotate(2deg);
  }
}

@keyframes artSlotFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes artSlotPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes artSlotSpark {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 216, 88, 0));
    transform: translateY(0);
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(255, 216, 88, 0.65));
    transform: translateY(-2px);
  }
}

@keyframes battleIdle {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes battleCardFly {
  0%,
  18% {
    opacity: 0;
    transform: translateX(0) translateY(8px) rotate(-8deg) scale(0.9);
  }
  32%,
  70% {
    opacity: 1;
  }
  62% {
    transform: translateX(126px) translateY(-8px) rotate(8deg) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateX(146px) translateY(-4px) rotate(12deg) scale(0.96);
  }
}

@keyframes battleCardFlyBack {
  0%,
  18% {
    opacity: 0;
    transform: translateX(0) translateY(8px) rotate(8deg) scale(0.9);
  }
  32%,
  70% {
    opacity: 1;
  }
  62% {
    transform: translateX(-126px) translateY(-8px) rotate(-8deg) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateX(-146px) translateY(-4px) rotate(-12deg) scale(0.96);
  }
}

@keyframes battleImpact {
  0%,
  58%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  66% {
    opacity: 0.95;
    transform: scale(1.15);
  }
  76% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes battleFloat {
  0%,
  54%,
  100% {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  64%,
  82% {
    opacity: 1;
    transform: translateY(-10px) scale(1.08);
  }
  92% {
    opacity: 0;
    transform: translateY(-22px) scale(0.98);
  }
}

@keyframes battleStatusFade {
  0%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes prizePop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.86);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes prizeCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes deckPrepDot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-6px) scale(1.05);
  }
}

@keyframes artWiggle {
  0%,
  100% {
    transform: rotate(-1deg);
  }
  45% {
    transform: rotate(4deg) translateX(1px);
  }
}

@keyframes artPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.86;
  }
}

@keyframes artSpark {
  0%,
  100% {
    transform: scale(0.92) rotate(0deg);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.12) rotate(8deg);
    opacity: 1;
  }
}

@keyframes artSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mapRoomReady {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-3px);
  }
}

@media (max-width: 460px) {
  .app-shell {
    width: 100vw;
    min-height: 100dvh;
    padding: 8px;
  }

  .phone-frame {
    width: min(100%, 430px);
    height: calc(100dvh - 16px);
    border: 3px solid rgba(56, 39, 25, 0.9);
    border-radius: 30px;
    box-shadow: 0 14px 42px rgba(56, 39, 25, 0.22);
  }

  .phone-frame::before {
    display: none;
  }

  .phone-top {
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
  }
}

@media (max-width: 360px) {
  .phone-scroll {
    padding-right: 9px;
    padding-left: 9px;
  }

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

  .battle-flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .battle-plan__cta {
    width: 100%;
  }

  .battle-plan__chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-draft__slots {
    gap: 5px;
  }

  .battle-draft__slots .deck-slot {
    flex-basis: 88px;
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 88px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .battle-draft__slots .deck-slot__art {
    width: 28px;
    height: 34px;
  }

  .battle-draft__slots .deck-slot__moves {
    right: 5px;
    left: 5px;
    gap: 3px;
  }

  .battle-draft__slots .deck-slot__moves .tiny {
    min-height: 24px;
    font-size: 11px;
  }

  .battle-phase-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .battle-phase-actions .soft-button,
  .battle-phase-actions .big-cta {
    width: 100%;
  }

  .battle-match-panel__versus {
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  }

  .battle-match-panel__versus span {
    width: 42px;
    height: 42px;
  }

  .battle-report__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-prep-link {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-prep-link .soft-button {
    width: 100%;
  }

  .battle-impact-report {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-prize-modal {
    padding: 14px;
  }

  .battle-prize-card {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    border-radius: 21px;
  }

  .battle-prize-card__rewards {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .battle-guide__steps article {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 0 7px;
    align-items: center;
  }

  .battle-guide__steps i {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }

  .bottom-nav {
    right: 8px;
    left: 8px;
    gap: 4px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .nav-item {
    min-height: 44px;
    border-radius: 15px;
  }

  .nav-item span {
    width: 22px;
    height: 21px;
    border-radius: 9px;
  }

  .nav-badge {
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 9px;
  }

  .coach-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .coach-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .deck-toolbar {
    display: grid;
  }

  .campus-map {
    height: 146px;
  }

  .map-room {
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .map-room__art {
    width: 31px;
    height: 31px;
  }

  .campus-map__meta {
    max-width: 118px;
  }

  .campus-map__meta span {
    display: none;
  }

  .battle-spine-stage {
    height: 208px;
  }

  .battle-actor {
    width: 102px;
  }

  .battle-actor--player {
    left: 8px;
  }

  .battle-actor--enemy {
    right: 8px;
  }

  .battle-actor__sprite {
    width: 68px;
    height: 68px;
    border-radius: 20px;
  }

  .battle-projectile {
    top: 25%;
    width: 42px;
    height: 36px;
  }

  .battle-float--enemy {
    right: 7%;
  }

  .battle-float--player {
    left: 7%;
  }

  .battle-round-focus {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .battle-event-chip {
    flex-basis: 138px;
  }

  .battle-stage-chip {
    flex-basis: 150px;
  }
}

@media (max-height: 780px) {
  .cat-world {
    height: 160px;
  }

  .cat-character {
    --cat-scale: 0.82;
    transform-origin: bottom center;
  }

  .cat-summary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
