:root {
  --bg: #fff8ee;
  --bg-soft: rgba(255, 255, 255, 0.66);
  --paper: rgba(255, 253, 249, 0.94);
  --paper-strong: #fffdf9;
  --ink: #17323b;
  --muted: #61747d;
  --line: rgba(23, 50, 59, 0.12);
  --accent: #f08b54;
  --accent-strong: #e55d1d;
  --accent-soft: rgba(240, 139, 84, 0.16);
  --secondary: #2e9da5;
  --secondary-soft: rgba(46, 157, 165, 0.14);
  --gold: #ffc857;
  --shadow: 0 26px 60px rgba(117, 84, 42, 0.14);
  --shadow-soft: 0 14px 30px rgba(117, 84, 42, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 200, 87, 0.32), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(46, 157, 165, 0.16), transparent 24%),
    linear-gradient(180deg, #fff9f0 0%, #fff2de 100%);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

.page-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  top: -12rem;
  left: -10rem;
  background: rgba(255, 200, 87, 0.44);
}

.page-glow-right {
  right: -10rem;
  bottom: -10rem;
  background: rgba(46, 157, 165, 0.22);
}

.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 24px 48px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  padding: 34px;
  border-radius: 38px;
  background:
    linear-gradient(130deg, rgba(255, 253, 249, 0.94), rgba(255, 246, 231, 0.8)),
    linear-gradient(110deg, rgba(255, 200, 87, 0.12), transparent);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto auto -35% 55%;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 139, 84, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-copy,
.hero-scene {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.point-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-strong);
}

h1,
h2,
h3 {
  font-family: "Baloo 2", cursive;
  line-height: 1;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 5.2vw, 5rem);
  line-height: 0.92;
  margin-top: 10px;
}

.hero-text {
  max-width: 38rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.card-button,
.game-action,
.option-pill,
.answer-chip,
.word-chip,
.basket-button,
.close-button,
.tab-button {
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.primary-button,
.card-button,
.game-action {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffef9;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(229, 93, 29, 0.18);
}

.ghost-button {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(23, 50, 59, 0.08);
  color: var(--ink);
  font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover,
.card-button:hover,
.game-action:hover,
.option-pill:hover,
.answer-chip:hover,
.word-chip:hover,
.basket-button:hover,
.tab-button:hover,
.close-button:hover,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.card-button:focus-visible,
.game-action:focus-visible,
.option-pill:focus-visible,
.answer-chip:focus-visible,
.word-chip:focus-visible,
.basket-button:focus-visible,
.tab-button:focus-visible,
.close-button:focus-visible,
.subject-chip:hover,
.subject-chip:focus-visible,
.rule-card:hover,
.rule-card:focus-within {
  transform: translateY(-2px);
  outline: none;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.hero-points div,
.subject-overview,
.rule-card,
.learning-modal,
.game-shell {
  backdrop-filter: blur(14px);
}

.hero-points div {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero-points strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.38;
}

.hero-scene {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-sheet {
  width: min(100%, 420px);
  padding: 22px;
  border-radius: 30px;
  background:
    linear-gradient(165deg, rgba(24, 49, 59, 0.96), rgba(42, 73, 83, 0.94)),
    radial-gradient(circle at top right, rgba(255, 200, 87, 0.22), transparent 36%);
  color: #fffef9;
  box-shadow: 0 22px 40px rgba(23, 50, 59, 0.22);
  position: relative;
  overflow: hidden;
  animation: riseIn 700ms ease both;
}

.scene-ring {
  position: absolute;
  inset: -14% auto auto 62%;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.scene-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 200, 87, 0.94);
}

.scene-letters {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.scene-letters span {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: "Baloo 2", cursive;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
}

.scene-objects {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.scene-object {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
}

.scene-book {
  display: grid;
  gap: 10px;
  min-height: 146px;
}

.scene-book span,
.scene-cubes span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 800;
  min-height: 44px;
}

.scene-basket {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: center;
  min-height: 146px;
}

.scene-basket span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc857, #f08b54);
}

.scene-cubes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  grid-column: 1 / -1;
}

.floating-tag {
  position: absolute;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.floating-tag-left {
  top: 16px;
  left: -10px;
}

.floating-tag-right {
  top: 78px;
  right: -12px;
}

.floating-tag-bottom {
  bottom: 6px;
  left: 26px;
}

.workspace {
  margin-top: 24px;
}

.subject-stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
}

.subject-switcher {
  display: grid;
  gap: 12px;
}

.subject-chip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.58);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.subject-chip.is-active {
  background:
    linear-gradient(135deg, rgba(255, 200, 87, 0.2), rgba(255, 255, 255, 0.94));
}

.subject-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(240, 139, 84, 0.18), rgba(46, 157, 165, 0.1));
  color: var(--ink);
  font-family: "Baloo 2", cursive;
  font-size: 1.5rem;
}

.subject-chip strong {
  display: block;
  font-size: 1.22rem;
}

.subject-chip small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.subject-overview {
  padding: 22px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  align-items: start;
}

.subject-overview h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-top: 8px;
}

.subject-description,
.gallery-copy,
.modal-hook,
.support-copy,
.stack-card p,
.layer-card p,
.example-card p,
.detail-step p,
.game-intro p,
.game-feedback,
.question-copy,
.teacher-note,
.game-helper {
  color: var(--muted);
  line-height: 1.72;
}

.subject-description {
  margin: 12px 0 0;
}

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

.overview-stats div {
  padding: 16px 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.overview-stats span {
  display: block;
  font-family: "Baloo 2", cursive;
  font-size: 2rem;
  line-height: 1;
}

.overview-stats small {
  color: var(--muted);
}

.gallery-section {
  margin-top: 22px;
}

.gallery-heading {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: end;
}

.gallery-heading h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-top: 8px;
}

.gallery-copy {
  margin: 0;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.rule-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
}

.rule-card-top,
.rule-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.rule-tag,
.rule-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.rule-tag {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.rule-badge {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.rule-card h3 {
  font-size: 1.52rem;
  line-height: 1.02;
}

.rule-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.rule-visual {
  min-height: 170px;
  border-radius: 24px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.78), rgba(255, 244, 228, 0.72));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.rule-visual svg,
.modal-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

.memory-mini {
  color: var(--ink);
  font-weight: 700;
  max-width: 60%;
}

.card-button {
  flex-shrink: 0;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 36, 44, 0.38);
  backdrop-filter: blur(10px);
  animation: fadeIn 220ms ease;
}

.learning-modal {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 32px auto;
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 28px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(255, 248, 236, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 70px rgba(17, 36, 44, 0.18);
  animation: modalUp 260ms ease;
}

.close-button {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(23, 50, 59, 0.08);
  color: var(--ink);
  font-weight: 800;
  z-index: 2;
}

.modal-top {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
  margin-top: 12px;
}

.modal-visual {
  min-height: 280px;
  border-radius: 30px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.78), rgba(255, 243, 228, 0.74));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.modal-title {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.94;
  margin-top: 10px;
}

.modal-hook {
  margin: 16px 0 0;
}

.modal-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.modal-band div {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.modal-band strong {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tab-button {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(23, 50, 59, 0.08);
  color: var(--ink);
  font-weight: 800;
}

.tab-button.is-active {
  background: var(--accent);
  color: #fffef9;
}

.modal-panel {
  margin-top: 18px;
}

.stack-grid,
.angles-grid,
.examples-grid,
.detail-grid,
.quiz-grid,
.choice-grid,
.distribution-grid,
.parity-grid {
  display: grid;
  gap: 16px;
}

.stack-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.angles-grid,
.examples-grid,
.quiz-grid,
.choice-grid,
.distribution-grid,
.parity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.example-card-wide {
  grid-column: 1 / -1;
}

.detail-grid {
  grid-template-columns: 1fr;
}

.stack-card,
.layer-card,
.example-card,
.detail-step,
.game-shell,
.question-card,
.basket-card,
.number-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.stack-card h3,
.layer-card h3,
.example-card h3,
.detail-step h3,
.game-intro h3,
.question-card h3,
.basket-card h3,
.number-card h3 {
  font-size: 1.34rem;
  line-height: 1.06;
}

.teacher-note {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(46, 157, 165, 0.08);
}

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

.example-list li {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
}

.example-random {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(23, 50, 59, 0.08);
}

.example-random p {
  margin: 6px 0 0;
}

.game-shell {
  display: grid;
  gap: 18px;
}

.games-stack {
  display: grid;
  gap: 16px;
}

.lightning-shell {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 12px;
}

.lightning-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.lightning-head h3 {
  font-size: 1.28rem;
}

.game-header {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.game-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-weight: 800;
}

.token-grid,
.word-bank,
.answer-row,
.question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-pill,
.answer-chip,
.word-chip {
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(23, 50, 59, 0.07);
  color: var(--ink);
  font-weight: 800;
}

.option-pill.is-active,
.answer-chip.is-active,
.word-chip.is-active {
  background: var(--accent);
  color: #fffef9;
}

.word-chip.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.word-chip.is-draggable,
.parity-pill,
.is-draggable-token,
.is-draggable-dot {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.drag-ghost {
  opacity: 0.4;
}

.game-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.secondary-action {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(23, 50, 59, 0.08);
  color: var(--ink);
  font-weight: 800;
}

.game-feedback {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.game-feedback.is-success {
  background: rgba(46, 157, 165, 0.12);
  color: var(--ink);
}

.game-feedback.is-warning {
  background: rgba(240, 139, 84, 0.12);
  color: var(--ink);
}

.builder-lane {
  display: grid;
  gap: 12px;
}

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

.drag-column {
  display: grid;
  gap: 8px;
}

.drag-column strong {
  font-size: 0.95rem;
}

.drag-sort-list {
  min-height: 86px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px dashed rgba(23, 50, 59, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.drag-target-list {
  background: rgba(240, 139, 84, 0.08);
}

.built-line {
  min-height: 74px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(23, 50, 59, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.empty-line {
  color: var(--muted);
}

.story-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}

.story-arrow {
  align-self: center;
  font-family: "Baloo 2", cursive;
  font-size: 2rem;
  color: var(--accent-strong);
}

.story-box {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.story-box strong,
.question-card strong,
.basket-card strong,
.number-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.token-pond,
.dot-pond {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.token,
.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08);
}

.token.is-clickable {
  cursor: pointer;
}

.transfer-dropzone,
.distribute-dropzone {
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.transfer-dropzone.is-drop-hover,
.distribute-dropzone.is-drop-hover {
  border-color: rgba(240, 139, 84, 0.62);
  background: rgba(240, 139, 84, 0.12);
  box-shadow: 0 0 0 3px rgba(240, 139, 84, 0.12);
}

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

.basket-button {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-align: left;
}

.basket-button small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.basket-count {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.remaining-bits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.remaining-bits.is-bank {
  min-height: 38px;
}

.remaining-bits .dot {
  width: 20px;
  height: 20px;
}

.number-card {
  display: grid;
  gap: 12px;
}

.number-value {
  font-family: "Baloo 2", cursive;
  font-size: 2.4rem;
  line-height: 1;
}

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

.parity-column {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 8px;
}

.parity-list {
  min-height: 94px;
  border-radius: 16px;
  border: 1px dashed rgba(23, 50, 59, 0.18);
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  background: rgba(255, 255, 255, 0.48);
}

.parity-even {
  background: rgba(46, 157, 165, 0.1);
}

.parity-odd {
  background: rgba(240, 139, 84, 0.12);
}

.parity-pill {
  min-width: 54px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(23, 50, 59, 0.08);
  color: var(--ink);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-empty {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1140px) {
  .hero,
  .subject-stage,
  .gallery-heading,
  .modal-top,
  .game-header,
  .stack-grid,
  .story-stage,
  .drag-columns {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .app-shell {
    padding: 18px 16px 34px;
  }

  .hero {
    padding: 24px;
    border-radius: 30px;
  }

  .hero-points,
  .modal-band,
  .angles-grid,
  .examples-grid,
  .quiz-grid,
  .choice-grid,
  .distribution-grid,
  .parity-grid,
  .parity-board,
  .rule-grid,
  .overview-stats,
  .basket-grid {
    grid-template-columns: 1fr;
  }

  .learning-modal {
    margin: 14px;
    max-height: calc(100vh - 28px);
    padding: 20px;
    border-radius: 28px;
  }

  .modal-title {
    font-size: 2.3rem;
  }

  .hero-scene {
    min-height: auto;
  }
}
