:root {
  --ink: #172033;
  --muted: #627086;
  --paper: #f8fbff;
  --line: #d6e1ef;
  --blue: #2f80ed;
  --cyan: #35c2d7;
  --gold: #f3b33d;
  --red: #d94f55;
  --green: #46a66b;
  --violet: #6d5bd0;
  --shadow: 0 18px 45px rgba(29, 48, 78, 0.18);
  font-family: "Segoe UI", "Yu Gothic UI", "Hiragino Sans", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.8)),
    radial-gradient(circle at 18% 18%, rgba(53, 194, 215, 0.24), transparent 34%),
    radial-gradient(circle at 78% 8%, rgba(243, 179, 61, 0.18), transparent 30%),
    linear-gradient(135deg, #dfeeff 0%, #f9fcff 48%, #eaf7f2 100%);
}

button {
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  filter: grayscale(0.45);
  opacity: 0.54;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  width: min(1280px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
}

.battlefield,
.side-panel section {
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.battlefield {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.eyebrow,
.topbar h1 {
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.05;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-toggle {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(47, 128, 237, 0.25);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(180deg, #35c2d7, #2f80ed);
  box-shadow: 0 6px 16px rgba(47, 128, 237, 0.2);
}

.turn-box {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 8px;
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.turn-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.turn-box strong {
  font-size: 28px;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background:
    linear-gradient(180deg, rgba(115, 193, 241, 0.92), rgba(219, 246, 255, 0.88) 52%, rgba(123, 188, 137, 0.86) 53%, rgba(93, 154, 105, 0.9));
}

.sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  left: -4%;
  bottom: -2%;
  z-index: 1;
  width: min(850px, 69%);
  max-height: 92%;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 24px 32px rgba(30, 55, 84, 0.32)) saturate(1.08);
  opacity: 0.92;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 45%, rgba(214, 241, 255, 0.3));
  pointer-events: none;
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  width: 36vw;
  height: 11vw;
  min-width: 270px;
  min-height: 76px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  filter: blur(2px);
}

.sky::before {
  top: 10%;
  left: 5%;
}

.sky::after {
  top: 24%;
  right: 6%;
}

.island {
  position: absolute;
  display: block;
  width: 180px;
  height: 48px;
  border-radius: 50%;
  background: #6a9b73;
  box-shadow: inset 0 -16px 0 #527d57;
}

.island::after {
  content: "";
  position: absolute;
  left: 54px;
  top: 38px;
  border-left: 38px solid transparent;
  border-right: 38px solid transparent;
  border-top: 92px solid #8d6a45;
}

.island-a {
  left: 7%;
  top: 21%;
  transform: scale(0.72);
}

.island-b {
  right: 8%;
  top: 12%;
  transform: scale(0.52);
}

.island-c {
  left: 40%;
  top: 33%;
  transform: scale(0.42);
  opacity: 0.75;
}

.enemy-wrap {
  position: absolute;
  top: 34px;
  right: min(8vw, 86px);
  z-index: 4;
  width: min(420px, 48%);
  min-width: 270px;
}

.enemy-card {
  position: relative;
  z-index: 3;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(38, 66, 98, 0.18);
}

.enemy-name-row,
.hptext {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

#enemyMode {
  color: var(--red);
}

.hpbar {
  overflow: hidden;
  width: 100%;
  height: 10px;
  margin: 8px 0 5px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.16);
}

.hpbar.large {
  height: 14px;
}

.hpbar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
  transition: width 280ms ease;
}

.hptext {
  color: var(--muted);
  font-size: 12px;
}

.enemy-sprite {
  position: relative;
  width: min(320px, 78%);
  aspect-ratio: 1;
  margin: 22px auto 0;
  animation: enemyFloat 2.7s ease-in-out infinite;
}

.crystal {
  position: absolute;
  display: block;
  background: linear-gradient(145deg, #f7ffff 0%, #88e1ec 35%, #346dd7 100%);
  clip-path: polygon(50% 0, 88% 22%, 78% 78%, 50% 100%, 21% 78%, 12% 22%);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.72);
}

.core {
  inset: 18% 31%;
  z-index: 3;
}

.wing {
  top: 28%;
  width: 31%;
  height: 42%;
  opacity: 0.88;
}

.wing.left {
  left: 6%;
  transform: rotate(-28deg);
}

.wing.right {
  right: 6%;
  transform: rotate(28deg);
}

.halo {
  left: 23%;
  top: 2%;
  width: 54%;
  height: 21%;
  border: 11px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: transparent;
  clip-path: none;
}

.party-line {
  position: absolute;
  z-index: 5;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.member-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(38, 66, 98, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.member-card.active {
  transform: translateY(-8px);
  box-shadow: 0 18px 34px rgba(38, 66, 98, 0.25);
}

.portrait-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.portrait {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  color: #fff;
  background-image: var(--portrait), var(--fallback);
  background-position: var(--portrait-pos), center;
  background-size: 470%, cover;
  background-repeat: no-repeat;
  font-size: 28px;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.member-name {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-role {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ougi {
  height: 9px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.18);
}

.ougi span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 240ms ease;
}

.floating-text {
  position: absolute;
  z-index: 8;
  top: 45%;
  left: 50%;
  min-width: 220px;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: clamp(26px, 5vw, 58px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 3px 0 rgba(23, 32, 51, 0.5), 0 14px 30px rgba(23, 32, 51, 0.34);
  opacity: 0;
  pointer-events: none;
}

.cutin {
  position: absolute;
  inset: 13% 0 auto;
  z-index: 7;
  display: grid;
  grid-template-columns: 58% minmax(220px, 1fr);
  align-items: center;
  height: min(230px, 42%);
  padding: 12px 36px;
  background:
    linear-gradient(90deg, rgba(10, 18, 38, 0.9), rgba(47, 128, 237, 0.72), rgba(255, 255, 255, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  border-block: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 48px rgba(23, 32, 51, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.cutin.show {
  animation: cutinSlide 1100ms ease both;
}

.cutin-image {
  height: 100%;
  background-image: url("assets/heroines-key-art.png");
  background-position: var(--cutin-pos, 15% 45%);
  background-size: 240%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.35));
}

.cutin-copy {
  color: #fff;
  text-align: right;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.cutin-copy span {
  display: block;
  color: #ffe18c;
  font-size: 15px;
  font-weight: 900;
}

.cutin-copy strong {
  display: block;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
}

.floating-text.show {
  animation: popText 820ms ease;
}

.command-panel {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 86px 86px;
  gap: 8px;
}

.attack-button,
.guard-button,
.reset-button,
.skill,
.summon button,
.gacha-actions button {
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 12px rgba(29, 48, 78, 0.11);
}

.attack-button {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-color: rgba(47, 128, 237, 0.28);
  color: #fff;
  background: linear-gradient(180deg, #63bcff, #2f80ed 70%, #2366bf);
}

.attack-button span {
  font-size: 28px;
  font-weight: 900;
}

.attack-button small {
  font-size: 11px;
  font-weight: 800;
}

.guard-button,
.reset-button {
  min-height: 82px;
  font-weight: 800;
}

.guard-button {
  background: #f6fbff;
}

.reset-button {
  background: #fff9ef;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.skill {
  display: grid;
  min-height: 82px;
  padding: 9px;
  text-align: left;
}

.skill strong {
  align-self: start;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill span {
  align-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.side-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 18px;
}

.side-panel section {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.gacha-panel {
  overflow: hidden;
}

.gacha-meter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 12px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(243, 179, 61, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf6, #fff5d9);
}

.gacha-meter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gacha-meter strong {
  color: #a66e11;
  font-size: 24px;
}

.gacha-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px;
}

.gacha-actions button {
  min-height: 46px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(180deg, #7b68ee, #2f80ed);
}

.gacha-actions button:nth-child(2) {
  background: linear-gradient(180deg, #ffbd58, #d94f55);
}

.rate-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gacha-result {
  margin: 10px 12px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f4f8fd);
}

.gacha-result.ssr {
  border-color: rgba(243, 179, 61, 0.72);
  box-shadow: 0 0 0 3px rgba(243, 179, 61, 0.13);
}

.gacha-result.ur {
  border-color: rgba(213, 107, 214, 0.78);
  box-shadow: 0 0 0 3px rgba(213, 107, 214, 0.17);
}

.gacha-result strong,
.gacha-result small {
  display: block;
}

.gacha-result strong {
  margin-top: 6px;
  font-size: 15px;
}

.gacha-result small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.gacha-result ul {
  display: grid;
  gap: 5px;
  max-height: 130px;
  margin: 10px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.gacha-result li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #354257;
  font-size: 12px;
  font-weight: 700;
}

.rarity {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.rarity.r,
.rarity.sr {
  background: linear-gradient(180deg, #8fa1b8, #627086);
}

.rarity.ssr {
  background: linear-gradient(180deg, #ffe18c, #f3b33d 55%, #b97815);
}

.rarity.ur {
  background: linear-gradient(180deg, #ffffff, #d56bd6 45%, #6d5bd0);
  box-shadow: 0 0 16px rgba(213, 107, 214, 0.58);
}

.summon {
  padding: 14px;
}

.summon-art {
  position: relative;
  overflow: hidden;
  height: 180px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9), transparent 13%),
    conic-gradient(from 0deg, #ff8a4b, #ffe082, #f44f6c, #6d5bd0, #ff8a4b);
}

.summon-art span {
  position: absolute;
  inset: 20px;
  clip-path: polygon(50% 0, 60% 34%, 96% 22%, 68% 48%, 100% 64%, 61% 61%, 50% 100%, 39% 61%, 0 64%, 32% 48%, 4% 22%, 40% 34%);
  background: rgba(255, 255, 255, 0.75);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.24));
}

.summon button {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(180deg, #ffb14f, #d94f55);
}

.summon p {
  min-height: 38px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.log-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 260px;
  overflow: hidden;
}

.panel-title {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

#battleLog {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  list-style: none;
}

#battleLog li {
  padding: 8px 9px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #f4f8fd;
  color: #354257;
  font-size: 13px;
  line-height: 1.45;
}

.roster-panel {
  overflow: hidden;
}

#rosterList {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.roster-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f4f8fd);
}

.roster-thumb {
  width: 58px;
  aspect-ratio: 1;
  border-radius: 8px;
  background-image: url("assets/heroines-key-art.png");
  background-position: var(--portrait-pos);
  background-size: 470%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.roster-item strong,
.roster-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-item strong {
  font-size: 15px;
}

.roster-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.roster-item.obtained {
  background: linear-gradient(180deg, #fff, #fff8e7);
}

.roster-item.obtained.ur {
  background: linear-gradient(180deg, #fff, #f6edff);
}

.roster-item em {
  color: #b97815;
  font-style: normal;
}

.roster-item.ur em {
  color: #6d5bd0;
}

.gacha-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 24, 43, 0.0);
  opacity: 0;
  pointer-events: none;
}

.gacha-overlay.show {
  animation: overlayFade 1300ms ease both;
}

.gacha-overlay.show.ur {
  animation-duration: 1800ms;
}

.gacha-burst {
  display: grid;
  place-items: center;
  width: min(520px, 92vw);
  min-height: 340px;
  padding: 28px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.9), rgba(243, 179, 61, 0.55) 22%, rgba(47, 128, 237, 0.2) 48%, rgba(10, 18, 38, 0.92) 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  transform: scale(0.72);
}

.gacha-overlay.ur .gacha-burst {
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.95), rgba(213, 107, 214, 0.66) 22%, rgba(109, 91, 208, 0.35) 50%, rgba(10, 18, 38, 0.94) 100%);
}

.gacha-overlay.show .gacha-burst {
  animation: burstPop 980ms ease both;
}

.burst-orb {
  width: 148px;
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background-image: url("assets/heroines-key-art.png");
  background-position: var(--portrait-pos);
  background-size: 470%;
  box-shadow: 0 0 42px rgba(255, 225, 140, 0.86), inset 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.gacha-overlay.ur .burst-orb {
  box-shadow: 0 0 56px rgba(213, 107, 214, 0.96), inset 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.gacha-burst span {
  margin-top: 14px;
  color: #ffe18c;
  font-size: clamp(54px, 11vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.42);
}

.gacha-overlay.ur .gacha-burst span {
  color: #f7d7ff;
}

.gacha-burst strong {
  margin-top: 8px;
  font-size: clamp(22px, 5vw, 36px);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.screen-flash {
  animation: flash 260ms ease;
}

.shake {
  animation: shake 260ms ease;
}

@keyframes enemyFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-13px);
  }
}

@keyframes popText {
  0% {
    opacity: 0;
    transform: translate(-50%, -34%) scale(0.76);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -72%) scale(1.08);
  }
}

@keyframes cutinSlide {
  0% {
    opacity: 0;
    transform: translateX(-100%) skewX(-8deg);
  }
  16%,
  76% {
    opacity: 1;
    transform: translateX(0) skewX(-8deg);
  }
  100% {
    opacity: 0;
    transform: translateX(100%) skewX(-8deg);
  }
}

@keyframes flash {
  0%,
  100% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.35);
  }
}

@keyframes overlayFade {
  0%,
  100% {
    opacity: 0;
    background: rgba(14, 24, 43, 0);
  }
  15%,
  78% {
    opacity: 1;
    background: rgba(14, 24, 43, 0.7);
  }
}

@keyframes burstPop {
  0% {
    transform: scale(0.65) rotate(-2deg);
    filter: brightness(1.8);
  }
  24%,
  75% {
    transform: scale(1) rotate(0);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(0.96);
    filter: brightness(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

@media (max-width: 1040px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .log-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
  }

  .battlefield,
  .side-panel section {
    border-radius: 0;
  }

  .topbar {
    align-items: start;
    padding: 12px;
  }

  .top-controls {
    flex-direction: column;
    align-items: end;
  }

  .stage {
    min-height: 560px;
  }

  .enemy-wrap {
    top: 20px;
    right: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
  }

  .enemy-sprite {
    width: 210px;
  }

  .hero-art {
    left: -28%;
    width: 118%;
    opacity: 0.7;
  }

  .party-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .command-panel {
    grid-template-columns: 1fr;
  }

  .action-row {
    grid-template-columns: 1fr 76px 76px;
  }

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

  .side-panel {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cutin {
    grid-template-columns: 48% 1fr;
    height: 170px;
    padding: 10px 16px;
  }

  .cutin-copy strong {
    font-size: 42px;
  }
}
