/* P1: palette-aware color values; literal fallbacks preserve the certified default. */
/* =========================================================
   WORDSTRIKE UI3 — MODE SELECT
   Cyber-athletic mode discovery built on the UI1 foundation.
   Practice Lab remains compatibility-only; no Practice-specific behavior lives here.
   ========================================================= */

.mode-select-screen {
  position: relative;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(24px, env(safe-area-inset-top))
    max(clamp(20px, 4vw, 56px), env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(clamp(20px, 4vw, 56px), env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 22% 38%, rgb(var(--custom-accent-rgb, 0 255 242) / 5%), transparent 28%),
    radial-gradient(circle at 74% 54%, rgb(255 60 172 / 3%), transparent 32%);
}

.mode-select-screen::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0 52%, rgb(var(--custom-accent-rgb, 0 255 242) / 2.4%) 52% 52.08%, transparent 52.08% 100%);
}

.mode-select-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 34px);
  width: min(1180px, 100%);
  min-height: calc(100dvh - max(48px, 8vw));
  margin: 0 auto;
}

.mode-select-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 52px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.mode-select-topline .screen-back-button {
  margin: 0;
  background: transparent;
}

.mode-select-context {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-micro);
  font-weight: 650;
  letter-spacing: var(--tracking-micro);
}

.mode-select-context strong {
  color: var(--color-text-secondary);
  font-weight: 700;
}

.mode-select-context span:last-child {
  font-family: var(--font-game);
  font-variant-numeric: tabular-nums;
}

.mode-select-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.55fr);
  gap: clamp(20px, 5vw, 70px);
  align-items: end;
}

.mode-select-kicker {
  margin: 0 0 8px;
  color: var(--color-accent);
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
}

.mode-select-intro h1 {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.mode-select-lead {
  max-width: 35rem;
  margin: 0 0 4px;
  color: var(--color-text-secondary);
  font-size: clamp(0.94rem, 1.4vw, 1.06rem);
  line-height: 1.65;
}

.mode-select-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.23fr) minmax(330px, 0.77fr);
  gap: clamp(22px, 4vw, 54px);
  min-height: 0;
  align-items: stretch;
}

/* ---------- Selected-mode showcase ---------- */

.mode-showcase {
  position: relative;
  display: grid;
  grid-template-rows: minmax(280px, 1fr) auto;
  min-width: 0;
  min-height: 500px;
  overflow: hidden;
  border-top: 1px solid var(--color-border-default);
  border-bottom: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgb(var(--custom-surface-1-rgb, 16 23 32) / 36%), rgb(var(--custom-bg-rgb, 10 14 20) / 80%)),
    var(--color-bg-elevated);
  box-shadow: var(--shadow-elevation-medium);
  isolation: isolate;
}

.mode-showcase::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

.mode-showcase-visual {
  position: relative;
  display: grid;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
}

.mode-showcase-visual::before {
  content: "";
  position: absolute;
  width: min(440px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--custom-accent-rgb, 0 255 242) / 10%), transparent 62%);
  filter: blur(2px);
}

.mode-showcase-index {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--color-text-muted);
  font-family: var(--font-game);
  font-size: var(--text-micro);
  letter-spacing: 0.13em;
}

.mode-showcase-signal {
  position: absolute;
  top: 18px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: var(--text-micro);
  font-weight: 650;
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
}

.mode-showcase-signal::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 10px rgb(76 255 142 / 45%);
}

.mode-showcase[data-mode-enabled="false"] .mode-showcase-signal::before,
.mode-showcase.mode-tone-home .mode-showcase-signal::before {
  background: var(--color-text-disabled);
  box-shadow: none;
}

.mode-showcase-copy {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5) var(--space-6);
  align-items: end;
  padding: clamp(22px, 4vw, 38px);
  border-top: 1px solid var(--color-border-subtle);
  background: rgb(var(--custom-elevated-rgb, 8 13 20) / 82%);
  backdrop-filter: blur(6px);
}

.mode-showcase-heading {
  min-width: 0;
}

.mode-showcase-heading p {
  margin: 0 0 7px;
  color: var(--color-text-muted);
  font-size: var(--text-label);
  font-weight: 650;
  letter-spacing: var(--tracking-label);
}

.mode-showcase-heading h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1;
}

.mode-showcase-description {
  grid-column: 1 / -1;
  max-width: 46rem;
  margin: -8px 0 0;
  color: var(--color-text-secondary);
  font-size: var(--text-body-small);
  line-height: 1.6;
}

.mode-showcase-command {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.mode-showcase-command kbd {
  display: grid;
  min-width: 40px;
  min-height: 30px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgb(var(--custom-accent-rgb, 0 255 242) / 32%);
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 10px;
}

.mode-showcase[data-mode-enabled="false"] .mode-showcase-command {
  color: var(--color-text-disabled);
}

.mode-showcase[data-mode-enabled="false"] .mode-showcase-command kbd {
  border-color: var(--color-border-subtle);
  background: transparent;
  color: var(--color-text-disabled);
}

/* Campaign trajectory motif */
.mode-motif-campaign {
  position: relative;
  width: min(470px, 82%);
  height: 220px;
}

.mode-motif-campaign .trajectory {
  position: absolute;
  top: 50%;
  left: 0;
  width: 73%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgb(var(--custom-accent-rgb, 0 255 242) / 40%), var(--color-accent));
}

.mode-motif-campaign .trajectory:nth-child(1) { transform: rotate(-15deg); }
.mode-motif-campaign .trajectory:nth-child(2) { transform: rotate(0deg); }
.mode-motif-campaign .trajectory:nth-child(3) { transform: rotate(15deg); }

.mode-motif-campaign .trajectory::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 14%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  animation: mode-signal-travel 4.8s var(--ease-standard) infinite;
}

.mode-motif-campaign .trajectory:nth-child(2)::before { animation-delay: -1.4s; }
.mode-motif-campaign .trajectory:nth-child(3)::before { animation-delay: -2.7s; }

.mode-motif-campaign .core-node {
  position: absolute;
  top: 50%;
  right: 2%;
  width: 78px;
  height: 78px;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid rgb(var(--custom-accent-rgb, 0 255 242) / 60%);
  background: rgb(var(--custom-accent-rgb, 0 255 242) / 5%);
  box-shadow: var(--bloom-accent-sm);
}

.mode-motif-campaign .core-node::after {
  content: "";
  position: absolute;
  inset: 21px;
  border: 1px solid var(--color-accent);
  background: rgb(var(--custom-accent-rgb, 0 255 242) / 12%);
}

/* Typing Test stream motif */
.mode-motif-typing {
  display: grid;
  width: min(520px, 84%);
  gap: 14px;
  transform: rotate(-3deg);
  font-family: var(--font-game);
}

.mode-motif-typing .word-row {
  display: flex;
  gap: 16px;
  color: rgb(237 244 247 / 22%);
  font-size: clamp(0.88rem, 1.5vw, 1.1rem);
  white-space: nowrap;
}

.mode-motif-typing .word-row:nth-child(2) { transform: translateX(8%); }
.mode-motif-typing .word-row:nth-child(3) { transform: translateX(-4%); }
.mode-motif-typing strong {
  position: relative;
  color: var(--color-text-primary);
  font-weight: 600;
}

.mode-motif-typing strong::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  box-shadow: var(--bloom-accent-sm);
}

.mode-motif-typing .caret {
  display: inline-block;
  width: 2px;
  height: 1.25em;
  margin-left: -12px;
  background: var(--color-accent);
  animation: mode-caret 1.1s steps(1, end) infinite;
}

/* Endless radar motif */
.mode-motif-endless {
  position: relative;
  width: 250px;
  aspect-ratio: 1;
}

.mode-motif-endless .ring {
  position: absolute;
  inset: 50%;
  border: 1px solid rgb(var(--custom-accent-rgb, 0 255 242) / 25%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.mode-motif-endless .ring:nth-child(1) { width: 68px; height: 68px; border-color: rgb(var(--custom-accent-rgb, 0 255 242) / 72%); }
.mode-motif-endless .ring:nth-child(2) { width: 132px; height: 132px; }
.mode-motif-endless .ring:nth-child(3) { width: 202px; height: 202px; }
.mode-motif-endless .ring:nth-child(4) {
  width: 246px;
  height: 246px;
  border-color: rgb(var(--custom-accent-rgb, 0 255 242) / 10%);
  animation: mode-endless-pulse 4s var(--ease-emphasis) infinite;
}

.mode-motif-endless .sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 112px;
  transform-origin: top center;
  background: linear-gradient(var(--color-accent), transparent);
  opacity: 0.58;
  animation: mode-radar-sweep 8s linear infinite;
}

.mode-motif-endless .center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--color-accent);
  box-shadow: var(--bloom-accent-sm);
}

/* Flow continuous-reading motif */
.mode-motif-flow {
  position: relative;
  display: grid;
  width: min(520px, 86%);
  gap: 14px;
  padding: 22px 8px;
  font-family: var(--font-game);
}

.mode-motif-flow .flow-stream-line {
  display: flex;
  align-items: baseline;
  gap: 15px;
  min-width: 0;
  color: rgb(237 244 247 / 24%);
  font-size: clamp(0.82rem, 1.45vw, 1.06rem);
  white-space: nowrap;
}

.mode-motif-flow .flow-stream-line:nth-child(1) {
  transform: translateX(-4%);
}

.mode-motif-flow .flow-stream-line:nth-child(2) {
  transform: translateX(7%);
}

.mode-motif-flow .flow-stream-line:nth-child(3) {
  transform: translateX(1%);
}

.mode-motif-flow strong {
  color: var(--color-text-primary);
  font-weight: 620;
}

.mode-motif-flow .flow-stream-caret {
  width: 2px;
  height: 1.2em;
  margin-left: -8px;
  background: var(--color-accent);
  box-shadow: var(--bloom-accent-sm);
  animation: mode-caret 1.1s steps(1, end) infinite;
}

.mode-motif-flow .flow-stream-rule {
  position: absolute;
  right: 3%;
  bottom: 2px;
  left: 3%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--custom-accent-rgb, 0 255 242) / 65%), transparent);
}

.mode-motif-flow .flow-stream-rule::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 18%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: var(--bloom-accent-sm);
  animation: mode-flow-current 5.8s var(--ease-standard) infinite;
}

.mode-tone-flow .mode-showcase-visual::before {
  background: radial-gradient(circle, rgb(var(--custom-accent-rgb, 0 255 242) / 12%), transparent 64%);
}

.mode-option[data-mode-id="flow"].selected {
  background: linear-gradient(90deg, rgb(var(--custom-accent-rgb, 0 255 242) / 10%), transparent 78%);
}

@keyframes mode-flow-current {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 0.95; }
  86% { opacity: 0.75; }
  100% { transform: translateX(330px); opacity: 0; }
}

/* Arcade Rush intersecting energy motif */
.mode-motif-rush {
  position: relative;
  width: min(510px, 86%);
  height: 220px;
}

.mode-motif-rush .rush-line {
  position: absolute;
  top: 50%;
  left: 2%;
  width: 96%;
  height: 2px;
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  box-shadow: 0 0 18px rgb(var(--custom-accent-rgb, 0 255 242) / 22%);
}

.mode-motif-rush .rush-line:nth-child(1) { transform: translateY(-38px) skewY(-7deg); }
.mode-motif-rush .rush-line:nth-child(2) { transform: translateY(2px) skewY(5deg); }
.mode-motif-rush .rush-line:nth-child(3) {
  transform: translateY(42px) skewY(-4deg);
  background: linear-gradient(90deg, transparent, var(--color-special), transparent);
  box-shadow: 0 0 18px rgb(255 60 172 / 24%);
}

.mode-motif-rush .rush-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--color-special);
  background: rgb(255 60 172 / 7%);
  box-shadow: var(--bloom-special);
}

.mode-motif-rush .rush-core::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid var(--color-accent);
}

/* Neutral unavailable/home motif */
.mode-motif-neutral {
  position: relative;
  display: grid;
  width: 170px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--color-border-default);
  border-radius: 50%;
  color: var(--color-text-muted);
  font-family: var(--font-game);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.mode-motif-neutral::before,
.mode-motif-neutral::after {
  content: "";
  position: absolute;
  background: var(--color-border-default);
}

.mode-motif-neutral::before { width: 1px; height: 126%; }
.mode-motif-neutral::after { width: 126%; height: 1px; }

.mode-tone-rush .mode-showcase-visual::before {
  background: radial-gradient(circle, rgb(255 60 172 / 10%), rgb(var(--custom-accent-rgb, 0 255 242) / 4%) 38%, transparent 65%);
}

/* ---------- Mode rail ---------- */

.mode-options {
  min-width: 0;
  align-self: stretch;
}

.mode-options-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-default);
}

.mode-options-heading strong {
  color: var(--color-text-secondary);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
}

.mode-options-heading span {
  color: var(--color-text-muted);
  font-family: var(--font-game);
  font-size: var(--text-micro);
}

.mode-options-list {
  display: grid;
  grid-template-columns: 1fr;
}

.mode-option {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  padding: 14px 10px 14px 8px;
  border: 0;
  border-bottom: 1px solid var(--color-border-subtle);
  border-radius: 0;
  background: transparent;
  color: var(--color-text-secondary);
  text-align: left;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

button.mode-option { cursor: pointer; }

.mode-option::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  transform: scaleY(0.2);
  background: var(--color-accent);
  opacity: 0;
  transition:
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.mode-option-index {
  color: var(--color-text-muted);
  font-family: var(--font-game);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.mode-option-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mode-option-copy strong {
  color: var(--color-text-primary);
  font-size: 0.98rem;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.mode-option-copy span {
  color: var(--color-text-muted);
  font-size: 0.77rem;
  line-height: 1.35;
}

.mode-option-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--color-text-muted);
  font-family: var(--font-game);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mode-option.available .mode-option-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-success);
}

.mode-option:hover,
.mode-option:focus-visible,
.mode-option.selected {
  background: linear-gradient(90deg, var(--color-accent-soft), transparent 78%);
  color: var(--color-text-primary);
}

.mode-option:hover::before,
.mode-option:focus-visible::before,
.mode-option.selected::before {
  transform: scaleY(1);
  opacity: 1;
}

.mode-option:focus-visible {
  outline: none;
  box-shadow: inset var(--focus-ring);
}

.mode-option[data-mode-id="arcade-rush"].selected {
  background: linear-gradient(90deg, rgb(255 60 172 / 9%), rgb(var(--custom-accent-rgb, 0 255 242) / 5%) 55%, transparent);
}

.mode-option[data-mode-id="arcade-rush"].selected::before {
  background: linear-gradient(var(--color-special), var(--color-accent));
}

.mode-option.coming-soon {
  color: var(--color-text-disabled);
  cursor: default;
  opacity: 0.6;
}

.mode-option.coming-soon .mode-option-copy strong,
.mode-option.coming-soon .mode-option-copy span,
.mode-option.coming-soon .mode-option-index,
.mode-option.coming-soon .mode-option-status {
  color: var(--color-text-disabled);
}

.mode-option.coming-soon.selected {
  opacity: 0.82;
  background: linear-gradient(90deg, rgb(143 155 165 / 8%), transparent 76%);
}

.mode-option.coming-soon.selected::before {
  background: var(--color-text-muted);
}

/* ---------- Footer / keyboard exit ---------- */

.mode-select-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-subtle);
}

.mode-select-hint {
  margin: 0;
  color: var(--color-text-muted);
  font-family: var(--font-game);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.mode-home-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--text-body-small);
  font-weight: 650;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.mode-home-action:hover,
.mode-home-action:focus-visible,
.mode-home-action.selected {
  border-color: var(--color-border-default);
  background: var(--color-surface-1);
  color: var(--color-text-primary);
}

.mode-home-action.selected {
  border-color: rgb(var(--custom-accent-rgb, 0 255 242) / 36%);
  color: var(--color-accent);
}

.mode-home-action:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.mode-home-arrow {
  color: var(--color-accent);
  font-family: var(--font-game);
}

@keyframes mode-signal-travel {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 0.9; }
  80% { opacity: 0.8; }
  100% { transform: translateX(235px); opacity: 0; }
}

@keyframes mode-caret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0.2; }
}

@keyframes mode-endless-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: 0.9; }
}

@keyframes mode-radar-sweep {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ownership ---------- */

@media (max-width: 980px) {
  .mode-select-shell {
    min-height: auto;
  }

  .mode-select-intro {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mode-select-lead {
    max-width: 44rem;
  }

  .mode-select-layout {
    grid-template-columns: 1fr;
  }

  .mode-showcase {
    grid-template-rows: minmax(230px, 0.85fr) auto;
    min-height: 410px;
  }

  .mode-options-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
}

@media (max-width: 620px) {
  .mode-select-screen {
    padding:
      max(16px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(22px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .mode-select-shell {
    gap: 18px;
  }

  .mode-select-topline {
    min-height: 46px;
    padding-bottom: 9px;
  }

  .mode-select-context strong {
    display: none;
  }

  .mode-select-intro h1 {
    font-size: clamp(2.3rem, 13vw, 3.35rem);
  }

  .mode-select-lead {
    font-size: 0.89rem;
    line-height: 1.55;
  }

  .mode-select-layout {
    gap: 20px;
  }

  .mode-showcase {
    grid-template-rows: 210px auto;
    min-height: 0;
  }

  .mode-showcase-visual {
    min-height: 210px;
  }

  .mode-showcase-index,
  .mode-showcase-signal {
    top: 12px;
  }

  .mode-showcase-index { left: 14px; }
  .mode-showcase-signal { right: 14px; }

  .mode-showcase-copy {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .mode-showcase-heading h2 {
    font-size: clamp(1.7rem, 9vw, 2.35rem);
  }

  .mode-showcase-command {
    justify-content: flex-start;
  }

  .mode-showcase-description {
    margin: 0;
  }

  .mode-motif-campaign {
    width: 86%;
    height: 150px;
  }

  .mode-motif-campaign .core-node {
    width: 58px;
    height: 58px;
  }

  .mode-motif-campaign .core-node::after {
    inset: 16px;
  }

  .mode-motif-typing {
    width: 90%;
    gap: 10px;
  }

  .mode-motif-endless {
    width: 170px;
  }

  .mode-motif-endless .ring:nth-child(1) { width: 48px; height: 48px; }
  .mode-motif-endless .ring:nth-child(2) { width: 88px; height: 88px; }
  .mode-motif-endless .ring:nth-child(3) { width: 132px; height: 132px; }
  .mode-motif-endless .ring:nth-child(4) { width: 168px; height: 168px; }
  .mode-motif-endless .sweep { height: 76px; }

  .mode-motif-flow {
    width: 92%;
    gap: 10px;
    padding-block: 12px;
  }

  .mode-motif-flow .flow-stream-line {
    gap: 10px;
    font-size: 0.78rem;
  }

  .mode-motif-rush {
    width: 91%;
    height: 150px;
  }

  .mode-motif-neutral {
    width: 126px;
  }

  .mode-options-list {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .mode-option {
    min-height: 76px;
    padding-block: 12px;
  }

  .mode-option-copy span {
    font-size: 0.73rem;
  }

  .mode-select-footer {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mode-home-action {
    justify-self: stretch;
  }
}

@media (min-width: 981px) and (max-height: 680px) {
  .mode-select-screen {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .mode-select-shell {
    gap: 14px;
    min-height: calc(100dvh - 36px);
  }

  .mode-select-topline {
    min-height: 44px;
    padding-bottom: 8px;
  }

  .mode-select-intro {
    align-items: center;
  }

  .mode-select-intro h1 {
    font-size: clamp(2rem, 5.4vh, 3.15rem);
  }

  .mode-select-lead {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .mode-showcase {
    grid-template-rows: minmax(190px, 1fr) auto;
    min-height: 360px;
  }

  .mode-showcase-visual {
    min-height: 190px;
  }

  .mode-showcase-copy {
    gap: 10px 20px;
    padding: 18px 22px;
  }

  .mode-showcase-heading h2 {
    font-size: clamp(1.65rem, 4.8vh, 2.45rem);
  }

  .mode-option {
    min-height: 65px;
    padding-block: 8px;
  }

  .mode-option-copy span {
    display: none;
  }

  .mode-select-footer {
    padding-top: 8px;
  }
}

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

  .mode-option:hover,
  .mode-option:focus-visible,
  .mode-option.selected {
    transform: none;
  }
}
