:root {
  --cream: #fff7df;
  --cream-soft: #fffcee;
  --paper: #fffdf4;
  --ink: #071b2d;
  --muted: #5f5b50;
  --line: #ead28f;
  --line-strong: #d8ad45;
  --yellow: #ffc400;
  --yellow-soft: #ffe59b;
  --orange: #ff6b00;
  --orange-dark: #d95000;
  --mint: #82ddb0;
  --mint-soft: #c6efdc;
  --peach: #ffc889;
  --peach-soft: #ffe2bc;
  --sky: #3679b3;
  --shadow: 0 14px 0 rgba(7, 27, 45, 0.08), 0 22px 48px rgba(109, 81, 18, 0.12);
  --soft-shadow: 0 8px 20px rgba(109, 81, 18, 0.12);
  --radius: 8px;
  --pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: ui-rounded, "Arial Rounded MT Bold", "Nunito", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
  background:
    radial-gradient(circle at 24px 24px, rgba(255, 196, 0, 0.2) 0 5px, transparent 6px),
    radial-gradient(circle at 74px 76px, transparent 0 12px, rgba(255, 196, 0, 0.14) 13px 15px, transparent 16px),
    linear-gradient(45deg, transparent 0 44px, rgba(255, 196, 0, 0.1) 45px 48px, transparent 49px),
    linear-gradient(135deg, transparent 0 56px, rgba(255, 196, 0, 0.12) 57px 60px, transparent 61px),
    var(--cream);
  background-size: 120px 120px, 140px 140px, 160px 160px, 180px 180px, auto;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.announcement {
  background: var(--yellow);
  border-bottom: 3px solid var(--line-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.announcement-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 40px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: anywhere;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--pill);
  background: #fff;
  color: var(--orange-dark);
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  box-shadow: inset 0 -2px 0 rgba(7, 27, 45, 0.08);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 244, 0.96);
  border-bottom: 4px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #000;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid #000;
  border-radius: 8px;
  background: var(--yellow);
  color: #000;
  font-size: 14px;
  font-weight: 1000;
  transform: rotate(-7deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.language-switcher a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: var(--pill);
  color: #000;
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
}

.nav-links a:hover,
.language-switcher a:hover {
  background: var(--yellow-soft);
}

.language-switcher {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: var(--pill);
  background: #fff;
}

.language-switcher a.is-active {
  background: #000;
  color: #fff;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: clamp(22px, 4vw, 34px) 0 38px;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(24px, 3vw, 36px);
  overflow: hidden;
  padding: clamp(30px, 4.6vw, 48px);
  border: 1px solid rgba(80, 118, 89, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 98% 6%, rgba(80, 118, 89, 0.08) 0 0, rgba(80, 118, 89, 0.08) 96px, transparent 97px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 255, 248, 0.98));
  box-shadow: 0 26px 70px rgba(67, 112, 78, 0.13);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  width: fit-content;
  margin-bottom: 22px;
  padding: 8px 14px;
  border: 1px solid rgba(80, 118, 89, 0.2);
  border-radius: var(--pill);
  background: rgba(225, 241, 229, 0.72);
  color: #4a6c54;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  max-width: 920px;
  color: #16251a;
  font-size: clamp(44px, 6vw, 78px);
}

.hero .lede {
  max-width: 980px;
  color: #69786d;
}

.hero-info-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 18px;
}

.hero-info-card {
  min-width: 0;
  padding: clamp(20px, 2.3vw, 26px);
  border: 1px solid rgba(80, 118, 89, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 36px rgba(224, 240, 229, 0.38);
}

.hero-info-card h2 {
  color: #16251a;
  font-size: clamp(20px, 2vw, 26px);
}

.hero-info-card ul {
  margin: 16px 0 0;
  padding-left: 22px;
  color: #69786d;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 820;
}

.hero-info-card li + li {
  margin-top: 5px;
}

.hero .hero-actions {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.hero .button.primary {
  border-color: rgba(80, 118, 89, 0.86);
  border-bottom-color: #3c5845;
  background: #507659;
}

.hero .button:not(.primary) {
  border-color: rgba(80, 118, 89, 0.18);
  border-bottom-color: rgba(80, 118, 89, 0.28);
  background: rgba(255, 255, 255, 0.76);
  color: #16251a;
}

.eyebrow {
  margin: 0 0 12px;
  color: #5f3d00;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: #000;
  line-height: 1.07;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 70px);
  overflow-wrap: anywhere;
  word-break: normal;
}

h2 {
  font-size: clamp(27px, 3.6vw, 42px);
}

h3 {
  font-size: 22px;
}

.lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 760;
  overflow-wrap: anywhere;
  word-break: normal;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button,
.share-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--pill);
  background: #fff8dc;
  color: #000;
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(7, 27, 45, 0.12);
}

.button.primary,
.share-button {
  border-color: #ff8b21;
  border-bottom-color: var(--orange-dark);
  background: var(--orange);
  color: #fff;
}

.button:hover,
.share-button:hover {
  transform: translateY(-1px);
}

.button:active,
.share-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(7, 27, 45, 0.12);
}

.test-card,
.game-preview,
.visual-panel,
.panel,
.content-card,
.type-card,
.atlas-card,
.faq details,
.result-card {
  border: 3px solid rgba(234, 210, 143, 0.95);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.game-preview,
.test-card {
  overflow: hidden;
}

.game-preview-head {
  padding: 18px 22px;
  background: var(--paper);
  border-bottom: 3px solid rgba(7, 27, 45, 0.06);
}

.game-screen {
  position: relative;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.35) 0 3px, transparent 4px),
    linear-gradient(180deg, var(--yellow) 0%, #ffbc00 100%);
  background-size: 52px 52px, auto;
}

.game-screen::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -46px;
  height: 120px;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 232, 166, 0.95);
  pointer-events: none;
}

.mii-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.mii-avatar {
  width: 106px;
  height: 152px;
  display: grid;
  place-items: end center;
}

.mii-avatar::before {
  content: "";
  width: 82px;
  height: 82px;
  display: block;
  border: 4px solid var(--ink);
  border-radius: 44% 44% 48% 48%;
  background:
    radial-gradient(circle at 30% 45%, #000 0 4px, transparent 5px),
    radial-gradient(circle at 68% 45%, #000 0 4px, transparent 5px),
    linear-gradient(160deg, #3a2113 0 28%, transparent 29%),
    #ffd8ad;
  box-shadow: 0 48px 0 -12px #fff2cf, 0 82px 0 -26px #fff;
}

.preview-controls {
  display: grid;
  gap: 8px;
}

.preview-row {
  display: grid;
  grid-template-columns: 108px 58px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--pill);
  background: rgba(255, 249, 223, 0.95);
  color: var(--ink);
  font-weight: 1000;
}

.preview-track {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.preview-track span {
  height: 22px;
  border-radius: 6px;
  background: var(--peach);
}

.preview-track span:nth-child(-n + 4) {
  background: var(--mint);
}

.preview-track span.is-on {
  background: var(--orange);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.game-ok {
  position: relative;
  z-index: 1;
  width: min(220px, 70%);
  margin: 24px auto 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  background: var(--orange);
  color: #fff;
  font-size: 24px;
  font-weight: 1000;
  box-shadow: 0 5px 0 var(--orange-dark);
}

.test-card {
  padding: 22px;
}

.test-card ul {
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-weight: 780;
}

.test-card li + li {
  margin-top: 6px;
}

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

.stat,
.trust-item {
  border: 3px solid rgba(234, 210, 143, 0.9);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px;
}

.stat strong,
.trust-item strong {
  display: block;
  color: #000;
  font-size: 25px;
  line-height: 1;
}

.stat span,
.trust-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.visual-panel {
  padding: 18px;
  background: var(--paper);
}

.mini-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mini-cell {
  min-height: 74px;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius);
  padding: 10px;
  color: #fff;
  font-weight: 1000;
  line-height: 1.1;
}

.mini-cell:nth-child(4n + 1) {
  background: #4e9159;
}

.mini-cell:nth-child(4n + 2) {
  background: var(--sky);
}

.mini-cell:nth-child(4n + 3) {
  background: var(--yellow);
  color: #000;
}

.mini-cell:nth-child(4n + 4) {
  background: var(--orange);
}

.section {
  padding: 58px 0;
}

.section.alt {
  background: rgba(255, 242, 193, 0.46);
  border-block: 3px solid rgba(234, 210, 143, 0.7);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head p,
.content-card p,
.type-group p,
.article p,
.article li {
  color: var(--muted);
  font-weight: 760;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.result-panel {
  background: var(--yellow);
}

.result-top {
  padding: 22px;
  border-bottom: 3px solid rgba(7, 27, 45, 0.08);
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.28) 0 3px, transparent 4px),
    var(--yellow);
  background-size: 52px 52px;
}

.region-row,
.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--pill);
  background: var(--paper);
}

.toggle button {
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 1000;
  padding: 7px 12px;
}

.toggle button.is-active {
  background: var(--orange);
  color: #fff;
}

.result-kicker,
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.result-kicker {
  margin-top: 18px;
}

.dot {
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: var(--pill);
  background: var(--mint);
}

.result-name {
  margin-top: 10px;
  color: #000;
  font-size: clamp(30px, 5vw, 46px);
}

.result-desc {
  color: #352b13;
  font-size: 16px;
  font-weight: 800;
}

.share-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 22px 20px;
  border-top: 3px solid rgba(7, 27, 45, 0.08);
  background: #ffe18a;
}

.share-button {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.share-status {
  width: 100%;
  min-height: 18px;
  color: #5a3d00;
  font-size: 13px;
  font-weight: 900;
}

.score-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.score-card,
.slider-card {
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--pill);
  background: var(--paper);
  padding: 14px 16px;
}

.score-card span,
.range-ends,
.note,
.small-label {
  color: #564512;
  font-size: 13px;
  font-weight: 900;
}

.score-card strong {
  display: block;
  margin-top: 4px;
  color: #000;
  font-size: 30px;
  line-height: 1;
}

.controls {
  padding: 0 16px 16px;
}

.slider-card {
  margin-top: 12px;
}

.slider-header,
.range-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.slider-title,
.slider-value {
  color: var(--ink);
  font-weight: 1000;
}

input[type="range"] {
  width: 100%;
  margin: 14px 0 8px;
  accent-color: var(--orange);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 16px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--mint) 0 50%, var(--peach) 50% 100%);
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -6px;
  border: 4px solid #fff;
  border-radius: var(--radius);
  background: var(--orange);
  box-shadow: 0 3px 0 var(--orange-dark);
  -webkit-appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 16px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--mint) 0 50%, var(--peach) 50% 100%);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid #fff;
  border-radius: var(--radius);
  background: var(--orange);
  box-shadow: 0 3px 0 var(--orange-dark);
}

.note {
  margin-top: 12px;
}

.chart-panel,
.content-card,
.type-card,
.atlas-card {
  padding: 18px;
}

.type-grid,
.atlas-grid,
.card-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.type-group {
  margin-top: 28px;
}

.type-group h3 {
  padding-left: 12px;
  border-left: 8px solid var(--group-color);
}

.type-card,
.chip-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.type-card {
  min-height: 174px;
}

.type-card:hover,
.type-card.is-active,
.chip-button:hover,
.chip-button.is-active {
  border-color: var(--orange);
  box-shadow: var(--shadow);
}

.type-card strong,
.atlas-card strong {
  display: block;
  color: #000;
  font-size: 18px;
}

.type-card span {
  display: inline-flex;
  margin: 9px 0;
  padding: 3px 8px;
  border: 2px solid;
  border-radius: var(--pill);
  color: var(--ink);
  background: var(--cream-soft);
  font-size: 12px;
  font-weight: 1000;
}

.type-card small,
.atlas-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

.atlas-card {
  min-height: 132px;
  border-left: 8px solid var(--group-color);
  color: var(--ink);
  text-decoration: none;
}

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

.chip-button {
  min-height: 92px;
  border: 3px solid rgba(234, 210, 143, 0.95);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 12px;
}

.chip-button strong,
.chip-button span,
.chip-button small {
  display: block;
}

.chip-button span,
.chip-button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.mapping {
  overflow: hidden;
  border: 3px solid rgba(234, 210, 143, 0.95);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.mapping-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-top: 2px solid rgba(234, 210, 143, 0.7);
}

.mapping-row:first-child {
  border-top: 0;
}

.mapping-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  box-shadow: none;
  padding: 16px;
}

.faq summary {
  cursor: pointer;
  color: #000;
  font-weight: 1000;
}

.faq p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 760;
}

.site-footer {
  padding: 34px 0;
  border-top: 4px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.breadcrumbs {
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.breadcrumbs a {
  color: #000;
  text-decoration: none;
}

.article {
  max-width: 860px;
  padding: 22px;
  border: 3px solid rgba(234, 210, 143, 0.95);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.article p,
.article li {
  font-size: 18px;
}

.article li + li {
  margin-top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input.sr-only[type="range"] {
  width: 1px;
  height: 1px;
  margin: -1px;
}

.calculator-section {
  padding-top: 34px;
  scroll-margin-top: 112px;
}

.mii-calculator {
  padding: 0;
  color: #000;
}

.calculator-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.calculator-heading-row h2 {
  font-size: clamp(34px, 4.4vw, 52px);
}

.calculator-region-toggle {
  min-width: 156px;
  border: 1px solid #e3b467;
  background: #fff0c9;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.65);
}

.calculator-region-toggle button {
  min-width: 68px;
  color: #7d5523;
  font-size: 18px;
}

.calculator-region-toggle button.is-active {
  background: #ffc447;
  color: #000;
  box-shadow: 0 3px 0 rgba(171, 114, 24, 0.25);
}

.result-hero {
  margin-bottom: 30px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 28px;
  background: #439a9a;
}

.result-hero .result-name {
  margin: 0;
  color: #000;
  font-size: clamp(32px, 4.4vw, 50px);
}

.result-hero .result-desc {
  max-width: 980px;
  margin: 28px 0 0;
  color: #092029;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 900;
  line-height: 1.25;
}

.segmented-controls {
  display: grid;
  gap: 20px;
}

.segmented-row h3 {
  margin-bottom: 14px;
  font-size: 27px;
}

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

.segment-button {
  min-width: 0;
  height: 42px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  font-weight: 1000;
  line-height: 1;
}

.segment-button.is-mint {
  background: #a8e7bf;
}

.segment-button.is-mint:first-child {
  background: #6dcc87;
}

.segment-button.is-peach {
  background: #ffc985;
}

.segment-button.is-peach:nth-last-child(2) {
  background: #ffad52;
}

.segment-button.is-peach:last-child {
  background: #ff9d2d;
}

.segment-button.is-active {
  background: #ff5707;
}

.segment-button:focus-visible,
.personality-choice:focus-visible {
  outline: 4px solid rgba(0, 0, 0, 0.28);
  outline-offset: 3px;
}

.segment-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  color: #7b5320;
  font-size: 17px;
  font-weight: 800;
}

.mii-calculator .note {
  margin: 0;
  color: #7b5320;
  font-size: 15px;
  font-weight: 850;
}

.personality-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 24px;
}

.personality-choice-group {
  min-width: 0;
}

.personality-choice-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 30px;
}

.personality-choice-group h3 span {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--group-color);
  opacity: 0.8;
}

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

.personality-choice {
  min-width: 0;
  min-height: 82px;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--choice-color);
  color: #000;
  cursor: pointer;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 1000;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.25);
}

.personality-choice.is-active {
  border-color: #000;
}

.mii-calculator .share-toolbar {
  margin-top: 24px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 240, 201, 0.82);
}

@media (max-width: 980px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-grid,
  .calculator-shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-info-grid {
    grid-template-columns: 1fr;
  }

  .type-grid,
  .atlas-grid,
  .chip-grid,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .personality-group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .announcement-inner,
  .container,
  .nav {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .announcement-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 0;
  }

  .announcement-inner span:last-child {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  h1 {
    max-width: 100%;
    font-size: 28px;
    line-height: 1.14;
    overflow-wrap: break-word;
  }

  .lede {
    max-width: 34ch;
    font-size: 17px;
    overflow-wrap: break-word;
  }

  .brand {
    white-space: normal;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links a {
    min-width: 0;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.72);
  }

  .language-switcher {
    width: 100%;
  }

  .language-switcher a {
    flex: 1;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-grid {
    gap: 22px;
    padding: 24px 20px;
    border-radius: 22px;
    background:
      radial-gradient(circle at 106% 0%, rgba(80, 118, 89, 0.08) 0 0, rgba(80, 118, 89, 0.08) 74px, transparent 75px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 255, 248, 0.98));
  }

  .hero .eyebrow {
    margin-bottom: 18px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero .lede {
    max-width: 100%;
  }

  .hero-info-card {
    padding: 18px;
    border-radius: 16px;
  }

  .hero-info-card h2 {
    font-size: 21px;
  }

  .hero-info-card ul {
    font-size: 16px;
  }

  .hero-stats,
  .trust-strip,
  .score-boxes,
  .type-grid,
  .atlas-grid,
  .chip-grid,
  .chart-grid,
  .mini-chart,
  .mii-row {
    grid-template-columns: 1fr;
  }

  .mii-avatar {
    display: none;
  }

  .preview-row {
    grid-template-columns: 1fr;
    border-radius: var(--radius);
  }

  .preview-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 100%;
  }

  .game-preview,
  .game-screen,
  .preview-controls,
  .preview-row,
  .result-panel,
  .chart-panel,
  .panel {
    max-width: 100%;
  }

  .mini-cell {
    width: 100%;
    min-height: 62px;
  }

  .visual-panel {
    width: 100%;
  }

  .region-row,
  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .mapping-row {
    grid-template-columns: 1fr;
  }

  .share-toolbar {
    padding-inline: 16px;
  }

  .calculator-heading-row {
    gap: 14px;
    margin-bottom: 22px;
  }

  .calculator-section {
    scroll-margin-top: 292px;
  }

  .calculator-heading-row h2 {
    font-size: 28px;
    line-height: 1.13;
  }

  .calculator-region-toggle {
    width: 100%;
  }

  .calculator-region-toggle button {
    min-width: 0;
    flex: 1;
    font-size: 16px;
  }

  .result-hero {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 20px;
  }

  .result-hero .result-name {
    font-size: 30px;
  }

  .result-hero .result-desc {
    margin-top: 18px;
    font-size: 17px;
  }

  .segmented-controls {
    gap: 18px;
  }

  .segmented-row h3 {
    margin-bottom: 10px;
    font-size: 23px;
  }

  .segment-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .segment-button {
    height: 40px;
    border-radius: 8px;
    font-size: 23px;
  }

  .segment-labels {
    font-size: 15px;
  }

  .personality-group-grid {
    gap: 14px;
    margin-top: 22px;
  }

  .personality-choice-group h3 {
    font-size: 25px;
  }

  .personality-choice-grid {
    gap: 8px;
  }

  .personality-choice {
    min-height: 64px;
    padding: 10px 8px;
    border-radius: 14px;
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .mii-calculator .share-toolbar {
    padding: 14px 0 0;
    background: transparent;
  }
}
