:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: #0c111d;
  --line: rgba(255, 255, 255, 0.11);
  --muted: #8c96a8;
  --white: #f4f7fb;
  --gojo: #43d7ff;
  --gojo-deep: #2477ff;
  --sukuna: #ff4f5f;
  --sukuna-deep: #a71935;
  --gold: #efc66a;
  --platform-gold: #d2aa4f;
  --platform-navy: #101a2e;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(58, 78, 120, 0.2), transparent 42%),
    linear-gradient(145deg, #080b13, #04060b 70%);
  color: var(--white);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

button { font: inherit; }

.game-shell {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(370px, 540px) minmax(220px, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 68px);
  padding: 18px clamp(24px, 4vw, 72px);
}

.stage-column {
  position: relative;
  width: 100%;
  height: 94vh;
  max-height: 960px;
  height: min(94vh, 960px);
  height: min(94dvh, 960px);
  min-height: 620px;
  display: grid;
  grid-template-rows: 58px 1fr 38px;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.46));
}

.topbar, .statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(10, 14, 24, 0.92);
  backdrop-filter: blur(16px);
}

.topbar {
  padding: 0 12px;
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
}

.statusbar {
  padding: 0 15px;
  border-radius: 0 0 18px 18px;
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

#modeStatus {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-lockup { text-align: center; line-height: 1.05; }
.title-lockup span { display: block; color: #758096; font-size: 8px; letter-spacing: 0.24em; }
.title-lockup strong { font-size: 18px; letter-spacing: 0.18em; }

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #b8c2d2;
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover { color: #fff; border-color: rgba(255, 255, 255, 0.28); }

.arena {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-inline: 1px solid var(--line);
  background: #080c14;
  isolation: isolate;
  touch-action: none;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.arena[data-mode="single"] #gameCanvas { cursor: crosshair; }

.hud {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 13px 14px;
  background: linear-gradient(to bottom, rgba(5, 7, 13, 0.82), transparent);
  pointer-events: none;
}

.fighter-hud { min-width: 0; }
.hud-name { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 12px; }
.hud-name b { font: 700 11px/1 ui-monospace, monospace; color: #fff; }
.sukuna-hud .hud-name { text-align: right; }

.health-track, .charge-track, .domain-track {
  height: 7px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.charge-track { height: 2px; margin-top: 4px; }
.domain-track { height: 2px; margin-top: 3px; background: rgba(255, 255, 255, .065); }
.health-fill, .charge-fill, .domain-fill { height: 100%; transform-origin: left; transition: transform 220ms ease-out; }
.health-fill { background: linear-gradient(90deg, var(--gojo-deep), var(--gojo)); }
.sukuna-hud .health-fill { background: linear-gradient(90deg, #8f112b, var(--sukuna)); }
.charge-fill { background: #b774ff; transform: scaleX(0); }
.sukuna-hud .charge-fill { background: var(--gold); }
.domain-fill { background: linear-gradient(90deg, #7253ff, #d8c5ff, #74ecff); transform: scaleX(0); box-shadow: 0 0 8px rgba(152, 116, 255, .65); }
.sukuna-hud .domain-fill { background: linear-gradient(90deg, #7e1029, #ff4f5f, #ffc56c); box-shadow: 0 0 8px rgba(255, 63, 86, .58); }

.summon-hud { margin-top: 5px; }
.summon-hud > span {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 2px;
  color: #d9c27c;
  font-size: 8px;
  letter-spacing: .08em;
}
.summon-hud b { color: #fff0ba; font: 700 8px/1 ui-monospace, monospace; }
.summon-health-track { height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.09); }
.summon-health-fill {
  height: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, #776132, #e1c45f, #fff2b0);
  box-shadow: 0 0 7px rgba(225,196,95,.55);
  transition: transform 180ms ease-out;
}

.round-badge {
  margin-top: 16px;
  color: #aab4c5;
  font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: 0.18em;
}

.battle-dialogue {
  position: absolute;
  z-index: 7;
  top: 72px;
  left: 14px;
  max-width: min(82%, 390px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(68, 217, 255, .25);
  border-left: 3px solid var(--gojo);
  border-radius: 4px;
  background: linear-gradient(100deg, rgba(12, 42, 68, .9), rgba(8, 13, 23, .78));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  backdrop-filter: blur(11px);
  pointer-events: none;
  animation: dialogue-in 180ms ease-out both;
}

.battle-dialogue.sukuna {
  right: 14px;
  left: auto;
  flex-direction: row-reverse;
  padding: 10px 10px 10px 14px;
  border-right: 3px solid var(--sukuna);
  border-left: 1px solid rgba(255, 78, 100, .25);
  background: linear-gradient(260deg, rgba(70, 18, 30, .9), rgba(13, 9, 16, .8));
  text-align: right;
}

.dialogue-sigil {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(114, 223, 255, .38);
  border-radius: 50%;
  background: rgba(38, 111, 255, .16);
  color: #c8f5ff;
  font: 900 17px/1 "STKaiti", "KaiTi", serif;
}

.sukuna .dialogue-sigil {
  border-color: rgba(255, 103, 119, .42);
  background: rgba(154, 23, 50, .2);
  color: #ffd0d5;
}

.dialogue-copy { min-width: 0; }
.dialogue-copy strong { display: block; color: #8deaff; font-size: 9px; letter-spacing: .13em; }
.sukuna .dialogue-copy strong { color: #ff929e; }
.dialogue-copy p { margin: 4px 0 0; color: #f5f8ff; font-size: 12px; line-height: 1.55; }

@keyframes dialogue-in {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

.overlay {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(rgba(5, 8, 14, 0.65), rgba(5, 8, 14, 0.82)),
    radial-gradient(circle at 50% 34%, rgba(47, 92, 151, 0.32), transparent 42%);
}

.menu-overlay::before, .menu-overlay::after {
  content: "";
  position: absolute;
  inset: 6% 8%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  clip-path: polygon(0 0, 30% 0, 30% 1px, 70% 1px, 70% 0, 100% 0, 100% 100%, 70% 100%, 70% calc(100% - 1px), 30% calc(100% - 1px), 30% 100%, 0 100%);
  pointer-events: none;
}

.menu-overlay::after { inset: 8% 11%; border-color: rgba(68, 215, 255, 0.08); }
.seal { color: rgba(255, 255, 255, 0.2); font-size: 22px; }
.seal-top { margin-bottom: 16px; }
.kicker { color: var(--gojo); font: 700 9px/1.2 ui-monospace, monospace; letter-spacing: 0.23em; }

.menu-copy h1 {
  margin: 12px 0 8px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(42px, 8vh, 67px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
}

.menu-copy h1 span { color: #cfd7e5; -webkit-text-stroke: 1px #fff; }
.menu-copy p { max-width: 320px; margin: 0 auto; color: #9ca7b9; font-size: 12px; line-height: 1.8; }

.mode-grid {
  width: min(82%, 390px);
  display: grid;
  gap: 9px;
  margin-top: 34px;
}

.mode-card {
  position: relative;
  display: block;
  min-height: 72px;
  padding: 14px 17px 14px 68px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  color: #eef3fb;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: 180ms ease;
}

.mode-card:hover, .mode-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(67, 215, 255, 0.52);
  background: rgba(67, 215, 255, 0.08);
  outline: none;
}

.mode-primary { border-color: rgba(67, 215, 255, 0.25); }
.mode-no { position: absolute; left: 17px; top: 21px; color: rgba(255, 255, 255, 0.2); font: 800 22px/1 ui-monospace, monospace; }
.mode-label { display: block; font-size: 16px; font-weight: 800; letter-spacing: 0.08em; }
.mode-card small { display: block; margin-top: 5px; color: #8994a6; font-size: 10px; }
.menu-note { margin-top: 18px; color: #687285; font-size: 10px; }

.creator-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.creator-links-menu {
  width: min(86%, 420px);
  margin-top: 13px;
}

.thanks-letter-button {
  position: relative;
  width: 46px;
  height: 34px;
  margin-top: 8px;
  padding: 0;
  border: 1px solid rgba(105, 215, 255, .24);
  border-radius: 8px;
  background: rgba(36, 83, 111, .12);
  color: #bdefff;
  cursor: pointer;
  transition: 160ms ease;
}
.thanks-letter-button::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff4e64;
  box-shadow: 0 0 8px rgba(255, 78, 100, .9);
}
.thanks-envelope {
  display: block;
  color: #c8f3ff;
  font-size: 22px;
  line-height: 32px;
  transform-origin: 50% 65%;
  filter: drop-shadow(0 0 7px rgba(68, 217, 255, .36));
  animation: thanks-envelope-shake 3.2s ease-in-out infinite;
}
.thanks-letter-button:hover, .thanks-letter-button:focus-visible { transform: translateY(-2px); border-color: rgba(105, 215, 255, .68); background: rgba(55, 130, 166, .18); color: #fff; outline: none; }
.thanks-letter-button:hover .thanks-envelope, .thanks-letter-button:focus-visible .thanks-envelope { animation-duration: .9s; }

@keyframes thanks-envelope-shake {
  0%, 70%, 100% { transform: translateX(0) rotate(0deg); }
  74% { transform: translateX(-2px) rotate(-7deg); }
  78% { transform: translateX(3px) rotate(7deg); }
  82% { transform: translateX(-2px) rotate(-5deg); }
  86% { transform: translateX(2px) rotate(4deg); }
  90% { transform: translateX(0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .thanks-envelope { animation: none; }
}

.creator-links-result { width: 100%; }

.creator-link {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: #f4f7fc;
  text-decoration: none;
  transition: 160ms ease;
}

.creator-link:hover, .creator-link:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.creator-link-mark {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
}

.creator-link strong {
  min-width: 0;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .03em;
}

.creator-primary-link {
  border-color: rgba(150, 102, 236, .48);
  background: linear-gradient(110deg, rgba(123, 79, 216, .22), rgba(39, 29, 71, .3));
  color: #f2eaff;
}
.creator-primary-link:hover, .creator-primary-link:focus-visible { border-color: rgba(179, 139, 255, .9); background: linear-gradient(110deg, rgba(132, 84, 230, .34), rgba(53, 35, 94, .42)); }
.creator-primary-link .creator-link-mark { background: #8b5de0; color: #fff; box-shadow: 0 0 15px rgba(139, 93, 224, .28); }

.bilibili-link {
  border-color: rgba(251, 114, 153, .4);
  color: #ffdce7;
}
.bilibili-link:hover, .bilibili-link:focus-visible { border-color: rgba(251, 114, 153, .86); background: rgba(251, 114, 153, .12); }
.bilibili-link .creator-link-mark { background: #fb7299; color: #fff; }

.platform-credit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: #95856a;
  font-size: 9px;
  text-decoration: none;
  letter-spacing: .04em;
  transition: 160ms ease;
}

.platform-credit:hover { color: #e2c47e; }
.platform-credit img,
.platform-status-link img,
.platform-result-card > img {
  display: block;
  object-fit: contain;
  border-radius: 50%;
  background: #f7f3e9;
}
.platform-credit img { width: 18px; height: 18px; padding: 2px; }

.difficulty-overlay {
  background:
    linear-gradient(rgba(5, 8, 14, .76), rgba(5, 8, 14, .9)),
    radial-gradient(circle at 50% 35%, rgba(47, 92, 151, .28), transparent 48%);
}

.difficulty-overlay h2 {
  margin: 13px 0 7px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 39px;
  letter-spacing: .1em;
}

.difficulty-overlay > p { margin: 0; color: #8f9aac; font-size: 11px; }
.difficulty-grid { width: min(84%, 400px); display: grid; gap: 9px; margin-top: 27px; }
.difficulty-card {
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 6px;
  background: rgba(255,255,255,.035);
  color: #eef3fb;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}
.difficulty-card:hover, .difficulty-card:focus-visible { transform: translateY(-2px); outline: none; }
.difficulty-card.easy:hover { border-color: rgba(91, 224, 166, .56); background: rgba(61, 169, 121, .1); }
.difficulty-card.normal { border-color: rgba(67,215,255,.28); }
.difficulty-card.normal:hover { border-color: rgba(67,215,255,.62); background: rgba(67,215,255,.09); }
.difficulty-card.shura:hover { border-color: rgba(255,78,100,.65); background: rgba(255,78,100,.09); }
.difficulty-card.abyss { border-color: rgba(190, 126, 255, .3); }
.difficulty-card.abyss:hover { border-color: rgba(210, 154, 255, .76); background: rgba(139, 71, 204, .13); }
.difficulty-mark { grid-row: 1 / 3; color: rgba(255,255,255,.21); font: 800 18px/1 ui-monospace, monospace; }
.difficulty-card strong { align-self: end; font-size: 15px; letter-spacing: .08em; }
.difficulty-card small { align-self: start; margin-top: 3px; color: #8490a2; font-size: 9px; }
.difficulty-card.selected::after {
  content: "推荐";
  position: absolute;
  right: 12px;
  top: 10px;
  color: #6fe5ff;
  font-size: 8px;
  letter-spacing: .12em;
}
.difficulty-overlay > .text-button { margin-top: 18px; padding: 10px 18px; }

.countdown {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: 900 clamp(80px, 18vh, 150px)/1 ui-monospace, monospace;
  text-shadow: 0 0 38px rgba(67, 215, 255, 0.45);
  pointer-events: none;
}

.result-overlay { background: rgba(4, 7, 12, 0.78); backdrop-filter: blur(8px); }
.result-overlay h2 { margin: 15px 0 7px; font-family: "STKaiti", "KaiTi", serif; font-size: 46px; }
.result-overlay p { margin: 0; color: #8f9aac; font-size: 12px; }
.result-overlay .challenge-victory-praise {
  width: min(82%, 430px);
  margin-top: 14px;
  color: #d8efff;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(16px, 2.4vh, 21px);
  line-height: 1.55;
  text-shadow: 0 0 18px rgba(68, 217, 255, 0.3);
}
.result-actions { width: min(84%, 360px); display: grid; gap: 11px; margin-top: 26px; }

.thanks-letter-overlay {
  z-index: 22;
  justify-content: center;
  padding: clamp(12px, 3vh, 24px);
  background: rgba(2, 5, 10, .9);
  backdrop-filter: blur(12px);
  text-align: left;
}

.thanks-letter-panel {
  position: relative;
  width: min(94%, 510px);
  max-height: min(92%, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(89, 202, 244, .28);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(19, 31, 50, .96), rgba(5, 9, 17, .98)),
    radial-gradient(circle at 50% 0, rgba(70, 202, 255, .16), transparent 48%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .58);
}

.thanks-close-button {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 6px;
  background: rgba(255, 255, 255, .055);
  color: #cbd5e4;
  font-size: 22px;
  cursor: pointer;
}
.thanks-close-button:hover, .thanks-close-button:focus-visible { border-color: rgba(103, 220, 255, .58); color: #fff; outline: none; }

.thanks-letter-heading { flex: 0 0 auto; padding: 24px 58px 16px 25px; border-bottom: 1px solid rgba(255, 255, 255, .075); }
.thanks-letter-heading h2 { margin: 10px 0 8px; color: #f6fbff; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(22px, 3.5vh, 31px); line-height: 1.35; }
.thanks-letter-heading > p { margin: 0; color: #65dfff; font: 700 9px/1.5 ui-monospace, monospace; letter-spacing: .1em; }

.thanks-letter-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 25px 28px;
  color: #c6d0df;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 215, 255, .45) rgba(255, 255, 255, .04);
}
.thanks-letter-scroll p { margin: 0 0 16px; font-size: 12px; line-height: 1.95; text-align: left; }
.thanks-letter-scroll .thanks-letter-lead { color: #f5fbff; font-size: 14px; font-weight: 800; }
.thanks-letter-scroll a { color: #77e2ff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.thanks-letter-scroll footer { padding-top: 4px; color: #7e8b9e; font: 700 10px/1.5 ui-monospace, monospace; text-align: right; }

.action-button {
  min-width: 180px;
  padding: 13px 22px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(110deg, #dbe8f4, #fff);
  color: #111722;
  font-weight: 900;
  cursor: pointer;
}

.text-button { border: 0; background: transparent; color: #8894a7; cursor: pointer; }

.platform-result-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0 11px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(210,170,79,.42);
  border-radius: 7px;
  background: linear-gradient(115deg, rgba(210,170,79,.12), rgba(16,26,46,.72));
  color: #f5f0e5;
  text-align: left;
  text-decoration: none;
  transition: 170ms ease;
}
.platform-result-card:hover { transform: translateY(-2px); border-color: rgba(239,198,106,.75); background: linear-gradient(115deg, rgba(210,170,79,.18), rgba(16,26,46,.82)); }
.platform-result-card > img { width: 42px; height: 42px; padding: 4px; grid-row: 1 / 3; }
.platform-result-card span { min-width: 0; display: grid; }
.platform-result-card small { color: #d2aa4f; font-size: 8px; letter-spacing: .12em; }
.platform-result-card strong { margin-top: 3px; color: #fff; font-size: 12px; line-height: 1.35; }
.platform-result-card em { margin-top: 3px; color: #8f98a8; font-size: 8px; font-style: normal; line-height: 1.35; }
.platform-result-card b { grid-column: 2; margin-top: 7px; color: #e6c675; font-size: 9px; letter-spacing: .05em; }

.platform-status-link {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #a99a7c;
  text-decoration: none;
  letter-spacing: .04em;
  transition: 150ms ease;
}
.platform-status-link:hover { color: #e5c77e; }
.platform-status-link img { width: 22px; height: 22px; padding: 2px; }
.platform-status-link span { color: #c8ad6b; font-weight: 700; font-size: 10px; }
.platform-status-link small { color: #707b8d; font-size: 8px; }

.touch-controls {
  position: absolute;
  z-index: 8;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  pointer-events: none;
}

.attack-button {
  min-width: 0;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  backdrop-filter: blur(12px);
}

.attack-button small { grid-column: 1; color: rgba(255,255,255,.62); font-size: 9px; }
.attack-button strong { grid-column: 1; font-size: 13px; }
.attack-button span { grid-column: 2; grid-row: 1 / 3; font: 800 16px/1 ui-monospace, monospace; opacity: .45; }
.gojo-button { background: linear-gradient(120deg, rgba(18, 75, 126, 0.78), rgba(14, 26, 49, 0.72)); }
.sukuna-button { background: linear-gradient(120deg, rgba(73, 17, 31, 0.72), rgba(33, 15, 23, 0.78)); text-align: right; }
.attack-button:active { transform: scale(.97); filter: brightness(1.35); }

.single-tap-hint {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 14px;
  min-width: 190px;
  padding: 9px 18px 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(68, 217, 255, .24);
  border-radius: 999px;
  background: rgba(8, 24, 42, .72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.single-tap-hint span { display: block; color: #83e6ff; font-size: 8px; letter-spacing: .14em; }
.single-tap-hint strong { display: block; margin-top: 2px; color: #f5fbff; font-size: 12px; }

.info-panel { max-width: 320px; color: #8994a6; }
.info-left { justify-self: end; text-align: right; }
.info-right { justify-self: start; }
.eyebrow { color: #647085; font: 700 10px/1 ui-monospace, monospace; letter-spacing: .22em; }
.info-panel h2 { margin: 10px 0; color: #eaf0f8; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(25px, 2.4vw, 36px); }
.info-panel p { margin: 0 0 22px; font-size: 12px; line-height: 1.85; }
.key-row { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.info-left .key-row { justify-content: flex-end; }
kbd { min-width: 36px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.16); border-bottom-width: 3px; border-radius: 8px; background: #111826; color: #eaf2ff; text-align: center; }
.key-row span { font-size: 11px; }
.ability-list { display: grid; gap: 10px; font-size: 11px; }
.dot { width: 7px; height: 7px; display: inline-block; margin: 0 7px 0 0; border-radius: 50%; box-shadow: 0 0 9px currentColor; }
.cyan { color: #43d7ff; background: currentColor; }
.red { color: #ff536d; background: currentColor; }
.purple { color: #b060ff; background: currentColor; }
.slash { color: #ff536d; background: currentColor; }
.cleave { color: #fff; background: currentColor; }
.flame { color: #ffb13b; background: currentColor; }
.info-left .dot { margin: 0 0 0 7px; }
.info-left .ability-list span { display: flex; flex-direction: row-reverse; align-items: center; }

.rotate-hint {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(5,7,12,.93);
  text-align: center;
  pointer-events: auto;
}

.rotate-hint strong { color: #f4f8ff; font-size: 18px; letter-spacing: .08em; }
.rotate-hint span { color: #8490a4; font-size: 11px; }

.hidden { display: none !important; }

@media (max-width: 980px) {
  .game-shell {
    height: 100vh;
    height: var(--app-height, 100vh);
    height: 100dvh;
    min-height: 100vh;
    min-height: var(--app-height, 100vh);
    min-height: 100dvh;
    grid-template-columns: 1fr;
    padding: 0;
  }
  .info-panel { display: none; }
  .stage-column {
    width: 100%;
    max-width: 600px;
    width: min(100vw, 600px);
    height: 100vh;
    height: var(--app-height, 100vh);
    height: 100dvh;
    min-height: 100vh;
    min-height: var(--app-height, 100vh);
    min-height: 100dvh;
    max-height: none;
    margin: auto;
    grid-template-rows: 52px minmax(0, 1fr) 34px;
    grid-template-rows:
      calc(52px + env(safe-area-inset-top, 0px))
      minmax(0, 1fr)
      calc(34px + env(safe-area-inset-bottom, 0px));
  }
  .topbar, .statusbar { border-radius: 0; }
  .topbar { padding: 0 12px; }
  .topbar { padding: env(safe-area-inset-top, 0px) 12px 0; }
  .statusbar { padding: 0 15px; }
  .statusbar { padding: 0 15px env(safe-area-inset-bottom, 0px); }
  .icon-button { width: 44px; height: 44px; }
  .platform-status-link small { display: none; }
}

@media (max-height: 680px) and (min-width: 981px) {
  .game-shell { grid-template-columns: minmax(180px, 1fr) minmax(320px, 440px) minmax(180px, 1fr); padding-block: 8px; }
  .stage-column { height: 98vh; height: 98dvh; min-height: 0; grid-template-rows: 48px minmax(0, 1fr) 30px; }
  .menu-copy h1 { font-size: 45px; }
  .mode-grid { margin-top: 22px; }
  .mode-card { min-height: 60px; padding-block: 9px; }
  .creator-links-menu { margin-top: 8px; }
  .creator-link { min-height: 34px; padding-block: 5px; }
  .thanks-letter-button { width: 42px; height: 31px; margin-top: 4px; }
  .thanks-envelope { font-size: 20px; line-height: 29px; }
  .seal-top { display: none; }
}

@media (max-width: 560px) {
  .menu-copy h1 { font-size: 48px; }
  .mode-grid { width: 86%; }
  .touch-controls { bottom: 9px; }
  .attack-button { height: 58px; }
  .hud { padding-inline: 10px; }
  .round-badge { font-size: 8px; }
  .platform-status-link span { font-size: 9px; }
  .platform-status-link img { width: 20px; height: 20px; }
  .difficulty-overlay h2 { font-size: 34px; }
  .difficulty-grid { width: 88%; margin-top: 22px; }
  .difficulty-card { min-height: 62px; }
  .platform-result-card { padding: 10px 11px; }
  .creator-links-menu { width: 90%; }
  .creator-link { padding-inline: 8px; }
  .creator-link strong { font-size: 8.5px; }
  .thanks-letter-overlay { padding: 9px; }
  .thanks-letter-panel { width: 100%; max-height: 96%; }
  .thanks-letter-heading { padding: 20px 52px 13px 18px; }
  .thanks-letter-heading h2 { font-size: 23px; }
  .thanks-letter-scroll { padding: 15px 18px 24px; }
  .thanks-letter-scroll p { font-size: 11.5px; line-height: 1.85; }
}

@media (max-width: 980px) and (max-height: 720px) {
  .seal-top { display: none; }
  .menu-copy h1 { margin-block: 7px 5px; font-size: 40px; }
  .menu-copy p { line-height: 1.45; }
  .mode-grid { gap: 6px; margin-top: 16px; }
  .mode-card { min-height: 57px; padding-block: 8px; }
  .mode-no { top: 17px; }
  .menu-note { margin-top: 9px; }
  .creator-links-menu { margin-top: 7px; }
  .thanks-letter-button { margin-top: 3px; }
  .platform-credit { margin-top: 5px; }
}
