/* FdPhotoChallenge R3 — public UI components (scoped) */

/* —— Page shell / hide gallery jumbotron context —— */
body.fdch-page .jumbotron {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}
body.fdch-page #content.content-grid {
  padding-top: 0.5rem;
}
body.fdch-page .fd-global-nav__link--galleries:not([aria-current="page"]) {
  box-shadow: none;
  border-color: transparent;
  background: transparent;
}
body.fdch-page.fdch-page--play #theFooter,
body.fdch-page.fdch-page--play .footer,
body.fdch-page.fdch-page--play footer {
  margin-top: 2.5rem;
}
body.fdch-page .fd-consent,
body.fdch-page [class*="fd-manage-cookies"],
body.fdch-page #fd-audience,
body.fdch-page .fd-info-banner {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fdch-shell {
  --fdch-ink: var(--fdgm-ink, #1a1917);
  --fdch-muted: var(--fdgm-muted, #6a655c);
  --fdch-accent: var(--fdgm-accent, #7a6548);
  --fdch-accent-soft: var(--fdgm-accent-soft, rgba(122, 101, 72, 0.12));
  --fdch-paper: var(--fdgm-paper, #f6f3ee);
  --fdch-line: var(--fdgm-line, rgba(26, 25, 23, 0.1));
  --fdch-ok: #2f6b3a;
  --fdch-ok-bg: rgba(47, 107, 58, 0.12);
  --fdch-ko: #8a3b2a;
  --fdch-ko-bg: rgba(138, 59, 42, 0.12);
  --fdch-radius: var(--fdgm-radius, 8px);
  --fdch-shadow: var(--fdgm-shadow, 0 12px 40px rgba(26, 25, 23, 0.1));
  --fdch-font-sans: var(--fdgm-font-sans, "DM Sans", "Segoe UI", sans-serif);
  --fdch-font-serif: var(--fdgm-font-serif, "Cormorant Garamond", Georgia, serif);
  --fdch-focus: var(--fdgm-focus, 0 0 0 3px rgba(122, 101, 72, 0.35));
  max-width: 1120px;
  margin: 0.75rem auto 3.5rem;
  padding: 0 1.25rem 2.5rem;
  color: var(--fdch-ink);
  font-family: var(--fdch-font-sans);
}
.fdch-shell--play { max-width: 1240px; }

.fdch-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fdch-muted);
}
.fdch-title {
  margin: 0 0 0.55rem;
  font-family: var(--fdch-font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.12;
  color: var(--fdch-ink);
}
.fdch-h2 {
  font-family: var(--fdch-font-serif);
  font-weight: 500;
  font-size: 1.45rem;
  margin: 0 0 0.85rem;
  color: var(--fdch-ink);
}
.fdch-h3 { font-size: 1.1rem; margin: 1.25rem 0 0.65rem; color: var(--fdch-ink); }
.fdch-lead { margin: 0 0 1rem; color: var(--fdch-muted); line-height: 1.55; max-width: 40rem; }
.fdch-phase {
  margin: 0 0 1rem;
  padding: 0.75rem 0.95rem;
  background: var(--fdch-accent-soft);
  border-radius: var(--fdch-radius);
}
.fdch-block { margin: 1.75rem 0; }
.fdch-meta, .fdch-note { color: var(--fdch-muted); font-size: 0.92rem; }
.fdch-empty { color: var(--fdch-muted); padding: 1.5rem 0; }

/* —— Buttons (never browser-default blue) —— */
.fdch-btn,
a.fdch-btn,
a.fdch-btn:link,
a.fdch-btn:visited,
button.fdch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: var(--fdch-radius);
  border: 1px solid var(--fdch-accent);
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.fdch-btn--primary,
a.fdch-btn--primary,
a.fdch-btn--primary:link,
a.fdch-btn--primary:visited {
  background: var(--fdch-accent);
  color: #fff !important;
  border-color: var(--fdch-accent);
}
.fdch-btn--primary:hover,
a.fdch-btn--primary:hover {
  background: #69563c;
  border-color: #69563c;
  color: #fff !important;
}
.fdch-btn--secondary,
a.fdch-btn--secondary,
a.fdch-btn--secondary:link,
a.fdch-btn--secondary:visited {
  background: var(--fdch-paper);
  color: var(--fdch-ink) !important;
  border-color: var(--fdch-line);
}
.fdch-btn--secondary:hover,
a.fdch-btn--secondary:hover {
  border-color: var(--fdch-accent);
  color: var(--fdch-ink) !important;
}
.fdch-btn--ghost,
a.fdch-btn--ghost,
a.fdch-btn--ghost:link,
a.fdch-btn--ghost:visited {
  background: transparent;
  color: var(--fdch-ink) !important;
  border-color: var(--fdch-line);
}
.fdch-btn--ghost:hover,
a.fdch-btn--ghost:hover {
  border-color: var(--fdch-accent);
  color: var(--fdch-ink) !important;
}
.fdch-btn--danger,
a.fdch-btn--danger,
a.fdch-btn--danger:link,
a.fdch-btn--danger:visited {
  background: transparent;
  color: var(--fdch-ko) !important;
  border-color: rgba(138, 59, 42, 0.35);
}
.fdch-btn:focus-visible,
a.fdch-btn:focus-visible {
  outline: none;
  box-shadow: var(--fdch-focus);
}
.fdch-btn:active { transform: translateY(1px); }
.fdch-btn:disabled,
.fdch-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.fdch-btn.is-loading { opacity: 0.7; cursor: wait; }

/* —— Hub —— */
.fdch-hub-hero {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--fdch-line);
  margin-bottom: 1.5rem;
}
.fdch-hub-hero__mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--fdch-line);
  display: grid;
  place-items: center;
  color: var(--fdch-accent);
  font-family: var(--fdch-font-serif);
  font-size: 1.1rem;
}
.fdch-hub-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}
.fdch-hub-steps__item {
  background: var(--fdch-paper);
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  padding: 0.9rem 1rem;
}
.fdch-hub-steps__n {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fdch-accent);
  margin-bottom: 0.35rem;
}
.fdch-hub-steps__t { margin: 0; font-weight: 600; color: var(--fdch-ink); }

.fdch-hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fdch-hub-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  box-shadow: var(--fdch-shadow);
  overflow: hidden;
  min-height: 100%;
}
.fdch-hub-card__media {
  aspect-ratio: 16 / 10;
  background: #1a1917;
  overflow: hidden;
}
.fdch-hub-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fdch-hub-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
}
.fdch-hub-card__name {
  margin: 0;
  font-family: var(--fdch-font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--fdch-ink);
}
.fdch-hub-card__intro {
  margin: 0;
  color: var(--fdch-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  flex: 1;
}
.fdch-hub-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--fdch-muted);
}
.fdch-hub-card__levels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fdch-hub-card__levels li {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--fdch-accent-soft);
  color: var(--fdch-ink);
}
.fdch-hub-card .fdch-btn { align-self: flex-start; margin-top: 0.35rem; }

.fdch-lb-mini { list-style: none; margin: 0 0 0.85rem; padding: 0; }
.fdch-lb-mini li { padding: 0.4rem 0; border-bottom: 1px solid var(--fdch-line); }
.fdch-lb-mini__rank { display: inline-block; min-width: 1.5rem; color: var(--fdch-muted); }

/* —— Collection levels —— */
.fdch-collection-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.7fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.fdch-collection-head__cover {
  border-radius: var(--fdch-radius);
  overflow: hidden;
  background: #111;
  box-shadow: var(--fdch-shadow);
}
.fdch-collection-head__cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
}
.fdch-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.fdch-level-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  box-shadow: var(--fdch-shadow);
}
.fdch-level-card.is-default { border-color: var(--fdch-accent); }
.fdch-level-card__name {
  margin: 0;
  font-family: var(--fdch-font-serif);
  font-size: 1.35rem;
  color: var(--fdch-ink);
}
.fdch-level-card__blurb { margin: 0; color: var(--fdch-muted); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.fdch-level-card__q { margin: 0; font-size: 0.85rem; color: var(--fdch-ink); font-weight: 600; }
.fdch-level-card__fields {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.fdch-level-card__fields li {
  font-size: 0.75rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--fdch-paper);
  border: 1px solid var(--fdch-line);
}
.fdch-level-card .fdch-btn { margin-top: 0.35rem; width: 100%; }

/* —— Game board —— */
.fdch-game {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.fdch-game__photo {
  background: #111;
  border-radius: var(--fdch-radius);
  overflow: hidden;
  box-shadow: var(--fdch-shadow);
}
.fdch-game__photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
}
.fdch-game__panel {
  background: #fff;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  padding: 1.1rem 1.15rem 1.25rem;
  box-shadow: var(--fdch-shadow);
}
.fdch-game__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.fdch-game__level {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fdch-muted);
}
.fdch-timer {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--fdch-paper);
  border: 1px solid var(--fdch-line);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--fdch-ink);
}
.fdch-timer.is-paused { opacity: 0.65; }
.fdch-progress-bar {
  height: 4px;
  background: var(--fdch-line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.fdch-progress-bar__fill {
  height: 100%;
  background: var(--fdch-accent);
  width: 0%;
  transition: width 0.25s ease;
}
.fdch-question {
  font-size: 1.2rem;
  font-weight: 650;
  margin: 0 0 0.85rem;
  color: var(--fdch-ink);
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.fdch-choices {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}
/* Hide decorative legends only — never the playable question (#fdch-question-label). */
.fdch-choices legend:not(.fdch-question):not(#fdch-question-label) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.fdch-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  cursor: pointer;
  background: var(--fdch-paper);
  color: var(--fdch-ink);
  position: relative;
}
.fdch-choice:hover { border-color: var(--fdch-accent); }
.fdch-choice:has(input:focus-visible) { box-shadow: var(--fdch-focus); }
.fdch-choice.is-selected,
.fdch-choice:has(input:checked) {
  border-color: var(--fdch-accent);
  background: var(--fdch-accent-soft);
  box-shadow: inset 3px 0 0 var(--fdch-accent);
}
.fdch-choice.is-correct {
  border-color: var(--fdch-ok);
  background: var(--fdch-ok-bg);
  box-shadow: inset 3px 0 0 var(--fdch-ok);
}
.fdch-choice.is-incorrect {
  border-color: var(--fdch-ko);
  background: var(--fdch-ko-bg);
  box-shadow: inset 3px 0 0 var(--fdch-ko);
}
.fdch-choice.is-locked { cursor: default; pointer-events: none; }
.fdch-choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--fdch-accent); flex-shrink: 0; }
.fdch-choice__mark {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
}
.fdch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  align-items: center;
}
.fdch-actions .fdch-btn--primary { order: 1; }
.fdch-actions .fdch-btn--danger,
.fdch-actions .fdch-btn--ghost { order: 2; }

/* —— Feedback panel —— */
.fdch-feedback-panel {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--fdch-radius);
  border: 1px solid var(--fdch-line);
  background: var(--fdch-paper);
}
.fdch-feedback-panel.is-ok { border-color: rgba(47, 107, 58, 0.35); background: var(--fdch-ok-bg); }
.fdch-feedback-panel.is-ko { border-color: rgba(138, 59, 42, 0.35); background: var(--fdch-ko-bg); }
.fdch-feedback-panel__title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fdch-ink);
}
.fdch-feedback-panel__line { margin: 0.25rem 0; color: var(--fdch-ink); font-size: 0.95rem; }
.fdch-feedback-panel__remember {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--fdch-line);
}
.fdch-feedback-panel__remember h3 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fdch-muted);
}
.fdch-feedback-panel__remember p {
  margin: 0;
  color: var(--fdch-ink);
  line-height: 1.5;
  font-size: 0.92rem;
}

/* —— Result screen —— */
.fdch-result-hero { margin-bottom: 1.25rem; }
.fdch-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.35rem;
}
.fdch-stats > div {
  background: #fff;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  padding: 0.85rem 0.95rem;
  box-shadow: var(--fdch-shadow);
}
.fdch-stats dt { color: var(--fdch-muted); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.fdch-stats dd { margin: 0.25rem 0 0; font-size: 1.35rem; font-weight: 600; color: var(--fdch-ink); }

.fdch-publish {
  margin: 1.25rem 0;
  padding: 1.1rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  background: var(--fdch-paper);
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
}
.fdch-publish label { font-weight: 500; color: var(--fdch-ink); }
.fdch-publish input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  font: inherit;
  color: var(--fdch-ink);
  background: #fff;
  box-sizing: border-box;
}
.fdch-publish__hint { margin: 0; font-size: 0.85rem; color: var(--fdch-muted); }

.fdch-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.fdch-settings-grid li,
.fdch-settings-grid__item {
  background: #fff;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  padding: 0.85rem 0.95rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.fdch-settings-grid__item--wide {
  grid-column: 1 / -1;
}
.fdch-settings-grid__k {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fdch-muted);
  line-height: 1.3;
}
.fdch-settings-grid__v {
  font-weight: 600;
  color: var(--fdch-ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
@media (min-width: 720px) {
  .fdch-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fdch-settings-grid__item--wide {
    grid-column: span 3;
  }
}
@media (min-width: 1100px) {
  .fdch-settings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .fdch-settings-grid__item--wide {
    grid-column: span 2;
  }
}
@media (prefers-color-scheme: dark) {
  .fdch-settings-grid li,
  .fdch-settings-grid__item {
    background: #1c1c1c;
    border-color: #3a3a3a;
  }
  .fdch-settings-grid__v { color: #f2f2f2; }
}

.fdch-answer-review {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.fdch-answer-review__item {
  background: #fff;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  padding: 0.95rem 1rem;
}
.fdch-answer-review__item.is-ok { border-left: 3px solid var(--fdch-ok); }
.fdch-answer-review__item.is-ko { border-left: 3px solid var(--fdch-ko); }
.fdch-answer-review__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.fdch-answer-review__field { font-weight: 600; color: var(--fdch-ink); }
.fdch-answer-review__state { font-size: 0.85rem; font-weight: 600; }
.fdch-answer-review__item.is-ok .fdch-answer-review__state { color: var(--fdch-ok); }
.fdch-answer-review__item.is-ko .fdch-answer-review__state { color: var(--fdch-ko); }
.fdch-answer-review__line { margin: 0.2rem 0; font-size: 0.92rem; color: var(--fdch-ink); }
.fdch-answer-review__edu { margin: 0.55rem 0 0; color: var(--fdch-muted); font-size: 0.88rem; line-height: 1.45; }

.fdch-periods { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.fdch-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.fdch-table th, .fdch-table td { padding: 0.6rem 0.45rem; border-bottom: 1px solid var(--fdch-line); text-align: left; color: var(--fdch-ink); }

.fdch-picture-cta {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  background: var(--fdch-paper);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.fdch-picture-cta__title { width: 100%; margin: 0; font-weight: 600; color: var(--fdch-ink); }
.fdch-picture-cta__note { width: 100%; margin: 0; font-size: 0.85rem; color: var(--fdch-muted); }
.fdch-picture-cta__exif { width: 100%; }
.fdch-error { padding: 0.85rem; background: #f8e8e4; border-radius: var(--fdch-radius); color: #6a2a1c; }
.fdch-loading { padding: 2.5rem 1rem; text-align: center; color: var(--fdch-muted); }

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

@media (max-width: 900px) {
  .fdch-hub-steps { grid-template-columns: 1fr; }
  .fdch-collection-head { grid-template-columns: 1fr; }
  .fdch-level-grid { grid-template-columns: 1fr; }
  .fdch-game { grid-template-columns: 1fr; }
  .fdch-game__photo img { max-height: 48vh; }
}
@media (max-width: 420px) {
  .fdch-shell { padding-left: 0.85rem; padding-right: 0.85rem; }
  .fdch-actions { flex-direction: column; align-items: stretch; }
  .fdch-actions .fdch-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .fdch-shell *, .fdch-btn, .fdch-progress-bar__fill {
    transition: none !important;
    animation: none !important;
  }
}


/* R4 — pedagogy cue + level pills */
.fdch-cue {
  margin: 0.55rem 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(92, 83, 70, 0.08);
  border: 1px solid rgba(92, 83, 70, 0.14);
}
.fdch-cue__label {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fdch-muted);
  font-weight: 650;
}
.fdch-cue__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--fdch-ink);
}
.fdch-choice-meta { font-size: 0.8rem; margin: 0.15rem 0 0.35rem; }
.fdch-level-card__pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.fdch-level-card__pills li {
  margin: 0;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(44, 42, 38, 0.06);
  font-size: 0.78rem;
  color: var(--fdch-ink);
}
.fdch-picture-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
}
.fdch-picture-cta__note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.85rem;
  color: var(--fdch-muted);
}

/* —— R6A Daily Challenge —— */
.fdch-daily-hero { margin-bottom: 1.25rem; }
.fdch-daily-streak {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fdch-ink);
}
.fdch-daily-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.fdch-daily-intro {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--fdch-radius);
  background: var(--fdch-accent-soft);
  text-align: center;
}
.fdch-daily-intro #fdch-daily-intro-text { margin: 0 0 0.75rem; color: var(--fdch-ink); }

.fdch-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(44, 42, 38, 0.08);
  color: var(--fdch-ink);
}
.fdch-badge--live { background: var(--fdch-ok-bg); color: var(--fdch-ok); }

.fdch-history-list { list-style: none; margin: 0; padding: 0; }
.fdch-history-item {
  border-bottom: 1px solid var(--fdch-line);
}
.fdch-history-item a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0;
  color: var(--fdch-ink);
  text-decoration: none;
}
.fdch-history-item a:hover { color: var(--fdch-accent); }
.fdch-history-date { font-weight: 600; min-width: 9rem; }
.fdch-history-collection { color: var(--fdch-muted); }

.fdch-share-block {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--fdch-radius);
  border: 1px solid var(--fdch-line);
}
.fdch-share-block .fdch-check {
  display: block;
  margin: 0.35rem 0;
  font-weight: 500;
}
.fdch-share-block input[type="text"] {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 0.35rem 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  font-family: inherit;
}
.fdch-share-result { margin-top: 0.75rem; }
.fdch-share-preview-wrap {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px dashed var(--fdch-line);
  border-radius: var(--fdch-radius);
  background: rgba(0, 0, 0, 0.12);
  min-height: 8rem;
}
.fdch-share-preview-wrap[data-empty="0"] {
  border-style: solid;
  background: transparent;
}
.fdch-share-preview-hint {
  margin: 0;
  color: var(--fdch-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.fdch-share-card {
  display: block;
  width: 100%;
  max-width: 36rem;
  height: auto;
  border-radius: var(--fdch-radius);
  margin: 0 auto;
}
.fdch-share-url-fallback {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0.5rem 0 0.25rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.fdch-shell--share { max-width: 640px; text-align: center; }
.fdch-share-card {
  width: 100%;
  max-width: 600px;
  border-radius: var(--fdch-radius);
  box-shadow: var(--fdch-shadow);
  margin: 1rem 0;
}

/* —— R6B a11y / responsive —— */
.fdch-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.fdch-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fdch-choices .fdch-choice,
.fdch-choices button,
.fdch-choices label {
  min-height: 44px;
}
.fdch-daily-date {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.fdch-daily-countdown {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.95rem;
  color: var(--fdch-muted);
}
.fdch-daily-teaser {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--fdch-radius);
  background: var(--fdch-accent-soft);
  border: 1px solid var(--fdch-line);
}
.fdch-daily-teaser .fdch-btn { margin-top: 0.75rem; }
.fdch-timer__visual { font-variant-numeric: tabular-nums; }

@media (max-width: 768px) {
  .fdch-shell { padding: 0 0.85rem 2rem; margin-top: 0.35rem; }
  .fdch-game {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }
  .fdch-game__photo img {
    width: 100%;
    height: auto;
    max-height: 42vh;
    object-fit: contain;
  }
  .fdch-daily-nav { gap: 0.4rem; }
  .fdch-daily-nav .fdch-btn { flex: 1 1 auto; }
  .fdch-history-date { min-width: 0; width: 100%; }
  .fdch-share-block input[type="text"] { max-width: 100%; }
  body.fdch-page { overflow-x: hidden; }
}

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

@media (prefers-color-scheme: dark) {
  body.fdch-page .fdch-shell {
    --fdch-ink: #f2efe8;
    --fdch-muted: #b0a99c;
    --fdch-paper: #1c1b19;
    --fdch-line: rgba(242, 239, 232, 0.14);
  }
}

.fdch-btn:focus-visible,
.fdch-choices button:focus-visible,
.fdch-choices label:focus-visible,
a.fdch-btn:focus-visible {
  outline: none;
  box-shadow: var(--fdch-focus);
}

/* R7A — Photo Comparison */
.fdch-comparison-teaser { margin-top: 1.5rem; }

/* R7I — landing / level cards / leaderboard polish */
.fdch-cmp-intro {
  max-width: 52rem;
  margin: 0 auto;
}
.fdch-cmp-hero {
  margin-bottom: 1.75rem;
  padding: 1.35rem 1.35rem 1.5rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  background:
    linear-gradient(165deg, rgba(122, 101, 72, 0.10) 0%, transparent 48%),
    var(--fdch-paper);
}
.fdch-cmp-hero__title {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  max-width: 18ch;
}
.fdch-cmp-hero__lead {
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fdch-ink);
}
.fdch-cmp-hero__pedagogy {
  max-width: 42rem;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--fdch-muted);
}

.fdch-cmp-levels {
  border: 0;
  margin: 0 0 1.35rem;
  padding: 0;
}
.fdch-cmp-levels__legend {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fdch-ink);
}
.fdch-cmp-level-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .fdch-cmp-level-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}
.fdch-cmp-level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 11.5rem;
  margin: 0;
  padding: 1rem 1rem 1.05rem 2.55rem;
  border: 1.5px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  background: var(--fdch-paper);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.fdch-cmp-level-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.fdch-cmp-level-card__check {
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--fdch-muted);
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
}
.fdch-cmp-level-card__check::after {
  content: "";
  position: absolute;
  inset: 0.18rem;
  border-radius: 50%;
  background: transparent;
}
.fdch-cmp-level-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.fdch-cmp-level-card__name {
  font-family: var(--fdch-font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--fdch-ink);
  line-height: 1.2;
}
.fdch-cmp-level-card__diff {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fdch-muted);
  white-space: nowrap;
}
.fdch-cmp-level-card__count {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fdch-ink);
}
.fdch-cmp-level-card__desc {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--fdch-muted);
}
.fdch-cmp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.fdch-cmp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--fdch-line);
  border-radius: 999px;
  background: rgba(26, 25, 23, 0.04);
  color: var(--fdch-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}
.fdch-cmp-level-card.is-selected,
.fdch-cmp-level-card:has(input:checked) {
  border-color: var(--fdch-accent);
  box-shadow: 0 0 0 1px var(--fdch-accent), 0 10px 28px rgba(26, 25, 23, 0.08);
  background: linear-gradient(180deg, rgba(122, 101, 72, 0.08), transparent 55%), var(--fdch-paper);
}
.fdch-cmp-level-card.is-selected .fdch-cmp-level-card__check,
.fdch-cmp-level-card:has(input:checked) .fdch-cmp-level-card__check {
  border-color: var(--fdch-accent);
}
.fdch-cmp-level-card.is-selected .fdch-cmp-level-card__check::after,
.fdch-cmp-level-card:has(input:checked) .fdch-cmp-level-card__check::after {
  background: var(--fdch-accent);
}
.fdch-cmp-level-card:hover {
  border-color: rgba(122, 101, 72, 0.55);
}
.fdch-cmp-level-card:focus-within {
  outline: 3px solid #c45c26;
  outline-offset: 3px;
}

.fdch-cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.35rem;
}
.fdch-cmp-actions .fdch-btn {
  min-height: 48px;
}
.fdch-cmp-actions__primary {
  min-width: min(100%, 16rem);
  font-weight: 600;
}
@media (max-width: 767px) {
  .fdch-cmp-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .fdch-cmp-actions .fdch-btn,
  .fdch-cmp-actions__primary {
    width: 100%;
    min-width: 0;
  }
}

/* Leaderboard R7I */
.fdch-cmp-lb {
  max-width: 52rem;
  min-height: calc(100vh - 14rem);
  display: flex;
  flex-direction: column;
}
.fdch-cmp-lb__hero { margin-bottom: 1.25rem; }
.fdch-cmp-lb__title {
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  max-width: 22ch;
}
.fdch-cmp-lb__lead {
  max-width: 38rem;
  color: var(--fdch-ink);
  font-size: 1.02rem;
}
.fdch-cmp-lb__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}
.fdch-cmp-lb__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--fdch-line);
  border-radius: var(--fdch-radius);
  color: var(--fdch-ink) !important;
  text-decoration: none !important;
  background: transparent;
  font-size: 0.92rem;
}
.fdch-cmp-lb__filter:hover {
  border-color: var(--fdch-accent);
}
.fdch-cmp-lb__filter.is-active {
  background: var(--fdch-accent);
  border-color: var(--fdch-accent);
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.fdch-cmp-lb__filter.is-active::after {
  content: "";
  /* selection not color-only: stronger weight via border already + active fill */
}
.fdch-cmp-lb__level { margin: -0.35rem 0 1rem; }
.fdch-cmp-lb-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.5rem 0 1.5rem;
  padding: 1.75rem 1.35rem;
  border: 1px dashed var(--fdch-line);
  border-radius: var(--fdch-radius);
  background: linear-gradient(160deg, rgba(122, 101, 72, 0.07), transparent 55%);
}
.fdch-cmp-lb-empty__icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--fdch-line);
  background: rgba(26, 25, 23, 0.03);
  margin-bottom: 0.25rem;
}
.fdch-cmp-lb-empty__glyph {
  width: 1.35rem;
  height: 1.1rem;
  border: 2px solid var(--fdch-accent);
  border-radius: 2px;
  position: relative;
}
.fdch-cmp-lb-empty__glyph::before,
.fdch-cmp-lb-empty__glyph::after {
  content: "";
  position: absolute;
  left: 0.18rem;
  right: 0.18rem;
  height: 2px;
  background: var(--fdch-accent);
  opacity: 0.75;
}
.fdch-cmp-lb-empty__glyph::before { top: 0.28rem; }
.fdch-cmp-lb-empty__glyph::after { top: 0.58rem; width: 55%; }
.fdch-cmp-lb-empty .fdch-h2 { margin: 0; }
.fdch-cmp-lb-empty .fdch-lead { margin: 0; max-width: 34rem; }
.fdch-cmp-lb-criteria {
  list-style: none;
  margin: 0.35rem 0 0.85rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.fdch-cmp-lb-criteria li {
  margin: 0;
}
.fdch-cmp-lb-criteria__label {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--fdch-line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fdch-ink);
  background: rgba(26, 25, 23, 0.04);
}
.fdch-cmp-lb-empty__actions { margin-top: 0.35rem; }
.fdch-cmp-lb__table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
}
.fdch-cmp-lb__table { min-width: 36rem; }
.fdch-cmp-lb__name {
  max-width: 14rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fdch-cmp-board { margin-top: 1rem; }
.fdch-cmp-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.fdch-cmp-question { font-size: clamp(1.25rem, 2.2vw, 1.75rem); margin: 0.75rem 0 0.35rem; }
.fdch-cmp-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.fdch-cmp-card {
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  background: rgba(0,0,0,.04);
  transition: border-color .15s ease, box-shadow .15s ease;
  min-width: 0;
  max-width: 100%;
}
.fdch-cmp-card.is-selected {
  border-color: var(--fdch-accent, #2a6f6a);
  box-shadow: 0 0 0 1px var(--fdch-accent, #2a6f6a);
}
.fdch-cmp-card:focus-visible {
  outline: none;
  box-shadow: var(--fdch-focus, 0 0 0 3px rgba(42,111,106,.45));
}
.fdch-cmp-frame {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  overflow: hidden;
}
.fdch-cmp-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.fdch-cmp-card figcaption { padding: 0.65rem; }
.fdch-cmp-card .fdch-btn { width: 100%; min-height: 44px; }
.fdch-cmp-validate { margin: 0.75rem 0 1.25rem; }
.fdch-cmp-notions { flex: 1 1 100%; font-size: 0.9rem; color: var(--fdch-muted, #666); }
.fdch-shell.fdch-comparison,
#fdch-comparison {
  max-width: min(1240px, 100%);
  box-sizing: border-box;
  min-width: 0;
}

@media (prefers-color-scheme: dark) {
  .fdch-cmp-hero,
  .fdch-cmp-level-card,
  .fdch-cmp-lb-empty {
    background-color: rgba(255,255,255,0.03);
  }
  .fdch-cmp-badge,
  .fdch-cmp-lb-criteria__label {
    background: rgba(255,255,255,0.06);
  }
}
html.fdch-dark .fdch-cmp-hero,
[data-theme="dark"] .fdch-cmp-hero,
html.fdch-dark .fdch-cmp-level-card,
[data-theme="dark"] .fdch-cmp-level-card,
html.fdch-dark .fdch-cmp-lb-empty,
[data-theme="dark"] .fdch-cmp-lb-empty {
  background-color: rgba(255,255,255,0.03);
}
@media (prefers-reduced-motion: reduce) {
  .fdch-cmp-level-card,
  .fdch-cmp-lb__filter {
    transition: none !important;
  }
}


/*
 * R7G — Root-cause containment of horizontal overflow at ~1024px on FDCH pages.
 * Cause: theme navbar (#navbar-menubar / #identificationDropdown) expands to ~1101px
 * when the collapse is open and nav items do not wrap. Scoped to body.fdch-page only;
 * theme files are not modified. Not a blanket overflow-x:hidden mask.
 */
body.fdch-page .navbar > .container-fluid {
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  box-sizing: border-box;
}
body.fdch-page #navbar-menubar.navbar-collapse,
body.fdch-page #navbar-menubar.collapse.navbar-collapse {
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
}
body.fdch-page #navbar-menubar .navbar-nav.fd-global-nav,
body.fdch-page #navbar-menubar .navbar-nav {
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}
body.fdch-page #identificationDropdown {
  max-width: 100%;
  flex: 0 1 auto;
}
body.fdch-page #wrapper,
body.fdch-page #content {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

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

@media (max-width: 767px) {
  .fdch-cmp-pair { grid-template-columns: 1fr; }
  .fdch-cmp-frame { aspect-ratio: 3 / 2; max-height: 42vh; }
  .fdch-cmp-actions .fdch-btn { flex: 1 1 auto; }
}

/* R7E — a11y / responsive hardening */
.fdch-cmp-feedback[aria-live],
.fdch-cmp-status[aria-live],
.fdch-live {
  outline: none;
}
.fdch-cmp-card:focus-visible,
.fdch-cmp-level-card:focus-within,
.fdch-cmp-actions .fdch-btn:focus-visible {
  outline: 3px solid #c45c26;
  outline-offset: 3px;
}
.fdch-cmp-timer,
.fdch-cmp-progress {
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .fdch-cmp-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; }
  .fdch-cmp-frame { aspect-ratio: 3 / 2; max-height: none; }
}
@media (min-width: 1024px) and (max-width: 1100px) {
  /* Landscape tablet / small laptop: slightly tighter pair gap to keep both columns readable */
  .fdch-cmp-pair { gap: 0.85rem; }
  .fdch-cmp-question { font-size: clamp(1.1rem, 1.8vw, 1.45rem); }
}
@media (max-width: 430px) {
  .fdch-cmp-question { font-size: 1.15rem; line-height: 1.35; }
  .fdch-cmp-card .fdch-btn,
  .fdch-cmp-actions .fdch-btn { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .fdch-cmp-card,
  .fdch-cmp-pair,
  .fdch-cmp-feedback { transition: none !important; animation: none !important; }
}
html.fdch-dark .fdch-cmp-card,
[data-theme="dark"] .fdch-cmp-card {
  border-color: rgba(255,255,255,0.18);
}
@media (min-resolution: 2dppx) {
  .fdch-cmp-frame img { image-rendering: auto; }
}

/* —— R8B Inverse mode —— */
.fdch-inverse { max-width: 56rem; margin: 0 auto; padding: 0 1rem 2.5rem; }
.fdch-inverse .fdch-inv-hero { max-width: 40rem; margin: 0 auto 1.25rem; text-align: center; }
.fdch-inverse .fdch-inv-hero__title { font-size: clamp(1.55rem, 2.8vw, 2.1rem); line-height: 1.15; margin: 0.25rem 0 0.6rem; }
.fdch-inverse .fdch-inv-hero__lead { margin: 0 0 0.45rem; }
.fdch-inverse .fdch-inv-hero__pedagogy { opacity: 0.85; max-width: 36rem; margin: 0 auto; }
.fdch-inv-pilot-badge {
  display: inline-block; margin-top: 0.75rem; padding: 0.25rem 0.65rem;
  border: 1px solid var(--fdch-accent, #2a6f6a); border-radius: 0.3rem;
  color: var(--fdch-accent, #2a6f6a); font-weight: 600; font-size: 0.85rem;
}
.fdch-inv-level-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1rem 0 1.1rem; }
.fdch-inv-level-card {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.05rem 1.1rem;
  border: 2px solid rgba(42,111,106,0.28); border-radius: 0.65rem; cursor: pointer;
  position: relative; background: rgba(255,255,255,0.03); min-height: 8.5rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.fdch-inv-level-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fdch-inv-level-card:focus-within { outline: 2px solid var(--fdch-accent, #2a6f6a); outline-offset: 2px; }
.fdch-inv-level-card.is-selected { border-color: var(--fdch-accent, #2a6f6a); box-shadow: inset 0 0 0 1px var(--fdch-accent, #2a6f6a); background: rgba(42,111,106,0.06); }
.fdch-inv-level-card__check { width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 2px solid currentColor; align-self: flex-end; flex-shrink: 0; }
.fdch-inv-level-card.is-selected .fdch-inv-level-card__check { background: var(--fdch-accent, #2a6f6a); border-color: var(--fdch-accent, #2a6f6a); box-shadow: inset 0 0 0 2px #fff; }
.fdch-inv-level-card__top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.fdch-inv-level-card__name { font-weight: 700; font-size: 1.08rem; }
.fdch-inv-level-card__diff { font-size: 0.82rem; opacity: 0.8; }
.fdch-inv-level-card__count { font-size: 0.9rem; opacity: 0.92; }
.fdch-inv-level-card__desc { font-size: 0.88rem; opacity: 0.88; line-height: 1.35; }
.fdch-inv-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.3rem; }
.fdch-inv-badge { font-size: 0.72rem; padding: 0.12rem 0.4rem; border: 1px solid rgba(42,111,106,0.35); border-radius: 0.25rem; }
.fdch-inv-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin-top: 0.85rem; }
.fdch-inv-actions .fdch-btn, .fdch-inv-validate-bar .fdch-btn { min-height: 44px; min-width: 8rem; }
.fdch-inv-board { margin-top: 0.5rem; }
.fdch-inv-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.65rem; }
.fdch-inv-prompt { text-align: center; margin: 0.25rem 0 0.85rem; }
.fdch-inv-prompt__label { margin: 0; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.75; }
.fdch-inv-target-pill {
  display: inline-block; margin: 0.35rem 0 0.45rem; padding: 0.45rem 1rem;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 750; line-height: 1.2;
  color: #0f2f2c; background: rgba(42,111,106,0.14); border: 1px solid rgba(42,111,106,0.35); border-radius: 999px;
}
.fdch-inv-prompt__cue { margin: 0 auto; max-width: 34rem; font-size: 0.95rem; opacity: 0.9; }
.fdch-inv-grid { display: grid; gap: 0.75rem; margin: 0.5rem 0 0.75rem; }
.fdch-inv-grid[data-choice-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fdch-inv-grid[data-choice-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fdch-inv-grid[data-choice-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fdch-inv-card {
  margin: 0; display: flex; flex-direction: column; gap: 0.45rem; cursor: pointer;
  border: 2px solid rgba(0,0,0,0.12); border-radius: 0.55rem; padding: 0.4rem;
  background: rgba(255,255,255,0.02);
  position: relative; transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
  height: 100%;
}
.fdch-inv-card__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fdch-inv-card:focus-within { outline: 2px solid var(--fdch-accent, #7a6548); outline-offset: 2px; }
.fdch-inv-card.is-selected {
  border-color: var(--fdch-accent, #7a6548); background: rgba(122,101,72,0.08);
  box-shadow: inset 0 0 0 1px var(--fdch-accent, #7a6548);
}
.fdch-inv-frame {
  /* Identical frames for portrait / landscape / square — never stretch */
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  max-height: none;
  background: rgba(122, 101, 72, 0.06);
  border-radius: 0.35rem;
  overflow: hidden;
}
.fdch-inv-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.fdch-inv-card__caption { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; min-height: 44px; padding: 0 0.15rem 0.15rem; }
.fdch-inv-card__name { font-weight: 650; }
.fdch-inv-card__selected {
  font-size: 0.78rem; font-weight: 700; color: var(--fdch-accent, #2a6f6a);
  padding: 0.15rem 0.45rem; border-radius: 999px; border: 1px solid currentColor;
}
.fdch-inv-validate-bar {
  position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 0.55rem;
  align-items: center; justify-content: center; padding: 0.7rem 0.4rem; margin-top: 0.35rem;
  background: linear-gradient(180deg, transparent, rgba(250,250,248,0.92) 28%);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.fdch-inv-validate-hint { margin: 0; font-size: 0.88rem; opacity: 0.8; width: 100%; text-align: center; }
.fdch-inv-feedback { max-width: 40rem; margin: 1rem auto; }
.fdch-inv-fb-values { list-style: none; padding: 0; margin: 0.75rem 0 1rem; }
.fdch-inv-fb-values li { padding: 0.4rem 0; border-bottom: 1px solid rgba(0,0,0,0.08); }
.fdch-inv-fb-values li.is-correct { font-weight: 700; color: var(--fdch-accent, #2a6f6a); }
.fdch-inv-fb-values li.is-selected::before { content: "→ "; opacity: 0.7; }
.fdch-inv-result { text-align: center; max-width: 36rem; margin: 0 auto; }
.fdch-inv-lb-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.fdch-inv-lb-empty { text-align: center; padding: 2rem 1rem; max-width: 28rem; margin: 0 auto; }
.fdch-inv-lb-table { width: 100%; }
.fdch-teaser--inverse {
  margin: 1.25rem 0; padding: 1.1rem 1.2rem; border: 1px solid rgba(42,111,106,0.28);
  border-radius: 0.65rem; background: rgba(42,111,106,0.05);
}
.fdch-teaser--inverse .fdch-h2 { margin-top: 0; }
body.dark-mode .fdch-inv-target-pill,
html[data-theme="dark"] .fdch-inv-target-pill { color: #dff5f1; background: rgba(90,190,180,0.18); }
body.dark-mode .fdch-inv-validate-bar,
html[data-theme="dark"] .fdch-inv-validate-bar { background: linear-gradient(180deg, transparent, rgba(18,24,28,0.94) 28%); }
@media (max-width: 1024px) {
  .fdch-inv-grid[data-choice-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fdch-inv-grid[data-choice-count="3"] .fdch-inv-card:last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; width: 100%; }
}
@media (max-width: 720px) {
  .fdch-inv-level-grid { grid-template-columns: 1fr; }
  .fdch-inv-grid[data-choice-count="2"],
  .fdch-inv-grid[data-choice-count="3"],
  .fdch-inv-grid[data-choice-count="4"] { grid-template-columns: 1fr; }
  .fdch-inv-grid[data-choice-count="3"] .fdch-inv-card:last-child { max-width: none; }
  .fdch-inv-frame, .fdch-inv-frame img { max-height: none; }
  .fdch-inv-frame { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .fdch-inverse * { transition: none !important; animation: none !important; }
}
