/* GameMind Retention Suite — intentionally scoped to gmrs classes. */
.gmrs-home-hub,
.gmrs-page,
.gmrs-relay-section,
.gmrs-dialog {
  --gmrs-forest: var(--forest, #174f43);
  --gmrs-forest-dark: var(--forest-dark, #0f3a31);
  --gmrs-mint: var(--mint, #d9eee5);
  --gmrs-lime: var(--lime, #c8e36e);
  --gmrs-coral: var(--coral, #ee765f);
  --gmrs-yellow: var(--yellow, #f3c85b);
  --gmrs-paper: var(--paper, #f6f3eb);
  --gmrs-card: var(--card, #fffef9);
  --gmrs-ink: var(--ink, #18221f);
  --gmrs-soft: var(--ink-soft, #51605b);
  --gmrs-line: var(--line, #d8d6cb);
  --gmrs-shadow: var(--shadow, 0 18px 45px rgba(32, 50, 45, .10));
  color: var(--gmrs-ink);
}

.gmrs-section-heading,
.gmrs-page-hero,
.gmrs-panel-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.gmrs-section-heading h2,
.gmrs-page-hero h1,
.gmrs-panel h2 {
  margin-bottom: 12px;
}

.gmrs-section-heading > div > p:last-child,
.gmrs-page-hero > div > p:last-child,
.gmrs-panel header > p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--gmrs-soft);
}

/* Personalized home */
.gmrs-home-hub {
  position: relative;
  padding: clamp(66px, 8vw, 105px) 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 91% 4%, rgba(200, 227, 110, .34), transparent 20%),
    linear-gradient(180deg, #edf4ee, var(--gmrs-paper));
  border-block: 1px solid rgba(23, 79, 67, .10);
}

.gmrs-home-hub::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -185px;
  width: 430px;
  aspect-ratio: 1;
  border: 1px solid rgba(23, 79, 67, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(23, 79, 67, .025), 0 0 0 110px rgba(23, 79, 67, .018);
  pointer-events: none;
}

.gmrs-home-hub .site-shell { position: relative; z-index: 1; }
.gmrs-home-hub .gmrs-section-heading { margin-bottom: 30px; }
.gmrs-home-hub .gmrs-section-heading h2 { max-width: 760px; font-size: clamp(37px, 4.5vw, 58px); }
.gmrs-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gmrs-next-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(23, 79, 67, .13);
  border-radius: 27px;
  background: rgba(255, 254, 249, .92);
  box-shadow: 0 14px 35px rgba(30, 67, 56, .08);
}
.gmrs-next-card::after {
  content: "";
  position: absolute;
  right: -55px;
  top: -65px;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gmrs-mint);
  opacity: .55;
  pointer-events: none;
}
.gmrs-next-card.has-image::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 125px;
  background: linear-gradient(180deg, transparent, rgba(255, 254, 249, .98)), var(--gmrs-card-image) center/cover;
  opacity: .42;
}
.gmrs-next-card > * { position: relative; z-index: 1; }
.gmrs-next-card small { margin: 20px 0 7px; color: var(--gmrs-forest); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.gmrs-next-card h3 { margin: 0 0 12px; font-size: clamp(21px, 2.1vw, 27px); }
.gmrs-next-card p { color: var(--gmrs-soft); font-size: 14px; }
.gmrs-next-card .button { margin-top: auto; }
.gmrs-card-icon { display: grid; width: 55px; aspect-ratio: 1; place-items: center; border-radius: 18px; color: #fff; background: var(--gmrs-forest); font-size: 22px; font-weight: 900; box-shadow: 0 9px 20px rgba(23, 79, 67, .18); }
.gmrs-next-daily { color: #fff; background: linear-gradient(145deg, var(--gmrs-forest-dark), var(--gmrs-forest)); }
.gmrs-next-daily::after { background: var(--gmrs-lime); opacity: .16; }
.gmrs-next-daily .gmrs-card-icon { color: var(--gmrs-forest-dark); background: var(--gmrs-lime); }
.gmrs-next-daily small, .gmrs-next-daily p { color: #cce0d9; }
.gmrs-next-daily h3 { color: #fff; }
.gmrs-next-daily p strong { color: var(--gmrs-lime); font-size: 22px; }
.gmrs-quest-preview { background: linear-gradient(145deg, #fff9df, #fffef9); }
.gmrs-community-metrics span { max-width: 155px; }

/* Full-page Journey and archive */
.gmrs-page {
  width: min(calc(100% - 40px), 1180px);
  margin: 0 auto;
  padding: clamp(55px, 7vw, 95px) 0 105px;
}
.gmrs-page-hero {
  min-height: 295px;
  margin-bottom: 30px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(23, 79, 67, .13);
  border-radius: 34px;
  background:
    radial-gradient(circle at 92% 12%, rgba(200, 227, 110, .42), transparent 25%),
    linear-gradient(145deg, #edf6f0, #fffef9);
  box-shadow: var(--gmrs-shadow);
}
.gmrs-page-hero h1 { max-width: 780px; font-size: clamp(45px, 6vw, 76px); }
.gmrs-page-hero > div > p:last-child { font-size: 18px; }
.gmrs-hero-actions { display: flex; min-width: 230px; flex-direction: column; gap: 10px; }
.gmrs-loading { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 100px; color: var(--gmrs-soft); }
.gmrs-loading[hidden] { display: none; }
.gmrs-loading span { width: 23px; aspect-ratio: 1; border: 3px solid var(--gmrs-mint); border-top-color: var(--gmrs-forest); border-radius: 50%; animation: gmrs-spin .8s linear infinite; }
@keyframes gmrs-spin { to { transform: rotate(360deg); } }
.gmrs-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.gmrs-stats[hidden] { display: none; }
.gmrs-stats > div { display: grid; min-height: 118px; align-content: center; padding: 18px 13px; border: 1px solid var(--gmrs-line); border-radius: 20px; background: var(--gmrs-card); text-align: center; box-shadow: 0 7px 20px rgba(32, 50, 45, .045); }
.gmrs-stats strong { color: var(--gmrs-forest); font-size: clamp(25px, 3vw, 37px); line-height: 1; }
.gmrs-stats div:last-child strong { font-size: clamp(16px, 1.8vw, 22px); line-height: 1.1; }
.gmrs-stats span { margin-top: 9px; color: var(--gmrs-soft); font-size: 11px; font-weight: 750; }
.gmrs-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 22px; }
.gmrs-panel { margin-bottom: 22px; padding: clamp(25px, 4vw, 42px); border: 1px solid var(--gmrs-line); border-radius: 28px; background: var(--gmrs-card); box-shadow: 0 10px 28px rgba(32, 50, 45, .055); }
.gmrs-panel h2 { font-size: clamp(29px, 3vw, 42px); }
.gmrs-activity-calendar { display: grid; grid-template-columns: repeat(13, minmax(12px, 1fr)); gap: 7px; margin-top: 26px; }
.gmrs-day-cell { display: block; aspect-ratio: 1; border: 1px solid #dce5e0; border-radius: 5px; background: #edf2ef; }
.gmrs-day-cell.gmrs-level-1 { border-color: #c5dfd3; background: #cfe7dc; }
.gmrs-day-cell.gmrs-level-2 { border-color: #8ec2ad; background: #99cdb7; }
.gmrs-day-cell.gmrs-level-3 { border-color: #3f8e75; background: #4f9b83; }
.gmrs-day-cell.gmrs-level-4 { border-color: var(--gmrs-forest-dark); background: var(--gmrs-forest); }
.gmrs-calendar-legend { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--gmrs-soft); font-size: 10px; }
.gmrs-calendar-legend span:nth-child(2) { display: inline-flex; align-items: center; gap: 4px; }
.gmrs-calendar-legend i { width: 9px; height: 9px; border-radius: 2px; background: #edf2ef; }
.gmrs-calendar-legend i:nth-child(2) { background: #cfe7dc; }
.gmrs-calendar-legend i:nth-child(3) { background: #99cdb7; }
.gmrs-calendar-legend i:nth-child(4) { background: var(--gmrs-forest); }
.gmrs-best-list { margin-top: 20px; }
.gmrs-best-row { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 9px 0; border-bottom: 1px solid #ecece5; color: var(--gmrs-ink); text-decoration: none; }
.gmrs-best-row > span { color: #8b9792; font-size: 10px; font-weight: 900; }
.gmrs-best-row > div { display: grid; min-width: 0; }
.gmrs-best-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gmrs-best-row small { color: var(--gmrs-soft); font-size: 9px; }
.gmrs-best-row b { color: var(--gmrs-forest); font-size: 17px; }
.gmrs-empty { padding: 30px 18px; border: 1px dashed #b8c7c0; border-radius: 17px; color: var(--gmrs-soft); background: #f6faf7; text-align: center; }
.gmrs-week-badge { flex: 0 0 auto; padding: 8px 13px; border-radius: 999px; color: #644a00; background: #f9d86c; font-size: 11px; font-weight: 900; }
.gmrs-quest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 25px; }
.gmrs-quest { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 132px; padding: 17px; border: 1px solid #e2e0d5; border-radius: 19px; background: var(--gmrs-paper); }
.gmrs-quest > span { display: grid; width: 43px; aspect-ratio: 1; place-items: center; border-radius: 14px; color: var(--gmrs-forest); background: var(--gmrs-mint); font-size: 19px; font-weight: 900; }
.gmrs-quest > div { display: grid; min-width: 0; }
.gmrs-quest strong { font-size: 13px; }
.gmrs-quest small { min-height: 32px; margin-top: 3px; color: var(--gmrs-soft); font-size: 9px; line-height: 1.4; }
.gmrs-quest > b { color: var(--gmrs-forest); font-size: 12px; }
.gmrs-quest-meter { height: 6px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: #dfe5e1; }
.gmrs-quest-meter i { display: block; height: 100%; border-radius: inherit; background: var(--gmrs-forest); }
.gmrs-quest.is-complete { border-color: #a8c964; background: #f4f8e6; }
.gmrs-quest.is-complete > span { color: var(--gmrs-forest-dark); background: var(--gmrs-lime); }
.gmrs-badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.gmrs-badge { display: flex; align-items: center; gap: 12px; min-height: 95px; padding: 15px; border: 1px solid #e1e0d7; border-radius: 18px; background: var(--gmrs-paper); }
.gmrs-badge > span { display: grid; width: 47px; aspect-ratio: 1; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #84908b; background: #e2e5e2; font-size: 15px; font-weight: 900; }
.gmrs-badge > div { display: grid; }
.gmrs-badge strong { font-size: 12px; }
.gmrs-badge small { color: var(--gmrs-soft); font-size: 9px; line-height: 1.35; }
.gmrs-badge.is-earned { border-color: #dfc75f; background: #fff9dd; }
.gmrs-badge.is-earned > span { color: #684a00; background: var(--gmrs-yellow); box-shadow: 0 5px 15px rgba(118, 83, 0, .14); }
.gmrs-badge.is-locked { opacity: .7; }
.gmrs-tools { display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; border: 0; background: linear-gradient(145deg, var(--gmrs-forest-dark), var(--gmrs-forest)); }
.gmrs-tools h2, .gmrs-tools .eyebrow { color: #fff; }
.gmrs-tools .eyebrow { color: var(--gmrs-lime); }
.gmrs-tools > div:first-child p:last-child { max-width: 670px; margin-bottom: 0; color: #c8dcd5; }
.gmrs-tools > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

/* Daily Mind Mix archive */
.gmrs-archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 20px; padding: 17px 21px; border: 1px solid #d5ddD8; border-radius: 18px; background: #edf6f0; font-size: 13px; }
.gmrs-archive-toolbar a { font-weight: 850; text-decoration: none; }
.gmrs-archive-day { margin-bottom: 20px; overflow: hidden; border: 1px solid var(--gmrs-line); border-radius: 27px; background: var(--gmrs-card); box-shadow: 0 8px 22px rgba(32, 50, 45, .045); }
.gmrs-archive-day > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 25px; border-bottom: 1px solid var(--gmrs-line); background: linear-gradient(90deg, #f6f3eb, #fffef9); }
.gmrs-archive-day header small { color: var(--gmrs-forest); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.gmrs-archive-day header h2 { margin: 3px 0 0; font-family: inherit; font-size: 20px; letter-spacing: -.02em; }
.gmrs-archive-day header > span { padding: 7px 10px; border-radius: 999px; color: var(--gmrs-forest); background: var(--gmrs-mint); font-size: 10px; font-weight: 850; }
.gmrs-archive-game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gmrs-archive-game { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 132px; padding: 18px; border-right: 1px solid #e8e7df; color: var(--gmrs-ink); text-decoration: none; }
.gmrs-archive-game:last-child { border-right: 0; }
.gmrs-archive-game img { width: 94px; aspect-ratio: 1.3; object-fit: cover; border-radius: 13px; background: var(--gmrs-forest); }
.gmrs-archive-game > span { display: grid; min-width: 0; }
.gmrs-archive-game small { color: var(--gmrs-forest); font-size: 8px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.gmrs-archive-game strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gmrs-archive-game em { color: var(--gmrs-soft); font-size: 9px; font-style: normal; }
.gmrs-archive-game > b { grid-column: 1 / -1; color: var(--gmrs-forest); font-size: 10px; }
.gmrs-archive-game.is-complete { background: #f3f8e8; }
.gmrs-archive-game.is-complete > b { color: #476514; }

/* Relay Garden */
.gmrs-relay-section { margin: clamp(45px, 7vw, 85px) auto; padding: clamp(28px, 5vw, 55px); border: 1px solid rgba(23, 79, 67, .16); border-radius: 34px; background: radial-gradient(circle at 92% 9%, rgba(200, 227, 110, .36), transparent 23%), linear-gradient(145deg, #f1f8f1, #fffef9); box-shadow: var(--gmrs-shadow); }
.gmrs-relay-section .gmrs-section-heading { align-items: center; }
.gmrs-relay-section h2 { max-width: 830px; font-size: clamp(35px, 4.4vw, 56px); }
.gmrs-relay-stage { display: grid; min-width: 132px; padding: 19px; border-radius: 22px; color: #fff; background: var(--gmrs-forest); text-align: center; box-shadow: 0 12px 28px rgba(23, 79, 67, .17); }
.gmrs-relay-stage strong { color: var(--gmrs-lime); font-size: 34px; line-height: 1; }
.gmrs-relay-stage small { margin-top: 5px; font-size: 9px; }
.gmrs-relay-note { margin: 27px 0 15px; padding: 13px 17px; border: 1px solid #c7d9d0; border-radius: 14px; color: var(--gmrs-forest-dark); background: #e7f3ed; font-size: 12px; font-weight: 750; }
.gmrs-relay-note.is-complete { border-color: #d7be4b; background: #fff6c9; }
.gmrs-relay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.gmrs-relay-leg { position: relative; display: flex; min-height: 245px; flex-direction: column; align-items: flex-start; padding: 23px; border: 1px solid #dce1db; border-radius: 22px; background: var(--gmrs-card); }
.gmrs-relay-number { position: absolute; right: 17px; top: 15px; display: grid; width: 32px; aspect-ratio: 1; place-items: center; border-radius: 50%; color: var(--gmrs-forest); background: var(--gmrs-mint); font-size: 11px; font-weight: 900; }
.gmrs-relay-leg > small { color: var(--gmrs-forest); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.gmrs-relay-leg h3 { max-width: calc(100% - 30px); margin: 10px 0; font-size: 20px; }
.gmrs-relay-leg p { color: var(--gmrs-soft); font-size: 12px; }
.gmrs-relay-leg .button { margin-top: auto; font-size: 11px; }
.gmrs-play-link { margin-top: 10px; color: var(--gmrs-forest); font-size: 10px; font-weight: 850; text-decoration: none; }
.gmrs-relay-leg.is-mine { border-color: var(--gmrs-forest); box-shadow: inset 0 0 0 2px rgba(23, 79, 67, .10); }
.gmrs-relay-leg.is-complete { border-color: #c8ba58; background: #fff9dd; }
.gmrs-relay-leg.is-complete .gmrs-relay-number { color: #614800; background: var(--gmrs-yellow); }
.gmrs-relay-footer { display: flex; align-items: center; gap: 18px; margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--gmrs-line); }
.gmrs-relay-footer strong { color: var(--gmrs-forest); }
.gmrs-relay-footer span { flex: 1; color: var(--gmrs-soft); font-size: 10px; }

/* Profile and post-game extensions */
.gmrs-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--gmrs-line); }
.gmrs-profile-actions .button { min-height: 42px; padding: 9px 13px; font-size: 10px; }
.gmrs-post-game { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; width: 100%; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--gmrs-line); }
.gmrs-post-game .button { font-size: 11px; }

/* Recovery and reminder dialogs */
.gmrs-dialog { z-index: 1000; width: min(92vw, 660px); padding: 0; border: 0; border-radius: 30px; background: transparent; box-shadow: 0 35px 100px rgba(6, 27, 22, .42); }
.gmrs-dialog::backdrop { background: rgba(8, 29, 25, .76); backdrop-filter: blur(7px); }
.gmrs-dialog-panel { position: relative; max-height: min(88vh, 760px); padding: clamp(28px, 5vw, 48px); overflow: auto; border-radius: 29px; background: var(--gmrs-card); }
.gmrs-dialog-panel h2 { margin-bottom: 13px; font-size: clamp(34px, 5vw, 52px); }
.gmrs-dialog-panel > p:not(.eyebrow) { color: var(--gmrs-soft); font-size: 14px; }
.gmrs-dialog-close { position: absolute; right: 18px; top: 15px; display: grid; width: 42px; aspect-ratio: 1; place-items: center; border: 0; border-radius: 50%; color: var(--gmrs-soft); background: var(--gmrs-paper); font-size: 28px; cursor: pointer; }
.gmrs-dialog-content { display: grid; gap: 13px; margin-top: 24px; }
.gmrs-dialog-content > label:not(.gmrs-check) { font-size: 12px; font-weight: 900; }
.gmrs-dialog-content textarea,
.gmrs-dialog-content input[type="time"] { width: 100%; padding: 14px 16px; border: 2px solid var(--gmrs-line); border-radius: 15px; color: var(--gmrs-ink); background: #fff; font: inherit; }
.gmrs-dialog-content textarea { min-height: 135px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.45; }
.gmrs-private-note { display: grid; gap: 3px; padding: 14px 16px; border: 1px solid #dfc66d; border-radius: 15px; color: #6e5215; background: #fff8df; font-size: 11px; }
.gmrs-dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.gmrs-dialog-actions .button { font-size: 11px; }
.gmrs-dialog-content > [data-gmrs-dialog-feedback] { margin: 0; padding: 11px 13px; border-radius: 12px; color: var(--gmrs-forest-dark); background: var(--gmrs-mint); font-size: 11px; font-weight: 750; }
.gmrs-dialog-content > [data-gmrs-dialog-feedback][data-state="error"] { color: #812f27; background: #ffe9e5; }
.gmrs-dialog-content > [data-gmrs-dialog-feedback][data-state="success"] { color: #185746; background: #e4f3eb; }
.gmrs-check { display: flex; align-items: flex-start; gap: 9px; color: var(--gmrs-soft); font-size: 11px; }
.gmrs-check input { margin-top: 4px; }
.gmrs-dialog-content > small { color: var(--gmrs-soft); font-size: 9px; }
.gmrs-install-steps { display: grid; gap: 11px; margin: 4px 0 0; padding-left: 23px; color: var(--gmrs-ink); font-size: 14px; }
.gmrs-install-steps li::marker { color: var(--gmrs-forest); font-weight: 900; }

/* The theme's default prose wrapper is intentionally narrow. Journey and archive
   are application-style pages and need the full site shell without a second card. */
body.gmrs-journey-page .prose-page,
body.gmrs-archive-page .prose-page { max-width: none; padding-bottom: 0; }
body.gmrs-journey-page .prose-page > .prose,
body.gmrs-archive-page .prose-page > .prose { padding: 0; border: 0; border-radius: 0; background: transparent; }
body.gmrs-journey-page .gmrs-page,
body.gmrs-archive-page .gmrs-page { width: 100%; padding-top: clamp(45px, 6vw, 72px); }
body.gmrs-journey-page .gmrs-page h2,
body.gmrs-archive-page .gmrs-page h2 { margin-top: 0; }

@media (max-width: 980px) {
  .gmrs-home-grid { grid-template-columns: 1fr 1fr; }
  .gmrs-next-card:last-child { grid-column: 1 / -1; min-height: 250px; }
  .gmrs-dashboard-grid { grid-template-columns: 1fr; }
  .gmrs-stats { grid-template-columns: repeat(3, 1fr); }
  .gmrs-stats > div:last-child { grid-column: span 2; }
  .gmrs-quest-grid { grid-template-columns: 1fr; }
  .gmrs-quest { min-height: 105px; }
  .gmrs-badge-grid { grid-template-columns: 1fr 1fr; }
  .gmrs-archive-game-grid { grid-template-columns: 1fr; }
  .gmrs-archive-game { grid-template-columns: 115px minmax(0, 1fr) auto; border-right: 0; border-bottom: 1px solid #e8e7df; }
  .gmrs-archive-game:last-child { border-bottom: 0; }
  .gmrs-archive-game > b { grid-column: auto; }
  .gmrs-relay-grid { grid-template-columns: 1fr; }
  .gmrs-relay-leg { min-height: 195px; }
}

@media (max-width: 700px) {
  .gmrs-section-heading,
  .gmrs-page-hero,
  .gmrs-panel-split,
  .gmrs-tools { align-items: stretch; flex-direction: column; }
  .gmrs-home-hub { padding-block: 55px; }
  .gmrs-home-grid { grid-template-columns: 1fr; }
  .gmrs-next-card,
  .gmrs-next-card:last-child { grid-column: auto; min-height: 285px; padding: 23px; }
  .gmrs-page { width: min(calc(100% - 24px), 1180px); padding-block: 32px 70px; }
  .gmrs-page-hero { min-height: 0; padding: 27px 22px; border-radius: 25px; }
  .gmrs-page-hero h1 { font-size: clamp(40px, 13vw, 59px); }
  .gmrs-page-hero > div > p:last-child { font-size: 15px; }
  .gmrs-hero-actions { min-width: 0; }
  .gmrs-stats { grid-template-columns: 1fr 1fr; }
  .gmrs-stats > div:last-child { grid-column: 1 / -1; }
  .gmrs-panel { padding: 23px 18px; border-radius: 22px; }
  .gmrs-activity-calendar { gap: 4px; }
  .gmrs-day-cell { border-radius: 3px; }
  .gmrs-calendar-legend span:nth-child(2) { display: none; }
  .gmrs-badge-grid { grid-template-columns: 1fr; }
  .gmrs-tools > div:last-child { justify-content: flex-start; }
  .gmrs-archive-toolbar { align-items: flex-start; flex-direction: column; }
  .gmrs-archive-day > header { padding: 17px; }
  .gmrs-archive-game { grid-template-columns: 86px minmax(0, 1fr); padding: 14px; }
  .gmrs-archive-game img { width: 86px; }
  .gmrs-archive-game > b { grid-column: 1 / -1; }
  .gmrs-relay-section { margin-inline: 12px; padding: 25px 18px; border-radius: 25px; }
  .gmrs-relay-stage { min-width: 0; width: 100%; }
  .gmrs-relay-footer { align-items: flex-start; flex-direction: column; }
  .gmrs-relay-footer span { flex: none; }
  .gmrs-dialog-panel { padding: 34px 21px 25px; border-radius: 24px; }
  .gmrs-dialog-actions { flex-direction: column; }
  .gmrs-dialog-actions .button { width: 100%; }
  .gmrs-post-game { flex-direction: column; }
  .gmrs-post-game .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gmrs-loading span { animation-duration: 1.8s; }
}
