:root {
  color-scheme: light;
  --bg: #f7faff;
  --surface: #ffffff;
  --surface-2: #edf5ff;
  --text: #162033;
  --muted: #64748b;
  --line: #d9e5f6;
  --primary: #1976d2;
  --primary-dark: #0d47a1;
  --success: #178a4d;
  --danger: #d32f2f;
  --shadow: 0 16px 40px rgba(25, 118, 210, 0.14);
  --radius: 8px;
  --page: min(1120px, calc(100vw - 32px));
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1420;
  --surface: #151d2b;
  --surface-2: #1d2a3d;
  --text: #eef5ff;
  --muted: #aab8cc;
  --line: #2d3d55;
  --primary: #64b5f6;
  --primary-dark: #2196f3;
  --success: #62d28f;
  --danger: #ff8a80;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(25, 118, 210, 0.14), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: var(--page);
  margin: 0 auto;
  padding: 18px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 118, 210, 0.28);
}

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

.icon-button,
.text-button,
.button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.icon-button:hover,
.button:hover,
.text-button:hover,
.tile:hover,
.primary-tile:hover {
  transform: translateY(-2px);
}

.icon-button:active,
.button:active,
.text-button:active,
.tile:active,
.primary-tile:active {
  transform: translateY(1px) scale(0.98);
}

.page-enter {
  animation: pageIn 360ms ease both;
}

.no-animation .page-enter,
.no-animation .flash-number.pop {
  animation: none !important;
}

.no-animation .icon-button,
.no-animation .text-button,
.no-animation .button,
.no-animation .tile,
.no-animation .primary-tile,
.no-animation .toast,
.no-animation .segmented span {
  transition: none !important;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
  gap: 24px;
  padding: 54px 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 800;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-panel,
.panel,
.tile,
.primary-tile,
.history-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.24), transparent 9rem),
    radial-gradient(circle at bottom left, rgba(25, 118, 210, 0.22), transparent 12rem),
    linear-gradient(155deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 96%, transparent));
}

.hero-panel-streak {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.34), transparent 9rem),
    radial-gradient(circle at bottom left, rgba(255, 107, 53, 0.18), transparent 11rem),
    linear-gradient(155deg, color-mix(in srgb, #fff5df 64%, var(--surface)), color-mix(in srgb, var(--surface-2) 86%, transparent));
}

.hero-panel strong {
  display: block;
  margin: 8px 0 10px;
  font-size: clamp(2.8rem, 7vw, 4rem);
  line-height: 0.92;
}

.hero-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-panel__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  font-weight: 800;
}

.hero-panel__note {
  margin: 12px 0 0;
  color: var(--text);
  font-weight: 700;
}

.hero-panel-streak .hero-panel__note {
  max-width: 24rem;
}

.challenge-progress {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
}

.challenge-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb347, var(--primary), var(--primary-dark));
  box-shadow: 0 0 18px rgba(25, 118, 210, 0.26);
}

.hero-panel-streak .challenge-progress {
  height: 14px;
  background: color-mix(in srgb, #ffe5bd 58%, var(--surface-2));
}

.hero-panel-streak .challenge-progress span {
  background: linear-gradient(90deg, #ffb347, #ff7a1a 58%, #ef5350);
  box-shadow: 0 0 24px rgba(255, 122, 26, 0.34);
}

.challenge-button {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(135deg, #ffb347, color-mix(in srgb, var(--primary) 72%, #ffb347));
  color: #10233c;
  box-shadow: 0 14px 28px rgba(255, 179, 71, 0.28);
}

.metric-label,
.muted,
.tile small,
.history-card small,
.result-meta {
  color: var(--muted);
}

.hero-panel-streak .metric-label {
  color: #9a5600;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel-streak strong {
  text-shadow: 0 10px 24px rgba(255, 122, 26, 0.14);
}

.hero-panel-streak .hero-panel__meta span {
  background: rgba(255, 255, 255, 0.64);
}

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

.tile,
.primary-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 20px;
}

.primary-tile {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.primary-tile small {
  color: rgba(255, 255, 255, 0.82);
}

.tile-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-weight: 800;
}

.primary-tile .tile-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.panel {
  padding: 22px;
}

.record-spotlight {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, #ffb347 36%, var(--line));
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.28), transparent 10rem),
    linear-gradient(160deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-2) 96%, transparent));
}

.record-spotlight__eyebrow {
  margin-bottom: 8px;
  color: #b56a00;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.record-spotlight__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.record-spotlight__body strong {
  display: block;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 0.95;
}

.record-spotlight__body p {
  margin: 8px 0 0;
  color: var(--text);
  font-weight: 700;
}

.challenge-cta {
  min-width: 220px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.stats-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.stats-list div,
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.stats-list dt,
.detail-row span:first-child {
  color: var(--muted);
}

.stats-list dd {
  margin: 0;
  font-weight: 800;
}

.settings-form,
.answer-form {
  display: grid;
  gap: 18px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

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

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.segmented input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 118, 210, 0.22);
}

.range-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}

.range-setting__label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.range-setting__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-weight: 800;
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 72%, white 8%), color-mix(in srgb, var(--primary-dark) 82%, transparent)) left center / var(--range-fill, 0%) 100% no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 94%, white 6%), color-mix(in srgb, var(--surface) 92%, transparent));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 36%, transparent),
    var(--shadow);
  cursor: pointer;
}

.range-input:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.range-input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 52%, transparent);
  outline-offset: 3px;
}

.range-input::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: transparent;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -7px;
  border: 2px solid color-mix(in srgb, white 72%, var(--primary));
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, color-mix(in srgb, white 82%, var(--primary) 18%), var(--primary) 62%);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.28);
}

.range-input::-moz-range-track {
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 94%, white 6%), color-mix(in srgb, var(--surface) 92%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 36%, transparent);
}

.range-input::-moz-range-progress {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 72%, white 8%), color-mix(in srgb, var(--primary-dark) 82%, transparent));
}

.range-input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 2px solid color-mix(in srgb, white 72%, var(--primary));
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, white 82%, var(--primary) 18%), var(--primary) 62%);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.28);
}

.button {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 26px rgba(25, 118, 210, 0.28);
}

.text-button {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-weight: 800;
}

.game-shell {
  min-height: 100vh;
}

.game-setup,
.answer-panel {
  max-width: 760px;
  margin: 32px auto 0;
}

.play-view {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 150px);
  text-align: center;
}

.flash-number {
  font-weight: 900;
  font-size: clamp(5rem, 24vw, 16rem);
  line-height: 1;
  letter-spacing: 0;
  color: var(--primary-dark);
}

.flash-number.pop {
  animation: numberPop 260ms ease both;
}

@keyframes numberPop {
  0% { opacity: 0; transform: scale(0.9); }
  35% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.progress-text {
  min-height: 24px;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 700;
}

.answer-form input {
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 2rem;
  text-align: center;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 28px;
}

.result-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.result-status.ok {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}

.result-status.ng {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}

.result-summary {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.result-summary-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(166, 204, 246, 0.28), rgba(166, 204, 246, 0.12));
}

.result-summary-label {
  min-width: 4.5rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.result-summary-label::after {
  content: ":";
  margin-left: 0.18em;
}

.result-summary-value {
  font-size: clamp(3.2rem, 10vw, 6rem);
  line-height: 1;
  font-weight: 900;
}

.result-summary-value-small {
  font-size: clamp(2rem, 6vw, 3rem);
}

.result-rank-text {
  color: var(--primary);
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1;
  font-weight: 900;
}

.number-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.number-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 800;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.action-stack--result {
  margin-top: 16px;
}

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

.result-next-steps .button {
  justify-content: center;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(0, 0.8fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
  align-items: end;
}

.history-group {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.analytics-panel {
  margin-bottom: 18px;
}

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

.analytics-card,
.insight-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.analytics-emphasis {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1;
}

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

.trend-list,
.insight-list {
  display: grid;
  gap: 12px;
}

.trend-row {
  display: grid;
  gap: 8px;
}

.trend-row__head,
.insight-card__header,
.insight-card__metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.trend-row__head span,
.insight-card__header span,
.insight-card__metric span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.trend-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.trend-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, #ffb347 74%, var(--primary)));
}

.history-group + .history-group {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.history-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.history-group-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.history-group-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.history-group-score {
  align-self: center;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.history-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
}

.history-detail-card {
  grid-template-columns: 1fr;
  gap: 16px;
}

.history-item {
  padding: 0;
  overflow: hidden;
}

.history-item[open] {
  background:
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.14), transparent 9rem),
    color-mix(in srgb, var(--surface) 94%, transparent);
}

.history-item-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.history-item-summary::-webkit-details-marker {
  display: none;
}

.history-item-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.history-item-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.history-item-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.history-item-side {
  text-align: right;
  flex: 0 0 auto;
}

.history-detail-body {
  display: grid;
  gap: 16px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.history-detail-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.history-card-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.history-score-block {
  text-align: right;
}

.history-share-button {
  margin-top: 8px;
}

.history-score {
  font-size: 1.5rem;
  font-weight: 900;
}

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

.history-detail-row,
.history-setting-chip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.history-detail-row span,
.history-setting-chip span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.history-chip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.history-sequence {
  display: grid;
  gap: 8px;
}

.field-label,
.select-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.field-label span {
  font-size: 0.92rem;
}

input[type="search"],
select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.history-summary-card {
  min-height: 132px;
}

.history-summary-suffix {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 999px;
  background: #162033;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 15, 28, 0.56);
}

.modal-card {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 22px;
}

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

.qr-canvas,
.result-preview {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 14px auto 0;
  border-radius: var(--radius);
  background: #fff;
}

.empty-state {
  padding: 34px 12px;
  color: var(--muted);
  text-align: center;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 64%, transparent);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  :root {
    --page: min(100vw - 24px, 720px);
  }

  .hero,
  .home-grid,
  .section-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }

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

  .history-toolbar,
  .history-summary {
    grid-template-columns: 1fr;
  }

  .result-next-steps {
    grid-template-columns: 1fr;
  }

  .record-spotlight__body {
    grid-template-columns: 1fr;
  }

  .challenge-cta {
    width: 100%;
    min-width: 0;
  }

  .history-item-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-item-side,
  .history-score-block {
    text-align: left;
  }

  .history-detail-grid,
  .history-chip-row {
    grid-template-columns: 1fr;
  }
}

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