:root {
  color-scheme: dark;
  --ink: #090b1a;
  --ink-soft: #10142b;
  --panel: rgba(16, 20, 43, 0.92);
  --panel-bright: #171d3a;
  --line: rgba(138, 154, 255, 0.2);
  --line-bright: rgba(88, 236, 255, 0.58);
  --cyan: #58ecff;
  --cyan-soft: #9af5ff;
  --violet: #9b78ff;
  --pink: #ff6ea8;
  --coral: #ff8a70;
  --gold: #ffd66b;
  --text: #f7f4ff;
  --muted: #9ba7c6;
  --board: #d49d63;
  --board-dark: #8c542f;
  --black-stone: #111525;
  --white-stone: #f7eefa;
  --shadow: 8px 8px 0 rgba(0, 0, 0, 0.28);
  --pixel-border:
    0 -3px 0 0 currentColor,
    0 3px 0 0 currentColor,
    -3px 0 0 0 currentColor,
    3px 0 0 0 currentColor;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(9, 11, 26, 0.88), rgba(9, 11, 26, 0.96)),
    linear-gradient(90deg, rgba(88, 236, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(88, 236, 255, 0.05) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 32px 32px, 32px 32px, auto;
  color: var(--text);
  font-family:
    "SFMono-Regular", "Cascadia Code", "PingFang SC", "Microsoft YaHei",
    monospace;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(90px);
  content: "";
  opacity: 0.13;
}

body::before {
  top: -200px;
  left: -170px;
  background: var(--violet);
}

body::after {
  right: -190px;
  bottom: -240px;
  background: var(--cyan);
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--text);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.scanlines {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.055) 4px
  );
  opacity: 0.55;
}

.page-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.16em;
}

.brand small {
  color: var(--cyan);
  font-size: 0.58rem;
  letter-spacing: 0.25em;
}

.brand-gem {
  position: relative;
  width: 22px;
  height: 22px;
  background: var(--cyan);
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 0 6px var(--violet),
    0 0 18px var(--cyan);
  transform: rotate(45deg) scale(0.74);
}

.brand-gem::after {
  position: absolute;
  inset: 6px;
  background: var(--ink);
  content: "";
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.pixel-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  background: var(--ink-soft);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.42);
  color: var(--cyan-soft);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition:
    transform 100ms steps(2),
    background 100ms linear;
}

.pixel-button::before,
.pixel-button::after {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--cyan);
  content: "";
}

.pixel-button::before {
  top: -1px;
  left: -1px;
}

.pixel-button::after {
  right: -1px;
  bottom: -1px;
}

.pixel-button:hover {
  background: #1c2448;
  transform: translate(-1px, -1px);
}

.pixel-button:active {
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.42);
  transform: translate(2px, 2px);
}

.pixel-button.primary {
  border-color: var(--violet);
  background: var(--violet);
  color: white;
}

.pixel-button.primary::before,
.pixel-button.primary::after {
  background: var(--cyan-soft);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  align-items: end;
  gap: 56px;
  padding: 54px 0 42px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 15px;
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
}

h1 {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1px var(--cyan);
  text-shadow: 4px 4px 0 rgba(155, 120, 255, 0.35);
}

.intro-copy {
  max-width: 520px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 2;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(500px, 1.55fr) minmax(210px, 0.62fr);
  gap: 20px;
  align-items: stretch;
}

.player-panel,
.board-panel,
.info-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.player-panel,
.info-panel {
  min-width: 0;
  padding: 22px;
}

.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.15em;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #6cffad;
  box-shadow: 0 0 8px #6cffad;
}

.mascot-stage {
  position: relative;
  display: grid;
  min-height: 300px;
  margin: 18px 0;
  overflow: hidden;
  place-items: end center;
  border: 1px solid rgba(155, 120, 255, 0.3);
  background:
    linear-gradient(135deg, rgba(155, 120, 255, 0.12), transparent 45%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 27px,
      rgba(88, 236, 255, 0.06) 28px
    ),
    #0d1125;
}

.mascot-stage::before {
  position: absolute;
  bottom: 16px;
  width: 190px;
  height: 32px;
  border: 2px solid rgba(88, 236, 255, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(88, 236, 255, 0.18);
  content: "";
}

.pixel-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--cyan);
  box-shadow:
    8px 0 0 var(--cyan),
    -8px 0 0 var(--cyan),
    0 8px 0 var(--cyan),
    0 -8px 0 var(--cyan);
  animation: sparkle 1.8s steps(3) infinite;
}

.spark-one {
  top: 54px;
  left: 18%;
}

.spark-two {
  top: 100px;
  right: 14%;
  animation-delay: -0.6s;
}

.spark-three {
  right: 24%;
  bottom: 52px;
  background: var(--pink);
  box-shadow:
    8px 0 0 var(--pink),
    -8px 0 0 var(--pink),
    0 8px 0 var(--pink),
    0 -8px 0 var(--pink);
  animation-delay: -1.1s;
}

@keyframes sparkle {
  50% {
    opacity: 0.25;
    transform: scale(0.65);
  }
}

.mascot {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 282px;
  filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, 0.32));
  transform-origin: bottom;
  animation: mascot-idle 2.4s steps(3) infinite;
}

@keyframes mascot-idle {
  50% {
    transform: translateY(3px);
  }
}

.mascot-hair-back {
  position: absolute;
  z-index: 1;
  top: 36px;
  left: 35px;
  width: 112px;
  height: 142px;
  background: #272a55;
  box-shadow:
    -7px 12px 0 #171b3d,
    7px 12px 0 #171b3d,
    -13px 32px 0 #171b3d,
    13px 32px 0 #171b3d,
    0 8px 0 var(--violet);
  clip-path: polygon(14% 0, 86% 0, 100% 24%, 92% 100%, 72% 88%, 50% 100%, 27% 88%, 8% 100%, 0 24%);
}

.mascot-head {
  position: absolute;
  z-index: 4;
  top: 45px;
  left: 48px;
  width: 88px;
  height: 92px;
  background: #ffd0b7;
  box-shadow:
    inset -7px 0 0 #e89d91,
    0 5px 0 #b45f70;
  clip-path: polygon(8% 0, 92% 0, 100% 25%, 92% 83%, 68% 100%, 32% 100%, 8% 83%, 0 25%);
}

.mascot-bangs {
  position: absolute;
  top: -9px;
  left: -6px;
  width: 101px;
  height: 42px;
  background: #303465;
  box-shadow: inset -6px 0 0 #171b3d;
  clip-path: polygon(0 0, 100% 0, 100% 44%, 83% 35%, 75% 84%, 58% 41%, 48% 92%, 33% 40%, 20% 80%, 8% 44%, 0 60%);
}

.mascot-eye {
  position: absolute;
  top: 49px;
  width: 14px;
  height: 16px;
  background: #11152f;
  box-shadow:
    inset 4px 0 0 var(--cyan),
    0 3px 0 #8c4c64;
}

.eye-left {
  left: 18px;
}

.eye-right {
  right: 18px;
}

.mascot-eye::after {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 4px;
  height: 4px;
  background: white;
  content: "";
}

.mascot-mouth {
  position: absolute;
  right: 37px;
  bottom: 15px;
  width: 16px;
  height: 5px;
  border-bottom: 4px solid #a5475d;
}

.cheek {
  position: absolute;
  bottom: 24px;
  width: 10px;
  height: 4px;
  background: var(--pink);
  opacity: 0.55;
}

.cheek-left {
  left: 10px;
}

.cheek-right {
  right: 10px;
}

.mascot-ear {
  position: absolute;
  top: 38px;
  width: 8px;
  height: 20px;
  background: #e89d91;
}

.ear-left {
  left: -7px;
}

.ear-right {
  right: -7px;
}

.mascot-neck {
  position: absolute;
  z-index: 3;
  top: 128px;
  left: 76px;
  width: 31px;
  height: 30px;
  background: #e89d91;
}

.mascot-body {
  position: absolute;
  z-index: 2;
  bottom: 7px;
  left: 27px;
  width: 130px;
  height: 132px;
  background: #202750;
  box-shadow:
    inset 9px 0 0 #303a70,
    inset -9px 0 0 #111630;
  clip-path: polygon(18% 0, 82% 0, 100% 22%, 90% 100%, 10% 100%, 0 22%);
}

.uniform-line {
  position: absolute;
  top: 30px;
  width: 8px;
  height: 92px;
  background: var(--cyan);
  opacity: 0.75;
}

.line-left {
  left: 33px;
  transform: rotate(-8deg);
}

.line-right {
  right: 33px;
  transform: rotate(8deg);
}

.uniform-gem {
  position: absolute;
  top: 19px;
  left: 57px;
  width: 17px;
  height: 17px;
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
  transform: rotate(45deg);
}

.hair-tail {
  position: absolute;
  z-index: 1;
  top: 93px;
  width: 34px;
  height: 113px;
  background: #252952;
}

.tail-left {
  left: 19px;
  clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 88%);
}

.tail-right {
  right: 15px;
  clip-path: polygon(0 0, 75% 0, 100% 88%, 25% 100%);
}

.mascot-hand {
  position: absolute;
  z-index: 6;
  top: 147px;
  right: 6px;
  width: 42px;
  height: 67px;
  border: 9px solid #ffd0b7;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(-15deg);
}

.held-stone {
  position: absolute;
  top: -18px;
  right: -16px;
  width: 22px;
  height: 22px;
  border: 3px solid #626d91;
  border-radius: 50%;
  background: #080a13;
  box-shadow: inset 4px 4px 0 #252a42;
}

.mascot[data-mood="thinking"] .eye-right {
  height: 5px;
  margin-top: 6px;
  background: #11152f;
  box-shadow: none;
}

.mascot[data-mood="thinking"] .eye-right::after {
  display: none;
}

.mascot[data-mood="smug"] .mascot-eye {
  height: 7px;
  margin-top: 5px;
  background: transparent;
  box-shadow: inset 0 -3px 0 #11152f;
}

.mascot[data-mood="smug"] .mascot-eye::after {
  display: none;
}

.mascot[data-mood="surprised"] .mascot-eye {
  width: 17px;
  height: 20px;
}

.mascot[data-mood="surprised"] .mascot-mouth {
  right: 39px;
  width: 11px;
  height: 11px;
  border: 3px solid #a5475d;
  border-radius: 50%;
}

.opponent-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.character-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
}

.character-name span {
  color: var(--cyan);
  font-size: 0.63rem;
}

.character-title {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.62rem;
}

.rank-badge {
  padding: 6px 8px;
  border: 1px solid rgba(255, 214, 107, 0.4);
  color: var(--gold);
  font-size: 0.56rem;
}

.speech-bubble {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border-left: 3px solid var(--violet);
  background: rgba(155, 120, 255, 0.08);
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.65;
}

.speech-bubble span {
  color: var(--violet);
}

.speech-bubble p {
  margin: 0;
}

.board-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
}

.status-bar,
.board-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.status-bar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-bar strong {
  color: var(--text);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.status-dot[data-state="thinking"] {
  background: var(--gold);
  box-shadow: 0 0 9px var(--gold);
  animation: blink 0.6s steps(2) infinite;
}

.status-dot[data-state="win"] {
  background: #6cffad;
  box-shadow: 0 0 9px #6cffad;
}

.status-dot[data-state="lose"] {
  background: var(--pink);
  box-shadow: 0 0 9px var(--pink);
}

@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

.board-frame {
  position: relative;
  width: 100%;
  margin: auto;
  padding: 18px;
  background: #604029;
  box-shadow:
    inset 0 0 0 4px #2f2330,
    inset 0 0 0 7px #a66b42,
    8px 8px 0 rgba(0, 0, 0, 0.35);
}

.corner {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.corner-tl {
  top: 8px;
  left: 8px;
}

.corner-tr {
  top: 8px;
  right: 8px;
}

.corner-bl {
  bottom: 8px;
  left: 8px;
}

.corner-br {
  right: 8px;
  bottom: 8px;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #4e3023;
  background-color: var(--board);
  background-image:
    linear-gradient(rgba(76, 45, 28, 0.62) 2px, transparent 2px),
    linear-gradient(90deg, rgba(76, 45, 28, 0.62) 2px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(255, 229, 173, 0.32), transparent 58%);
  background-size:
    calc(100% / 15) calc(100% / 15),
    calc(100% / 15) calc(100% / 15),
    100% 100%;
  touch-action: manipulation;
}

.board-cell {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: crosshair;
}

.board-cell:hover:not(:disabled) {
  background: rgba(255, 246, 190, 0.18);
}

.board-cell:disabled {
  cursor: default;
}

.board-cell::before {
  position: absolute;
  z-index: 1;
  inset: 10%;
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: scale(0.5);
}

.board-cell[data-stone="black"]::before,
.board-cell[data-stone="white"]::before {
  opacity: 1;
  transform: scale(1);
  animation: stone-in 140ms steps(3);
}

.board-cell[data-stone="black"]::before {
  border: 2px solid #05060c;
  background:
    radial-gradient(circle at 35% 28%, #4e587c 0 8%, transparent 9%),
    var(--black-stone);
  box-shadow:
    inset -4px -4px 0 #05060c,
    inset 3px 3px 0 #303955,
    3px 4px 0 rgba(71, 42, 25, 0.36);
}

.board-cell[data-stone="white"]::before {
  border: 2px solid #a77b9e;
  background:
    radial-gradient(circle at 35% 28%, white 0 9%, transparent 10%),
    var(--white-stone);
  box-shadow:
    inset -4px -4px 0 #c8a9c4,
    inset 3px 3px 0 white,
    3px 4px 0 rgba(71, 42, 25, 0.32);
}

.board-cell.is-last::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--pink);
  box-shadow: 0 0 5px var(--pink);
  content: "";
  transform: translate(-50%, -50%);
}

@keyframes stone-in {
  0% {
    transform: scale(1.35);
  }
}

.board-help {
  gap: 18px;
  justify-content: flex-start;
  padding-top: 9px;
}

.board-help span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.stone-key {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.stone-key.black {
  background: var(--black-stone);
  box-shadow: inset 2px 2px 0 #4a5270;
}

.stone-key.white {
  background: var(--white-stone);
}

.board-help .keyboard-hint {
  margin-left: auto;
  color: #6d7898;
  font-size: 0.56rem;
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.info-block {
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

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

.stats-grid div {
  display: grid;
  min-width: 0;
  min-height: 74px;
  place-content: center;
  border: 1px solid var(--line);
  background: rgba(88, 236, 255, 0.025);
  text-align: center;
}

.stats-grid strong {
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

.stats-grid span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.56rem;
}

.rule-block ol {
  display: grid;
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-block li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 7px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.65;
}

.rule-block li span {
  color: var(--violet);
  font-weight: 900;
}

.privacy-note {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px dashed rgba(88, 236, 255, 0.25);
  color: #74819f;
  font-size: 0.58rem;
  line-height: 1.65;
}

.privacy-note span {
  color: var(--cyan);
}

.privacy-note p {
  margin: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 0 34px;
  color: #616b89;
  font-size: 0.57rem;
  letter-spacing: 0.1em;
}

.result-overlay {
  width: min(430px, calc(100% - 40px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.result-overlay::backdrop {
  background: rgba(4, 5, 15, 0.76);
  backdrop-filter: blur(4px);
}

.result-card {
  position: relative;
  padding: 42px 32px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background:
    linear-gradient(135deg, rgba(155, 120, 255, 0.18), transparent 52%),
    #11162f;
  box-shadow:
    inset 0 0 0 5px #0b0e20,
    10px 10px 0 rgba(0, 0, 0, 0.4);
  text-align: center;
}

.result-card::before {
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(88, 236, 255, 0.22);
  content: "";
  pointer-events: none;
}

.result-glyph {
  display: block;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 2rem;
  text-shadow: 0 0 14px var(--gold);
}

.result-card h2 {
  margin: 8px 0 15px;
  color: var(--cyan);
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  letter-spacing: -0.06em;
  text-shadow: 4px 4px 0 var(--violet);
}

.result-card > p:not(.panel-kicker) {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.8;
}

.pixel-button.large {
  min-height: 48px;
  padding: 0 26px;
}

@media (max-width: 1180px) {
  .game-layout {
    grid-template-columns: minmax(210px, 0.65fr) minmax(490px, 1.4fr);
  }

  .info-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    align-items: stretch;
  }

  .info-block {
    padding: 0 22px 0 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .privacy-note {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 28px, 680px);
  }

  .topbar {
    min-height: 74px;
  }

  .audio-button .audio-label {
    display: none;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 40px 0 30px;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .board-panel {
    grid-row: 1;
  }

  .opponent-panel {
    grid-row: 2;
  }

  .info-panel {
    grid-column: auto;
    grid-row: 3;
    grid-template-columns: 1fr;
  }

  .info-block {
    padding: 0 0 21px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mascot-stage {
    min-height: 260px;
  }

  .mascot {
    transform: scale(0.88);
    transform-origin: bottom;
  }

  .board-help .keyboard-hint {
    display: none;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 18px, 480px);
  }

  .brand strong {
    font-size: 0.86rem;
  }

  .brand small {
    font-size: 0.5rem;
  }

  .topbar-actions {
    gap: 7px;
  }

  .topbar .pixel-button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.63rem;
  }

  .audio-button {
    width: 36px;
  }

  h1 {
    font-size: clamp(2.1rem, 12vw, 3.4rem);
  }

  .board-panel {
    padding: 9px;
  }

  .board-frame {
    padding: 12px;
  }

  .corner {
    width: 7px;
    height: 7px;
  }

  .corner-tl,
  .corner-tr {
    top: 5px;
  }

  .corner-bl,
  .corner-br {
    bottom: 5px;
  }

  .corner-tl,
  .corner-bl {
    left: 5px;
  }

  .corner-tr,
  .corner-br {
    right: 5px;
  }

  .board-cell[data-stone="black"]::before,
  .board-cell[data-stone="white"]::before {
    border-width: 1px;
  }

  .board-cell.is-last::after {
    width: 3px;
    height: 3px;
  }

  .player-panel,
  .info-panel {
    padding: 18px;
  }

  footer {
    display: grid;
    gap: 8px;
    text-align: center;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .info-panel {
    grid-template-columns: 1fr 0.85fr 1.2fr 0.85fr;
  }
}

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

/* Anime visual direction */
:root {
  --ink: #0c1024;
  --ink-soft: rgba(24, 31, 65, 0.82);
  --panel: rgba(22, 28, 59, 0.76);
  --panel-bright: rgba(35, 43, 84, 0.9);
  --line: rgba(191, 205, 255, 0.17);
  --line-bright: rgba(142, 225, 255, 0.5);
  --cyan: #7de7ff;
  --cyan-soft: #c7f7ff;
  --violet: #a991ff;
  --pink: #ff92c5;
  --coral: #ff9d8b;
  --gold: #ffe39b;
  --text: #fffaff;
  --muted: #b3bddb;
  --shadow: 0 20px 55px rgba(2, 5, 20, 0.34);
}

body {
  background:
    radial-gradient(circle at 14% 6%, rgba(169, 145, 255, 0.25), transparent 30%),
    radial-gradient(circle at 90% 28%, rgba(125, 231, 255, 0.18), transparent 26%),
    linear-gradient(155deg, #111735 0%, #090d20 55%, #111126 100%);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before,
body::after {
  filter: blur(120px);
  opacity: 0.22;
}

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

.ambient-petals::before,
.ambient-petals::after {
  position: absolute;
  width: 12px;
  height: 7px;
  border-radius: 100% 0 100% 0;
  background: rgba(255, 146, 197, 0.42);
  box-shadow:
    18vw 12vh 0 rgba(255, 255, 255, 0.24),
    36vw 42vh 0 rgba(255, 146, 197, 0.28),
    62vw 18vh 0 rgba(125, 231, 255, 0.25),
    78vw 56vh 0 rgba(255, 146, 197, 0.3),
    90vw 22vh 0 rgba(255, 255, 255, 0.2),
    48vw 82vh 0 rgba(169, 145, 255, 0.27);
  content: "";
  transform: rotate(28deg);
}

.ambient-petals::after {
  top: 28vh;
  left: 10vw;
  opacity: 0.6;
  transform: rotate(-34deg) scale(0.72);
}

.topbar {
  border-color: rgba(255, 255, 255, 0.1);
}

.brand strong {
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand small {
  color: #9deeff;
  letter-spacing: 0.3em;
}

.brand-gem {
  border-radius: 50% 50% 50% 12%;
  background: linear-gradient(135deg, #fff, var(--pink) 35%, var(--violet));
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 0 5px rgba(255, 255, 255, 0.3),
    0 0 22px rgba(255, 146, 197, 0.6);
}

.brand-gem::after {
  inset: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.pixel-button {
  border-color: rgba(185, 222, 255, 0.3);
  border-radius: 999px;
  background: rgba(26, 33, 69, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.03em;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.pixel-button::before,
.pixel-button::after {
  display: none;
}

.pixel-button:hover {
  background: rgba(58, 72, 130, 0.88);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.24);
  transform: translateY(-2px);
}

.pixel-button:active {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}

.pixel-button.primary {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #9c83ff, #7d88ff 50%, #64c9ed);
  box-shadow: 0 10px 28px rgba(121, 120, 255, 0.28);
}

.eyebrow {
  color: #9deeff;
  letter-spacing: 0.22em;
}

.eyebrow span {
  width: 12px;
  height: 7px;
  border-radius: 100% 0 100% 0;
  background: var(--pink);
  box-shadow: 0 0 12px rgba(255, 146, 197, 0.8);
  transform: rotate(32deg);
}

h1 {
  font-family: "STKaiti", "KaiTi", "PingFang SC", serif;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h1 em {
  background: linear-gradient(90deg, #f4d8ff, #8fe9ff 60%, #bbb0ff);
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  text-shadow: 0 8px 30px rgba(135, 208, 255, 0.2);
}

.player-panel,
.board-panel,
.info-panel {
  border-color: rgba(192, 208, 255, 0.15);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.mascot-stage {
  min-height: 320px;
  overflow: hidden;
  border-color: rgba(213, 195, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.26), transparent 24%),
    radial-gradient(circle at 25% 80%, rgba(255, 146, 197, 0.22), transparent 25%),
    linear-gradient(160deg, rgba(149, 185, 255, 0.2), rgba(118, 91, 184, 0.12)),
    #121936;
}

.mascot-stage::before {
  bottom: 12px;
  width: 210px;
  height: 45px;
  border: 0;
  background: radial-gradient(ellipse, rgba(150, 231, 255, 0.18), transparent 70%);
  box-shadow: none;
}

.pixel-spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow:
    11px 0 0 rgba(255, 255, 255, 0.55),
    -11px 0 0 rgba(255, 255, 255, 0.55),
    0 11px 0 rgba(255, 255, 255, 0.55),
    0 -11px 0 rgba(255, 255, 255, 0.55);
  filter: drop-shadow(0 0 8px var(--cyan));
  animation-timing-function: ease-in-out;
}

.spark-three {
  background: #ffbddb;
  box-shadow:
    11px 0 0 rgba(255, 189, 219, 0.5),
    -11px 0 0 rgba(255, 189, 219, 0.5),
    0 11px 0 rgba(255, 189, 219, 0.5),
    0 -11px 0 rgba(255, 189, 219, 0.5);
}

.mascot {
  width: 190px;
  height: 300px;
  filter: drop-shadow(0 18px 20px rgba(3, 5, 18, 0.35));
  animation-timing-function: ease-in-out;
}

.mascot-hair-back {
  top: 27px;
  left: 26px;
  width: 138px;
  height: 172px;
  border-radius: 48% 52% 34% 35%;
  background:
    linear-gradient(90deg, transparent 38%, rgba(151, 151, 255, 0.22) 42%, transparent 48%),
    linear-gradient(145deg, #4d548e, #242a58 55%, #171b3f);
  box-shadow:
    -8px 12px 0 #20264f,
    8px 13px 0 #20264f,
    0 0 0 2px rgba(185, 192, 255, 0.15);
  clip-path: none;
}

.mascot-head {
  top: 43px;
  left: 49px;
  width: 96px;
  height: 110px;
  border-radius: 47% 48% 46% 46% / 40% 40% 58% 58%;
  background:
    radial-gradient(circle at 35% 68%, rgba(255, 149, 172, 0.25), transparent 13%),
    radial-gradient(circle at 72% 68%, rgba(255, 149, 172, 0.25), transparent 13%),
    linear-gradient(110deg, #ffe0cf, #ffc5bb);
  box-shadow:
    inset -7px -2px 10px rgba(215, 118, 127, 0.2),
    0 3px 0 rgba(124, 68, 92, 0.32);
  clip-path: none;
}

.mascot-bangs {
  top: -16px;
  left: -9px;
  width: 112px;
  height: 57px;
  border-radius: 56% 52% 36% 20%;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(145deg, #555d99, #292e63 68%);
  box-shadow: none;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 87% 36%, 75% 83%, 59% 38%, 47% 91%, 31% 39%, 17% 76%, 6% 43%, 0 61%);
}

.mascot-eye {
  top: 58px;
  width: 17px;
  height: 24px;
  border-radius: 48% 52% 45% 55%;
  background:
    radial-gradient(circle at 48% 36%, white 0 10%, transparent 11%),
    linear-gradient(to bottom, #171a3a 0 28%, #5e6cbb 29% 64%, #94edff 65%);
  box-shadow:
    inset 0 -3px 0 #22264d,
    0 2px 0 rgba(121, 69, 94, 0.35);
}

.eye-left {
  left: 21px;
}

.eye-right {
  right: 21px;
}

.mascot-eye::after {
  top: 13px;
  left: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b6f7ff;
}

.mascot-mouth {
  right: 40px;
  bottom: 17px;
  width: 17px;
  height: 8px;
  border: 0;
  border-bottom: 2px solid #b6536e;
  border-radius: 50%;
}

.cheek {
  bottom: 28px;
  width: 14px;
  height: 6px;
  border-radius: 50%;
  background: #ff89ae;
  filter: blur(2px);
  opacity: 0.3;
}

.mascot-ear {
  top: 50px;
  width: 10px;
  height: 23px;
  border-radius: 50%;
  background: #f4aeaa;
}

.mascot-neck {
  top: 140px;
  left: 81px;
  width: 32px;
  height: 33px;
  border-radius: 0 0 40% 40%;
  background: linear-gradient(90deg, #f1aaa5, #ffc7b9);
}

.mascot-body {
  bottom: 2px;
  left: 22px;
  width: 150px;
  height: 151px;
  border-radius: 45% 45% 12% 12% / 22% 22% 8% 8%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent 28%),
    linear-gradient(110deg, #4d5fa5, #2a356f 62%, #202651);
  box-shadow:
    inset 10px 0 20px rgba(166, 188, 255, 0.12),
    inset -12px 0 18px rgba(7, 12, 38, 0.28);
  clip-path: none;
}

.uniform-line {
  top: 37px;
  width: 5px;
  height: 98px;
  border-radius: 999px;
  background: linear-gradient(var(--cyan), #7d88ff);
  opacity: 0.7;
}

.uniform-gem {
  top: 21px;
  left: 65px;
  width: 19px;
  height: 19px;
  border-radius: 50% 50% 50% 10%;
  background: linear-gradient(135deg, #fff, var(--pink) 45%, #a975ff);
  box-shadow: 0 0 16px rgba(255, 146, 197, 0.65);
}

.hair-tail {
  top: 101px;
  width: 44px;
  height: 124px;
  border-radius: 48% 18% 48% 52%;
  background: linear-gradient(#3b437b, #1c214a);
}

.tail-left {
  left: 11px;
  clip-path: none;
  transform: rotate(8deg);
}

.tail-right {
  right: 8px;
  clip-path: none;
  transform: rotate(-8deg);
}

.mascot-hand {
  top: 162px;
  right: 0;
  width: 50px;
  height: 73px;
  border-width: 10px;
  border-color: #ffc8ba;
  border-radius: 0 50% 0 0;
  transform: rotate(-13deg);
}

.held-stone {
  top: -20px;
  right: -18px;
  width: 24px;
  height: 24px;
  border-color: #697397;
  background: radial-gradient(circle at 35% 30%, #59627f, #0b0d18 42%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.mascot[data-mood="thinking"] .eye-right {
  border-radius: 50%;
}

.mascot[data-mood="smug"] .mascot-eye {
  border-radius: 50%;
}

.mascot[data-mood="surprised"] .mascot-mouth {
  border: 2px solid #b6536e;
  border-radius: 50%;
}

.rank-badge {
  border-radius: 999px;
  background: rgba(255, 227, 155, 0.06);
}

.speech-bubble {
  border: 1px solid rgba(205, 192, 255, 0.16);
  border-left: 0;
  border-radius: 14px;
  background: rgba(169, 145, 255, 0.08);
}

.status-dot {
  border-radius: 50%;
}

.board-frame {
  border-radius: 16px;
  background: linear-gradient(145deg, #7a5038, #3d2730);
  box-shadow:
    inset 0 0 0 3px rgba(255, 229, 190, 0.18),
    0 15px 32px rgba(0, 0, 0, 0.28);
}

.corner {
  border-radius: 50%;
}

.game-board {
  border-color: #5c3828;
  border-radius: 6px;
  background-color: #d8aa75;
  background-image:
    linear-gradient(rgba(79, 48, 32, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 48, 32, 0.55) 1px, transparent 1px),
    radial-gradient(circle at 42% 30%, rgba(255, 242, 209, 0.35), transparent 54%);
  box-shadow: inset 0 0 24px rgba(95, 52, 29, 0.2);
}

/* Keep all 15 playable positions centered on visible line intersections. */
.game-board {
  background-position:
    calc(100% / 30) calc(100% / 30),
    calc(100% / 30) calc(100% / 30),
    center;
  background-repeat: repeat, repeat, no-repeat;
}

.board-cell:hover:not(:disabled) {
  background: transparent;
}

.board-cell:hover:not(:disabled)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 42%;
  height: 42%;
  border: 1px solid rgba(255, 246, 190, 0.72);
  border-radius: 50%;
  background: rgba(255, 246, 190, 0.14);
  box-shadow: 0 0 0 2px rgba(76, 45, 28, 0.18);
  content: "";
  transform: translate(-50%, -50%);
}

.board-cell::before {
  transition:
    opacity 160ms ease,
    transform 160ms cubic-bezier(0.2, 1.5, 0.4, 1);
}

.board-cell[data-stone="black"]::before,
.board-cell[data-stone="white"]::before {
  animation-timing-function: cubic-bezier(0.2, 1.5, 0.4, 1);
}

.stats-grid div {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.privacy-note {
  border-style: solid;
  border-radius: 14px;
}

.result-card {
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(169, 145, 255, 0.22), transparent 52%),
    #151b3b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.result-card::before {
  border-style: solid;
  border-radius: 17px;
}

.result-card h2 {
  background: linear-gradient(90deg, #d8cfff, #87ecff, #ffc3df);
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

/* Original opponent: Mio — a new silver-haired star-night player. */
.mascot-hair-back {
  background:
    linear-gradient(90deg, transparent 38%, rgba(255, 255, 255, 0.32) 42%, transparent 48%),
    linear-gradient(145deg, #c9d6f4, #7988bd 54%, #444f86);
  box-shadow:
    -8px 12px 0 #59679d,
    8px 13px 0 #59679d,
    0 0 0 2px rgba(220, 232, 255, 0.24);
}

.mascot-bangs {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(145deg, #d8e4fb, #8797c8 68%);
}

.hair-tail {
  background: linear-gradient(#a8b8df, #566494);
}

.mascot-eye {
  background:
    radial-gradient(circle at 48% 36%, white 0 10%, transparent 11%),
    linear-gradient(to bottom, #21183d 0 28%, #825eae 29% 62%, #e3a9ff 63%);
  box-shadow:
    inset 0 -3px 0 #392653,
    0 2px 0 rgba(121, 69, 94, 0.35);
}

.mascot-eye::after {
  background: #ffe3ff;
}

.mascot-body {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(110deg, #28376f, #171f4d 62%, #101634);
}

.uniform-line {
  background: linear-gradient(#ffe4a8, #bd8cff);
}

.uniform-gem {
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, #fff 0 12%, transparent 13%),
    linear-gradient(135deg, #9cf4ff, #a97cff 58%, #ff9dc9);
  box-shadow: 0 0 18px rgba(156, 224, 255, 0.72);
}

.character-name span {
  color: #d9b6ff;
}

/* Five-stage campaign */
.campaign-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.campaign-step {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #6d7898;
  font-size: 0.58rem;
  font-weight: 800;
}

.campaign-step[data-state="current"] {
  border-color: var(--cyan);
  background: rgba(88, 236, 255, 0.11);
  box-shadow: 0 0 13px rgba(88, 236, 255, 0.22);
  color: var(--cyan);
}

.campaign-step[data-state="complete"] {
  border-color: var(--pink);
  background: rgba(255, 146, 197, 0.11);
  color: #ffc3df;
}

.result-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.result-actions .pixel-button {
  min-width: 138px;
}

.avatar-emblem,
.hair-accessory {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
}

.avatar-emblem {
  top: 22px;
  right: 20px;
  width: 29px;
  height: 29px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #5e65a7;
  box-shadow: 0 0 16px rgba(125, 231, 255, 0.45);
  color: white;
  font-size: 0.63rem;
  font-weight: 900;
}

.hair-accessory {
  pointer-events: none;
}

/* Kim — warm gold hair and a neon hair clip. */
.mascot-stage[data-opponent="kim"] {
  background:
    radial-gradient(circle at 52% 20%, rgba(255, 226, 135, 0.23), transparent 30%),
    linear-gradient(145deg, rgba(61, 220, 255, 0.14), transparent 55%),
    #10172d;
}

.mascot[data-opponent="kim"] .mascot-hair-back {
  background: linear-gradient(145deg, #ffe29a, #d3984e 68%, #87552b);
  box-shadow:
    -8px 12px 0 #a96e35,
    8px 13px 0 #a96e35,
    0 0 0 2px rgba(255, 235, 174, 0.22);
}

.mascot[data-opponent="kim"] .mascot-bangs {
  background: linear-gradient(145deg, #fff0b7, #d59b50 72%);
}

.mascot[data-opponent="kim"] .hair-tail {
  background: linear-gradient(#e7b865, #9c622f);
}

.mascot[data-opponent="kim"] .mascot-eye {
  background:
    radial-gradient(circle at 48% 36%, white 0 10%, transparent 11%),
    linear-gradient(to bottom, #10223c 0 28%, #1c9db4 29% 62%, #9ff5ff 63%);
}

.mascot[data-opponent="kim"] .mascot-body {
  background: linear-gradient(110deg, #223b66, #17254c 62%, #10172f);
}

.mascot[data-opponent="kim"] .avatar-emblem {
  background: linear-gradient(135deg, #ffcf6f, #56dff2);
}

.mascot[data-opponent="kim"] .accessory-left {
  top: 50px;
  left: 42px;
  width: 28px;
  height: 7px;
  border-radius: 999px;
  background: #72edff;
  box-shadow: 0 0 10px #72edff;
  transform: rotate(-22deg);
}

/* 刀龙 — crimson ponytails, horn-shaped clips and blade accents. */
.mascot-stage[data-opponent="daolong"] {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 105, 92, 0.24), transparent 31%),
    linear-gradient(145deg, rgba(255, 185, 86, 0.1), transparent 55%),
    #1c111d;
}

.mascot[data-opponent="daolong"] .mascot-hair-back,
.mascot[data-opponent="daolong"] .hair-tail {
  background: linear-gradient(145deg, #9e304b, #4b1835 68%, #260f26);
}

.mascot[data-opponent="daolong"] .mascot-bangs {
  background: linear-gradient(145deg, #c74358, #5e1c3b 72%);
}

.mascot[data-opponent="daolong"] .mascot-body {
  background: linear-gradient(110deg, #54233b, #28172d 62%, #170f20);
}

.mascot[data-opponent="daolong"] .uniform-line {
  background: linear-gradient(#ffcf70, #ff665d);
}

.mascot[data-opponent="daolong"] .avatar-emblem {
  background: linear-gradient(135deg, #ffbe59, #a62848);
}

.mascot[data-opponent="daolong"] .accessory-left,
.mascot[data-opponent="daolong"] .accessory-right {
  top: 32px;
  width: 18px;
  height: 30px;
  background: linear-gradient(#ffd373, #d34a44);
  clip-path: polygon(50% 0, 100% 100%, 0 76%);
}

.mascot[data-opponent="daolong"] .accessory-left {
  left: 38px;
  transform: rotate(-22deg);
}

.mascot[data-opponent="daolong"] .accessory-right {
  right: 35px;
  transform: scaleX(-1) rotate(-22deg);
}

/* tuch — mint engineering heroine with a small circuit visor. */
.mascot-stage[data-opponent="tuch"] {
  background:
    linear-gradient(rgba(87, 255, 209, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 255, 209, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(91, 245, 214, 0.22), transparent 31%),
    #0e1b29;
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.mascot[data-opponent="tuch"] .mascot-hair-back,
.mascot[data-opponent="tuch"] .hair-tail {
  background: linear-gradient(145deg, #91efd8, #388f91 62%, #1f5369);
}

.mascot[data-opponent="tuch"] .mascot-bangs {
  background: linear-gradient(145deg, #b8ffe6, #4ba0a0 72%);
}

.mascot[data-opponent="tuch"] .mascot-body {
  background: linear-gradient(110deg, #245d72, #17374f 62%, #10263c);
}

.mascot[data-opponent="tuch"] .uniform-line {
  background: linear-gradient(#b9ffe4, #50e5cc);
}

.mascot[data-opponent="tuch"] .avatar-emblem {
  background: linear-gradient(135deg, #76f6d7, #427da9);
}

.mascot[data-opponent="tuch"] .accessory-right {
  top: 52px;
  right: 37px;
  width: 34px;
  height: 12px;
  border: 2px solid #a7ffe8;
  border-radius: 3px;
  background: rgba(30, 69, 91, 0.88);
  box-shadow:
    inset 9px 0 0 rgba(92, 247, 214, 0.5),
    0 0 12px rgba(92, 247, 214, 0.55);
  transform: rotate(8deg);
}

/* peach — blossom-pink twin tails and flower clips. */
.mascot-stage[data-opponent="peach"] {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 170, 199, 0.27), transparent 32%),
    radial-gradient(circle at 20% 70%, rgba(154, 255, 183, 0.12), transparent 25%),
    #21142b;
}

.mascot[data-opponent="peach"] .mascot-hair-back,
.mascot[data-opponent="peach"] .hair-tail {
  background: linear-gradient(145deg, #ffb5c9, #d96899 62%, #853d78);
}

.mascot[data-opponent="peach"] .mascot-bangs {
  background: linear-gradient(145deg, #ffd1dc, #df78a4 72%);
}

.mascot[data-opponent="peach"] .hair-tail {
  width: 43px;
  border-radius: 48% 52% 45% 55%;
}

.mascot[data-opponent="peach"] .mascot-eye {
  background:
    radial-gradient(circle at 48% 36%, white 0 10%, transparent 11%),
    linear-gradient(to bottom, #281b3d 0 28%, #63a16e 29% 62%, #c5ffb8 63%);
}

.mascot[data-opponent="peach"] .mascot-body {
  background: linear-gradient(110deg, #6e3e77, #3d285e 62%, #281c46);
}

.mascot[data-opponent="peach"] .avatar-emblem {
  background: linear-gradient(135deg, #ffb7c9, #8fce86);
}

.mascot[data-opponent="peach"] .accessory-left {
  top: 43px;
  left: 36px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff2a8;
  box-shadow:
    9px 0 0 #ff9fbd,
    -9px 0 0 #ff9fbd,
    0 9px 0 #ffb5c9,
    0 -9px 0 #ffb5c9,
    0 0 14px rgba(255, 166, 197, 0.6);
}

/* 阿福 — black-haired final guardian with red-and-gold lucky ornaments. */
.mascot-stage[data-opponent="afu"] {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 202, 92, 0.24), transparent 31%),
    linear-gradient(145deg, rgba(255, 74, 87, 0.16), transparent 55%),
    #201018;
}

.mascot[data-opponent="afu"] .mascot-hair-back,
.mascot[data-opponent="afu"] .hair-tail {
  background: linear-gradient(145deg, #333349, #161522 66%, #090911);
}

.mascot[data-opponent="afu"] .mascot-bangs {
  background: linear-gradient(145deg, #46465c, #1a1927 72%);
}

.mascot[data-opponent="afu"] .mascot-eye {
  background:
    radial-gradient(circle at 48% 36%, white 0 10%, transparent 11%),
    linear-gradient(to bottom, #30171c 0 28%, #bd573c 29% 62%, #ffd178 63%);
}

.mascot[data-opponent="afu"] .mascot-body {
  background: linear-gradient(110deg, #8e293b, #4c172b 62%, #2a1020);
}

.mascot[data-opponent="afu"] .uniform-line {
  background: linear-gradient(#ffe59b, #ffb832);
}

.mascot[data-opponent="afu"] .uniform-gem {
  background: #ffd166;
  box-shadow: 0 0 17px #ffba38;
}

.mascot[data-opponent="afu"] .avatar-emblem {
  border-color: #ffe3a0;
  background: linear-gradient(135deg, #e83e4e, #ffbd39);
  color: #fff7cf;
}

.mascot[data-opponent="afu"] .accessory-left,
.mascot[data-opponent="afu"] .accessory-right {
  top: 36px;
  width: 25px;
  height: 25px;
  border: 4px solid #ef4650;
  border-radius: 50%;
  background: #ffd267;
  box-shadow: 0 0 0 3px rgba(255, 207, 91, 0.2);
}

.mascot[data-opponent="afu"] .accessory-left {
  left: 34px;
}

.mascot[data-opponent="afu"] .accessory-right {
  right: 32px;
}

@media (max-width: 520px) {
  .result-actions {
    display: grid;
  }

  .result-actions .pixel-button {
    width: 100%;
  }
}
