﻿:root {
  color-scheme: light;
  --bg: #f7fbff;
  --ink: #142033;
  --muted: #5d6b7c;
  --panel: #ffffff;
  --line: #c8d8e8;
  --accent: #e33b3b;
  --accent-dark: #af2424;
  --blue: #1769aa;
  --green: #1b9f72;
  --gold: #d9a300;
  --silver: #a8b1bc;
  --bronze: #b7763f;
  --shadow: 0 18px 40px rgba(29, 67, 107, 0.16);
  --radius: 8px;
  --cell-gap: 5px;
  --cell-size: clamp(34px, 7.5vmin, 54px);
  font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    linear-gradient(135deg, rgba(23, 105, 170, 0.09), transparent 38%),
    linear-gradient(315deg, rgba(227, 59, 59, 0.08), transparent 34%),
    var(--bg);
  color: var(--ink);
}

body.native-app {
  overscroll-behavior: none;
  -webkit-touch-callout: none;
}

button {
  min-height: 42px;
  border: 1px solid #9fb9d4;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

button:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(23, 105, 170, 0.14);
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #9fb9d4;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.14);
  outline: none;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.ghost-button,
.quiet-button {
  background: transparent;
}

.brand-button {
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 0;
  color: var(--blue);
  font-size: 1rem;
}

.full-width {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(200, 216, 232, 0.86);
  background: rgba(247, 251, 255, 0.9);
  backdrop-filter: blur(10px);
}

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

.screen-mute-toggle {
  display: none;
}

.note {
  color: var(--muted);
  font-size: 0.84rem;
}

main {
  width: min(1200px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.screen {
  display: none;
  min-height: calc(100vh - 122px);
}

.screen.active {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body[data-screen="intro"],
body[data-screen="title"] {
  background: #ffffff;
  overflow: hidden;
}

body[data-screen="intro"] {
  background: #ffffff;
}

body[data-screen="game"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(247, 251, 255, 0.18)),
    url("./assets/backgrounds/game-play-background.png") center top / cover no-repeat,
    var(--bg);
}

body[data-screen="intro"] .topbar,
body[data-screen="title"] .topbar {
  display: none;
}

body[data-screen="game"] .topbar,
body[data-screen="result"] .topbar {
  display: none;
}

@media (min-width: 681px) {
  body[data-screen="character"] .topbar,
  body[data-screen="guide"] .topbar,
  body[data-screen="ranking"] .topbar {
    display: none;
  }

  .section-heading .screen-mute-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 0 14px;
    border-color: #9fb9d4;
    background: #ffffff;
    color: var(--ink);
    text-align: center;
  }
}

body[data-screen="intro"] main,
body[data-screen="title"] main {
  width: 100%;
  padding: 0;
}

.intro-screen,
.opening-screen {
  min-height: 100vh;
}

.intro-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
}

.intro-logo-mark {
  display: block;
  width: min(76vw, 760px);
  max-height: 72vh;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.96);
}

.intro-screen.intro-logo-play .intro-logo-mark {
  animation: intro-logo-fade 2.05s ease-in-out forwards;
}

@keyframes intro-logo-fade {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  22%,
  72% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.03);
  }
}

.opening-screen .title-layout {
  display: none;
}

.opening-stage {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #ffffff;
}

.opening-mute-button {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 3;
  min-width: 112px;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.opening-mute-inline {
  display: none;
}

.opening-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

.opening-ui {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  justify-items: start;
  width: min(56vw, 720px);
  min-width: 340px;
  padding: clamp(8px, 1.8vh, 20px) 0 0 clamp(18px, 3vw, 42px);
}

.opening-logo {
  display: block;
  width: min(56vw, 720px);
  max-width: 100%;
  height: auto;
  margin-top: clamp(8px, 1.4vh, 16px);
  object-fit: contain;
  transform: translateX(-4%);
}

.opening-menu {
  display: grid;
  gap: clamp(8px, 1.4vh, 14px);
  width: min(22vw, 280px);
  min-width: 220px;
  margin-top: clamp(4px, 1.2vh, 14px);
  margin-left: clamp(74px, 8vw, 116px);
}

.opening-play-row {
  display: contents;
}

.image-menu-button {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.image-menu-button:hover {
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-2px) scale(1.02);
}

.image-menu-button:active {
  transform: scale(0.97);
}

.image-menu-button img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 6px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.lead {
  color: #2a3a4f;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.title-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 132px);
}

.menu-stack {
  display: grid;
  gap: 12px;
  max-width: 360px;
}

.hero-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(228, 241, 252, 0.8)),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(23, 105, 170, 0.08) 42px 43px);
  box-shadow: var(--shadow);
}

.hero-logo {
  display: grid;
  place-items: center;
  width: min(78%, 360px);
  aspect-ratio: 1.6;
  border: 8px solid #142033;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--accent);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  transform: rotate(-3deg);
}

.hero-placeholder p {
  position: absolute;
  bottom: 20px;
  color: var(--muted);
  font-weight: 700;
}

.falling-sample {
  position: absolute;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 4px solid #142033;
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 10px 0 rgba(20, 32, 51, 0.16);
}

.sample-a {
  top: 13%;
  left: 12%;
  background: #f28c28;
}

.sample-b {
  right: 13%;
  top: 26%;
  background: #8b3f2f;
}

.sample-c {
  left: 23%;
  bottom: 26%;
  background: var(--green);
}

.section-heading,
.game-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.game-title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

#game-character-button {
  white-space: nowrap;
}

.character-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.character-card,
.guide-grid article,
.character-detail,
.hud-card,
.ranking-panel,
.result-layout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(29, 67, 107, 0.08);
}

.character-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-height: 136px;
  padding: 14px;
  text-align: left;
}

.character-card-image {
  grid-row: 1 / span 3;
  width: 86px;
  height: 112px;
  padding: 4px;
  border: 2px solid #142033;
  border-radius: 8px;
  background: transparent;
  object-fit: contain;
  object-position: center bottom;
}

.character-card.selected {
  border-color: var(--accent);
  outline: 3px solid rgba(227, 59, 59, 0.18);
  background: #fff8f8;
}

.character-card strong {
  font-size: 1.18rem;
}

.character-card span {
  color: var(--muted);
  line-height: 1.45;
}

.character-detail {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.portrait-placeholder,
.mini-portrait {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #142033;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(227, 59, 59, 0.16), rgba(23, 105, 170, 0.12)),
    #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.portrait-placeholder {
  height: clamp(320px, 44vh, 430px);
  min-height: 320px;
  padding: 10px;
  font-size: 1.7rem;
}

.mini-portrait {
  width: 104px;
  height: 138px;
  padding: 4px;
  flex: 0 0 auto;
}

.character-portrait-image,
.hud-portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.mini-portrait .hud-portrait-image {
  width: 135%;
  height: 135%;
  object-fit: cover;
  object-position: center 14%;
  transform: translateY(4%) scale(1.04);
}

.stat-list,
.hud-stats,
.result-stats {
  display: grid;
  gap: 10px;
  margin: 0;
}

.stat-list div,
.hud-stats div,
.result-stats div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e0ebf5;
  border-radius: var(--radius);
  background: #f9fcff;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

dd {
  margin: 0;
  font-weight: 800;
}

.profile-text {
  color: #2a3a4f;
  line-height: 1.65;
}

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

.guide-grid article {
  padding: 18px;
}

.guide-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.15rem;
  color: #2a3a4f;
  line-height: 1.55;
}

.manual-book {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.manual-cover,
.manual-page {
  position: relative;
  overflow: hidden;
  border: 2px solid #244438;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(0deg, rgba(36, 68, 56, 0.04) 0 2px, transparent 2px 8px),
    #f3f0cf;
  color: #18362f;
  box-shadow: 0 10px 0 rgba(36, 68, 56, 0.12), 0 18px 32px rgba(29, 67, 107, 0.12);
  padding: 22px;
}

.manual-cover::after,
.manual-page::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(36, 68, 56, 0.28);
  border-radius: 6px;
  pointer-events: none;
}

.manual-cover {
  min-height: 340px;
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at top right, rgba(228, 205, 93, 0.38), transparent 34%),
    repeating-linear-gradient(0deg, rgba(36, 68, 56, 0.05) 0 2px, transparent 2px 8px),
    #efe9b7;
}

.manual-wide,
.manual-ending {
  grid-column: 1 / -1;
}

.manual-page-number,
.manual-kicker {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2b6155;
}

.manual-cover h3,
.manual-page h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.manual-cover h3 {
  font-size: clamp(2rem, 5vw, 4.1rem);
}

.manual-page h4 {
  position: relative;
  z-index: 1;
  margin: 16px 0 8px;
  color: #15342d;
  font-size: 0.95rem;
}

.manual-subtitle {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  color: #36584f;
  font-weight: 800;
  line-height: 1.55;
}

.manual-copy,
.manual-cover-art,
.manual-next-preview,
.manual-health-art,
.manual-skill-preview,
.manual-stinger-art,
.manual-profile-figure,
.manual-ending-art,
.manual-list,
.manual-note,
.manual-toc-list,
.manual-terms,
.manual-lesson-list,
.manual-character-list,
.manual-control-grid,
.manual-block-dex,
.manual-combo-row,
.manual-table-wrap,
.manual-rule-row {
  position: relative;
  z-index: 1;
}

.manual-copy p,
.manual-page p,
.manual-list,
.manual-terms dd {
  line-height: 1.72;
}

.manual-copy p,
.manual-page p {
  margin: 0 0 8px;
}

.manual-cover-art,
.manual-health-art,
.manual-stinger-art,
.manual-profile-figure,
.manual-ending-art,
.manual-skill-preview figure {
  margin: 0;
}

.manual-cover-art {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  width: min(42%, 430px);
  opacity: 0.96;
}

.manual-cover-art img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 10px 18px rgba(36, 68, 56, 0.18));
}

.manual-cover .manual-copy,
.manual-cover h3,
.manual-cover .manual-subtitle,
.manual-cover .manual-page-number,
.manual-cover .manual-kicker {
  max-width: 58%;
}

.manual-columns {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manual-note {
  border-left: 4px solid #2b6155;
  background: rgba(255, 255, 255, 0.42);
  padding: 12px 14px;
}

.manual-next-preview {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 2px solid rgba(36, 68, 56, 0.75);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.46);
  padding: 12px;
  margin-bottom: 16px;
}

.manual-next-stack {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.manual-next-stack img {
  width: 54px;
  aspect-ratio: 1;
  object-fit: contain;
}

.manual-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1rem;
}

.manual-toc-list {
  counter-reset: manual-toc;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manual-toc-list li {
  counter-increment: manual-toc;
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  line-height: 1.5;
}

.manual-toc-list li::before {
  content: counter(manual-toc, decimal-leading-zero);
  color: #f3f0cf;
  background: #244438;
  border-radius: 999px;
  padding: 3px 9px;
  text-align: center;
  font-weight: 900;
}

.manual-toc-list span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.manual-toc-list strong {
  color: #18362f;
  font-weight: 900;
}

.manual-toc-list em {
  color: #38584f;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.manual-control-grid,
.manual-block-dex,
.manual-combo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

.manual-control-grid div,
.manual-block-dex div,
.manual-combo-row div,
.manual-rule-row > div {
  border: 2px solid #244438;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.52);
  padding: 11px 12px;
  min-height: 64px;
}

.manual-control-grid strong,
.manual-block-dex strong,
.manual-combo-row strong,
.manual-rule-row strong,
.manual-character-list strong {
  display: block;
  color: #142033;
  font-weight: 900;
}

.manual-control-grid span,
.manual-block-dex span,
.manual-combo-row span {
  display: block;
  margin-top: 6px;
  color: #36584f;
  font-weight: 700;
  line-height: 1.45;
}

.manual-block-dex div,
.manual-combo-row div {
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
}

.manual-block-dex img {
  width: 72px;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 5px 6px rgba(20, 32, 51, 0.14));
}

.manual-combo-row img {
  width: 42px;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 -3px 8px;
  filter: drop-shadow(0 4px 5px rgba(20, 32, 51, 0.12));
}

.manual-rule-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

.manual-rule-row > div {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 142px;
  font-weight: 900;
  font-size: 1.05rem;
}

.manual-pattern {
  display: grid;
  justify-content: center;
  align-content: center;
  gap: 3px;
}

.manual-pattern img {
  width: 34px;
  aspect-ratio: 1;
  object-fit: contain;
}

.manual-pattern-vertical {
  grid-template-columns: 34px;
}

.manual-pattern-horizontal {
  grid-template-columns: repeat(4, 34px);
}

.manual-pattern-l {
  grid-template-columns: repeat(2, 34px);
  grid-template-rows: repeat(3, 34px);
}

.manual-pattern-l img:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.manual-pattern-l img:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.manual-pattern-l img:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
}

.manual-pattern-l img:nth-child(4) {
  grid-column: 2;
  grid-row: 3;
}

.manual-health-art,
.manual-stinger-art {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 2px solid rgba(36, 68, 56, 0.75);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.48);
  padding: 12px;
  margin-bottom: 16px;
}

.manual-health-art img {
  width: 108px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(27, 159, 114, 0.22));
}

.manual-stinger-art img,
.manual-ending-art img {
  width: 100%;
  max-width: 260px;
  object-fit: contain;
}

.manual-health-art figcaption,
.manual-stinger-art figcaption,
.manual-skill-preview figcaption {
  color: #36584f;
  font-weight: 800;
  line-height: 1.5;
}

.manual-skill-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.manual-skill-preview figure {
  display: grid;
  gap: 6px;
  justify-items: center;
  border: 2px solid rgba(36, 68, 56, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
  padding: 8px;
  text-align: center;
}

.manual-skill-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(36, 68, 56, 0.24);
  border-radius: 4px;
}

.manual-table-wrap {
  overflow-x: auto;
}

.manual-skill-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: rgba(255, 255, 255, 0.46);
}

.manual-skill-table th,
.manual-skill-table td {
  border: 2px solid #244438;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.manual-skill-table th {
  background: #244438;
  color: #f3f0cf;
  letter-spacing: 0.08em;
}

.manual-lesson-list {
  counter-reset: manual-lesson;
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.manual-lesson-list li {
  counter-increment: manual-lesson;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  line-height: 1.55;
}

.manual-lesson-list li::before {
  content: counter(manual-lesson);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 2px solid #244438;
  border-radius: 50%;
  color: #244438;
  font-weight: 900;
}

.manual-lesson-list strong,
.manual-lesson-list span {
  grid-column: 2;
}

.manual-lesson-list strong {
  color: #142033;
}

.manual-lesson-list span {
  color: #36584f;
}

.manual-character-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

.manual-character-list div {
  display: grid;
  align-content: start;
  justify-items: center;
  border: 2px solid rgba(36, 68, 56, 0.75);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.46);
  padding: 12px;
  text-align: center;
}

.manual-character-list img {
  width: 92px;
  height: 126px;
  object-fit: contain;
  object-position: bottom center;
  margin-bottom: 8px;
  filter: drop-shadow(0 8px 8px rgba(20, 32, 51, 0.16));
}

.manual-character-list span,
.manual-character-list em {
  display: block;
  margin-top: 6px;
  color: #36584f;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.manual-character-list p {
  margin-top: 8px;
}

.manual-character-profile .manual-list {
  margin-bottom: 14px;
}

.manual-profile-figure {
  position: relative;
  z-index: 1;
  float: right;
  width: min(38%, 170px);
  min-width: 116px;
  margin: 0 0 12px 16px;
  border: 2px solid rgba(36, 68, 56, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.52);
  padding: 8px;
}

.manual-profile-figure img {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 8px rgba(20, 32, 51, 0.16));
}

.manual-character-profile > p:not(.manual-page-number):not(.manual-subtitle):not(.manual-quote) {
  position: relative;
  z-index: 1;
}

.manual-quote {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  border-top: 2px solid rgba(36, 68, 56, 0.26);
  padding-top: 12px;
  font-weight: 900;
}

.manual-terms {
  display: grid;
  gap: 9px;
  margin: 0;
}

.manual-terms dt {
  color: #142033;
  font-weight: 900;
}

.manual-terms dd {
  margin: -5px 0 6px;
  color: #36584f;
  font-weight: 700;
}

.manual-ending-art {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  margin-bottom: 14px;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.board-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.board-panel .game-title-row {
  width: 100%;
}

.board-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(6, var(--cell-size));
  grid-template-rows: repeat(12, var(--cell-size));
  gap: var(--cell-gap);
  padding: 12px;
  border: 4px solid #142033;
  border-radius: var(--radius);
  background: #e8f2fb;
  box-shadow: var(--shadow);
  touch-action: none;
}

.board-grid.shake {
  animation: board-shake 220ms linear;
}

.board-grid.clear-burst {
  animation: board-punch 240ms cubic-bezier(0.2, 1.35, 0.35, 1);
}

.board-grid.combo-burst {
  animation: board-combo-punch 320ms cubic-bezier(0.16, 1.45, 0.3, 1);
}

.cell,
.preview-cell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(20, 32, 51, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}

.cell.filled,
.preview-cell.filled {
  border: 3px solid #142033;
  box-shadow: inset 0 -7px 0 rgba(20, 32, 51, 0.15);
}

.cell.active-piece {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.cell.filled.has-image,
.preview-cell.filled.has-image {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.block-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.cell.clearing {
  z-index: 2;
  animation: clear-pop 300ms cubic-bezier(0.16, 1.4, 0.24, 1) forwards;
}

.cell.clearing::before,
.cell.clearing::after {
  position: absolute;
  inset: -35%;
  content: "";
  pointer-events: none;
}

.cell.clearing::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 18%, rgba(255, 226, 96, 0.78) 19% 34%, transparent 58%),
    conic-gradient(from 18deg, transparent 0 10%, rgba(255, 255, 255, 0.9) 12% 15%, transparent 17% 29%, rgba(255, 216, 88, 0.82) 31% 35%, transparent 37% 100%);
  mix-blend-mode: screen;
  animation: clear-spark 330ms ease-out forwards;
}

.cell.clearing::after {
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: clear-ring 300ms ease-out forwards;
}

.score-heart-fx {
  position: fixed;
  z-index: 80;
  display: block;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(0.35);
  transition: transform 520ms cubic-bezier(0.16, 0.86, 0.28, 1), opacity 520ms ease-out;
  user-select: none;
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 18px rgba(255, 87, 126, 0.76))
    drop-shadow(0 0 24px rgba(255, 226, 84, 0.62));
  will-change: transform, opacity;
}

.hud-stats div.score-pulse {
  isolation: isolate;
  position: relative;
  z-index: 1;
  overflow: visible;
  animation: score-glow 760ms ease-out;
}

.hud-stats div.score-pulse::before,
.hud-stats div.score-pulse::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.hud-stats div.score-pulse::before {
  inset: -7px;
  z-index: -1;
  border: 2px solid rgba(255, 226, 88, 0.95);
  box-shadow: 0 0 22px rgba(255, 211, 62, 0.7);
  animation: score-impact-ring 760ms ease-out forwards;
}

.hud-stats div.score-pulse::after {
  inset: 0;
  z-index: 2;
  background: linear-gradient(115deg, transparent 0 33%, rgba(255, 255, 255, 0.95) 45%, transparent 59% 100%);
  mix-blend-mode: screen;
  animation: score-impact-shine 620ms ease-out forwards;
}

@keyframes score-glow {
  0% {
    border-color: rgba(255, 226, 88, 0.9);
    background: #ffffff;
    box-shadow: 0 0 0 rgba(255, 226, 88, 0), 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(1);
  }
  22% {
    border-color: rgba(255, 226, 88, 1);
    background:
      radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 1) 0 28%, rgba(255, 236, 122, 0.96) 29% 58%, #ffffff 78%);
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.95),
      0 0 0 10px rgba(255, 226, 88, 0.42),
      0 0 30px rgba(255, 211, 62, 0.95),
      0 0 48px rgba(255, 255, 255, 0.9);
    transform: scale(1.075);
  }
  48% {
    border-color: rgba(255, 246, 156, 1);
    box-shadow:
      0 0 0 8px rgba(255, 226, 88, 0.2),
      0 0 42px rgba(255, 211, 62, 0.72);
    transform: scale(1.025);
  }
  100% {
    border-color: #e0ebf5;
    background: #ffffff;
    box-shadow: none;
    transform: scale(1);
  }
}

@keyframes score-impact-ring {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  24% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.24);
  }
}

@keyframes score-impact-shine {
  0% {
    opacity: 0;
    transform: translateX(-85%) skewX(-12deg);
  }
  26% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateX(88%) skewX(-12deg);
  }
}

.block-noodle {
  background: #f28c28;
}

.block-whiskey {
  background: #9e4b2f;
}

.block-cigar {
  background: #6f6258;
}

.block-beer {
  background: #d9a300;
}

.block-fastfood {
  background: #d9572d;
}

.block-health {
  background: #1b9f72;
}

.hud-panel {
  display: grid;
  gap: 12px;
}

.hud-card {
  padding: 14px;
}

.character-hud {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hud-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

#hud-state {
  margin: 0;
  font-weight: 800;
}

.next-card {
  display: grid;
  gap: 8px;
}

.next-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-cell {
  width: 54px;
  height: 54px;
}

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

.hud-stats dd {
  font-size: 1.35rem;
}

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

.gauge-track {
  height: 14px;
  margin: 8px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef5fb;
}

.gauge-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #4cc38f);
  transition: width 140ms ease;
}

.skill-card.skill-ready {
  border-color: rgba(27, 159, 114, 0.58);
  box-shadow:
    0 0 0 2px rgba(27, 159, 114, 0.14),
    0 12px 28px rgba(27, 159, 114, 0.16);
}

.gauge-track.skill-ready {
  border-color: rgba(27, 159, 114, 0.65);
  background: #e6fff3;
  box-shadow: 0 0 16px rgba(27, 159, 114, 0.24);
}

.gauge-track.skill-ready .gauge-fill {
  background: linear-gradient(90deg, #1b9f72, #63efaa, #fff47a);
  animation: skill-gauge-glow 900ms ease-in-out infinite alternate;
}

.mobile-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(54px, 1fr));
  gap: 8px;
  width: min(100%, 620px);
}

.mobile-controls button {
  min-height: 56px;
  padding: 8px 10px;
  border-width: 2px;
  font-size: 1rem;
  font-weight: 900;
  touch-action: none;
  user-select: none;
}

.mobile-controls button.holding {
  border-color: var(--accent);
  background: #fff1f1;
  box-shadow: inset 0 0 0 2px rgba(227, 59, 59, 0.22), 0 8px 18px rgba(227, 59, 59, 0.12);
  transform: scale(0.96);
}

.mobile-controls button[data-action="hardDrop"] {
  border-color: #142033;
  background: #142033;
  color: #ffffff;
}

.mobile-controls button[data-action="skill"] {
  border-color: var(--green);
  background: #effaf5;
  color: #126947;
}

#skill-button,
.mobile-controls button[data-action="skill"] {
  position: relative;
  overflow: hidden;
}

#skill-button.skill-ready,
.mobile-controls button[data-action="skill"].skill-ready {
  border-color: #1b9f72;
  background: linear-gradient(135deg, #eafff4, #ffffff 48%, #fff4a8);
  color: #07583c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 0 3px rgba(27, 159, 114, 0.16),
    0 0 22px rgba(27, 159, 114, 0.36),
    inset 0 0 12px rgba(255, 255, 255, 0.76);
  animation: skill-ready-glow 900ms ease-in-out infinite alternate;
}

#skill-button.skill-ready::after,
.mobile-controls button[data-action="skill"].skill-ready::after {
  position: absolute;
  inset: -55%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.78) 50%, transparent 62%);
  content: "";
  pointer-events: none;
  transform: translateX(-45%) rotate(8deg);
  animation: skill-ready-sheen 1450ms linear infinite;
}

.skill-ready-pop {
  animation: skill-ready-pop 680ms cubic-bezier(0.18, 1.45, 0.3, 1) 1;
}

.banter-bubble {
  --banter-top: 28%;
  --banter-duration: 2s;
  position: absolute;
  top: var(--banter-top);
  z-index: 5;
  max-width: min(72%, 220px);
  padding: 9px 12px;
  border: 2px solid rgba(20, 32, 51, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(20, 32, 51, 0.18);
  color: #142033;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.35;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  animation: banter-fade var(--banter-duration) ease-in-out forwards;
}

.banter-bubble.left {
  left: 4px;
  transform-origin: left center;
}

.banter-bubble.right {
  right: 4px;
  transform-origin: right center;
}

.banter-bubble[hidden] {
  display: none;
}

.pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 32, 51, 0.52);
  backdrop-filter: blur(8px);
}

.pause-overlay[hidden] {
  display: none;
}

.pause-panel,
.confirm-panel {
  display: grid;
  gap: 16px;
  width: min(92vw, 560px);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: clamp(18px, 4vw, 28px);
  border: 2px solid rgba(20, 32, 51, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(20, 32, 51, 0.28);
}

.pause-panel h2,
.pause-panel h3,
.pause-panel p,
.confirm-panel h2,
.confirm-panel p {
  margin: 0;
}

.route-confirm-overlay {
  z-index: 36;
}

.confirm-panel {
  width: min(90vw, 420px);
  text-align: center;
}

.confirm-panel h2 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
}

.confirm-panel > p:not(.eyebrow) {
  color: #203048;
  font-weight: 900;
  line-height: 1.7;
}

.confirm-buttons {
  justify-content: center;
}

.pause-character {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.pause-portrait {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 3px solid #142033;
  border-radius: 50%;
  background: #ffffff;
}

.pause-portrait-image {
  display: block;
  width: 142%;
  height: 142%;
  object-fit: cover;
  object-position: center 12%;
  transform: translateY(5%);
}

.pause-skill {
  display: grid;
  gap: 10px;
  margin: 0;
}

.pause-skill div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e0ebf5;
  border-radius: var(--radius);
  background: #f9fcff;
}

.pause-skill dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pause-skill dd {
  margin: 0;
  font-weight: 800;
  line-height: 1.55;
}

.pause-audio {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #e0ebf5;
  border-radius: var(--radius);
  background: #f9fcff;
}

.pause-audio button {
  min-height: 38px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
  margin-top: 8vh;
  padding: clamp(20px, 4vw, 38px);
}

.result-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.result-copy h2 {
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.result-memorial {
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  height: min(56vh, 560px);
  margin: 6px auto 0;
  overflow: hidden;
}

.result-character-comment {
  margin: 8px 0 0;
  color: #2a3a4f;
  font-weight: 900;
  line-height: 1.55;
}

#result-memorial-image {
  display: block;
  width: auto;
  height: min(56vh, 560px);
  max-width: 100%;
  max-height: min(56vh, 560px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 16px 22px rgba(20, 32, 51, 0.24));
}

.record-badge {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 900;
  animation: blink 900ms steps(2, jump-none) infinite;
}

.hidden {
  display: none !important;
}

.name-entry {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e0ebf5;
  border-radius: var(--radius);
  background: #f9fcff;
}

.name-entry label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.name-entry-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 180px;
  gap: 10px;
}

.result-buttons {
  grid-column: 1 / -1;
}

.ranking-panel {
  padding: 18px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.ranking-list.showcase-ranking {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  padding-top: 0;
}

.ranking-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 8px 12px;
  border: 1px solid #e0ebf5;
  border-radius: var(--radius);
  background: #ffffff;
}

.ranking-compact-detail {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 0.9fr) minmax(90px, 1fr) minmax(100px, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-width: 0;
}

.ranking-compact-character {
  display: block;
  width: 58px;
  height: 58px;
  justify-self: end;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(230, 242, 255, 0.92));
  box-shadow: 0 5px 12px rgba(28, 54, 86, 0.16);
  object-fit: cover;
  object-position: center 16%;
}

.ranking-showcase {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 78px minmax(0, 1fr) 84px;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid #cfddeb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(28, 54, 86, 0.08);
}

.ranking-showcase.new {
  border-color: var(--accent);
  background: #fff7f7;
  animation: soft-pulse 850ms ease-in-out infinite alternate;
}

.ranking-showcase-1 {
  grid-column: 1 / -1;
}

.ranking-showcase-2 {
  grid-column: 1 / -1;
  margin-top: 0;
}

.ranking-showcase-3 {
  grid-column: 1 / -1;
  margin-top: 0;
}

.ranking-showcase-podium {
  grid-template-columns: minmax(0, 1fr);
  min-height: 78px;
  padding: 10px 12px;
}

.ranking-showcase-podium .ranking-showcase-detail {
  grid-column: 1 / -1;
}

.ranking-rank-image,
.ranking-character-art {
  display: block;
  object-fit: contain;
}

.ranking-rank-image {
  width: 68px;
  height: 68px;
  justify-self: center;
}

.ranking-character-art {
  width: 78px;
  height: 78px;
  justify-self: end;
}

.ranking-showcase-podium .ranking-rank-image {
  position: absolute;
  top: -52px;
  left: -20px;
  width: 86px;
  height: 86px;
}

.ranking-showcase-podium .ranking-character-art {
  position: absolute;
  width: 126px;
  height: 126px;
  top: -116px;
  right: 18px;
}

.ranking-showcase-1 .ranking-rank-image {
  position: static;
  left: auto;
  top: auto;
  width: 72px;
  height: 72px;
}

.ranking-showcase-1 .ranking-character-art {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  width: 70px;
  height: 70px;
  transform: none;
}

.ranking-showcase-detail {
  display: grid;
  grid-template-columns: minmax(100px, 1.1fr) minmax(80px, 0.8fr) minmax(90px, 0.9fr) minmax(120px, 1.2fr);
  gap: 6px 12px;
  align-items: center;
  min-width: 0;
}

.ranking-showcase-stat {
  min-width: 0;
}

.ranking-showcase-stat small {
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  color: #52667c;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-showcase-stat strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-showcase .ranking-score strong {
  color: #0b4f9c;
  font-size: 0.92rem;
}

.ranking-showcase-line .ranking-character-art {
  align-self: end;
  width: 70px;
  height: 70px;
  margin-top: -8px;
}

.ranking-showcase-line .ranking-rank-image {
  width: 72px;
  height: 72px;
}

.ranking-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid #e0ebf5;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
  text-align: center;
}

.ranking-row.new {
  border-color: var(--accent);
  background: #fff7f7;
  animation: soft-pulse 850ms ease-in-out infinite alternate;
}

.rank-medal {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8f2fb;
  font-size: 0.84rem;
  font-weight: 900;
}

.rank-1 .rank-medal {
  background: var(--gold);
  color: #ffffff;
}

.rank-2 .rank-medal {
  background: var(--silver);
  color: #ffffff;
}

.rank-3 .rank-medal {
  background: var(--bronze);
  color: #ffffff;
}

#fade-layer,
#flash-layer,
#toast {
  pointer-events: none;
  position: fixed;
  z-index: 20;
}

#fade-layer {
  inset: 0;
  background: #05070a;
  opacity: 0;
  transition: opacity 220ms ease;
}

#fade-layer.active {
  opacity: 1;
}

#flash-layer {
  inset: 0;
  background: #ffffff;
  opacity: 0;
}

#flash-layer.flash {
  animation: flash 180ms ease;
}

.game-over-stinger {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96) 0 28%, rgba(255, 243, 168, 0.9) 42%, rgba(227, 59, 59, 0.82) 78%),
    rgba(5, 7, 10, 0.68);
  opacity: 0;
  transition: opacity 120ms ease;
}

.game-over-stinger[hidden],
.skill-cutin[hidden] {
  display: none;
}

.game-over-stinger.active {
  opacity: 1;
}

.stinger-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: clamp(8px, 2.2svh, 18px);
  width: min(94vw, 680px);
  height: min(92svh, 760px);
}

.stinger-character,
.stinger-logo {
  display: block;
  object-fit: contain;
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.stinger-character {
  max-width: min(76vw, 430px);
  max-height: min(66svh, 540px);
  filter: drop-shadow(0 22px 24px rgba(20, 32, 51, 0.26));
}

.stinger-logo {
  max-width: min(88vw, 620px);
  max-height: min(20svh, 150px);
  filter: drop-shadow(0 14px 0 rgba(20, 32, 51, 0.22));
}

.game-over-stinger.active .stinger-character {
  animation: stinger-character-in 1180ms cubic-bezier(0.14, 1.45, 0.28, 1) forwards;
}

.game-over-stinger.active .stinger-logo {
  animation: stinger-logo-in 900ms 420ms cubic-bezier(0.12, 1.55, 0.24, 1) forwards;
}

.skill-cutin {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.98) 0 32%, rgba(255, 247, 196, 0.92) 48%, rgba(23, 105, 170, 0.74) 100%),
    rgba(5, 7, 10, 0.58);
  opacity: 0;
  transition: opacity 120ms ease;
}

.skill-cutin.active {
  opacity: 1;
}

.skill-cutin-stage {
  display: grid;
  place-items: center;
  gap: clamp(10px, 2svh, 18px);
  width: min(92vw, 560px);
}

.skill-cutin-name {
  margin: 0;
  padding: 7px 16px;
  border: 2px solid rgba(20, 32, 51, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #142033;
  font-size: clamp(1rem, 3.8vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 28px rgba(20, 32, 51, 0.16);
  opacity: 0;
}

.skill-cutin-image {
  display: block;
  width: min(86vw, 512px);
  max-height: min(72svh, 512px);
  border: 4px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 24px 42px rgba(20, 32, 51, 0.32);
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.skill-cutin.active .skill-cutin-name {
  animation: skill-cutin-label 360ms 120ms ease-out forwards;
}

.skill-cutin.active .skill-cutin-image {
  animation: skill-cutin-image-in 520ms 80ms cubic-bezier(0.16, 1.35, 0.28, 1) forwards;
}

#toast {
  left: 50%;
  bottom: 22px;
  min-width: min(440px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes board-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-7px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
}

@keyframes clear-pop {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
  45% {
    opacity: 1;
    transform: scale(1.18) rotate(-2deg);
    filter: brightness(1.55) saturate(1.2);
  }
  to {
    opacity: 0;
    transform: scale(0.18) rotate(8deg);
    filter: brightness(2);
  }
}

@keyframes clear-spark {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(0deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.6) rotate(55deg);
  }
}

@keyframes clear-ring {
  0% {
    opacity: 0.95;
    transform: scale(0.18);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes banter-fade {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  12%,
  76% {
    opacity: 0.84;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

@keyframes board-punch {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes board-combo-punch {
  0% {
    transform: scale(1) rotate(0deg);
  }
  35% {
    transform: scale(1.035) rotate(-0.5deg);
  }
  70% {
    transform: scale(0.995) rotate(0.4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes flash {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

@keyframes stinger-character-in {
  0% {
    opacity: 0;
    transform: scale(0.32) rotate(-7deg);
  }
  52% {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
  }
  70% {
    opacity: 1;
    transform: scale(0.98) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.02) rotate(0deg);
  }
}

@keyframes stinger-logo-in {
  0% {
    opacity: 0;
    transform: scale(0.18) translateY(20px) rotate(-4deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.14) translateY(0) rotate(2deg);
  }
  78% {
    opacity: 1;
    transform: scale(0.96) translateY(0) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

@keyframes skill-cutin-label {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes skill-cutin-image-in {
  0% {
    opacity: 0;
    transform: scale(0.74) rotate(-2deg);
  }
  62% {
    opacity: 1;
    transform: scale(1.04) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

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

@keyframes soft-pulse {
  to {
    box-shadow: 0 0 0 4px rgba(227, 59, 59, 0.18);
  }
}

@keyframes skill-ready-glow {
  from {
    filter: brightness(1);
    transform: translateY(0);
  }
  to {
    filter: brightness(1.12) saturate(1.16);
    transform: translateY(-1px);
  }
}

@keyframes skill-ready-sheen {
  from {
    transform: translateX(-55%) rotate(8deg);
  }
  to {
    transform: translateX(55%) rotate(8deg);
  }
}

@keyframes skill-gauge-glow {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.2) saturate(1.22);
  }
}

@keyframes skill-ready-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .title-layout,
  .character-layout,
  .game-shell,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .hero-placeholder {
    min-height: 360px;
  }

  .opening-background {
    object-position: right bottom;
  }

  .opening-ui {
    width: min(48vw, 430px);
    min-width: 300px;
    padding-left: 18px;
  }

  .opening-logo {
    width: min(60vw, 510px);
  }

  .opening-menu {
    width: min(30vw, 260px);
    min-width: 190px;
  }

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

  .manual-book,
  .manual-columns,
  .manual-character-list {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  :root {
    --cell-gap: 4px;
    --cell-size: clamp(31px, min(10.4vw, 4.8svh), 40px);
  }

  body[data-screen="game"] {
    --cell-gap: 3px;
    --cell-size: clamp(23px, min(9.4vw, 5.25svh), 37px);
    overflow: hidden;
    overscroll-behavior-y: contain;
  }

  body[data-screen="game"] main {
    width: min(calc(100vw - 12px), 430px);
    height: 100svh;
    padding: max(14px, env(safe-area-inset-top)) 0 max(44px, calc(env(safe-area-inset-bottom) + 38px));
    overflow: hidden;
  }

  body[data-screen="game"] .screen.active {
    height: 100%;
    min-height: auto;
  }

  .topbar,
  .section-heading,
  .game-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .button-row {
    width: 100%;
  }

  .topbar-actions button,
  .button-row button {
    flex: 1 1 auto;
  }

  body:not([data-screen="title"]):not([data-screen="game"]):not([data-screen="result"]) .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    min-height: 50px;
    padding: 6px 12px;
  }

  body:not([data-screen="title"]):not([data-screen="game"]):not([data-screen="result"]) .brand-button {
    display: none;
  }

  body:not([data-screen="title"]):not([data-screen="game"]):not([data-screen="result"]) .topbar-actions {
    justify-content: flex-end;
    width: auto;
    margin-left: auto;
  }

  body:not([data-screen="title"]):not([data-screen="game"]):not([data-screen="result"]) .topbar-actions button {
    flex: 0 0 auto;
    min-width: 112px;
    min-height: 38px;
  }

  .opening-stage {
    height: 100svh;
    min-height: 100svh;
  }

  .opening-background {
    inset: auto 0 0 auto;
    width: auto;
    height: clamp(185px, calc(100svh - 390px), 390px);
    max-width: 96vw;
    opacity: 0.95;
    object-fit: contain;
    object-position: right bottom;
  }

  .opening-ui {
    position: absolute;
    inset: 0;
    align-content: start;
    justify-items: center;
    width: 100%;
    min-width: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 0;
  }

  .opening-logo {
    width: min(94vw, 390px);
    height: auto;
    max-height: clamp(170px, 32svh, 245px);
    object-fit: contain;
    object-position: center;
    margin-top: 0;
    transform: none;
  }

  .opening-menu {
    --opening-button-width: clamp(104px, 32vw, 128px);
    width: min(78vw, 250px);
    min-width: 0;
    gap: clamp(8px, 1.25svh, 12px);
    margin: clamp(0px, 0.7svh, 6px) auto 0;
    justify-items: center;
  }

  .opening-play-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .opening-menu > .image-menu-button {
    width: var(--opening-button-width);
  }

  .opening-play-row .image-menu-button {
    width: var(--opening-button-width);
    flex: 0 0 var(--opening-button-width);
  }

  .opening-mute-button {
    display: none;
  }

  .opening-mute-inline {
    display: inline-flex;
    position: absolute;
    left: calc(50% + (var(--opening-button-width) / 2) + clamp(14px, 4.4vw, 22px));
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    min-width: clamp(60px, 17vw, 76px);
    min-height: clamp(30px, 7.8vw, 36px);
    padding: 0 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.92);
    font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(14, 36, 66, 0.08);
  }

  .character-grid,
  .guide-grid,
  .hud-panel,
  .hud-stats {
    grid-template-columns: 1fr;
  }

  .manual-book {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .manual-cover,
  .manual-page {
    padding: 16px;
  }

  .manual-cover {
    min-height: 260px;
  }

  .manual-cover-art {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 280px);
    margin: 0 0 14px;
  }

  .manual-cover .manual-copy,
  .manual-cover h3,
  .manual-cover .manual-subtitle,
  .manual-cover .manual-page-number,
  .manual-cover .manual-kicker {
    max-width: none;
  }

  .manual-cover::after,
  .manual-page::after {
    inset: 6px;
  }

  .manual-next-preview,
  .manual-health-art,
  .manual-stinger-art {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

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

  .manual-control-grid,
  .manual-block-dex,
  .manual-combo-row,
  .manual-rule-row,
  .manual-character-list {
    grid-template-columns: 1fr;
  }

  .manual-profile-figure {
    float: none;
    width: min(72%, 180px);
    margin: 0 auto 12px;
  }

  .manual-toc-list li {
    grid-template-columns: 3.7rem minmax(0, 1fr);
  }

  .manual-lesson-list li {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .manual-skill-table {
    min-width: 640px;
    font-size: 0.92rem;
  }

  body[data-screen="character"] main {
    width: min(calc(100vw - 24px), 430px);
    padding-top: 12px;
  }

  body[data-screen="character"] .section-heading {
    gap: 10px;
    margin-bottom: 12px;
  }

  body[data-screen="character"] .section-heading h2 {
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  body[data-screen="character"] .character-layout {
    display: block;
  }

  body[data-screen="character"] .character-grid {
    gap: 10px;
    overflow-anchor: none;
  }

  body[data-screen="character"] .character-card {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 118px;
    padding: 12px;
    scroll-margin-top: 64px;
  }

  body[data-screen="character"] .character-card-image {
    width: 76px;
    height: 98px;
  }

  body[data-screen="character"] .character-detail {
    display: none;
    margin: -2px 0 12px;
    padding: 14px;
    border-color: rgba(227, 59, 59, 0.32);
    box-shadow: 0 10px 22px rgba(29, 67, 107, 0.1);
    contain: layout paint;
    overflow-anchor: none;
  }

  body[data-screen="character"] .character-detail.mobile-expanded {
    display: grid;
  }

  body[data-screen="character"] .character-detail .portrait-placeholder {
    display: none;
  }

  body[data-screen="character"] .character-detail .detail-block {
    order: 1;
  }

  body[data-screen="character"] .character-detail .profile-text {
    display: -webkit-box;
    order: 2;
    margin: 0;
    overflow: hidden;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body[data-screen="character"] #start-game-button {
    order: 3;
    min-height: 48px;
  }

  body[data-screen="character"] .character-detail .stat-list {
    order: 4;
    gap: 8px;
  }

  body[data-screen="character"] .character-detail .stat-list div {
    padding: 8px;
  }

  .game-shell {
    display: grid;
    grid-template-columns: clamp(42px, 13vw, 56px) minmax(0, max-content) clamp(42px, 13vw, 56px);
    grid-template-rows: auto auto auto auto auto;
    height: 100%;
    gap: 4px;
    align-content: start;
    justify-content: center;
  }

  .board-panel {
    display: contents;
    gap: 5px;
    min-height: 0;
  }

  .board-panel .game-title-row {
    margin-bottom: 0;
  }

  body[data-screen="game"] .board-panel .game-title-row {
    grid-column: 1 / -1;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-height: 36px;
  }

  body[data-screen="game"] .board-panel .game-title-row > div:first-child {
    display: none;
  }

  body[data-screen="game"] .game-title-actions {
    display: flex;
    gap: 4px;
    max-width: 100%;
    justify-content: flex-end;
  }

  body[data-screen="game"] .board-panel .game-title-row button {
    min-height: 36px;
    padding: 6px 9px;
    font-size: clamp(0.78rem, 3.2vw, 0.9rem);
  }

  .board-panel .game-title-row h2 {
    display: none;
  }

  .board-stage {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
  }

  .board-grid {
    padding: 5px;
    border-width: 2px;
  }

  .cell,
  .preview-cell {
    border-radius: 6px;
  }

  .mobile-controls {
    grid-column: 1 / -1;
    grid-row: 5;
    justify-self: center;
    position: static;
    z-index: 6;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: min(100%, 410px);
    padding: 6px;
    border: 2px solid rgba(20, 32, 51, 0.16);
    border-radius: 14px;
    background: rgba(247, 251, 255, 0.94);
    box-shadow: 0 12px 26px rgba(20, 32, 51, 0.16);
    backdrop-filter: blur(8px);
  }

  .mobile-controls button {
    min-height: 66px;
    padding: 8px 6px;
    font-size: clamp(1.08rem, 4.7vw, 1.34rem);
  }

  .hud-panel {
    display: contents;
  }

  .hud-card {
    padding: 4px;
  }

  .audio-placeholder {
    display: none;
  }

  .character-hud {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    place-items: center;
    gap: 4px;
  }

  .character-hud > div:last-child {
    display: none;
  }

  #hud-character {
    display: none;
  }

  #hud-state {
    display: none;
  }

  body[data-screen="game"] .mini-portrait {
    width: clamp(38px, 11vw, 48px);
    height: clamp(38px, 11vw, 48px);
    padding: 0;
    border-width: 2px;
    border-radius: 50%;
  }

  body[data-screen="game"] .mini-portrait .hud-portrait-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transform: none;
  }

  .next-card {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    align-items: center;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
  }

  .next-card .note {
    display: none;
  }

  .next-preview {
    flex-direction: column;
    gap: 4px;
  }

  .preview-cell {
    width: clamp(24px, 7vw, 28px);
    height: clamp(24px, 7vw, 28px);
  }

  .hud-stats {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .hud-stats div:nth-child(2) {
    display: none;
  }

  .hud-stats div {
    min-height: 34px;
    padding: 4px 6px;
  }

  .hud-stats dt,
  .hud-label {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }

  .hud-stats dt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hud-stats dd {
    font-size: clamp(0.78rem, 3.4vw, 0.92rem);
  }

  .skill-card {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 4;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
  }

  .skill-card .skill-header {
    display: contents;
    margin-bottom: 0;
  }

  body[data-screen="game"] .skill-card .hud-label {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    white-space: nowrap;
  }

  body[data-screen="game"] #skill-cost {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    font-size: 0.82rem;
    font-weight: 800;
  }

  .skill-card .gauge-track {
    grid-column: 2;
    grid-row: 1;
    height: 8px;
    margin: 0;
  }

  .skill-card .note {
    display: none;
  }

  #skill-button {
    display: none;
  }

  .banter-bubble {
    max-width: min(76%, 170px);
    padding: 7px 9px;
    font-size: 0.75rem;
  }

  body[data-screen="game"] #toast {
    top: 34px;
    bottom: auto;
    min-width: 0;
    width: min(300px, calc(100vw - 96px));
    max-width: calc(100vw - 96px);
    padding: 6px 10px;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%) translateY(-8px);
  }

  body[data-screen="game"] #toast.show {
    transform: translateX(-50%) translateY(0);
  }

  .pause-panel {
    gap: 12px;
    width: min(calc(100vw - 24px), 420px);
    max-height: calc(100svh - 28px);
    padding: 16px;
  }

  .pause-character {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
  }

  .pause-portrait {
    width: 84px;
    height: 84px;
  }

  .pause-skill div {
    padding: 8px;
  }

  .name-entry-row {
    grid-template-columns: 1fr;
  }

  .result-layout {
    margin-top: 12px;
  }

  .result-memorial {
    width: min(74vw, 300px);
    height: min(46vh, 390px);
  }

  #result-memorial-image {
    height: min(46vh, 390px);
    max-height: min(46vh, 390px);
  }

  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr) 56px;
    gap: 8px;
    min-height: 64px;
    padding: 7px 8px;
  }

  .ranking-compact-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 8px;
  }

  .ranking-compact-character {
    width: 48px;
    height: 48px;
    padding: 2px;
  }

  .ranking-list.showcase-ranking {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 0;
  }

  .ranking-showcase,
  .ranking-showcase-1,
  .ranking-showcase-2,
  .ranking-showcase-3 {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .ranking-showcase,
  .ranking-showcase-podium {
    grid-template-columns: 66px minmax(0, 1fr) 64px;
    min-height: 68px;
    padding: 8px;
  }

  .ranking-showcase-podium .ranking-rank-image,
  .ranking-showcase-podium .ranking-character-art,
  .ranking-showcase-1 .ranking-rank-image,
  .ranking-showcase-1 .ranking-character-art {
    position: static;
    transform: none;
  }

  .ranking-showcase-podium .ranking-showcase-detail {
    grid-column: auto;
  }

  .ranking-rank-image,
  .ranking-showcase-line .ranking-rank-image,
  .ranking-showcase-podium .ranking-rank-image,
  .ranking-showcase-1 .ranking-rank-image {
    width: 58px;
    height: 58px;
  }

  .ranking-character-art,
  .ranking-showcase-line .ranking-character-art,
  .ranking-showcase-podium .ranking-character-art,
  .ranking-showcase-1 .ranking-character-art {
    width: 60px;
    height: 60px;
    margin-top: 0;
  }

  .ranking-showcase-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
  }

  .ranking-showcase-stat small {
    font-size: 0.56rem;
  }

  .ranking-showcase-stat strong {
    font-size: 0.72rem;
  }

  .ranking-showcase .ranking-score strong {
    font-size: 0.78rem;
  }
}
