.app-shell--learn {
  --app-shell-gap: var(--section-gap);
  --app-shell-top-padding: 8px;
  --app-shell-bottom-padding: 56px;
}

.app-shell--learn .app-shell__hero,
.app-shell--learn > .app-shell__main > .content-container.surface--plain.app-shell__section,
.app-shell--learn [data-learn-grid] {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.app-shell--learn .app-shell__hero {
  padding: 22px 22px 20px;
  border: 1px solid var(--theme-border-normal);
  border-radius: var(--surface-radius);
  background: var(--theme-surface-subtle);
}

.app-shell--learn .title-row {
  align-items: flex-start;
  gap: var(--control-gap-wide);
}

.app-shell--learn .app-shell__hero > .title-row > .text-meta {
  --text-meta-size: var(--type-label-size);
  --text-meta-weight: 400;
  --text-meta-line: 1;
  --text-meta-track: 0;
  --text-meta-text-transform: none;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  flex: 0 0 100%;
  padding: 8px 12px;
  border: 1px solid var(--theme-border-normal);
  border-radius: var(--radius-pill);
  background: var(--theme-surface-base);
  color: var(--text-secondary);
}

.app-shell--learn .app-shell__hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.app-shell--learn .app-shell__hero > .text-summary {
  --text-summary-color: var(--text-secondary);
  --text-summary-size: 15px;
  --text-summary-line: 1.55;
  max-width: 58ch;
}

#gameProgressModal .section-head,
#gameSettingsModal .section-head {
  margin-bottom: 8px;
}

.app-shell--learn > .app-shell__main > .content-container.surface--plain.app-shell__section {
  padding: 18px 18px 20px;
  border: 1px solid var(--theme-border-normal);
  border-radius: var(--surface-radius);
  background: var(--theme-surface-subtle);
  overflow: hidden;
}

.app-shell--learn > .app-shell__main > .content-container.surface--plain.app-shell__section .content-body,
#gameProgressModal .content-body,
#gameSettingsModal .content-body {
  display: grid;
  gap: 16px;
}

#game-welcome,
#game-lessons {
  margin-top: 0;
}

#game-lessons .content-body,
#game-welcome .content-body {
  gap: 20px;
}

#gameProgressModal .button-rail {
  width: fit-content;
}

#gameProgressModal .content-container.surface--plain {
  padding: 20px;
  border: 1px solid var(--theme-border-normal);
  border-radius: var(--surface-radius);
  background: var(--theme-surface-subtle);
}

#gameProgressModal .progress-grid {
  gap: 14px;
}

#gameProgressModal .progress-card {
  --item-card-padding: 18px;
  --item-card-radius: var(--surface-radius);
  --item-card-bg: var(--theme-surface-base);
  --item-card-border: 1px solid var(--theme-border-normal);
}

#gameProgressModal .progress-label {
  --text-meta-track: 0;
  --text-meta-text-transform: none;
}

#gameProgressModal .progress-value {
  --text-title-weight: 400;
  --text-title-line: 1.05;
}

#gameProgressModal .progress-bar {
  --progress-bar-bg: var(--theme-surface-subtle);
}

.app-shell--learn [data-game-result] a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .app-shell--learn {
    gap: 20px;
    padding-bottom: 44px;
  }

  .app-shell--learn .app-shell__hero,
  .app-shell--learn > .app-shell__main > .content-container.surface--plain.app-shell__section,
  .app-shell--learn [data-learn-grid] {
    width: min(100%, calc(100vw - 24px));
  }

  .app-shell--learn .app-shell__hero,
  .app-shell--learn > .app-shell__main > .content-container.surface--plain.app-shell__section {
    padding: 18px 16px 20px;
    border-radius: var(--surface-radius);
  }
}

@media (max-width: 640px) {
  .app-shell--learn .app-shell__hero {
    padding: 16px 14px 18px;
    border-radius: var(--surface-radius);
  }

  .app-shell--learn .app-shell__hero h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .app-shell--learn .app-shell__hero > .text-summary {
    font-size: 14px;
  }

  .app-shell--learn > .app-shell__main > .content-container.surface--plain.app-shell__section {
    padding: 14px 12px 16px;
    border-radius: var(--surface-radius);
  }

  #gameProgressModal .content-container.surface--plain {
    border-radius: var(--surface-radius);
  }

  #gameProgressModal .progress-grid {
    grid-template-columns: 1fr;
  }

  #gameProgressModal .button-rail {
    width: 100%;
  }
}
