:root {
  --night: #151210;
  --night-2: #211d1a;
  --paper: #f2eee5;
  --paper-2: #fbf8f1;
  --lake: #19443a;
  --lake-2: #276859;
  --red: #c62b35;
  --silver: #c8cbcb;
  --ink-muted: #675f59;
  --night-muted: #aaa49f;
  --line-dark: rgba(242, 238, 229, 0.2);
  --line-light: rgba(21, 18, 16, 0.18);
  --wash: rgba(25, 68, 58, 0.08);
  --correct: #176a50;
  --warning: #a45e00;
  --font-display: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
  --page: max(24px, calc((100vw - 1280px) / 2));
  --radius: 6px;
  --header: 76px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-behavior: smooth;
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--night);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
strong,
b {
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

::selection {
  background: var(--red);
  color: var(--paper);
}

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

.prototype-app {
  min-height: 100dvh;
  background: var(--paper);
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 3px;
  background: var(--paper);
  color: var(--night);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--lake);
  color: var(--paper);
}

.button--primary:hover:not(:disabled) {
  background: #12372f;
}

.button--secondary {
  border-color: currentColor;
  background: transparent;
}

.button--secondary:hover:not(:disabled) {
  background: rgba(25, 68, 58, 0.08);
}

.button--danger {
  background: var(--red);
  color: #fff;
}

.button--danger:hover:not(:disabled) {
  background: #a51f29;
}

.button--wide {
  width: 100%;
}

.text-button {
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-transform: uppercase;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 18px;
}

/* Header and footer */
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: var(--header);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px max(24px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line-dark);
  background: rgba(21, 18, 16, 0.97);
  color: var(--paper);
  backdrop-filter: blur(12px);
}

.brand-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 4px;
  background: transparent;
  color: var(--paper);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  mix-blend-mode: screen;
}

.brand-button span {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 4px;
  background: transparent;
  color: var(--paper);
  font-size: 14px;
  font-weight: 750;
}

.site-nav button:hover {
  background: rgba(242, 238, 229, 0.1);
}

.site-nav .nav-cta {
  margin-left: 8px;
  background: var(--paper);
  color: var(--night);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(280px, 1fr);
  gap: 48px;
  padding: 48px var(--page);
  border-top: 1px solid var(--line-dark);
  background: var(--night);
  color: var(--paper);
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 0;
  color: var(--night-muted);
  font-size: 13px;
}

.site-footer > p {
  max-width: 680px;
}

/* Shared cover components */
.cover-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line-light);
  background: #d8d4cb;
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  background:
    radial-gradient(circle at center, var(--paper) 0 10%, transparent 10.5%),
    repeating-radial-gradient(circle at center, #282321 0 2px, #151210 2px 8px);
  color: var(--paper);
  text-align: center;
}

.cover-placeholder span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.cover-placeholder b {
  font-size: 24px;
}

/* Home */
.hero-section {
  position: relative;
  display: grid;
  min-height: calc(100dvh - var(--header));
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(52px, 8vw, 130px);
  overflow: hidden;
  padding: clamp(62px, 8vw, 116px) var(--page);
  background: var(--night);
  color: var(--paper);
  isolation: isolate;
}

.hero-section::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto auto;
  width: 52%;
  height: 100%;
  background: linear-gradient(155deg, rgba(242, 238, 229, 0.18), transparent 58%);
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 0 100%);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-copy .eyebrow {
  color: var(--silver);
}

.hero-copy h1 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(76px, 10vw, 156px);
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 0.74;
}

.hero-subtitle {
  margin-bottom: 22px;
  font-size: clamp(23px, 2.7vw, 38px);
  font-weight: 800;
  letter-spacing: 0.07em;
}

.hero-intro {
  max-width: 590px;
  margin-bottom: 34px;
  color: var(--silver);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-section .button--secondary {
  color: var(--paper);
}

.hero-record {
  position: relative;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(242, 238, 229, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--night) 0 2.4%, transparent 2.6%),
    radial-gradient(circle at center, var(--red) 0 16%, #b8232d 16.2% 21%, transparent 21.2%),
    repeating-radial-gradient(circle at center, #24201e 0 3px, #0c0b0a 3px 10px);
  box-shadow: -28px 36px 0 rgba(25, 68, 58, 0.8), 0 44px 90px rgba(0, 0, 0, 0.45);
  animation: slow-spin 30s linear infinite;
}

.record-rings {
  position: absolute;
  inset: 34%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 238, 229, 0.28);
  border-radius: 50%;
  background: var(--red);
  text-align: center;
}

.record-rings span {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 950;
  line-height: 0.9;
}

.record-rings small {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

.resume-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 34px;
  padding: 30px var(--page);
  border-block: 1px solid var(--line-dark);
  background: var(--lake);
  color: var(--paper);
}

.resume-banner .eyebrow {
  margin-bottom: 4px;
  color: var(--silver);
}

.resume-banner h2 {
  margin: 0;
  font-size: 24px;
}

.resume-meta {
  display: grid;
  gap: 3px;
  color: var(--silver);
  font-size: 13px;
}

.resume-banner .button--primary {
  background: var(--paper);
  color: var(--night);
}

.rule-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line-light);
  background: var(--paper);
}

.rule-strip > div {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: center;
  padding: 26px clamp(20px, 3vw, 44px);
  border-right: 1px solid var(--line-light);
}

.rule-strip > div:last-child {
  border-right: 0;
}

.rule-strip b {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 60px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}

.rule-strip span {
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 13px;
}

.home-section {
  padding: clamp(70px, 9vw, 128px) var(--page);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 46px;
}

.featured-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 0 18px;
  border-bottom: 3px solid var(--night);
  background: transparent;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
}

.featured-card .cover-frame {
  margin-bottom: 17px;
}

.featured-card > span,
.featured-card > small {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.featured-card strong {
  margin: 5px 0 3px;
  font-size: 18px;
  line-height: 1.25;
}

.lake-section {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) var(--page);
  background: var(--lake);
  color: var(--paper);
  isolation: isolate;
}

.lake-section::after {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -55%;
  width: 70vw;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 238, 229, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(242, 238, 229, 0.05), 0 0 0 140px rgba(242, 238, 229, 0.04), 0 0 0 210px rgba(242, 238, 229, 0.03);
  content: "";
}

.lake-section h2 {
  max-width: 820px;
  margin-bottom: 26px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.lake-section > p:last-child {
  max-width: 600px;
  margin: 0;
  color: var(--silver);
  font-size: 18px;
}

/* Page headers and collection */
.page-intro {
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(68px, 9vw, 120px) 24px clamp(44px, 6vw, 76px);
}

.page-intro h1 {
  max-width: 970px;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(54px, 8vw, 108px);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.page-intro > p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 18px;
}

.collection-page {
  min-height: 100dvh;
  background: var(--paper);
}

.collection-tools {
  position: sticky;
  z-index: 20;
  top: var(--header);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 2fr) auto;
  align-items: end;
  gap: 20px;
  padding: 18px var(--page);
  border-block: 1px solid var(--line-light);
  background: rgba(242, 238, 229, 0.97);
  backdrop-filter: blur(10px);
}

.search-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.search-field input,
.name-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--night);
  border-radius: 3px;
  background: var(--paper-2);
  outline: 0;
}

.search-field input:focus,
.name-field input:focus {
  box-shadow: 0 0 0 3px rgba(198, 43, 53, 0.25);
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.filter-chips button {
  min-height: 42px;
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.filter-chips button:hover,
.filter-chips .is-active {
  border-color: var(--night);
  background: var(--night);
  color: var(--paper);
}

.result-count {
  margin: 0 0 11px;
  white-space: nowrap;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.collection-grid {
  display: grid;
  max-width: 1280px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-inline: auto;
  padding: 1px 24px clamp(72px, 9vw, 120px);
  background: var(--line-light);
}

.collection-card {
  min-width: 0;
  padding: 18px;
  background: var(--paper);
  text-align: left;
  transition: background-color 140ms ease, transform 140ms ease;
}

.collection-card:hover {
  z-index: 1;
  background: var(--paper-2);
  box-shadow: 0 0 0 2px var(--night);
}

.collection-card-copy {
  padding-top: 18px;
}

.collection-card-copy > span,
.collection-card-copy > small {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.collection-card-copy h2 {
  min-height: 2.5em;
  margin: 8px 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.collection-card-copy p {
  min-height: 2.8em;
  margin-bottom: 8px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.4;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 90px 24px;
  background: var(--paper);
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 36px;
}

.empty-state button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--night);
  background: transparent;
  font-weight: 750;
}

.collection-cta {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 48px var(--page);
  background: var(--lake);
  color: var(--paper);
}

.collection-cta p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 48px);
  font-weight: 900;
  line-height: 1.05;
}

.collection-cta .button--primary {
  background: var(--paper);
  color: var(--night);
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 28px;
  background: rgba(10, 9, 8, 0.78);
  place-items: center;
  backdrop-filter: blur(6px);
}

.record-modal {
  position: relative;
  display: grid;
  width: min(960px, 100%);
  max-height: calc(100dvh - 56px);
  grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1.15fr);
  gap: 0;
  overflow: auto;
  border: 1px solid var(--line-dark);
  background: var(--paper);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.45);
}

.record-modal .cover-frame {
  height: 100%;
  min-height: 540px;
  border: 0;
}

.record-modal-copy {
  padding: clamp(34px, 5vw, 64px);
}

.record-modal-copy h2 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1;
}

.record-modal-copy h3 {
  margin: 0 0 24px;
  color: var(--ink-muted);
  font-size: 16px;
}

.record-modal-copy dl {
  display: grid;
  margin: 26px 0;
  border-top: 1px solid var(--line-light);
}

.record-modal-copy dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-light);
}

.record-modal-copy dt {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 750;
}

.record-modal-copy dd {
  margin: 0;
  font-size: 13px;
}

.prototype-note {
  padding: 14px 16px;
  border-left: 4px solid var(--red);
  background: rgba(198, 43, 53, 0.07);
  color: var(--ink-muted);
  font-size: 12px;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: var(--paper);
  place-items: center;
}

.modal-close-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.modal-close-icon::before,
.modal-close-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform-origin: center;
}

.modal-close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Rules, name and ready */
.narrow-page {
  min-height: calc(100dvh - var(--header));
  padding-bottom: 100px;
  background: var(--paper);
}

.narrow-page .page-intro {
  max-width: 900px;
}

.rules-panel,
.name-panel {
  width: min(852px, calc(100% - 48px));
  margin-inline: auto;
  border: 1px solid var(--night);
  background: var(--paper-2);
  box-shadow: 16px 16px 0 var(--lake);
}

.rules-panel {
  padding: clamp(28px, 5vw, 58px);
}

.rules-title {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: start;
  gap: 18px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--night);
}

.rules-title > span {
  padding: 5px 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.rules-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.rules-title p {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 30px 0;
  background: var(--line-light);
}

.rules-grid > div {
  min-height: 124px;
  padding: 22px;
  background: var(--paper-2);
}

.rules-grid b {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 950;
  line-height: 1;
}

.rules-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.rules-list {
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-light);
}

.rules-list li > span {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.rules-list p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.rules-list b {
  color: var(--night);
}

.text-mode-option,
.privacy-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 14px;
  margin-bottom: 22px;
  padding: 17px;
  border: 1px solid var(--line-light);
  background: var(--paper);
}

.text-mode-option input,
.privacy-option input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--lake);
}

.text-mode-option span,
.privacy-option span {
  display: grid;
}

.text-mode-option small,
.privacy-option small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 12px;
}

.name-page .page-intro {
  padding-bottom: 42px;
}

.name-panel {
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 58px);
}

.name-field {
  position: relative;
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.name-field input {
  min-height: 66px;
  padding: 14px 18px;
  font-size: 22px;
  font-weight: 750;
}

.name-field small {
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
  font-weight: 500;
}

.name-field small b {
  color: var(--night);
  font-family: var(--font-mono);
}

.field-error {
  color: var(--red) !important;
}

.name-preview {
  position: relative;
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 24px 130px 24px 24px;
  background: var(--lake);
  color: var(--paper);
}

.name-preview::after {
  position: absolute;
  right: -30px;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 238, 229, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(242, 238, 229, 0.05), 0 0 0 52px rgba(242, 238, 229, 0.04);
  content: "";
}

.name-preview span {
  color: var(--silver);
  font-size: 12px;
}

.name-preview strong {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-panel .privacy-option {
  margin: 0;
}

.ready-page {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: clamp(56px, 8vw, 130px);
  padding: clamp(48px, 7vw, 96px) var(--page);
  overflow: hidden;
  background: var(--night);
  color: var(--paper);
}

.ready-record {
  position: relative;
  width: min(42vw, 550px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #151210 0 2.5%, transparent 2.7%),
    radial-gradient(circle at center, var(--paper) 0 20%, transparent 20.2%),
    repeating-radial-gradient(circle at center, #25211e 0 3px, #0d0c0b 3px 10px);
  box-shadow: -30px 30px 0 var(--lake);
}

.ready-record > div {
  position: absolute;
  inset: 33%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--night);
  text-align: center;
}

.ready-record span,
.ready-record small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.ready-record b {
  font-family: var(--font-display);
  font-size: clamp(45px, 6vw, 80px);
  line-height: 0.9;
}

.ready-copy {
  max-width: 620px;
}

.ready-copy h1 {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.ready-copy > p:not(.eyebrow) {
  color: var(--silver);
  font-size: 17px;
}

.ready-checks {
  display: grid;
  gap: 12px;
  margin: 30px 0 36px;
  padding: 0;
  color: var(--silver);
  list-style: none;
}

.ready-copy .button--primary {
  background: var(--paper);
  color: var(--night);
}

.ready-copy .text-button {
  width: 100%;
  margin-top: 10px;
  color: var(--paper);
}

/* Quiz */
.quiz-shell {
  min-height: 100dvh;
  padding-bottom: 56px;
  background: #e9e5dc;
}

.offline-banner {
  position: sticky;
  z-index: 70;
  top: 0;
  padding: 10px 24px;
  background: var(--warning);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.exam-header {
  position: sticky;
  z-index: 60;
  top: 0;
  display: grid;
  min-height: 76px;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 8px max(20px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line-dark);
  background: rgba(21, 18, 16, 0.98);
  color: var(--paper);
  backdrop-filter: blur(12px);
}

.offline-banner + .exam-header {
  top: 41px;
}

.exam-header > img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.exam-position {
  display: flex;
  align-items: center;
  gap: 20px;
}

.exam-position b {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.exam-position span {
  color: var(--night-muted);
  font-size: 12px;
}

.exam-timer {
  display: grid;
  justify-items: end;
  padding: 6px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
}

.exam-timer small {
  color: var(--night-muted);
  font-size: 9px;
}

.exam-timer b {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1.15;
}

.exam-timer.is-warning {
  border-color: var(--red);
  background: var(--red);
}

.exam-timer.is-warning small {
  color: #fff;
}

.exam-progress {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 3px;
  background: rgba(242, 238, 229, 0.14);
}

.exam-progress > span {
  display: block;
  height: 100%;
  background: var(--red);
  transition: width 180ms ease;
}

.quiz-layout {
  display: grid;
  max-width: 1280px;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 24px;
  margin-inline: auto;
  padding: 38px 24px 70px;
}

.question-column {
  min-width: 0;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 750;
}

.question-meta span:first-child {
  padding: 4px 8px;
  background: var(--lake);
  color: var(--paper);
}

.question-card {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line-light);
  background: var(--paper-2);
  box-shadow: 10px 10px 0 rgba(25, 68, 58, 0.14);
}

.question-number {
  margin-bottom: 20px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.question-image {
  width: min(300px, 68%);
  aspect-ratio: 1;
  margin: 0 auto 30px;
  overflow: hidden;
  border: 8px solid #fff;
  box-shadow: 0 8px 28px rgba(21, 18, 16, 0.18);
}

.question-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.question-card h1 {
  margin-bottom: 30px;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.option-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-option {
  display: grid;
  min-height: 64px;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line-light);
  background: var(--paper);
  font-weight: 650;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.question-option:hover {
  border-color: var(--night);
  transform: translateX(2px);
}

.question-option.is-selected {
  border: 2px solid var(--lake);
  background: rgba(25, 68, 58, 0.09);
}

.question-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option-letter {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--night);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  place-items: center;
}

.question-option.is-selected .option-letter {
  border-color: var(--lake);
  background: var(--lake);
  color: var(--paper);
}

.question-option > i {
  color: var(--lake);
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.question-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.question-status button {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid var(--line-light);
  background: transparent;
  font-weight: 700;
}

.question-status button.is-flagged {
  border-color: var(--red);
  color: var(--red);
}

.quiz-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
}

.quiz-navigation > .button:last-child {
  justify-self: stretch;
}

.answer-sheet-trigger {
  display: none;
}

.answer-sheet {
  padding: 22px;
  border: 1px solid var(--line-light);
  background: var(--paper-2);
}

.quiz-layout > .answer-sheet {
  position: sticky;
  top: 102px;
}

.answer-sheet-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
}

.answer-sheet-heading .eyebrow {
  margin-bottom: 2px;
  color: var(--ink-muted);
  font-size: 9px;
}

.answer-sheet-heading h2 {
  margin: 0;
  font-size: 22px;
}

.answer-sheet-heading button {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  place-items: center;
}

.sheet-side {
  padding-top: 15px;
}

.sheet-side h3 {
  margin: 0 0 7px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.sheet-grid button {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  border: 1px solid var(--line-light);
  border-radius: 3px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  place-items: center;
}

.sheet-grid button.is-answered {
  border-color: var(--lake);
  background: var(--lake);
  color: var(--paper);
}

.sheet-grid button.is-partial {
  border-color: var(--lake);
  background: transparent;
  box-shadow: inset 0 -4px 0 var(--lake);
  color: var(--lake);
}

.sheet-grid button.is-current {
  box-shadow: 0 0 0 2px var(--red);
}

.sheet-grid button.is-flagged span {
  position: absolute;
  top: -7px;
  right: -3px;
  color: var(--red);
  font-size: 22px;
}

.sheet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-light);
  color: var(--ink-muted);
  font-size: 9px;
}

.sheet-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sheet-legend i {
  display: inline-grid;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-light);
  border-radius: 2px;
  font-style: normal;
  place-items: center;
}

.legend-current {
  box-shadow: 0 0 0 1px var(--red);
}

.legend-answered {
  background: var(--lake);
}

.legend-partial {
  border-color: var(--lake) !important;
  box-shadow: inset 0 -3px 0 var(--lake);
}

.sheet-drawer-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(4px);
}

.sheet-drawer {
  width: min(400px, 92vw);
  height: 100%;
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.28);
}

.sheet-drawer .answer-sheet {
  min-height: 100%;
  padding: 28px;
  border: 0;
}

.prototype-toolbar {
  position: fixed;
  z-index: 65;
  right: 12px;
  bottom: 12px;
  font-size: 11px;
}

.prototype-toolbar details {
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: var(--night);
  color: var(--paper);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.24);
}

.prototype-toolbar summary {
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 750;
}

.prototype-toolbar button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-top: 1px solid var(--line-dark);
  background: transparent;
  color: var(--paper);
  text-align: left;
}

.submit-dialog {
  width: min(600px, 100%);
  padding: clamp(28px, 5vw, 54px);
  border-top: 8px solid var(--red);
  background: var(--paper-2);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.45);
}

.submit-backdrop {
  place-items: center;
}

.submit-dialog h2 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 950;
  line-height: 1.03;
}

.submit-dialog > p:not(.eyebrow) {
  color: var(--ink-muted);
}

.submit-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 26px 0;
  background: var(--line-light);
}

.submit-summary span {
  display: grid;
  gap: 4px;
  padding: 17px;
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 12px;
}

.submit-summary b {
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 18px;
}

.unanswered-list {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line-light);
  background: var(--paper);
}

.unanswered-list b {
  font-size: 12px;
}

.unanswered-list p {
  margin: 8px 0 0;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 13px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Result */
.result-page {
  min-height: 100dvh;
  padding-bottom: 90px;
  background: var(--paper);
}

.result-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  padding: clamp(70px, 9vw, 120px) var(--page);
  background: var(--night);
  color: var(--paper);
  isolation: isolate;
}

.result-hero::after {
  position: absolute;
  z-index: -1;
  top: -16%;
  right: -8%;
  width: min(68vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 238, 229, 0.2);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(242, 238, 229, 0.08) 0 2px, transparent 2px 24px);
  content: "";
}

.result-title {
  margin-bottom: 0;
  color: var(--silver);
  font-size: clamp(25px, 3.5vw, 44px);
  font-weight: 750;
}

.score-disc {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 6px 0 4px;
}

.score-disc span {
  font-family: var(--font-display);
  font-size: clamp(150px, 23vw, 320px);
  font-weight: 950;
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.score-disc small {
  font-family: var(--font-mono);
  font-size: 17px;
}

.result-hero h1 {
  max-width: 800px;
  margin: 36px 0 4px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
}

.result-hero > p:not(.eyebrow, .result-title) {
  color: var(--night-muted);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  max-width: 760px;
  margin-top: 32px;
  background: var(--line-dark);
}

.result-meta span {
  display: grid;
  min-width: 170px;
  gap: 4px;
  padding: 14px 18px;
  background: var(--night);
  color: var(--night-muted);
  font-size: 11px;
}

.result-meta b {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 16px;
}

.module-results {
  width: min(980px, calc(100% - 48px));
  margin: clamp(62px, 8vw, 100px) auto 50px;
}

.module-results .section-heading {
  margin-bottom: 36px;
}

.module-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(220px, 1fr) 54px;
  align-items: center;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-light);
}

.module-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.module-row > div:first-child span,
.module-row > small {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.module-track {
  height: 10px;
  overflow: hidden;
  background: #d6d1c8;
}

.module-track span {
  display: block;
  height: 100%;
  background: var(--lake);
}

.module-row > small {
  text-align: right;
}

.result-actions {
  display: flex;
  width: min(980px, calc(100% - 48px));
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 54px;
}

.result-actions .text-button {
  margin-left: auto;
}

.shared-device-panel {
  display: flex;
  width: min(980px, calc(100% - 48px));
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-inline: auto;
  padding: 20px;
  border: 1px dashed var(--line-light);
}

.shared-device-panel p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.shared-device-panel button {
  min-height: 42px;
  flex: none;
  padding: 8px 12px;
  background: transparent;
  color: var(--red);
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Review */
.review-page {
  min-height: 100dvh;
  padding-bottom: 100px;
  background: var(--paper);
}

.review-summary {
  display: flex;
  max-width: 980px;
  align-items: center;
  gap: 14px;
  margin: 0 auto 30px;
  padding: 22px 24px;
  border-block: 1px solid var(--night);
}

.review-summary > b {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
}

.review-summary > span {
  color: var(--ink-muted);
}

.review-summary button {
  min-height: 42px;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--night);
  background: transparent;
  font-weight: 750;
}

.review-list {
  display: grid;
  width: min(980px, calc(100% - 48px));
  gap: 20px;
  margin-inline: auto;
}

.review-card {
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid var(--line-light);
  background: var(--paper-2);
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.review-head span:first-child {
  color: var(--red);
}

.review-card h2 {
  max-width: 820px;
  margin-bottom: 26px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.3;
}

.review-options {
  display: grid;
  gap: 8px;
}

.review-options > div {
  display: grid;
  min-height: 48px;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line-light);
}

.review-options p {
  margin: 0;
}

.review-options small {
  color: var(--ink-muted);
  font-size: 10px;
}

.review-options .is-correct {
  border-color: var(--correct);
  background: rgba(23, 106, 80, 0.08);
  color: var(--correct);
}

.review-options .is-wrong {
  border-color: var(--red);
  background: rgba(198, 43, 53, 0.07);
  color: var(--red);
}

.explanation {
  margin-top: 24px;
  padding: 22px;
  border-left: 5px solid var(--lake);
  background: var(--wash);
}

.explanation b {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.explanation p {
  margin: 8px 0 0;
  color: #3f3a36;
}

.review-card > .text-button {
  margin-top: 14px;
  color: var(--lake);
}

.review-related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line-light);
  background: var(--paper);
}

.review-related-item .cover-frame {
  width: 72px;
}

.review-related-item > div:last-child {
  display: grid;
}

.review-related-item span,
.review-related-item small {
  color: var(--ink-muted);
  font-size: 10px;
}

.review-related-item b {
  font-size: 14px;
}

/* Share card */
.card-page {
  min-height: calc(100dvh - var(--header));
  padding-bottom: 100px;
  background: var(--paper);
}

.card-page > .page-intro {
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

.card-page > .page-intro h1 {
  font-size: clamp(42px, 6vw, 76px);
}

.card-layout {
  display: grid;
  max-width: 1120px;
  grid-template-columns: minmax(380px, 0.9fr) minmax(300px, 0.65fr);
  align-items: start;
  gap: clamp(38px, 7vw, 90px);
  margin-inline: auto;
  padding-inline: 24px;
}

.score-card-preview {
  position: relative;
  display: grid;
  width: min(100%, 560px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  background: var(--night);
  color: var(--paper);
  box-shadow: 20px 20px 0 var(--lake);
  isolation: isolate;
}

.card-event-title {
  position: relative;
  z-index: 3;
  display: grid;
  width: 62%;
  align-self: start;
  gap: 1px;
  padding-top: 9px;
}

.card-event-title small {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.card-event-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.84;
}

.card-event-title strong {
  margin-top: 6px;
  font-size: clamp(12px, 2vw, 17px);
  line-height: 1.25;
}

.card-event-title span {
  width: max-content;
  margin-top: 5px;
  padding: 4px 7px;
  background: var(--lake);
  color: var(--paper);
  font-size: clamp(8px, 1.35vw, 11px);
  font-weight: 700;
}

.card-mj-silhouette {
  position: absolute;
  z-index: 2;
  top: 7%;
  right: 5%;
  width: 29%;
  height: 32%;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 207% auto;
  filter: grayscale(1) invert(1) contrast(3.4) brightness(1.08);
  -webkit-mask-image: linear-gradient(#000 0 76%, transparent 100%);
  mask-image: linear-gradient(#000 0 76%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.26;
  pointer-events: none;
}

.score-card-preview::after {
  position: absolute;
  z-index: -1;
  right: -27%;
  bottom: -16%;
  width: 92%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 238, 229, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(242, 238, 229, 0.04), 0 0 0 56px rgba(242, 238, 229, 0.035), 0 0 0 84px rgba(242, 238, 229, 0.03);
  content: "";
}

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

.card-top img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.card-top span {
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.card-grooves {
  display: grid;
  width: min(67%, 330px);
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  border: 1px solid rgba(242, 238, 229, 0.23);
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #24201e 0 2px, #11100e 2px 13px);
  place-items: center;
}

.card-grooves > div {
  display: flex;
  width: 60%;
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--lake);
  text-align: center;
}

.card-grooves p {
  max-width: 90%;
  margin-bottom: 0;
  overflow: hidden;
  font-size: clamp(12px, 2vw, 18px);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-grooves b {
  font-family: var(--font-display);
  font-size: clamp(78px, 13vw, 148px);
  letter-spacing: -0.08em;
  line-height: 0.82;
}

.card-grooves span {
  font-size: 11px;
  font-weight: 700;
}

.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 13px;
  border-block: 1px solid var(--line-dark);
  color: var(--silver);
  font-size: 11px;
}

.card-stats b {
  color: var(--paper);
  font-family: var(--font-mono);
}

.card-footer {
  display: grid;
  align-content: end;
}

.card-footer b {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.card-footer span,
.card-footer small {
  max-width: 58%;
  line-height: 1.3;
}

.card-footer span,
.card-footer small {
  color: var(--night-muted);
  font-size: 9px;
}

.card-controls {
  position: sticky;
  top: calc(var(--header) + 28px);
  padding: 30px;
  border: 1px solid var(--line-light);
  background: var(--paper-2);
}

.card-controls h2 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 950;
}

.card-controls > p {
  margin-bottom: 24px;
  color: var(--ink-muted);
  font-size: 13px;
}

.card-controls .privacy-option {
  margin-bottom: 10px;
}

.card-controls > .button {
  margin-top: 10px;
}

.card-controls > .text-button {
  width: 100%;
  margin-top: 8px;
}

.card-followup-actions {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-light);
}

.card-followup-actions > span {
  margin-bottom: 2px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.share-notice {
  margin: 14px 0 0 !important;
  padding: 10px 12px;
  border-left: 4px solid var(--lake);
  background: var(--wash);
  color: var(--lake) !important;
  font-size: 12px !important;
}

/* Responsive */
@media (max-width: 1023px) {
  :root {
    --page: 32px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    gap: 46px;
  }

  .hero-record,
  .ready-record {
    width: min(39vw, 430px);
  }

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

  .collection-tools {
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  }

  .result-count {
    display: none;
  }

  .quiz-layout {
    grid-template-columns: minmax(0, 1fr) 288px;
  }

  .answer-sheet {
    padding: 17px;
  }

  .card-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(280px, 0.65fr);
    gap: 42px;
  }
}

@media (max-width: 767px) {
  :root {
    --page: 20px;
    --header: 68px;
  }

  .site-header {
    padding-inline: 16px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand-button span {
    display: none;
  }

  .site-nav button:not(.nav-cta) {
    display: none;
  }

  .site-nav .nav-cta {
    margin-left: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 36px 20px;
  }

  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 54px;
    padding-block: 64px 82px;
  }

  .hero-copy h1 {
    font-size: clamp(74px, 26vw, 120px);
  }

  .hero-record {
    width: min(88vw, 430px);
    order: 2;
  }

  .resume-banner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-block: 26px;
  }

  .resume-meta {
    display: flex;
    gap: 18px;
  }

  .rule-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .rule-strip > div {
    min-height: 120px;
    border-bottom: 1px solid var(--line-light);
  }

  .rule-strip > div:nth-child(2n) {
    border-right: 0;
  }

  .featured-grid,
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lake-section {
    min-height: 420px;
  }

  .page-intro {
    padding-inline: 20px;
  }

  .collection-tools {
    position: static;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 20px 20px;
  }

  .collection-grid {
    padding-inline: 20px;
  }

  .collection-card {
    padding: 12px;
  }

  .collection-card-copy h2 {
    min-height: auto;
    font-size: 16px;
  }

  .collection-card-copy p {
    display: none;
  }

  .collection-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-modal {
    max-height: calc(100dvh - 24px);
    grid-template-columns: 1fr;
  }

  .record-modal .cover-frame {
    height: auto;
    min-height: 0;
  }

  .record-modal-copy {
    padding: 30px 22px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .rules-panel,
  .name-panel {
    width: calc(100% - 32px);
    box-shadow: 8px 8px 0 var(--lake);
  }

  .rules-title {
    grid-template-columns: 76px 1fr;
  }

  .rules-title p {
    grid-column: 2;
  }

  .ready-page {
    min-height: 100dvh;
    grid-template-columns: 1fr;
    gap: 54px;
    padding-block: 48px 70px;
  }

  .ready-record {
    width: min(82vw, 420px);
  }

  .exam-header {
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    padding-inline: 14px;
  }

  .exam-header > img {
    width: 42px;
    height: 42px;
  }

  .exam-position {
    display: grid;
    gap: 1px;
  }

  .exam-position b {
    font-size: 11px;
  }

  .exam-timer {
    padding: 5px 8px;
  }

  .exam-timer b {
    font-size: 16px;
  }

  .quiz-layout {
    display: block;
    padding: 24px 16px 110px;
  }

  .quiz-layout > .answer-sheet {
    display: none;
  }

  .question-card {
    padding: 26px 18px;
    box-shadow: 6px 6px 0 rgba(25, 68, 58, 0.14);
  }

  .question-option {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 10px;
  }

  .option-letter {
    width: 34px;
    height: 34px;
  }

  .question-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .quiz-navigation {
    position: fixed;
    z-index: 55;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: 1fr 0.8fr 1fr;
    gap: 6px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-light);
    background: rgba(242, 238, 229, 0.97);
    backdrop-filter: blur(10px);
  }

  .answer-sheet-trigger {
    display: inline-flex;
  }

  .prototype-toolbar {
    bottom: 86px;
  }

  .module-results,
  .result-actions,
  .shared-device-panel,
  .review-list {
    width: calc(100% - 32px);
  }

  .result-hero {
    min-height: 560px;
    padding-block: 70px;
  }

  .score-disc span {
    font-size: clamp(140px, 48vw, 220px);
  }

  .module-row {
    grid-template-columns: 1fr 52px;
    gap: 12px;
  }

  .module-row .module-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

  .result-actions .text-button {
    margin-left: 0;
  }

  .shared-device-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-summary {
    margin-inline: 16px;
  }

  .card-layout {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-inline: 20px;
  }

  .score-card-preview {
    justify-self: center;
    box-shadow: 10px 10px 0 var(--lake);
  }

  .card-controls {
    position: static;
  }
}

@media (max-width: 479px) {
  .card-page > .page-intro {
    padding: 22px 20px 24px;
  }

  .card-page > .page-intro h1 {
    margin-bottom: 12px;
    font-size: 36px;
  }

  .card-page > .page-intro > p:last-child {
    font-size: 14px;
  }

  .button {
    min-height: 50px;
    padding-inline: 15px;
  }

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

  .hero-record {
    box-shadow: -16px 20px 0 rgba(25, 68, 58, 0.8), 0 30px 70px rgba(0, 0, 0, 0.4);
  }

  .featured-grid {
    gap: 10px;
  }

  .featured-card strong {
    font-size: 15px;
  }

  .collection-grid {
    gap: 1px;
    padding-inline: 12px;
  }

  .collection-card {
    padding: 9px;
  }

  .collection-card-copy {
    padding-top: 11px;
  }

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

  .rules-title {
    display: block;
  }

  .rules-title > span {
    display: inline-block;
    margin-bottom: 14px;
  }

  .rules-title p {
    margin-top: 8px;
  }

  .rules-list li {
    grid-template-columns: 36px 1fr;
    gap: 8px;
  }

  .name-preview {
    padding-right: 80px;
  }

  .ready-record {
    box-shadow: -16px 18px 0 var(--lake);
  }

  .question-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .question-image {
    width: 86%;
  }

  .quiz-navigation {
    grid-template-columns: 0.9fr 0.8fr 1.1fr;
  }

  .quiz-navigation .button {
    padding-inline: 8px;
    font-size: 13px;
  }

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

  .result-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .result-meta span {
    min-width: 0;
  }

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

  .review-summary {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .review-summary button {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .review-options > div {
    grid-template-columns: 22px 1fr;
  }

  .review-options small {
    grid-column: 2;
  }

  .score-card-preview {
    width: 100%;
    padding: 22px;
  }

  .card-top img {
    width: 52px;
    height: 52px;
  }

  .card-grooves {
    width: 94%;
  }
}

@media (max-width: 359px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .rule-strip span {
    font-size: 11px;
  }

  .collection-card-copy h2 {
    font-size: 14px;
  }

  .exam-position span {
    display: none;
  }

  .exam-timer small {
    display: none;
  }

  .quiz-navigation .button {
    font-size: 12px;
  }
}

/* Score-card propagation QR: fixed white quiet zone for reliable scanning. */
.card-footer {
  position: relative;
  z-index: 2;
  padding-right: 154px;
}

.card-share-qr {
  position: absolute;
  z-index: 4;
  right: clamp(22px, 4vw, 42px);
  bottom: clamp(22px, 4vw, 42px);
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--silver);
  font-family: var(--font-mono);
  text-decoration: none;
}

.card-share-qr span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card-share-qr img {
  box-sizing: content-box;
  display: block;
  width: 112px;
  height: auto;
  padding: 10px;
  background: #fff;
  image-rendering: pixelated;
}

.card-share-qr:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

@media (max-width: 479px) {
  .card-event-title {
    padding-top: 3px;
  }

  .card-event-title small {
    font-size: 5px;
  }

  .card-event-title h2 {
    font-size: 26px;
  }

  .card-event-title strong {
    margin-top: 3px;
    font-size: 9px;
  }

  .card-event-title span {
    padding: 2px 4px;
    font-size: 6px;
  }

  .card-mj-silhouette {
    top: 8%;
    right: 4%;
    width: 29%;
    height: 31%;
  }

  .card-grooves {
    width: 57%;
  }

  .card-grooves p {
    font-size: 9px;
  }

  .card-grooves b {
    font-size: 70px;
  }

  .card-grooves span,
  .card-stats,
  .card-footer b {
    font-size: 7px;
  }

  .card-footer span,
  .card-footer small {
    font-size: 6px;
  }

  .card-footer {
    padding-right: 108px;
  }

  .card-share-qr {
    right: 18px;
    bottom: 18px;
    gap: 4px;
  }

  .card-share-qr span {
    font-size: 7px;
  }

  .card-share-qr img {
    width: 82px;
    padding: 8px;
  }
}

/* Homepage MJ signatures: a full-viewport silhouette behind the title and record. */
.hero-visual {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  width: 100%;
  min-width: 0;
  place-items: center;
  justify-self: center;
  transform: translateX(2%);
}

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

.hero-mj-silhouette {
  position: absolute;
  z-index: 0;
  top: 48%;
  left: 42%;
  width: min(56vw, 760px);
  height: min(59vw, 800px);
  overflow: hidden;
  background-position: 22% 0;
  background-repeat: no-repeat;
  background-size: 160% auto;
  filter: grayscale(1) invert(1) contrast(3.4) brightness(1.08);
  -webkit-mask-image: radial-gradient(ellipse at 50% 47%, #000 0 52%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 47%, #000 0 52%, transparent 80%);
  mix-blend-mode: screen;
  opacity: 0.068;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-1deg);
  transform-origin: 50% 50%;
}

.hero-mj-index {
  position: absolute;
  z-index: 3;
  right: -2%;
  bottom: 5%;
  display: grid;
  gap: 5px;
  padding: 10px 0;
  color: rgba(242, 238, 229, 0.66);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  pointer-events: none;
  text-align: right;
}

.hero-mj-index span {
  font-size: 12px;
  font-weight: 700;
}

.hero-mj-index small {
  font-size: 8px;
}

.hero-mj-signatures {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 11px;
  margin-top: 25px;
  color: rgba(242, 238, 229, 0.48);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero-mj-signatures i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--silver);
  opacity: 0.45;
}

@media (min-width: 1600px) {
  .hero-mj-silhouette {
    top: 49%;
    left: 39.5%;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .hero-mj-silhouette {
    top: 46%;
    left: 44%;
    width: min(74vw, 700px);
    height: min(77vw, 730px);
    opacity: 0.06;
  }
}

@media (max-width: 767px) {
  .hero-visual {
    margin-top: -2px;
    transform: none;
  }

  .hero-mj-silhouette {
    top: 38%;
    left: 54%;
    width: 132vw;
    height: 138vw;
    opacity: 0.075;
    transform: translate(-50%, -50%) rotate(2deg);
  }

  .hero-mj-index {
    right: 0;
    bottom: 1%;
  }

  .hero-mj-index small {
    display: none;
  }

  .hero-mj-signatures {
    margin-top: 20px;
  }
}

@media (max-width: 359px) {
  .hero-mj-silhouette {
    width: 144vw;
    height: 150vw;
  }

  .hero-mj-index {
    display: none;
  }
}

.resume-expired-notice {
  position: relative;
  z-index: 2;
  padding: 12px max(20px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid rgba(242, 238, 229, 0.25);
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.question-image-fallback {
  margin: 0 0 24px;
  padding: 12px 14px;
  border-left: 4px solid var(--lake);
  background: rgba(25, 68, 58, 0.08);
  color: var(--ink-muted);
  font-size: 12px;
}

.selection-limit {
  margin: 2px 0 0;
  padding: 8px 4px 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.selection-limit.is-warning {
  color: var(--red);
  font-weight: 800;
}

.clear-record-dialog {
  border-top-color: var(--red);
}

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

  .hero-record {
    animation: none;
  }
}

/* Birthday dedication scorecard V2: shared by the on-page preview and PNG artwork. */
.score-card-preview.birthday-scorecard-v2 {
  position: relative;
  isolation: isolate;
  container-name: birthday-card;
  container-type: inline-size;
  display: block;
  width: min(100%, 560px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(243, 239, 231, 0.34);
  background:
    linear-gradient(rgba(243, 239, 231, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 231, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 79% 22%, rgba(35, 83, 70, 0.42), transparent 31%),
    #151210;
  background-size: 34px 34px, 34px 34px, auto, auto;
  color: #f3efe7;
  box-shadow: 14px 14px 0 #19473c, 0 24px 64px rgba(0, 0, 0, 0.24);
}

.score-card-preview.birthday-scorecard-v2::before,
.score-card-preview.birthday-scorecard-v2::after {
  content: none;
}

.birthday-card-frame {
  position: absolute;
  z-index: 8;
  inset: 16px;
  border: 1px solid rgba(243, 239, 231, 0.18);
  pointer-events: none;
}

.birthday-card-header {
  position: absolute;
  z-index: 6;
  top: 5.3%;
  right: 6.2%;
  left: 6.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(243, 239, 231, 0.74);
  font-family: var(--font-mono);
  font-size: clamp(7px, 1.45cqw, 11px);
  line-height: 1.35;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.birthday-card-header span:last-child {
  text-align: right;
}

.birthday-card-lockup {
  position: absolute;
  z-index: 5;
  top: 11.5%;
  right: 5.5%;
  left: 6.2%;
}

.birthday-card-kicker {
  margin: 0 0 1.1%;
  color: rgba(243, 239, 231, 0.68);
  font-family: var(--font-mono);
  font-size: clamp(7px, 1.65cqw, 12px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.birthday-card-title {
  max-width: 65%;
  margin: 0;
  color: #f3efe7;
  font-family: var(--font-display);
  font-size: clamp(34px, 10.8cqw, 82px);
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: -0.074em;
  text-transform: uppercase;
}

.birthday-card-title span,
.birthday-card-title strong {
  display: block;
}

.birthday-card-title span {
  margin-bottom: 0.08em;
  font-size: 0.63em;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.birthday-card-dedication {
  position: relative;
  z-index: 7;
  display: inline-flex;
  width: max-content;
  max-width: 88%;
  align-items: baseline;
  gap: 0.55em;
  margin-top: 4.2%;
  padding: 2.1% 3.2% 2.4%;
  transform: rotate(-1.2deg);
  background: #f3efe7;
  box-shadow: 7px 7px 0 #19473c;
  color: #151210;
}

.birthday-card-dedication-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: clamp(8px, 1.75cqw, 13px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
}

.birthday-card-dedication-name {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(20px, 5.5cqw, 42px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: nowrap;
  white-space: nowrap;
}

.birthday-card-subtitle {
  max-width: 62%;
  margin: 4.3% 0 0;
  color: rgba(243, 239, 231, 0.72);
  font-size: clamp(8px, 1.9cqw, 14px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.birthday-card-subtitle span {
  display: block;
}

.birthday-card-silhouette {
  position: absolute;
  z-index: 3;
  top: 9.5%;
  right: 3.2%;
  width: 27%;
  height: 27.5%;
  opacity: 0.3;
  pointer-events: none;
}

.birthday-card-silhouette img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.birthday-card-mid-rule {
  position: absolute;
  z-index: 5;
  top: 53.3%;
  right: 6.2%;
  left: 6.2%;
  height: 1px;
  background: rgba(243, 239, 231, 0.24);
}

.birthday-card-record-score {
  position: absolute;
  z-index: 4;
  top: 57.6%;
  left: 5.2%;
  display: grid;
  width: 44%;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 239, 231, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 14%, rgba(243, 239, 231, 0.11) 14.2% 14.7%, transparent 14.9% 100%),
    repeating-radial-gradient(circle at center, #151210 0 5px, #292522 6px, #151210 8px);
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.34);
  place-items: center;
}

.birthday-card-record-label {
  display: grid;
  width: 58%;
  aspect-ratio: 1;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(243, 239, 231, 0.48);
  border-radius: 50%;
  background: #19473c;
  box-shadow: inset 0 0 0 10px rgba(21, 18, 16, 0.08);
  text-align: center;
}

.birthday-card-score-only {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.birthday-card-score-only strong {
  color: #f3efe7;
  font-family: var(--font-display);
  font-size: clamp(43px, 15.4cqw, 86px);
  font-weight: 950;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.birthday-card-score-only small {
  margin: 0 0 0.12em 0.2em;
  color: rgba(243, 239, 231, 0.86);
  font-size: clamp(8px, 2.7cqw, 15px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.birthday-card-result {
  position: absolute;
  z-index: 6;
  top: 58.4%;
  right: 6.2%;
  width: 34%;
  padding-bottom: 4%;
  border-bottom: 1px solid rgba(243, 239, 231, 0.2);
}

.birthday-card-result span {
  display: block;
  color: rgba(243, 239, 231, 0.46);
  font-family: var(--font-mono);
  font-size: clamp(6px, 1.25cqw, 9px);
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.birthday-card-result strong {
  display: block;
  margin-top: 4%;
  color: #f3efe7;
  font-family: var(--font-mono);
  font-size: clamp(7px, 1.7cqw, 12px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.birthday-card-share-qr {
  position: absolute;
  z-index: 7;
  right: 6.2%;
  bottom: 7.5%;
  display: grid;
  width: 25%;
  justify-items: center;
  color: #f3efe7;
  text-decoration: none;
}

.birthday-card-share-qr > strong {
  margin-bottom: 7%;
  font-size: clamp(8px, 1.75cqw, 13px);
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-align: center;
}

.birthday-card-share-qr-box {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  padding: 10.5%;
  overflow: hidden;
  background: #fff;
  place-items: center;
}

.birthday-card-share-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.birthday-card-share-qr > small {
  margin-top: 6%;
  color: rgba(243, 239, 231, 0.62);
  font-family: var(--font-mono);
  font-size: clamp(6px, 1.25cqw, 9px);
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-align: center;
}

.birthday-card-share-qr:focus-visible {
  outline: 3px solid #f3efe7;
  outline-offset: 5px;
}

.birthday-card-footer {
  position: absolute;
  z-index: 7;
  right: 6.2%;
  bottom: 3.2%;
  left: 6.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(243, 239, 231, 0.46);
  font-family: var(--font-mono);
  font-size: clamp(5px, 1.15cqw, 8px);
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.birthday-card-footer span:last-child {
  text-align: right;
}

@container birthday-card (max-width: 460px) {
  .birthday-card-frame {
    inset: 9px;
  }

  .birthday-card-dedication {
    max-width: 92%;
    margin-top: 2.6%;
    padding: 1.7% 2.5% 2%;
  }

  .birthday-card-subtitle {
    margin-top: 3%;
    line-height: 1.35;
  }

  .birthday-card-mid-rule {
    top: 54.8%;
  }

  .birthday-card-record-score {
    top: 57.4%;
    width: 40.5%;
  }

  .birthday-card-result {
    top: 56.4%;
    padding-bottom: 3%;
  }

  .birthday-card-share-qr {
    bottom: 7.2%;
    width: 23%;
  }
}

@media (max-width: 479px) {
  .score-card-preview.birthday-scorecard-v2 {
    box-shadow: 8px 8px 0 #19473c;
  }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-card-dedication {
    transform: none;
  }
}

/* Embedded/mobile hardening
   SSPAI can render the experience inside a content column that is narrower
   than the browser viewport. Respond to the app's real width as well as the
   viewport so the desktop record column can never squeeze copy to one glyph. */
.prototype-app {
  container-name: heim-app;
  container-type: inline-size;
}

.prototype-app #main-content,
.prototype-app #main-content > main,
.prototype-app .hero-copy,
.prototype-app .hero-visual {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.prototype-app .hero-copy h1,
.prototype-app .hero-subtitle,
.prototype-app .hero-intro {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.prototype-app .hero-copy h1,
.prototype-app .hero-subtitle {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.prototype-app .hero-intro {
  word-break: normal;
  overflow-wrap: break-word;
}

@container heim-app (max-width: 767px) {
  .prototype-app .hero-section {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 58px;
    padding: 66px 20px 86px;
  }

  .prototype-app .hero-copy {
    max-width: none;
  }

  .prototype-app .hero-copy h1 {
    font-size: clamp(58px, 18cqw, 86px);
  }

  .prototype-app .hero-subtitle {
    font-size: clamp(20px, 6cqw, 28px);
  }

  .prototype-app .hero-visual {
    margin-top: -2px;
    transform: none;
  }

  .prototype-app .hero-visual .hero-record {
    width: min(84cqw, 420px);
    max-width: 100%;
  }

  .prototype-app .hero-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .prototype-app .hero-actions > :first-child {
    grid-column: auto;
  }

  .prototype-app .record-card-grid--featured,
  .prototype-app .record-card-grid--collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prototype-app .collection-tools {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .prototype-app .collection-tools > *,
  .prototype-app .filter-chips {
    min-width: 0;
    max-width: 100%;
  }

  .prototype-app .quiz-layout {
    display: block;
  }

  .prototype-app .quiz-layout > .answer-sheet {
    display: none;
  }

  .prototype-app .answer-sheet-trigger {
    display: inline-flex;
  }

  .prototype-app .card-layout,
  .prototype-app .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .prototype-app .activity-dialog {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .prototype-app .activity-dialog-copy,
  .prototype-app .activity-map-panel,
  .prototype-app .activity-location-card,
  .prototype-app .activity-map-picker {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .prototype-app .activity-dialog-copy {
    padding: 42px 20px 30px;
  }

  .prototype-app .activity-map-panel {
    min-height: auto;
    padding: 24px 20px 28px;
  }
}

@container heim-app (max-width: 599px) {
  .prototype-app .record-card-grid--collection {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container heim-app (max-width: 479px) {
  .prototype-app .record-card-grid--featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .prototype-app .activity-dialog-copy {
    padding: 36px 16px 25px;
  }

  .prototype-app .activity-map-panel {
    padding: 20px 16px 24px;
  }

  .prototype-app .activity-map-picker-backdrop {
    padding: 8px;
  }

  .prototype-app .activity-map-picker {
    padding: 28px 20px 22px;
  }
}

/* Keep the quiz actions comfortably above browser chrome, a home indicator,
   or the physical screen edge. Safe-area values can be zero in WebViews, so
   the dock always keeps a visible 12px minimum inset. */
@media (max-width: 767px) {
  .prototype-app .quiz-shell {
    padding-bottom: 0;
  }

  .prototype-app .quiz-layout {
    padding-bottom: 86px;
    padding-bottom: calc(74px + max(12px, env(safe-area-inset-bottom)));
  }

  .prototype-app .quiz-navigation {
    right: 10px;
    bottom: 12px;
    left: 10px;
    width: auto;
    min-width: 0;
    padding: 6px;
    border: 1px solid rgba(21, 18, 16, 0.18);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(21, 18, 16, 0.18);
  }

  @supports (bottom: max(12px, env(safe-area-inset-bottom))) {
    .prototype-app .quiz-navigation {
      right: max(10px, env(safe-area-inset-right));
      bottom: max(12px, env(safe-area-inset-bottom));
      left: max(10px, env(safe-area-inset-left));
    }
  }
}

@media print {
  .site-header,
  .site-footer,
  .card-page > .page-intro,
  .card-controls {
    display: none !important;
  }

  .card-page,
  body {
    background: #fff;
  }

  .card-layout {
    display: block;
    padding: 0;
  }

  .score-card-preview {
    width: 160mm;
    margin: 0 auto;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* --------------------------------------------------------------------------
   HIGH-FIDELITY V1
   Night stage, warm paper, lake ripples and a restrained pressing-label system.
   -------------------------------------------------------------------------- */

:root {
  --night: #151210;
  --night-2: #201c19;
  --paper: #f2eee5;
  --paper-2: #fbf8f1;
  --lake: #19443a;
  --lake-2: #235b4e;
  --red: #c62b35;
  --silver: #c8cbcb;
  --ink-muted: #5c5753;
  --night-muted: #aaa49f;
  --line-dark: rgba(242, 238, 229, 0.19);
  --line-light: rgba(21, 18, 16, 0.16);
  --wash: rgba(25, 68, 58, 0.075);
  --font-display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --page: max(40px, calc((100vw - 1200px) / 2));
  --header: 72px;
  --paper-grain:
    radial-gradient(circle at 13% 19%, rgba(21, 18, 16, 0.018) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 71% 43%, rgba(21, 18, 16, 0.014) 0 0.8px, transparent 1px);
}

html {
  color-scheme: light dark;
  background: var(--night);
}

body {
  background-color: var(--paper);
  background-image: var(--paper-grain);
  background-size: 13px 17px, 19px 23px;
  color-scheme: light;
  letter-spacing: 0.004em;
}

button,
label,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  letter-spacing: 0.015em;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.prototype-app {
  background-color: var(--paper);
  background-image: var(--paper-grain);
  background-size: 13px 17px, 19px 23px;
}

.eyebrow {
  margin-bottom: 14px;
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.button {
  min-height: 54px;
  padding: 14px 24px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.045em;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.button--primary {
  background: var(--lake);
  color: var(--paper);
}

.button--primary:hover:not(:disabled) {
  background: #11362e;
}

.button--secondary {
  border-color: rgba(21, 18, 16, 0.48);
}

.button--secondary:hover:not(:disabled) {
  border-color: var(--lake);
  background: var(--wash);
  color: var(--lake);
}

.text-button {
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.section-heading h2 {
  max-width: 15ch;
  font-size: clamp(38px, 4.4vw, 64px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.section-heading > p:last-child {
  max-width: 36em;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.8;
}

/* Pressing-label navigation */
.site-header {
  min-height: var(--header);
  padding: 7px var(--page);
  border-bottom-color: rgba(200, 203, 203, 0.21);
  background: rgba(21, 18, 16, 0.96);
  box-shadow: none;
}

.site-header::after {
  position: absolute;
  right: var(--page);
  bottom: -1px;
  left: var(--page);
  height: 1px;
  background: linear-gradient(90deg, var(--red) 0 54px, transparent 54px);
  content: "";
}

.brand-button {
  min-height: 52px;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
}

.brand-button span {
  padding-left: 14px;
  border-left: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.site-nav {
  gap: 2px;
}

.site-nav button {
  min-height: 44px;
  padding-inline: 15px;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.site-nav button:hover {
  background: rgba(242, 238, 229, 0.07);
}

.site-nav .nav-cta {
  margin-left: 12px;
  background: var(--paper);
}

.site-nav .nav-cta:hover {
  background: var(--silver);
}

.site-footer {
  position: relative;
  padding-block: 52px;
  background-color: var(--night);
  background-image: repeating-radial-gradient(circle at 88% 150%, transparent 0 34px, rgba(200, 203, 203, 0.05) 35px 36px);
}

.site-footer::before {
  position: absolute;
  top: 0;
  left: var(--page);
  width: 56px;
  height: 3px;
  background: var(--red);
  content: "";
}

.site-footer strong {
  letter-spacing: 0.11em;
}

/* Complete covers, mounted like items in a listening archive */
.cover-frame {
  border-color: rgba(21, 18, 16, 0.13);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 36%),
    #d8d3ca;
}

.cover-frame::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.17);
  pointer-events: none;
  content: "";
}

.cover-frame img {
  object-fit: contain;
  transition: transform 260ms cubic-bezier(0.2, 0.75, 0.3, 1);
}

.cover-placeholder {
  background:
    radial-gradient(circle at center, var(--paper) 0 3%, transparent 3.2%),
    radial-gradient(circle at center, var(--lake) 0 18%, transparent 18.2%),
    repeating-radial-gradient(circle at center, #25211e 0 1px, #11100f 2px 9px);
}

/* Home: one spotlight, one record, one lake */
.hero-section {
  min-height: max(690px, calc(100dvh - var(--header)));
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.82fr);
  gap: clamp(64px, 7vw, 112px);
  padding-block: clamp(82px, 9vw, 128px);
  background-color: var(--night);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
}

.hero-section::before {
  top: -20%;
  right: -5%;
  width: 62%;
  height: 132%;
  background: linear-gradient(164deg, rgba(242, 238, 229, 0.21), rgba(200, 203, 203, 0.045) 47%, transparent 68%);
  clip-path: polygon(43% 0, 72% 0, 100% 100%, 0 100%);
  opacity: 0.76;
}

.hero-copy {
  max-width: 700px;
}

.hero-copy::before {
  display: block;
  width: 56px;
  height: 4px;
  margin-bottom: 26px;
  background: var(--red);
  content: "";
}

.hero-copy h1 {
  margin-bottom: 24px;
  font-size: clamp(82px, 10.4vw, 150px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.76;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-subtitle {
  margin-bottom: 22px;
  font-size: clamp(22px, 2.25vw, 34px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-intro {
  max-width: 31em;
  color: rgba(242, 238, 229, 0.74);
  font-size: 16px;
  line-height: 1.85;
}

.hero-section .button--primary {
  background: var(--paper);
  color: var(--night);
}

.hero-section .button--primary:hover:not(:disabled) {
  background: var(--silver);
}

.hero-section .button--secondary {
  border-color: rgba(242, 238, 229, 0.5);
}

.hero-section .button--secondary:hover:not(:disabled) {
  border-color: var(--paper);
  background: rgba(242, 238, 229, 0.08);
  color: var(--paper);
}

.hero-record {
  width: min(41vw, 530px);
  border-color: rgba(200, 203, 203, 0.2);
  background:
    radial-gradient(circle at center, #0b0a09 0 1.8%, transparent 2%),
    radial-gradient(circle at center, rgba(242, 238, 229, 0.85) 0 2.2%, transparent 2.35%),
    radial-gradient(circle at center, var(--lake) 0 16.5%, #153b33 16.7% 20.5%, transparent 20.7%),
    conic-gradient(from 211deg, transparent 0 18%, rgba(200, 203, 203, 0.1) 20%, transparent 22% 54%, rgba(200, 203, 203, 0.06) 57%, transparent 60%),
    repeating-radial-gradient(circle at center, #25211e 0 1px, #11100f 2px 6px, #1e1a18 7px 9px);
  box-shadow: 0 0 0 22px rgba(25, 68, 58, 0.72), 0 40px 76px rgba(0, 0, 0, 0.32);
  animation-duration: 56s;
}

.hero-record::before {
  position: absolute;
  inset: 5.5%;
  border: 1px solid rgba(200, 203, 203, 0.12);
  border-radius: 50%;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.4);
  content: "";
}

.record-rings {
  inset: 35%;
  border-color: rgba(242, 238, 229, 0.33);
  background: var(--lake);
}

.record-rings::before {
  content: none;
}

.record-rings span {
  font-size: clamp(48px, 5.3vw, 76px);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.record-rings small {
  letter-spacing: 0.16em;
}

.resume-banner {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding-block: 26px;
  border-block-color: rgba(242, 238, 229, 0.21);
  background: var(--lake);
}

.resume-banner .button--primary {
  border: 1px solid var(--paper);
}

.rule-strip {
  border-bottom-color: var(--line-light);
  background-color: var(--paper);
  background-image: var(--paper-grain);
}

.rule-strip > div {
  position: relative;
  min-height: 160px;
  padding-top: 34px;
}

.rule-strip > div::before {
  position: absolute;
  top: 24px;
  left: clamp(20px, 3vw, 44px);
  width: 24px;
  height: 2px;
  background: var(--red);
  content: "";
}

.rule-strip b {
  font-size: clamp(44px, 4.1vw, 62px);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.rule-strip span {
  letter-spacing: 0.04em;
}

.home-section {
  background-color: var(--paper);
  background-image: var(--paper-grain);
}

.featured-grid {
  gap: clamp(14px, 2vw, 24px);
}

.featured-card {
  position: relative;
  padding: 10px 10px 20px;
  border: 1px solid transparent;
  border-bottom: 2px solid var(--night);
}

.featured-card::after {
  position: absolute;
  right: 10px;
  bottom: 9px;
  width: 18px;
  height: 2px;
  background: var(--red);
  opacity: 0;
  content: "";
  transition: opacity 160ms ease, transform 160ms ease;
}

.featured-card:hover {
  border-color: rgba(21, 18, 16, 0.12);
  border-bottom-color: var(--night);
  background: var(--paper-2);
  transform: translateY(-3px);
}

.featured-card:hover::after {
  opacity: 1;
  transform: translateX(-3px);
}

.featured-card:hover .cover-frame img {
  transform: scale(1.018);
}

.lake-section {
  min-height: 520px;
  background-color: var(--lake);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px);
  background-size: 72px 72px;
}

.lake-section::before {
  position: absolute;
  top: 0;
  left: var(--page);
  width: 60px;
  height: 4px;
  background: var(--red);
  content: "";
}

.lake-section::after {
  right: -5%;
  bottom: -66%;
  width: min(78vw, 980px);
  box-shadow: 0 0 0 68px rgba(242, 238, 229, 0.045), 0 0 0 136px rgba(242, 238, 229, 0.035), 0 0 0 204px rgba(242, 238, 229, 0.026), 0 0 0 272px rgba(242, 238, 229, 0.018);
}

.lake-section h2 {
  max-width: 12ch;
  font-weight: 900;
  letter-spacing: -0.05em;
}

/* Knowledge crate */
.collection-page .page-intro {
  max-width: none;
  margin: 0;
  padding-inline: var(--page);
  background-color: var(--night);
  background-image:
    repeating-radial-gradient(ellipse at 92% 132%, transparent 0 22px, rgba(200, 203, 203, 0.065) 23px 24px),
    linear-gradient(150deg, transparent 55%, rgba(25, 68, 58, 0.24));
  color: var(--paper);
}

.collection-page .page-intro::before {
  display: block;
  width: 54px;
  height: 3px;
  margin-bottom: 24px;
  background: var(--red);
  content: "";
}

.collection-page .page-intro > p:last-child {
  color: var(--silver);
}

.page-intro h1 {
  font-size: clamp(58px, 7.7vw, 104px);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.page-intro > p:last-child {
  line-height: 1.8;
}

.collection-tools {
  grid-template-columns: minmax(260px, 0.88fr) minmax(520px, 1.7fr) auto;
  padding-block: 18px;
  background: rgba(242, 238, 229, 0.975);
  box-shadow: 0 8px 24px rgba(21, 18, 16, 0.045);
}

.search-field input,
.name-field input {
  border-color: rgba(21, 18, 16, 0.44);
  border-radius: 2px;
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
}

.search-field input:focus,
.name-field input:focus {
  border-color: var(--lake);
  box-shadow: 0 0 0 3px rgba(25, 68, 58, 0.16);
}

.filter-chips button {
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.filter-chips button:hover,
.filter-chips .is-active {
  border-color: var(--lake);
  background: var(--lake);
}

.collection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1248px;
  padding: 48px 24px clamp(80px, 9vw, 120px);
  background: transparent;
}

.collection-card {
  position: relative;
  padding: 18px 18px 22px;
  border: 1px solid rgba(21, 18, 16, 0.12);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: none;
  transition: border-color 160ms ease, transform 180ms ease, background-color 160ms ease;
}

.collection-card::before {
  position: absolute;
  top: -1px;
  left: 18px;
  width: 36px;
  height: 3px;
  background: var(--red);
  opacity: 0;
  content: "";
  transition: opacity 160ms ease;
}

.collection-card:hover {
  border-color: rgba(21, 18, 16, 0.46);
  background: var(--paper-2);
  box-shadow: none;
  transform: translateY(-3px);
}

.collection-card:hover::before {
  opacity: 1;
}

.collection-card:hover .cover-frame img {
  transform: scale(1.015);
}

.collection-card-copy > span,
.collection-card-copy > small {
  letter-spacing: 0.1em;
}

.collection-card-copy h2 {
  margin-top: 10px;
  font-size: 20px;
}

.collection-card-copy p {
  font-size: 13px;
  line-height: 1.55;
}

.collection-cta {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background: var(--lake);
}

.collection-cta::after {
  position: absolute;
  right: -60px;
  width: 300px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 238, 229, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(242, 238, 229, 0.035), 0 0 0 76px rgba(242, 238, 229, 0.025);
  content: "";
}

.collection-cta > * {
  position: relative;
  z-index: 1;
}

.record-modal {
  border-color: rgba(200, 203, 203, 0.28);
  background-color: var(--paper);
  background-image: var(--paper-grain);
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.4);
}

.record-modal .cover-frame {
  background: #cbc6bd;
}

.record-modal-copy::before {
  display: block;
  width: 42px;
  height: 3px;
  margin-bottom: 24px;
  background: var(--red);
  content: "";
}

.record-modal-copy h2 {
  font-weight: 900;
}

.prototype-note {
  border-left-width: 3px;
  background: rgba(198, 43, 53, 0.055);
}

.rules-source-note {
  margin: 0;
  border-left: 3px solid var(--red);
  padding: 14px 16px;
  background: rgba(198, 43, 53, 0.055);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.rules-source-note b {
  color: var(--ink);
}

/* Birthday-edition title: keep the longer Chinese/English lockup inside the spotlight. */
.hero-copy h1 {
  font-size: clamp(68px, 8.3vw, 122px);
  letter-spacing: -0.055em;
  line-height: 0.86;
}

.record-rings small {
  max-width: 84%;
  font-size: clamp(7px, 0.7vw, 10px);
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 767px) {
  .hero-copy h1 {
    font-size: clamp(58px, 18vw, 86px);
  }
}

/* Rule sheet and personal pressing label */
.narrow-page {
  background-color: var(--paper);
  background-image: var(--paper-grain);
}

.narrow-page > .page-intro::before,
.review-page > .page-intro::before,
.card-page > .page-intro::before {
  display: block;
  width: 54px;
  height: 3px;
  margin-bottom: 24px;
  background: var(--red);
  content: "";
}

.rules-panel,
.name-panel {
  border-color: rgba(21, 18, 16, 0.68);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: 12px 12px 0 rgba(25, 68, 58, 0.95);
}

.rules-title > span {
  border-radius: 1px;
  letter-spacing: 0.1em;
}

.rules-grid > div {
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
}

.rules-grid b {
  font-weight: 900;
}

.rules-list li > span {
  letter-spacing: 0.08em;
}

.text-mode-option,
.privacy-option {
  border-color: rgba(21, 18, 16, 0.2);
  background: rgba(242, 238, 229, 0.5);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.text-mode-option:hover,
.privacy-option:hover {
  border-color: var(--lake);
  background: var(--wash);
}

.name-field input {
  font-size: 20px;
}

.name-preview {
  border-left: 4px solid var(--red);
  background-color: var(--lake);
  background-image: repeating-radial-gradient(circle at 104% 50%, transparent 0 22px, rgba(242, 238, 229, 0.07) 23px 24px);
}

.name-preview::after {
  right: -22px;
  border-color: rgba(242, 238, 229, 0.22);
  box-shadow: 0 0 0 25px rgba(242, 238, 229, 0.035), 0 0 0 50px rgba(242, 238, 229, 0.026);
}

.ready-page {
  position: relative;
  background-color: var(--night);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  isolation: isolate;
}

.ready-page::before {
  position: absolute;
  z-index: -1;
  top: -30%;
  left: -5%;
  width: 58%;
  height: 150%;
  background: linear-gradient(155deg, rgba(242, 238, 229, 0.16), transparent 62%);
  clip-path: polygon(20% 0, 52% 0, 100% 100%, 0 100%);
  content: "";
}

.ready-record {
  border: 1px solid rgba(200, 203, 203, 0.2);
  background:
    radial-gradient(circle at center, #0c0b0a 0 2%, transparent 2.2%),
    radial-gradient(circle at center, var(--paper) 0 19.5%, transparent 19.8%),
    conic-gradient(from 180deg, transparent, rgba(200, 203, 203, 0.1), transparent 14% 53%, rgba(200, 203, 203, 0.06), transparent 64%),
    repeating-radial-gradient(circle at center, #25211e 0 1px, #11100f 2px 7px);
  box-shadow: -22px 24px 0 rgba(25, 68, 58, 0.88);
}

.ready-record > div {
  border: 1px solid rgba(21, 18, 16, 0.16);
}

.ready-record > div::before {
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 17%;
  width: 3px;
  background: var(--red);
  content: "";
}

.ready-copy::before {
  display: block;
  width: 54px;
  height: 3px;
  margin-bottom: 25px;
  background: var(--red);
  content: "";
}

.ready-copy h1 {
  font-weight: 900;
}

.ready-checks {
  border-block: 1px solid var(--line-dark);
  padding-block: 20px;
}

/* Focused, fatigue-aware test surface */
.quiz-shell {
  background-color: #e8e3d9;
  background-image: var(--paper-grain);
  background-size: 13px 17px, 19px 23px;
}

.exam-header {
  min-height: 72px;
  grid-template-columns: 52px 1fr auto;
  background: rgba(21, 18, 16, 0.98);
  box-shadow: 0 8px 22px rgba(21, 18, 16, 0.12);
}

.exam-header > img {
  width: 46px;
  height: 46px;
}

.exam-position b {
  font-size: 12px;
  letter-spacing: 0.1em;
}

.exam-position span {
  position: relative;
  padding-left: 20px;
}

.exam-position span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--red);
  content: "";
}

.exam-timer {
  min-width: 104px;
  border-color: rgba(200, 203, 203, 0.27);
  background: rgba(242, 238, 229, 0.035);
}

.exam-timer b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.exam-progress {
  bottom: -2px;
  height: 2px;
}

.exam-progress > span {
  background: var(--red);
}

.quiz-layout {
  max-width: 1120px;
  grid-template-columns: minmax(0, 720px) minmax(280px, 320px);
  gap: 40px;
  padding-block: 44px 78px;
}

.question-meta {
  margin-bottom: 14px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.question-meta span:first-child {
  padding: 5px 9px;
  border-radius: 1px;
}

.question-card {
  padding: clamp(30px, 4.5vw, 54px);
  border-color: rgba(21, 18, 16, 0.18);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: 8px 8px 0 rgba(25, 68, 58, 0.1);
}

.question-number {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
}

.question-number::before {
  width: 28px;
  height: 2px;
  background: var(--red);
  content: "";
}

.question-image {
  width: min(320px, 72%);
  border: 12px solid #fff;
  background: #d7d2c9;
  box-shadow: 0 12px 32px rgba(21, 18, 16, 0.14);
}

.question-image img {
  object-fit: contain;
}

.question-card h1 {
  max-width: 720px;
  margin-bottom: 32px;
  font-size: clamp(23px, 2.35vw, 29px);
  font-weight: 750;
  letter-spacing: -0.012em;
  line-height: 1.52;
  text-wrap: pretty;
}

.option-list {
  gap: 12px;
}

.question-option {
  min-height: 62px;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  gap: 15px;
  padding: 12px 15px;
  border-color: rgba(21, 18, 16, 0.18);
  background: rgba(242, 238, 229, 0.6);
  font-size: 16px;
  font-weight: 560;
  line-height: 1.55;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.question-option:hover {
  border-color: rgba(21, 18, 16, 0.55);
  background: var(--paper);
  transform: translateX(2px);
}

.question-option.is-selected {
  border-color: var(--lake);
  background: rgba(25, 68, 58, 0.095);
  box-shadow: inset 3px 0 0 var(--lake);
}

.option-letter {
  width: 36px;
  height: 36px;
  border-color: rgba(21, 18, 16, 0.46);
  border-radius: 50%;
}

.question-status {
  margin-block: 20px;
}

.question-status button {
  border-radius: 2px;
  background: rgba(242, 238, 229, 0.55);
}

.answer-sheet {
  border-color: rgba(21, 18, 16, 0.18);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: 6px 6px 0 rgba(21, 18, 16, 0.055);
}

.quiz-layout > .answer-sheet {
  top: 100px;
}

.answer-sheet-heading h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
}

.sheet-side h3 {
  letter-spacing: 0.14em;
}

.sheet-grid button {
  border-radius: 2px;
}

.sheet-grid button.is-answered {
  background: var(--lake);
}

.sheet-grid button.is-partial {
  background: transparent;
}

.sheet-grid button.is-current {
  box-shadow: 0 0 0 2px var(--red), inset 0 0 0 1px var(--paper);
}

.sheet-drawer .answer-sheet {
  box-shadow: none;
}

.submit-dialog {
  border-top-width: 5px;
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
}

/* The score is the spotlight */
.result-hero {
  min-height: 660px;
  background-color: var(--night);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 80px 80px;
}

.result-hero::before {
  position: absolute;
  z-index: -1;
  top: -30%;
  left: -2%;
  width: 62%;
  height: 150%;
  background: linear-gradient(158deg, rgba(242, 238, 229, 0.18), transparent 60%);
  clip-path: polygon(15% 0, 42% 0, 100% 100%, 0 100%);
  content: "";
}

.result-hero::after {
  top: -24%;
  right: -8%;
  border-color: rgba(200, 203, 203, 0.15);
  background: repeating-radial-gradient(circle, rgba(200, 203, 203, 0.065) 0 1px, transparent 2px 22px);
}

.result-hero > .eyebrow::before {
  display: inline-block;
  width: 34px;
  height: 2px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--red);
  content: "";
}

.result-title {
  max-width: 18ch;
  color: var(--silver);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 650;
}

.score-disc {
  position: relative;
  width: fit-content;
  margin-top: 20px;
}

.score-disc::after {
  position: absolute;
  right: -12px;
  bottom: 2px;
  left: 6px;
  height: 5px;
  background: var(--red);
  content: "";
}

.score-disc span {
  font-size: clamp(160px, 22vw, 300px);
  font-weight: 900;
  letter-spacing: -0.1em;
}

.result-meta span {
  min-width: 178px;
  border-top: 1px solid rgba(200, 203, 203, 0.07);
}

.module-results {
  max-width: 980px;
}

.module-row {
  padding-block: 22px;
}

.module-track {
  height: 7px;
  background: rgba(21, 18, 16, 0.12);
}

.module-track span {
  position: relative;
  background: var(--lake);
}

.module-track span::after {
  position: absolute;
  top: -2px;
  right: 0;
  width: 3px;
  height: 11px;
  background: var(--red);
  content: "";
}

.shared-device-panel {
  border-style: solid;
  border-color: rgba(21, 18, 16, 0.15);
  background: rgba(251, 248, 241, 0.62);
}

/* Review reads like liner notes */
.review-page,
.card-page,
.result-page {
  background-color: var(--paper);
  background-image: var(--paper-grain);
}

.review-card {
  border-color: rgba(21, 18, 16, 0.16);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
}

.review-head span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.08em;
}

.review-head span:first-child::before {
  width: 24px;
  height: 2px;
  background: var(--red);
  content: "";
}

.review-card h2 {
  line-height: 1.45;
  text-wrap: pretty;
}

.explanation {
  border-left-width: 3px;
  background: rgba(25, 68, 58, 0.065);
}

/* A collectible pressing label, not a generic certificate */
.card-layout {
  grid-template-columns: minmax(420px, 0.92fr) minmax(300px, 0.58fr);
}

.score-card-preview {
  border: 1px solid rgba(200, 203, 203, 0.23);
  background-color: var(--night);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.013) 1px, transparent 1px);
  background-size: 54px 54px;
  box-shadow: 14px 14px 0 var(--lake);
}

.score-card-preview::before {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(200, 203, 203, 0.16);
  pointer-events: none;
  content: "";
}

.score-card-preview::after {
  right: -23%;
  bottom: -15%;
  border-color: rgba(200, 203, 203, 0.18);
  box-shadow: 0 0 0 26px rgba(200, 203, 203, 0.032), 0 0 0 52px rgba(200, 203, 203, 0.026), 0 0 0 78px rgba(200, 203, 203, 0.02), 0 0 0 104px rgba(200, 203, 203, 0.014);
}

.card-top {
  position: relative;
  z-index: 1;
}

.card-top::after {
  position: absolute;
  right: 0;
  bottom: -13px;
  left: 0;
  height: 1px;
  background: var(--line-dark);
  content: "";
}

.card-top img {
  width: 68px;
  height: 68px;
}

.card-grooves {
  position: relative;
  border-color: rgba(200, 203, 203, 0.17);
  background:
    conic-gradient(from 225deg, transparent, rgba(200, 203, 203, 0.09), transparent 16% 63%, rgba(200, 203, 203, 0.055), transparent 75%),
    repeating-radial-gradient(circle at center, #25211e 0 1px, #11100f 2px 9px);
}

.card-grooves::after {
  position: absolute;
  inset: 5%;
  border: 1px solid rgba(200, 203, 203, 0.08);
  border-radius: 50%;
  content: "";
}

.card-grooves > div {
  position: relative;
  z-index: 1;
  width: 61%;
  border: 1px solid rgba(242, 238, 229, 0.16);
  background-color: var(--lake);
  background-image: repeating-radial-gradient(circle at 50% 50%, transparent 0 15px, rgba(242, 238, 229, 0.045) 16px 17px);
}

.card-grooves b {
  font-weight: 900;
}

.card-stats {
  border-color: rgba(200, 203, 203, 0.2);
}

.card-controls {
  border-color: rgba(21, 18, 16, 0.16);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: 8px 8px 0 rgba(25, 68, 58, 0.09);
}

.card-controls h2 {
  font-weight: 900;
}

/* Responsive details: the archive becomes 3 / 2 / 1 columns. */
@media (max-width: 1023px) {
  :root {
    --page: 24px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
  }

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

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

  .quiz-layout {
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 28px;
  }

  .card-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(280px, 0.68fr);
  }
}

@media (max-width: 767px) {
  :root {
    --page: 16px;
    --header: 64px;
  }

  .site-header {
    padding-inline: 16px;
  }

  .site-header::after {
    right: 16px;
    left: 16px;
  }

  .site-nav .nav-cta {
    min-height: 42px;
    padding-inline: 15px;
  }

  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 58px;
    padding: 66px 20px 86px;
  }

  .hero-section::before {
    top: 42%;
    right: -45%;
    width: 130%;
    height: 72%;
    opacity: 0.55;
  }

  .hero-copy h1 {
    font-size: clamp(76px, 25vw, 118px);
  }

  .hero-intro {
    font-size: 15px;
  }

  .hero-record {
    width: min(84vw, 420px);
    box-shadow: 0 0 0 15px rgba(25, 68, 58, 0.76), 0 30px 64px rgba(0, 0, 0, 0.3);
  }

  .resume-banner {
    grid-template-columns: 1fr;
  }

  .rule-strip > div {
    min-height: 126px;
  }

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

  .featured-card {
    padding-inline: 4px;
  }

  .collection-page .page-intro {
    padding-inline: 20px;
  }

  .collection-tools {
    padding-inline: 16px;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 26px 12px 78px;
  }

  .collection-card {
    padding: 10px 10px 15px;
  }

  .collection-card-copy h2 {
    font-size: 16px;
  }

  .rules-panel,
  .name-panel {
    width: calc(100% - 32px);
    box-shadow: 7px 7px 0 var(--lake);
  }

  .ready-page {
    padding-inline: 20px;
  }

  .ready-record {
    box-shadow: -14px 16px 0 rgba(25, 68, 58, 0.9);
  }

  .exam-header {
    min-height: 64px;
    grid-template-columns: 42px 1fr auto;
    padding-inline: 12px;
  }

  .exam-header > img {
    width: 40px;
    height: 40px;
  }

  .exam-position span {
    padding-left: 0;
  }

  .exam-position span::before {
    display: none;
  }

  .exam-timer {
    min-width: 80px;
  }

  .quiz-layout {
    padding: 26px 16px 112px;
  }

  .question-card {
    padding: 27px 18px;
    box-shadow: 5px 5px 0 rgba(25, 68, 58, 0.1);
  }

  .question-card h1 {
    font-size: clamp(21px, 5.8vw, 26px);
    line-height: 1.5;
  }

  .question-option {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 11px;
    padding: 11px;
    font-size: 15px;
  }

  .quiz-navigation {
    background-color: rgba(242, 238, 229, 0.98);
    background-image: var(--paper-grain);
  }

  .result-hero {
    min-height: 590px;
  }

  .score-disc::after {
    height: 4px;
  }

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

  .score-card-preview {
    box-shadow: 9px 9px 0 var(--lake);
  }
}

@media (max-width: 479px) {
  .hero-actions {
    grid-template-columns: 1fr 1fr;
  }

  .rule-strip b {
    font-size: 42px;
  }

  .featured-card strong {
    font-size: 15px;
  }

  .collection-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-inline: 16px;
  }

  .collection-card {
    padding: 14px 14px 18px;
  }

  .collection-card-copy p {
    display: block;
    min-height: auto;
  }

  .question-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .question-image {
    width: 88%;
    border-width: 8px;
  }

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

  .card-controls {
    padding: 24px 20px;
    box-shadow: 5px 5px 0 rgba(25, 68, 58, 0.09);
  }
}

@media (max-width: 359px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 70px;
  }

  .site-nav .nav-cta {
    padding-inline: 12px;
    font-size: 11px;
  }

  .exam-header {
    grid-template-columns: 38px 1fr auto;
    gap: 7px;
  }

  .exam-timer {
    min-width: 70px;
  }

  .question-card {
    padding-inline: 15px;
  }

  .question-option {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 8px;
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-record,
  .ready-record,
  .cover-frame img,
  .featured-card,
  .collection-card,
  .question-option {
    animation: none !important;
    transform: none !important;
  }
}

@media print {
  .score-card-preview {
    border-color: rgba(200, 203, 203, 0.23);
    box-shadow: none;
  }
}

@media (max-width: 767px) {
  .hero-copy h1 {
    font-size: clamp(58px, 18vw, 86px);
  }
}

@media (max-width: 359px) {
  .hero-copy h1 {
    font-size: 58px;
  }
}

.exam-exit-button {
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  place-items: center;
}

.exam-exit-button:hover {
  border-color: var(--line-dark);
  background: rgba(242, 238, 229, 0.06);
}

.exam-exit-button img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

/* Compact mobile quiz: keep a short prompt, four short choices and navigation
   within a common iPhone viewport without shrinking interactive targets. */
@media (max-width: 767px) {
  .quiz-shell {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  .exam-header {
    display: flex;
    min-height: 50px;
    gap: 8px;
    padding: 4px 10px;
  }

  .exam-header > img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .exam-position {
    min-width: 0;
    flex: 1 1 auto;
    gap: 0;
  }

  .exam-position b {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.25;
    letter-spacing: 0.055em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .exam-position span {
    font-size: 10px;
    line-height: 1.2;
  }

  .exam-timer {
    min-width: 68px;
    padding: 2px 6px;
  }

  .exam-timer small {
    font-size: 8px;
    line-height: 1.1;
  }

  .exam-timer b {
    font-size: 14px;
  }

  .exam-header > button,
  .exam-exit-button,
  .quiz-exit-button,
  .exit-quiz-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1.15;
  }

  .exam-exit-button img {
    width: 32px;
    height: 32px;
  }

  .quiz-layout {
    padding: 8px 10px calc(62px + env(safe-area-inset-bottom));
  }

  .question-meta {
    min-width: 0;
    align-items: center;
    flex-direction: row;
    gap: 7px;
    margin-bottom: 6px;
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: 0.025em;
  }

  .question-meta span {
    min-width: 0;
  }

  .question-meta span:first-child {
    flex: 0 1 auto;
    padding: 3px 6px;
  }

  .question-meta span:last-child,
  .question-points,
  .question-score,
  .question-value {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 9px;
    white-space: nowrap;
  }

  .question-card {
    padding: 12px 12px 13px;
    box-shadow: 3px 3px 0 rgba(25, 68, 58, 0.1);
  }

  .question-number {
    gap: 7px;
    margin-bottom: 7px;
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: 0.06em;
  }

  .question-number::before {
    width: 16px;
    height: 1px;
  }

  .question-image {
    width: min(44vw, 164px);
    margin-bottom: 9px;
    border-width: 5px;
    box-shadow: 0 5px 14px rgba(21, 18, 16, 0.12);
  }

  .question-image-fallback {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.35;
  }

  .question-card h1 {
    margin-bottom: 10px;
    font-size: clamp(17px, 4.9vw, 20px);
    line-height: 1.32;
    letter-spacing: -0.008em;
  }

  .option-list {
    gap: 6px;
  }

  .question-option {
    min-height: 44px;
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    gap: 8px;
    padding: 5px 8px;
    font-size: 14px;
    line-height: 1.3;
  }

  .option-letter {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .question-option > i {
    font-size: 13px;
  }

  .selection-limit {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.3;
  }

  .question-status {
    min-height: 44px;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin: 5px 0 4px;
  }

  .question-status button {
    min-height: 44px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .question-status > span {
    display: none;
  }

  .quiz-navigation {
    min-width: 0;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.82fr) minmax(0, 1.16fr);
    gap: 5px;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  }

  .quiz-navigation .button {
    min-width: 0;
    min-height: 44px;
    padding: 6px 5px;
    font-size: 12px;
    line-height: 1.15;
  }

  .submit-dialog,
  .exit-dialog,
  .quiz-exit-dialog {
    width: min(100%, 420px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 22px 18px;
  }

  .exit-dialog .dialog-actions .button,
  .quiz-exit-dialog .dialog-actions .button {
    min-height: 44px;
  }
}

@media (max-width: 359px) {
  .exam-position span {
    display: block;
  }

  .quiz-layout {
    padding-inline: 8px;
  }

  .question-card {
    padding-inline: 10px;
  }

  .question-option {
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    gap: 6px;
    padding-inline: 7px;
    font-size: 13px;
  }

  .option-letter {
    width: 28px;
    height: 28px;
  }

  .quiz-navigation .button {
    padding-inline: 3px;
    font-size: 11px;
  }
}

/* Long-form record archive
   The dialog owns its scroll, while the cover remains a stable visual anchor. */
.record-archive-backdrop {
  overflow: hidden;
  padding: 24px;
  place-items: center;
}

.modal-backdrop-dismiss {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.record-archive-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
}

.record-modal.record-archive {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-height: inherit;
  align-items: start;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-color: rgba(200, 203, 203, 0.38);
  background-color: var(--paper);
  background-image: var(--paper-grain);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.46);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.record-archive-shell > .modal-close {
  position: absolute;
  z-index: 6;
  top: 16px;
  right: 16px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  border-color: rgba(21, 18, 16, 0.26);
  background: rgba(251, 248, 241, 0.96);
  box-shadow: 0 4px 18px rgba(21, 18, 16, 0.12);
  line-height: 1;
  transition: background-color 120ms ease, border-color 120ms ease;
  backdrop-filter: blur(8px);
}

.record-archive-shell > .modal-close:hover {
  border-color: var(--night);
  background: var(--paper-2);
}

.record-archive-cover {
  position: sticky;
  top: 32px;
  flex: 0 1 360px;
  width: calc(100% - 64px);
  max-width: 360px;
  align-self: start;
  margin: 32px 0 32px 32px;
  padding: 12px;
  border: 1px solid var(--line-light);
  background: var(--paper-2);
  box-shadow: 10px 10px 0 var(--lake);
}

.record-archive-content {
  flex: 1 1 560px;
  min-width: 0;
  max-width: 100%;
}

.record-archive .record-archive-cover .cover-frame {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  border: 0;
  background: #cbc6bd;
}

.record-archive-intro {
  min-width: 0;
  padding: clamp(50px, 6vw, 76px) clamp(36px, 5vw, 64px) 36px;
}

.record-archive-intro .eyebrow {
  max-width: calc(100% - 52px);
  margin-bottom: 18px;
  color: var(--lake);
}

.record-archive-intro h2 {
  max-width: 18ch;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.record-archive-subtitle {
  margin: 0 0 24px;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}

.record-archive-summary {
  max-width: 66ch;
  margin-bottom: 28px;
  color: #403a36;
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}

.record-archive-meta {
  display: grid;
  margin: 0 0 28px;
  border-top: 1px solid var(--line-light);
}

.record-archive-meta > div {
  display: grid;
  grid-template-columns: minmax(78px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-light);
}

.record-archive-meta dt {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.record-archive-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.button--apple-music {
  min-height: 48px;
  border-color: var(--night);
  background: var(--night);
  color: var(--paper);
  text-decoration: none;
}

.button--apple-music:hover {
  background: var(--lake);
  border-color: var(--lake);
}

.record-archive-body {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  column-gap: 32px;
  padding: 0 clamp(36px, 5vw, 64px) clamp(42px, 6vw, 72px);
}

.record-archive-section {
  flex: 1 1 280px;
  min-width: 0;
  padding: 32px 0 34px;
  border-top: 1px solid var(--line-light);
}

.record-archive-description,
.record-archive-contents,
.record-archive-facts,
.record-archive-sources,
.record-archive-cta {
  flex-basis: 100%;
  width: 100%;
}

.record-archive-section h3,
.record-archive-cta h3 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.record-archive-section > p:not(.record-archive-kicker) {
  max-width: 72ch;
  margin-bottom: 14px;
  color: #403a36;
  font-size: 15px;
  line-height: 1.8;
  text-wrap: pretty;
}

.record-archive-section > p:last-child {
  margin-bottom: 0;
}

.record-archive-kicker {
  margin: 0 0 10px;
  color: var(--lake);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.record-archive-context:first-of-type {
  padding-right: 2px;
}

.record-track-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 24px;
}

.record-track-group {
  min-width: 0;
}

.record-track-group h4 {
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--night);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.record-track-group ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-track-group li {
  display: grid;
  min-width: 0;
  grid-template-columns: 3.5ch minmax(0, 1fr);
  column-gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(21, 18, 16, 0.12);
  line-height: 1.42;
}

.record-track-group li > span {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.65;
  text-align: right;
  white-space: nowrap;
}

.record-track-group li > b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
  text-wrap: pretty;
}

.record-track-group li > small {
  min-width: 0;
  grid-column: 2;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
}

.record-archive-facts {
  margin-top: 2px;
}

.record-archive-facts > ol {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 1px;
  background: rgba(25, 68, 58, 0.18);
  list-style: none;
  counter-reset: archive-fact;
}

.record-archive-facts > ol > li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  background: var(--paper-2);
  font-size: 13px;
  line-height: 1.6;
  counter-increment: archive-fact;
}

.record-archive-facts > ol > li::before {
  color: var(--lake);
  content: counter(archive-fact, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.record-archive-sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-archive-sources li {
  min-width: 0;
}

.record-archive-sources a {
  display: inline-block;
  overflow-wrap: anywhere;
  color: var(--lake);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-decoration-color: rgba(25, 68, 58, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.record-archive-sources a:hover {
  color: var(--night);
  text-decoration-color: currentColor;
}

.record-archive-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-top: 0;
  background: var(--lake);
  color: var(--paper);
}

.record-archive-cta .eyebrow {
  margin-bottom: 7px;
  color: rgba(242, 238, 229, 0.7);
}

.record-archive-cta h3 {
  margin: 0;
  font-size: clamp(23px, 2.5vw, 32px);
}

.record-archive-cta .button--primary {
  flex: none;
  border-color: var(--paper);
  background: var(--paper);
  color: var(--night);
}

.record-archive-cta .button--primary:hover:not(:disabled) {
  background: transparent;
  color: var(--paper);
}

@media (max-width: 899px) {
  .record-archive-backdrop {
    padding: 12px;
  }

  .record-archive-shell {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .record-modal.record-archive {
    display: block;
    max-height: inherit;
    scrollbar-gutter: auto;
  }

  .record-archive-shell > .modal-close {
    top: 12px;
    right: 12px;
    display: grid;
  }

  .record-archive-cover {
    position: static;
    width: min(58vw, 280px);
    margin: 0 auto 28px;
    padding: 8px;
    transform: translateY(28px);
    box-shadow: 7px 7px 0 var(--lake);
  }

  .record-archive-intro {
    padding: 38px 24px 30px;
  }

  .record-archive-intro h2 {
    max-width: 20ch;
    font-size: clamp(36px, 9vw, 54px);
  }

  .record-archive-body {
    display: block;
    padding: 0 24px 36px;
  }

  .record-archive-section {
    padding-block: 28px;
  }

  .record-archive-context {
    padding-right: 0;
  }
}

@media (max-width: 479px) {
  .record-archive-backdrop {
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }

  .record-archive-shell {
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
  }

  .record-modal.record-archive {
    max-height: inherit;
  }

  .record-archive-shell > .modal-close {
    top: 8px;
    right: 8px;
  }

  .record-archive-cover {
    width: min(62vw, 232px);
    margin-bottom: 24px;
    transform: translateY(22px);
  }

  .record-archive-intro {
    padding: 32px 17px 24px;
  }

  .record-archive-intro .eyebrow {
    margin-bottom: 13px;
    font-size: 9px;
  }

  .record-archive-intro h2 {
    padding-right: 0;
    font-size: clamp(32px, 11vw, 46px);
  }

  .record-archive-subtitle {
    margin-bottom: 18px;
    font-size: 14px;
  }

  .record-archive-summary {
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.7;
  }

  .record-archive-meta {
    margin-bottom: 22px;
  }

  .record-archive-meta > div {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .button--apple-music {
    width: 100%;
  }

  .record-archive-body {
    padding: 0 17px 24px;
  }

  .record-archive-section {
    padding-block: 24px;
  }

  .record-archive-section h3,
  .record-archive-cta h3 {
    font-size: 25px;
  }

  .record-track-groups {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .record-track-group li {
    grid-template-columns: 3ch minmax(0, 1fr);
    column-gap: 8px;
  }

  .record-archive-facts > ol > li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .record-archive-sources ul {
    display: grid;
    gap: 9px;
  }

  .record-archive-cta {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
    padding: 22px 18px;
  }

  .record-archive-cta .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .record-modal.record-archive,
  .record-archive-cover,
  .record-archive .cover-frame img,
  .record-archive-shell > .modal-close,
  .button--apple-music {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Homepage event entry and shared record summary cards
   Kept at the end so these component-scoped rules remain the final cascade. */
.hero-actions {
  display: grid;
  width: min(100%, 660px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-actions .button {
  min-width: 0;
  min-height: 48px;
  padding-inline: 14px;
}

.record-card-grid {
  display: grid;
  align-items: stretch;
  gap: clamp(12px, 1.55vw, 22px);
  margin-top: 42px;
}

.record-card-grid--featured {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.record-card-grid--collection {
  max-width: 1248px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  padding: 48px 24px clamp(80px, 9vw, 120px);
}

.record-summary-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 14px 14px 18px;
  border: 1px solid rgba(21, 18, 16, 0.14);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: none;
  text-align: left;
  transition: border-color 160ms ease, transform 180ms ease, background-color 160ms ease;
}

.record-summary-card::before {
  position: absolute;
  z-index: 1;
  top: -1px;
  left: 14px;
  width: 34px;
  height: 3px;
  background: var(--red);
  opacity: 0;
  content: "";
  transition: opacity 160ms ease;
}

.record-summary-card:hover,
.record-summary-card:focus-within {
  border-color: rgba(21, 18, 16, 0.48);
  background-color: var(--paper-2);
  box-shadow: none;
  transform: translateY(-3px);
}

.record-summary-card:hover::before,
.record-summary-card:focus-within::before {
  opacity: 1;
}

.record-summary-card:hover .cover-frame img,
.record-summary-card:focus-within .cover-frame img {
  transform: scale(1.015);
}

.record-summary-card .cover-frame {
  flex: none;
  aspect-ratio: 1;
}

.record-summary-card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding-top: 16px;
}

.record-summary-card-copy > span,
.record-summary-card-copy > small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.5;
}

.record-summary-card-copy h2 {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 8px 0 7px;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.28;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-summary-card-copy p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.record-summary-card-copy > small {
  margin-bottom: 14px;
}

.record-summary-card-action {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  padding: 9px 10px;
  border-color: rgba(21, 18, 16, 0.42);
  font-size: 12px;
}

.home-records-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.home-records-action .button {
  min-height: 48px;
}

/* Offline exhibition dialog */
.activity-backdrop {
  overflow: hidden;
  padding: 24px;
}

.activity-dialog-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1160px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
}

.activity-dialog {
  display: grid;
  width: 100%;
  max-height: inherit;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(200, 203, 203, 0.36);
  background-color: var(--paper);
  background-image: var(--paper-grain);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.46);
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: touch;
}

.activity-dialog-shell > .modal-close {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-color: rgba(21, 18, 16, 0.26);
  background: rgba(251, 248, 241, 0.96);
  box-shadow: 0 4px 18px rgba(21, 18, 16, 0.12);
  backdrop-filter: blur(8px);
}

.activity-dialog-copy {
  min-width: 0;
  padding: clamp(42px, 5vw, 66px);
}

.activity-dialog-copy::before {
  display: block;
  width: 48px;
  height: 3px;
  margin-bottom: 22px;
  background: var(--red);
  content: "";
}

.activity-dialog-copy .eyebrow {
  color: var(--lake);
}

.activity-dialog-copy h2 {
  max-width: 16ch;
  margin: 0 0 30px;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}

.activity-dialog-meta {
  display: grid;
  margin: 0 0 30px;
  border-top: 1px solid var(--line-light);
}

.activity-dialog-meta > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-light);
}

.activity-dialog-meta dt {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.activity-dialog-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
}

.activity-dialog-meta a {
  color: var(--lake);
  text-underline-offset: 4px;
}

.activity-dialog-overview h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.activity-dialog-overview p {
  margin-bottom: 10px;
  color: #403a36;
  font-size: 14px;
  line-height: 1.78;
  text-wrap: pretty;
}

.activity-dialog-overview p:last-child {
  margin-bottom: 0;
}

.activity-map-panel {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  gap: 16px;
  padding: 76px 26px 26px;
  background-color: var(--lake);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
}

.activity-location-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  flex: none;
  border: 1px solid rgba(242, 238, 229, 0.28);
  background: var(--paper-2);
  color: var(--night);
}

.activity-location-copy {
  padding: 18px 20px 20px;
}

.activity-location-kicker,
.activity-location-note,
.activity-location-status {
  margin: 0;
}

.activity-location-kicker {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.activity-location-name {
  margin: 7px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.3vw, 32px);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.activity-location-address {
  color: #292521;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.activity-location-note {
  margin-top: 5px;
  color: #6a625b;
  font-size: 12px;
  line-height: 1.5;
}

.activity-location-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.activity-location-actions .button {
  width: 100%;
  min-width: 0;
  padding-inline: 10px;
}

.activity-location-actions .button--primary {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--lake);
  text-decoration: none;
}

.activity-location-copy-button {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(242, 238, 229, 0.65);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  justify-self: center;
}

.activity-location-copy-button:hover {
  border-bottom-color: var(--paper);
}

.activity-location-status {
  min-height: 18px;
  color: rgba(242, 238, 229, 0.82);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.activity-map-panel .button {
  min-height: 48px;
  flex: none;
  border-color: rgba(242, 238, 229, 0.7);
  color: var(--paper);
  text-decoration: none;
}

.activity-map-panel .button--secondary:hover:not(:disabled) {
  border-color: var(--paper);
  background: rgba(242, 238, 229, 0.1);
  color: var(--paper);
}

.activity-map-panel .activity-location-actions .button--primary {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--lake);
}

.activity-map-panel .activity-location-actions .button--primary:hover:not(:disabled) {
  border-color: var(--paper);
  background: #fffdf7;
  color: var(--night);
}

.activity-map-panel :focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--night);
}

.activity-location-copy-button:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

.activity-dialog-shell > .modal-close:focus-visible {
  outline: 3px solid var(--night);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(242, 238, 229, 0.92);
}

.activity-map-picker-backdrop {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  padding: 20px;
  background: rgba(21, 18, 16, 0.78);
  backdrop-filter: blur(8px);
  place-items: center;
}

.activity-map-picker-dismiss {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.activity-map-picker {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  padding: 34px;
  border: 1px solid var(--line-light);
  background-color: var(--paper);
  background-image: var(--paper-grain);
  color: var(--night);
  box-shadow: 14px 14px 0 rgba(25, 68, 58, 0.9);
}

.activity-map-picker::before {
  display: block;
  width: 42px;
  height: 3px;
  margin-bottom: 22px;
  background: var(--red);
  content: "";
}

.activity-map-picker .eyebrow {
  margin: 0 56px 8px 0;
  color: var(--lake);
}

.activity-map-picker h3 {
  margin: 0 56px 10px 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}

.activity-map-picker-intro {
  margin: 0 0 22px;
  color: #655e58;
  font-size: 13px;
  line-height: 1.6;
}

.activity-map-picker-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  color: var(--night);
  cursor: pointer;
  place-items: center;
}

.activity-map-picker-list {
  display: grid;
  gap: 10px;
}

.activity-map-picker-list a {
  display: grid;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-content: center;
  padding: 13px 16px;
  border: 1px solid var(--line-light);
  color: var(--night);
  text-decoration: none;
}

.activity-map-picker-list a:hover {
  border-color: var(--lake);
  background: rgba(25, 68, 58, 0.06);
}

.activity-map-picker-list span {
  color: #716960;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.activity-map-picker-list strong {
  grid-column: 1;
  font-size: 17px;
}

.activity-map-picker-list b {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--lake);
  font-size: 20px;
}

.activity-map-picker :focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  box-shadow: none;
}

/* Half-second handoff between a homepage record card and its archive page. */
.record-transition-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    rgba(21, 18, 16, 0.97);
  background-size: 56px 56px;
  color: var(--paper);
  cursor: progress;
  place-items: center;
  animation: record-transition-overlay 500ms ease both;
}

.record-transition-panel {
  display: grid;
  width: min(560px, 100%);
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 36px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(242, 238, 229, 0.28);
  background: rgba(32, 28, 25, 0.92);
  box-shadow: 12px 12px 0 rgba(25, 68, 58, 0.72);
  animation: record-transition-panel 500ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.record-transition-disc {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 238, 229, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--paper) 0 2.4%, transparent 2.7%),
    radial-gradient(circle at center, var(--lake) 0 18%, #12372f 18.3% 22%, transparent 22.4%),
    conic-gradient(from 220deg, transparent 0 22%, rgba(242, 238, 229, 0.13) 24%, transparent 27% 69%, rgba(242, 238, 229, 0.08) 72%, transparent 75%),
    repeating-radial-gradient(circle at center, #26211f 0 1px, #0e0d0c 2px 6px, #1d1917 7px 9px);
  box-shadow: 0 0 0 9px rgba(25, 68, 58, 0.34), 0 18px 32px rgba(0, 0, 0, 0.3);
  animation: record-transition-spin 500ms cubic-bezier(0.3, 0.7, 0.3, 1) both;
}

.record-transition-disc::after {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(242, 238, 229, 0.08);
  border-radius: inherit;
  content: "";
}

.record-transition-copy {
  min-width: 0;
}

.record-transition-copy > * {
  overflow-wrap: anywhere;
}

.record-transition-copy span,
.record-transition-copy small {
  display: block;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
}

.record-transition-copy strong,
.record-transition-copy b {
  display: block;
  margin: 8px 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
}

@keyframes record-transition-overlay {
  0% { opacity: 0; }
  18%, 100% { opacity: 1; }
}

@keyframes record-transition-panel {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  30%, 100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes record-transition-spin {
  from { transform: rotate(-18deg) scale(0.9); }
  to { transform: rotate(126deg) scale(1); }
}

/* Compact site menu: the header keeps one clear control at every breakpoint. */
.site-menu {
  position: relative;
  z-index: 2;
  flex: none;
}

.site-menu-toggle {
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid rgba(242, 238, 229, 0.34);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  place-items: center;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.site-menu-toggle:hover,
.site-menu-toggle[aria-expanded="true"] {
  border-color: var(--paper);
  background: rgba(242, 238, 229, 0.08);
}

.site-menu-toggle-icon {
  display: grid;
  width: 22px;
  gap: 5px;
}

.site-menu-toggle-icon i {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition: opacity 140ms ease, transform 160ms ease;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon i:first-child {
  transform: translateY(7px) rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon i:nth-child(2) {
  opacity: 0;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle-icon i:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.site-menu-popover {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  width: min(330px, calc(100vw - (2 * var(--page))));
  padding: 10px;
  border: 1px solid rgba(200, 203, 203, 0.34);
  background-color: var(--paper-2);
  background-image: var(--paper-grain);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  color: var(--night);
  animation: site-menu-enter 160ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.site-menu-popover::before {
  display: block;
  width: 34px;
  height: 3px;
  margin: 2px 0 8px 4px;
  background: var(--red);
  content: "";
}

.site-menu-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-menu-item {
  position: relative;
  width: 100%;
  min-height: 50px;
  padding: 12px 42px 12px 14px;
  border-top: 1px solid rgba(21, 18, 16, 0.12);
  background: transparent;
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}

.site-menu-item::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 2px;
  background: currentColor;
  content: "";
  opacity: 0.38;
  transform: translateY(-50%);
}

.site-menu-item:hover,
.site-menu-item:focus-visible {
  background: var(--wash);
  color: var(--lake);
}

.site-menu-item[aria-current="page"] {
  background: var(--lake);
  color: var(--paper);
}

@keyframes site-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1199px) {
  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions > :first-child {
    grid-column: 1 / -1;
  }

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

@media (max-width: 1023px) {
  .collection-tools {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  }

  .collection-tools > *,
  .filter-chips {
    min-width: 0;
  }

  .record-card-grid--collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-dialog {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  }

  .activity-dialog-copy {
    padding: 40px 30px;
  }

  .activity-map-panel {
    padding-inline: 20px;
  }
}

@media (max-width: 767px) {
  .record-transition-panel {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 20px;
    padding: 22px 18px;
    box-shadow: 8px 8px 0 rgba(25, 68, 58, 0.72);
  }

  .record-transition-copy strong,
  .record-transition-copy b {
    font-size: clamp(24px, 7.5vw, 32px);
  }

  /* The final desktop archive grid is declared after the earlier responsive
     layer, so restate the one-column tool rail here. Without this override the
     520px filter track expands the document and leaves a large dark gutter in
     mobile Safari. */
  .collection-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .collection-tools {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-tools > *,
  .filter-chips {
    min-width: 0;
    max-width: 100%;
  }

  .filter-chips {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .hero-actions > :first-child {
    grid-column: auto;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 50px;
  }

  .record-card-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-card-grid--collection {
    gap: 14px;
    padding: 28px 16px 76px;
  }

  .record-summary-card {
    padding: 11px 11px 15px;
  }

  .record-summary-card-copy h2 {
    font-size: 16px;
  }

  .activity-backdrop {
    padding: 10px;
  }

  .activity-dialog {
    display: block;
    max-height: inherit;
    scrollbar-gutter: auto;
  }

  .activity-dialog-shell {
    max-height: calc(100dvh - 20px);
  }

  .activity-dialog-shell > .modal-close {
    top: 10px;
    right: 10px;
  }

  .activity-dialog-copy {
    padding: 42px 20px 30px;
  }

  .activity-dialog-copy .eyebrow {
    max-width: calc(100% - 42px);
  }

  .activity-dialog-copy h2 {
    max-width: 18ch;
    font-size: clamp(33px, 9vw, 48px);
  }

  .activity-map-panel {
    min-height: auto;
    padding: 24px 20px 28px;
  }

  .activity-location-card {
    flex: none;
  }
}

@media (max-width: 599px) {
  .record-card-grid--collection {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .record-card-grid {
    gap: 16px;
    margin-top: 30px;
  }

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

  .record-card-grid--collection {
    margin-top: 0;
    padding-inline: 14px;
  }

  .record-summary-card {
    padding: 14px 14px 18px;
  }

  .record-summary-card-copy h2,
  .record-summary-card-copy p {
    min-height: 0;
  }

  .record-summary-card-copy h2 {
    font-size: 19px;
  }

  .record-summary-card-copy p {
    font-size: 13px;
  }

  .home-records-action {
    justify-content: stretch;
    margin-top: 22px;
  }

  .home-records-action .button {
    width: 100%;
  }

  .activity-backdrop {
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }

  .activity-dialog-shell {
    max-height: calc(100dvh - 12px);
  }

  .activity-dialog-shell > .modal-close {
    top: 8px;
    right: 8px;
  }

  .activity-dialog-copy {
    padding: 36px 16px 25px;
  }

  .activity-dialog-copy::before {
    width: 36px;
    margin-bottom: 18px;
  }

  .activity-dialog-copy h2 {
    margin-bottom: 24px;
    font-size: clamp(30px, 10vw, 40px);
  }

  .activity-dialog-meta > div {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
  }

  .activity-dialog-overview h3 {
    font-size: 24px;
  }

  .activity-map-panel {
    padding: 20px 16px 24px;
  }

  .activity-location-copy {
    padding: 16px;
  }

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

  .activity-location-copy-button {
    grid-column: auto;
  }

  .activity-map-picker-backdrop {
    padding: 12px;
  }

  .activity-map-picker {
    padding: 28px 20px 22px;
    box-shadow: 8px 8px 0 rgba(25, 68, 58, 0.9);
  }

  .activity-map-picker-close {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 359px) {
  .activity-dialog-copy {
    padding-inline: 14px;
  }

  .activity-dialog-copy h2 {
    font-size: 29px;
  }

  .activity-dialog-meta > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .activity-map-panel {
    padding-inline: 14px;
  }

  .activity-map-picker-backdrop {
    padding: 8px;
  }

  .activity-map-picker {
    width: 100%;
    max-height: calc(100dvh - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .record-transition-overlay,
  .record-transition-panel,
  .record-transition-disc,
  .site-menu-popover {
    animation: none !important;
  }

  .site-menu-toggle,
  .site-menu-toggle-icon i {
    transition: none !important;
  }

  .record-summary-card,
  .record-summary-card::before,
  .record-summary-card .cover-frame img,
  .activity-dialog,
  .activity-dialog-shell > .modal-close,
  .activity-map-panel .button {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .record-summary-card:hover,
  .record-summary-card:focus-within {
    transform: none !important;
  }
}

/* Intrinsic responsive fallback
   Some in-app browsers report a desktop-like viewport while mounting the site
   inside a much narrower content column. These rules wrap against the app's
   actual available width and do not depend on media or container queries. */
#root,
.prototype-app,
.prototype-app #main-content,
.prototype-app #main-content > main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#root,
.prototype-app {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  #root,
  .prototype-app {
    overflow-x: clip;
  }
}

.prototype-app {
  --page: 16px;
}

@supports (width: 1cqw) {
  .prototype-app .site-header,
  .prototype-app #main-content,
  .prototype-app .site-footer {
    --page: max(16px, calc((100cqw - 1200px) / 2));
  }
}

.prototype-app :where(h1, h2, h3, p, address, dt, dd, label, button, a) {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  word-break: normal;
  overflow-wrap: break-word;
}

.prototype-app :where(.site-header, .brand-button, .hero-copy, .hero-visual, .collection-tools, .question-column, .card-controls) {
  min-width: 0;
  max-width: 100%;
}

.brand-button {
  min-width: 0;
  flex: 1 1 auto;
}

.brand-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-menu {
  flex: 0 0 auto;
}

.prototype-app .hero-section {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(44px, 6%, 88px);
  padding-inline: var(--page);
}

.prototype-app .hero-copy,
.prototype-app .hero-visual {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.prototype-app .hero-record,
.prototype-app .hero-visual .hero-record {
  width: min(84%, 420px);
  max-width: 100%;
}

.prototype-app .hero-subtitle {
  word-break: normal;
  overflow-wrap: anywhere;
}

.prototype-app .hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.prototype-app .hero-actions > :first-child {
  grid-column: auto;
}

.prototype-app .rule-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.prototype-app .collection-tools {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.prototype-app .collection-tools > *,
.prototype-app .filter-chips,
.prototype-app .result-count {
  min-width: 0;
  max-width: 100%;
}

.prototype-app .result-count {
  white-space: normal;
}

.prototype-app .record-card-grid--featured {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.prototype-app .record-card-grid--collection {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.prototype-app .rules-title {
  display: flex;
  flex-wrap: wrap;
}

.prototype-app .rules-title > span {
  flex: 0 0 auto;
}

.prototype-app .rules-title h2 {
  min-width: 0;
  flex: 1 1 240px;
}

.prototype-app .rules-title p {
  flex: 1 1 100%;
}

.prototype-app .rules-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.prototype-app .name-field small {
  flex-wrap: wrap;
  gap: 4px 12px;
}

.prototype-app .name-preview {
  padding: 20px;
}

.prototype-app .name-preview::after {
  opacity: 0.28;
}

.prototype-app .ready-page {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(36px, 6%, 80px);
  padding-inline: var(--page);
}

.prototype-app .ready-copy {
  min-width: 0;
}

.prototype-app .ready-record {
  width: min(84%, 420px);
  max-width: 100%;
}

.prototype-app .quiz-layout {
  display: flex;
  flex-wrap: wrap;
}

.prototype-app .question-column {
  min-width: 0;
  flex: 1 1 560px;
}

.prototype-app .quiz-layout > .answer-sheet {
  min-width: min(100%, 280px);
  flex: 0 1 320px;
}

.prototype-app .module-row {
  display: flex;
  flex-wrap: wrap;
}

.prototype-app .module-row > div:first-child,
.prototype-app .module-track {
  min-width: 0;
  flex: 1 1 220px;
}

.prototype-app .module-row > small {
  flex: 0 0 54px;
}

.prototype-app .result-meta span {
  min-width: min(100%, 170px);
  flex: 1 1 170px;
}

.prototype-app :where(.shared-device-panel, .review-summary, .review-head) {
  flex-wrap: wrap;
}

.prototype-app .review-options > div {
  grid-template-columns: 26px minmax(0, 1fr) auto;
}

.prototype-app .card-layout {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.prototype-app .activity-dialog {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.prototype-app .site-footer {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.prototype-app .site-menu-popover {
  width: min(220px, calc(100vw - 32px));
}

/* Older WebViews can understand grid but not container-relative font units.
   Give them readable, bounded type instead of viewport-sized headlines. */
.prototype-app .hero-copy h1 {
  font-size: 58px;
}

.prototype-app .hero-subtitle {
  font-size: 22px;
}

.prototype-app .page-intro h1 {
  font-size: 58px;
}

.prototype-app .section-heading h2 {
  font-size: 38px;
}

.prototype-app .activity-dialog-copy h2 {
  font-size: 36px;
}

.prototype-app .record-archive-intro h2 {
  font-size: 38px;
}

.prototype-app .ready-copy h1 {
  font-size: 48px;
}

.prototype-app .score-disc span {
  font-size: 120px;
}

@supports (font-size: 1cqi) {
  .prototype-app .hero-record,
  .prototype-app .hero-visual .hero-record {
    width: min(92%, 530px);
  }

  .prototype-app .hero-copy h1 {
    font-size: clamp(58px, 8.3cqi, 122px);
  }

  .prototype-app .hero-subtitle {
    font-size: clamp(22px, 2.25cqi, 34px);
  }

  .prototype-app .page-intro h1 {
    font-size: clamp(58px, 7.7cqi, 104px);
  }

  .prototype-app .section-heading h2 {
    font-size: clamp(38px, 4.4cqi, 64px);
  }

  .prototype-app .activity-dialog-copy h2 {
    font-size: clamp(36px, 4.6cqi, 62px);
  }

  .prototype-app .record-archive-intro h2 {
    font-size: clamp(38px, 5cqi, 66px);
  }

  .prototype-app .ready-copy h1 {
    font-size: clamp(48px, 6cqi, 80px);
  }

  .prototype-app .score-disc span {
    font-size: clamp(120px, 22cqi, 300px);
  }

  .prototype-app .site-menu-popover {
    width: min(330px, calc(100cqw - 32px));
    max-width: calc(100cqw - 32px);
  }
}

/* Flexbox is the compatibility fallback for engines that predate CSS min()
   inside grid tracks. It still wraps against the real host width. */
@supports not (grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr))) {
  .prototype-app .hero-section,
  .prototype-app .ready-page,
  .prototype-app .hero-actions,
  .prototype-app .rule-strip,
  .prototype-app .collection-tools,
  .prototype-app .record-card-grid,
  .prototype-app .rules-grid,
  .prototype-app .card-layout,
  .prototype-app .activity-dialog,
  .prototype-app .site-footer {
    display: flex;
    flex-wrap: wrap;
  }

  .prototype-app .hero-copy,
  .prototype-app .hero-visual,
  .prototype-app .ready-record,
  .prototype-app .ready-copy {
    flex: 1 1 420px;
  }

  .prototype-app .hero-actions > *,
  .prototype-app .rule-strip > * {
    flex: 1 1 180px;
  }

  .prototype-app .collection-tools > * {
    flex: 1 1 260px;
  }

  .prototype-app .record-card-grid--featured > .record-summary-card {
    flex: 1 1 190px;
  }

  .prototype-app .record-card-grid--collection > .record-summary-card,
  .prototype-app .rules-grid > * {
    flex: 1 1 300px;
  }

  .prototype-app .score-card-preview,
  .prototype-app .card-controls,
  .prototype-app .activity-dialog-copy,
  .prototype-app .activity-map-panel,
  .prototype-app .site-footer > * {
    flex: 1 1 340px;
  }
}

/* Legacy WebView baseline
   Flexbox is the unconditional layout. JavaScript tags the app by its rendered
   width, so embedded browsers remain responsive even when their viewport or
   media-query implementation reports the wrong size. */
.prototype-app .hero-section,
.prototype-app .ready-page,
.prototype-app .hero-actions,
.prototype-app .rule-strip,
.prototype-app .collection-tools,
.prototype-app .record-card-grid,
.prototype-app .rules-grid,
.prototype-app .card-layout,
.prototype-app .activity-dialog,
.prototype-app .site-footer {
  display: flex;
  flex-wrap: wrap;
}

.prototype-app .hero-copy,
.prototype-app .hero-visual,
.prototype-app .ready-record,
.prototype-app .ready-copy {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 100%;
}

.prototype-app .hero-actions > *,
.prototype-app .rule-strip > * {
  flex: 1 1 180px;
  min-width: 0;
}

.prototype-app .collection-tools > * {
  flex: 1 1 260px;
  min-width: 0;
}

.prototype-app .record-card-grid--featured > .record-summary-card {
  flex: 1 1 190px;
  min-width: 0;
}

.prototype-app .record-card-grid--collection > .record-summary-card,
.prototype-app .rules-grid > * {
  flex: 1 1 300px;
  min-width: 0;
}

.prototype-app .score-card-preview,
.prototype-app .card-controls,
.prototype-app .activity-dialog-copy,
.prototype-app .activity-map-panel,
.prototype-app .site-footer > * {
  flex: 1 1 340px;
  min-width: 0;
  max-width: 100%;
}

.prototype-app[data-layout="compact"] .hero-actions > *,
.prototype-app[data-layout="compact"] .collection-tools > *,
.prototype-app[data-layout="compact"] .rules-grid > *,
.prototype-app[data-layout="compact"] .score-card-preview,
.prototype-app[data-layout="compact"] .card-controls,
.prototype-app[data-layout="compact"] .activity-dialog-copy,
.prototype-app[data-layout="compact"] .activity-map-panel,
.prototype-app[data-layout="compact"] .site-footer > *,
.prototype-app[data-layout="narrow"] .hero-actions > *,
.prototype-app[data-layout="narrow"] .collection-tools > *,
.prototype-app[data-layout="narrow"] .rules-grid > *,
.prototype-app[data-layout="narrow"] .score-card-preview,
.prototype-app[data-layout="narrow"] .card-controls,
.prototype-app[data-layout="narrow"] .activity-dialog-copy,
.prototype-app[data-layout="narrow"] .activity-map-panel,
.prototype-app[data-layout="narrow"] .site-footer > * {
  flex-basis: 100%;
  width: 100%;
}

.prototype-app[data-layout="compact"] .record-card-grid--featured > .record-summary-card,
.prototype-app[data-layout="compact"] .record-card-grid--collection > .record-summary-card {
  flex-basis: calc(50% - 12px);
}

.prototype-app[data-layout="narrow"] .record-card-grid--featured > .record-summary-card,
.prototype-app[data-layout="narrow"] .record-card-grid--collection > .record-summary-card {
  flex-basis: 100%;
  width: 100%;
}

.prototype-app[data-layout="compact"] .quiz-layout,
.prototype-app[data-layout="narrow"] .quiz-layout {
  display: block;
  padding-bottom: 86px;
}

.prototype-app[data-layout="compact"] .quiz-layout > .answer-sheet,
.prototype-app[data-layout="narrow"] .quiz-layout > .answer-sheet {
  display: none;
}

.prototype-app[data-layout="compact"] .answer-sheet-trigger,
.prototype-app[data-layout="narrow"] .answer-sheet-trigger {
  display: inline-flex;
}

.prototype-app[data-layout="compact"] .quiz-navigation,
.prototype-app[data-layout="narrow"] .quiz-navigation {
  position: fixed;
  right: 10px;
  bottom: 12px;
  left: 10px;
  z-index: 55;
  width: auto;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(21, 18, 16, 0.18);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(21, 18, 16, 0.18);
}

.prototype-app[data-layout="compact"] .record-archive-backdrop,
.prototype-app[data-layout="narrow"] .record-archive-backdrop {
  padding: 12px;
}

.prototype-app[data-layout="compact"] .record-modal.record-archive,
.prototype-app[data-layout="narrow"] .record-modal.record-archive {
  display: block;
}

.prototype-app[data-layout="compact"] .record-archive-cover,
.prototype-app[data-layout="narrow"] .record-archive-cover {
  position: static;
  width: calc(100% - 48px);
  max-width: 280px;
  margin: 24px auto 28px;
  transform: none;
}

.prototype-app[data-layout="compact"] .record-archive-content,
.prototype-app[data-layout="narrow"] .record-archive-content {
  width: 100%;
}

.prototype-app[data-layout="compact"] .record-archive-intro,
.prototype-app[data-layout="narrow"] .record-archive-intro {
  padding: 32px 20px 26px;
}

.prototype-app[data-layout="compact"] .record-archive-body,
.prototype-app[data-layout="narrow"] .record-archive-body {
  display: block;
  padding: 0 20px 34px;
}

.prototype-app[data-layout="compact"] .record-archive-cta,
.prototype-app[data-layout="narrow"] .record-archive-cta {
  align-items: stretch;
  flex-direction: column;
}

.prototype-app[data-layout="compact"] .activity-dialog,
.prototype-app[data-layout="narrow"] .activity-dialog {
  display: block;
  width: 100%;
}

.prototype-app[data-layout="compact"] .activity-dialog-copy,
.prototype-app[data-layout="narrow"] .activity-dialog-copy {
  padding: 38px 20px 28px;
}

.prototype-app[data-layout="compact"] .activity-map-panel,
.prototype-app[data-layout="narrow"] .activity-map-panel {
  min-height: auto;
  padding: 24px 20px 28px;
}

.prototype-app[data-layout="compact"] .site-menu-popover,
.prototype-app[data-layout="narrow"] .site-menu-popover {
  width: 220px;
  max-width: 220px;
}

@supports (bottom: max(12px, env(safe-area-inset-bottom))) {
  .prototype-app[data-layout="compact"] .quiz-navigation,
  .prototype-app[data-layout="narrow"] .quiz-navigation {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
  }
}

/* Homepage editorial line-wrap polish
   Use full-character measures for Chinese copy instead of `ch`, which is
   derived from the width of the Latin zero and causes premature wrapping. */
.prototype-app .home-section .section-heading {
  width: min(100%, 1040px);
  max-width: 1040px;
}

.prototype-app .home-section .section-heading h2 {
  max-width: none;
  text-wrap: balance;
}

.prototype-app .home-section .section-heading > p:last-child {
  max-width: 52em;
  text-wrap: pretty;
}

.prototype-app .lake-section h2 {
  max-width: min(100%, 12em);
  text-wrap: balance;
}

.prototype-app .lake-section > p:last-child {
  max-width: 48em;
  line-height: 1.75;
  text-wrap: pretty;
}

/* The rendered app width is more reliable than the outer viewport inside
   embedded mobile browsers. Keep this short subtitle intact at both compact
   sizes, with a conservative pixel fallback for older WebViews. */
.prototype-app[data-layout="compact"] .hero-subtitle,
.prototype-app[data-layout="narrow"] .hero-subtitle {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.prototype-app[data-layout="compact"] .home-section .section-heading h2,
.prototype-app[data-layout="narrow"] .home-section .section-heading h2 {
  text-wrap: wrap;
}

.prototype-app[data-layout="compact"] .lake-section h2,
.prototype-app[data-layout="narrow"] .lake-section h2 {
  font-size: 32px;
  line-height: 1.06;
}

.prototype-app[data-layout="compact"] .lake-section h2 br,
.prototype-app[data-layout="narrow"] .lake-section h2 br {
  display: none;
}

@supports (font-size: 1cqi) {
  .prototype-app[data-layout="compact"] .hero-subtitle,
  .prototype-app[data-layout="narrow"] .hero-subtitle {
    font-size: clamp(13px, 4cqi, 17px);
  }
}
