:root {
  color-scheme: light;
  --bg: #efe8db;
  --paper: #fbf7ef;
  --panel: #f8f2e7;
  --panel-dark: #12212c;
  --panel-darker: #0d171f;
  --ink: #13202a;
  --ink-soft: #5f6870;
  --ink-faint: #7a837f;
  --line: #d3cabb;
  --line-strong: #263746;
  --accent: #2c7a67;
  --accent-2: #a36a2b;
  --accent-soft: #dff1ea;
  --warning: #c05b2d;
  --shadow: 0 16px 38px rgba(16, 24, 32, 0.12);
  --radius: 8px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 40px 40px, 40px 40px, auto;
  overflow-x: hidden;
}

body[data-mode="fantasy"] {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.18)),
    linear-gradient(90deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    url("./fantasy-home-bg.svg");
  background-size: auto, 40px 40px, 40px 40px, cover;
  background-position: center, 0 0, 0 0, center top;
  background-blend-mode: screen, normal, normal, normal;
}

body[data-mode="dnd"] {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.16)),
    linear-gradient(90deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    url("./dnd-bg.svg");
  background-size: auto, 40px 40px, 40px 40px, cover;
  background-position: center, 0 0, 0 0, center top;
  background-blend-mode: screen, normal, normal, normal;
}

body[data-mode="random"] {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.18)),
    linear-gradient(90deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    url("./random-bg.svg");
  background-size: auto, 40px 40px, 40px 40px, cover;
  background-position: center, 0 0, 0 0, center top;
  background-blend-mode: screen, normal, normal, normal;
}

body[data-mode="wheel"] {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14)),
    linear-gradient(90deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 32, 42, 0.03) 1px, transparent 1px),
    url("./wheel-bg.svg");
  background-size: auto, 40px 40px, 40px 40px, cover;
  background-position: center, 0 0, 0 0, center top;
  background-blend-mode: screen, normal, normal, normal;
}

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  --ui-scale: 0.9;
  width: min(1180px, calc((100vw - 32px) / var(--ui-scale)));
  margin: 0 auto;
  transform: scale(var(--ui-scale));
  transform-origin: top center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(19, 32, 42, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--panel-darker), #22394a);
  color: #f4efe6;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong,
.panel-head h2,
.band-head h2,
.standard strong,
.spotlight strong,
.wheel-core strong,
.route-grid strong {
  letter-spacing: -0.01em;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy span,
.panel-meta,
.panel-note,
.hero-text,
.hero-stats span,
.route-links small,
.route-grid p,
.status,
.spotlight p,
.wheel-note,
.standard span,
.legal-page p {
  color: var(--ink-soft);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  font-size: 14px;
}

.topnav a,
.footer a {
  position: relative;
  padding: 4px 0;
}

.topnav a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.topnav a::after,
.footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.16s ease;
}

.topnav a:hover::after,
.footer a:hover::after {
  transform: scaleX(1);
}

.page {
  display: grid;
  gap: 14px;
  padding: 16px 0 18px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.mode-band {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  background: rgba(251, 247, 239, 0.96);
  border: 1px solid rgba(19, 32, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sample-band {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  background: rgba(251, 247, 239, 0.92);
  border: 1px solid rgba(19, 32, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.control-panel,
.output-panel,
.route-band,
.standards-band,
.legal-page {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 22px 22px 20px;
  background:
    linear-gradient(135deg, rgba(44, 122, 103, 0.08), rgba(44, 122, 103, 0)),
    var(--paper);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.hero-panel {
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.98), rgba(248, 242, 231, 0.98));
  border: 1px solid rgba(19, 32, 42, 0.08);
  color: var(--ink);
}

.eyebrow,
.panel-eyebrow,
.panel-kicker,
.spotlight-label,
.wheel-label,
.route-grid span,
.standard span {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow,
.panel-eyebrow,
.panel-kicker,
.route-grid span {
  color: var(--accent-2);
}

.panel-kicker,
.route-grid span {
  color: rgba(247, 239, 226, 0.65);
}

.mode-grid span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(44, 122, 103, 0.1);
  border: 1px solid rgba(44, 122, 103, 0.16);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

.route-grid span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(19, 32, 42, 0.05);
  border: 1px solid rgba(19, 32, 42, 0.08);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

.standard span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(163, 106, 43, 0.1);
  border: 1px solid rgba(163, 106, 43, 0.16);
  font-size: 11px;
  color: var(--accent-2);
}

.hero-panel .panel-kicker {
  color: var(--accent-2);
}

.hero-copy h1 {
  margin: 0;
  max-width: 20ch;
  font-size: 3rem;
  line-height: 0.94;
  text-align: left;
  margin-inline: 0;
  text-wrap: wrap;
}

.hero-text {
  max-width: 66ch;
  margin: 12px 0 0;
  font-size: 0.97rem;
  text-align: left;
  margin-inline: 0;
}

.hero-actions,
.action-row,
.preset-row,
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 20px;
}

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

.hero-stats div,
.route-links a,
.route-grid article,
.standard {
  border-radius: var(--radius);
}

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

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sample-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(19, 32, 42, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  font-size: 1rem;
}

.mode-grid article {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(19, 32, 42, 0.04);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.mode-grid span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-2);
}

.mode-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.hero-stats div {
  padding: 12px;
  background: rgba(19, 32, 42, 0.04);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.hero-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

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

.route-links a {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  background: rgba(19, 32, 42, 0.03);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.route-links a:hover {
  border-color: rgba(19, 32, 42, 0.16);
  background: rgba(19, 32, 42, 0.05);
}

.route-links strong,
.route-links span,
.route-links small {
  display: block;
}

.route-links strong {
  color: var(--ink);
}

.route-links span {
  font-size: 0.88rem;
}

.panel-note {
  margin: 0;
  font-size: 0.88rem;
}

.generator-band {
  display: grid;
  grid-template-columns: minmax(330px, 0.92fr) minmax(390px, 1.08fr);
  gap: 14px;
  align-items: start;
}

.control-panel,
.output-panel,
.route-band,
.standards-band {
  padding: 18px;
  background: var(--paper);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.control-panel {
  position: sticky;
  top: 14px;
  background:
    linear-gradient(180deg, rgba(19, 39, 52, 0.98), rgba(13, 23, 31, 0.98));
  border-color: rgba(127, 224, 197, 0.18);
  color: #f6f1e8;
  overflow: hidden;
}

.control-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #f4c77b, #7fe0c5);
}

.control-panel > * {
  position: relative;
  z-index: 1;
}

.output-panel {
  background: var(--paper);
  color: var(--ink);
  border-color: rgba(19, 32, 42, 0.08);
}

.control-panel.is-flash,
.output-panel.is-flash,
.hero-copy.is-flash,
.wheel-stage.is-flash {
  box-shadow: 0 0 0 1px rgba(44, 122, 103, 0.22), 0 18px 42px rgba(16, 24, 32, 0.18);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h2,
.band-head h2 {
  margin: 0;
  line-height: 1.1;
}

.control-panel .panel-head h2 {
  color: #fff6ea;
}

.panel-badge,
.panel-meta {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(19, 32, 42, 0.12);
  background: rgba(19, 32, 42, 0.04);
  white-space: nowrap;
}

.output-panel .panel-meta {
  color: var(--ink-soft);
  border-color: rgba(19, 32, 42, 0.12);
  background: rgba(255, 255, 255, 0.6);
}

.control-panel .panel-eyebrow {
  color: #f4c77b;
}

.control-panel .panel-badge {
  color: #12212c;
  background: linear-gradient(135deg, #f4c77b, #ffdf9e);
  border-color: rgba(255, 223, 158, 0.3);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.mode-tabs {
  margin-bottom: 14px;
}

.mode-tab,
.chip,
.button {
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.mode-tab,
.chip {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f6f1e8;
}

.mode-tab.is-active {
  background: linear-gradient(135deg, #7fe0c5, #9eeccf);
  color: #12212c;
  border-color: rgba(127, 224, 197, 0.32);
}

.route-links a.is-active {
  border-color: rgba(44, 122, 103, 0.18);
  background: rgba(223, 241, 234, 0.78);
}

.chip:hover,
.mode-tab:hover,
.button:hover {
  transform: translateY(-1px);
}

.button:active,
.mode-tab:active,
.chip:active {
  transform: translateY(0);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.field span {
  font-size: 13px;
  color: rgba(246, 241, 232, 0.8);
}

.field span strong {
  margin-left: 8px;
  color: #fff6ea;
}

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

input[type="text"],
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(248, 242, 231, 0.98);
  color: var(--ink);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.status {
  min-height: 1.4em;
  margin: 10px 0 0;
}

.button {
  padding: 10px 14px;
  box-shadow: none;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(135deg, #f4c77b, #ffdf9e);
  color: #12212c;
  border-color: rgba(255, 223, 158, 0.28);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f6f1e8;
}

.hero-actions .button-primary,
.action-row .button-primary {
  min-width: 200px;
}

.hero-actions .button-secondary,
.action-row .button-secondary {
  min-width: 170px;
}

.action-row {
  align-items: flex-start;
}

.output-panel .button-secondary {
  background: rgba(19, 32, 42, 0.04);
  border-color: rgba(19, 32, 42, 0.1);
  color: var(--ink);
}

.spotlight {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.spotlight strong {
  display: block;
  margin-top: 6px;
  font-size: 2.2rem;
  line-height: 0.98;
}

.spotlight p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  max-width: 54ch;
}

.wheel-stage {
  display: grid;
  gap: 12px;
  margin: 16px 0 14px;
}

.wheel-stage[hidden] {
  display: none !important;
}

.wheel-disc {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 340px);
  margin: 0 auto;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.18) 0 12%,
      rgba(44, 122, 103, 0.82) 12% 25%,
      rgba(255, 255, 255, 0.12) 25% 38%,
      rgba(163, 106, 43, 0.9) 38% 50%,
      rgba(255, 255, 255, 0.14) 50% 62%,
      rgba(44, 122, 103, 0.75) 62% 75%,
      rgba(255, 255, 255, 0.14) 75% 88%,
      rgba(163, 106, 43, 0.82) 88% 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.03), 0 18px 36px rgba(0, 0, 0, 0.24);
}

.wheel-disc::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at center, rgba(13, 23, 31, 0.3), rgba(13, 23, 31, 0.05));
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid #f2c98b;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
  z-index: 2;
}

.wheel-core {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  height: 62%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: rgba(13, 23, 31, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wheel-core strong {
  display: block;
  margin-top: 6px;
  font-size: 1.9rem;
  line-height: 0.98;
}

.wheel-note {
  margin: 0;
  text-align: center;
}

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

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.result-item span {
  overflow-wrap: anywhere;
}

.result-item button {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  padding: 0;
}

.result-item button.is-copied,
.button.is-copied {
  color: var(--accent);
  font-weight: 700;
}

.result-item.is-selected {
  background: rgba(223, 241, 234, 0.86);
  border-color: rgba(44, 122, 103, 0.18);
}

.output-actions {
  align-items: center;
}

.route-band {
  display: grid;
  gap: 14px;
}

.route-band,
.mode-band,
.sample-band,
.standards-band,
.faq-band {
  position: relative;
  overflow: hidden;
}

.route-band::before,
.mode-band::before,
.sample-band::before,
.standards-band::before,
.faq-band::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
}

.route-band::before {
  background: linear-gradient(90deg, #2c7a67, #7fe0c5);
}

.mode-band::before {
  background: linear-gradient(90deg, #a36a2b, #f4c77b);
}

.sample-band::before {
  background: linear-gradient(90deg, #12212c, #4f6776);
}

.standards-band::before {
  background: linear-gradient(90deg, #c05b2d, #f08f63);
}

.faq-band::before {
  background: linear-gradient(90deg, #263746, #90a4b6);
}

.route-band .band-head .panel-eyebrow,
.mode-band .band-head .panel-eyebrow,
.sample-band .band-head .panel-eyebrow,
.faq-band .band-head .panel-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(44, 122, 103, 0.14);
  border: 1px solid rgba(44, 122, 103, 0.24);
  color: var(--accent);
}

.band-head h2 {
  max-width: 20ch;
  font-size: 1.6rem;
  line-height: 1.12;
  color: var(--ink);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.route-grid article {
  padding: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.route-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.12rem;
  line-height: 1.28;
}

.route-grid p {
  margin: 6px 0 0;
  font-size: 1.02rem;
  line-height: 1.5;
}

.standards-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.standard {
  padding: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.standard span {
  font-size: 11px;
}

.standard strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.faq-band {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid rgba(19, 32, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.faq-grid article {
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.faq-grid strong {
  display: block;
  font-size: 1.12rem;
  line-height: 1.32;
}

.faq-grid p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.5;
}

.footer {
  display: flex;
  gap: 18px;
  padding: 14px 18px 20px;
  margin-bottom: 10px;
  color: var(--ink);
  background: rgba(251, 247, 239, 0.86);
  border: 1px solid rgba(19, 32, 42, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer a {
  color: var(--ink);
}

.legal-page {
  width: min(760px, calc(100vw - 32px));
  margin: 24px auto;
  padding: 18px;
  background: var(--paper);
  border: 1px solid rgba(19, 32, 42, 0.08);
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(19, 32, 42, 0.08);
  background: rgba(19, 32, 42, 0.04);
}

@media (max-width: 860px) {
  .page-shell {
    --ui-scale: 1;
    width: min(1180px, calc(100vw - 20px));
    transform: none;
  }

  .hero-band,
  .generator-band {
    grid-template-columns: 1fr;
  }

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

  .control-panel {
    position: static;
  }

  .topbar,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 1180px);
  }

  .hero-copy,
  .hero-panel,
  .control-panel,
  .output-panel,
  .route-band,
  .standards-band {
    padding: 16px;
  }

  .route-links {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .field-grid,
  .result-list {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .hero-actions,
  .action-row,
  .preset-row,
  .mode-tabs {
    gap: 8px;
  }

  .button,
  .mode-tab,
  .chip {
    width: 100%;
    justify-content: center;
  }

  .wheel-disc {
    width: min(100%, 290px);
  }
}
