/* --- New 2x2 grid and answer button styles for new flashcard game --- */
.flashcard-topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.flashcard-question-area {
  margin-bottom: 0.2rem;
}

.flashcard-shape-prompt {
  display: grid;
  place-items: center;
  min-height: 150px;
}

.flashcard-shape-prompt[hidden] {
  display: none;
}

.flashcard-shape-prompt .chord-diagram {
  width: 124px;
  height: 154px;
  max-width: none;
  overflow: visible;
}

.flashcard-chord-name {
  font-family: var(--font-heading, inherit);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  color: #f0c45b;
  letter-spacing: -0.06em;
  text-shadow: 0 2px 16px #1a223a88;
}
.flashcard-round-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
}
.score-pill {
  color: #ffe7a0;
  font-weight: 700;
  background: rgba(32, 58, 104, 0.32);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 1rem;
}
.flashcard-grid-answers {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.answer-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 420px;
}
.answer-option-2x2 {
  background: linear-gradient(180deg, #22345a 80%, #1a223a 100%);
  border: 2.5px solid rgba(240, 196, 91, 0.13);
  border-radius: 14px;
  box-shadow: 0 2px 16px #1a223a22;
  padding: 10px 2px 2px 2px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.answer-option-2x2 svg.chord-diagram {
  width: 92px;
  height: 116px;
  margin: 0 auto;
  display: block;
}

.answer-option-2x2.answer-option-name {
  min-height: 120px;
  padding: 10px 12px;
  color: #f8fbff;
  font-family: var(--font-heading, inherit);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.answer-option-name-text {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
}

.answer-option-2x2.is-correct {
  border-color: #aeea8c;
  background: linear-gradient(180deg, #2a4d2a 80%, #1a2a1a 100%);
  box-shadow: 0 0 0 3px #aeea8c55;
}
.answer-option-2x2.is-wrong {
  border-color: #ef8d80;
  background: linear-gradient(180deg, #4d2a2a 80%, #2a1a1a 100%);
  box-shadow: 0 0 0 3px #ef8d8055;
}
.answer-option-2x2.is-dimmed {
  opacity: 0.32;
}
.flashcard-controls-row {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}
.feedback-message {
  color: #ffe7a0;
  font-size: 1.08rem;
  font-weight: 600;
  margin-left: 1.2rem;
}
@media (max-width: 720px) {
  .flashcard-topbar {
    gap: 0.3rem;
    margin-bottom: 0.7rem;
  }
  .flashcard-chord-name {
    font-size: 2.1rem;
  }
  .answer-grid-2x2 {
    gap: 10px;
    max-width: 98vw;
  }
  .answer-option-2x2 svg.chord-diagram {
    width: 68px;
    height: 86px;
  }
  .flashcard-shape-prompt {
    min-height: 116px;
  }
  .flashcard-shape-prompt .chord-diagram {
    width: 94px;
    height: 118px;
  }
  .answer-option-2x2.answer-option-name {
    min-height: 92px;
    font-size: 1.7rem;
  }
  .flashcard-controls-row {
    gap: 10px;
    margin-top: 0.7rem;
    margin-bottom: 0.3rem;
  }
  .feedback-message {
    margin-left: 0.5rem;
    font-size: 0.98rem;
  }
}
:root {
  --flash-bg-top: #203a68;
  --flash-bg-bottom: #182b4d;
  --flash-shell-border: rgba(214, 223, 238, 0.16);
  --flash-soft: rgba(245, 247, 251, 0.76);
  --flash-muted: rgba(245, 247, 251, 0.62);
  --flash-card-ink: #16233f;
  --flash-teal: #2a9db5;
  --flash-teal-bright: #3cb8be;
  --flash-teal-deep: #1f8197;
  --flash-line: rgba(167, 193, 225, 0.24);
}

body.flashcards-page {
  padding: 0;
  color: rgba(245, 247, 251, 0.92);
  background:
    radial-gradient(circle at top left, rgba(95, 141, 210, 0.18), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(42, 157, 181, 0.13), transparent 24%),
    linear-gradient(180deg, var(--flash-bg-top), var(--flash-bg-bottom));
}

body.flashcards-page .siteFooter,
body.progression-flashcards-page .siteFooter {
  margin-top: 24px;
}

.flashcards-wrap {
  padding-bottom: 48px;
}

.flashcards-hero,
.flashcards-shell {
  margin: 0 24px;
}

.flashcards-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 18%, rgba(42, 157, 181, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(29, 49, 86, 0.92), rgba(18, 32, 58, 0.97));
  border: 1px solid var(--flash-shell-border);
  box-shadow: 0 18px 36px rgba(7, 14, 30, 0.2);
}

.flashcards-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #f8fbff;
}

.hero-sub {
  max-width: 66ch;
  margin-bottom: 0;
  font-size: 1.02rem;
  color: var(--flash-soft);
}

.hero-facts,
.status-pill,
.status-chip {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 22px 0 0;
}

.hero-facts div {
  display: grid;
  gap: 4px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--flash-line);
}

.hero-facts dt {
  color: rgba(166, 220, 228, 0.92);
}

.hero-facts dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #f7fbff;
}

.flashcards-hero-panel {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-info-card {
  width: min(100%, 340px);
  padding: 20px 22px;
  border: 1px solid rgba(118, 163, 208, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 38, 69, 0.72), rgba(15, 29, 53, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-card-label,
.flashcard-prompt {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-card-label {
  color: rgba(166, 220, 228, 0.92);
}

.hero-info-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.hero-info-grid div {
  display: grid;
  gap: 4px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(167, 193, 225, 0.16);
}

.hero-info-grid span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(191, 209, 232, 0.74);
}

.hero-info-grid strong {
  color: #f8fbff;
  font-size: 0.97rem;
  line-height: 1.4;
}

.flashcards-layout {
  margin-top: 20px;
}

.flashcards-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
}

.flashcards-sidebar,
.flashcards-stage {
  display: grid;
  gap: 18px;
}

.control-card,
.flashcard-card,
.answer-panel,
.summary-panel {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 49, 86, 0.92), rgba(20, 35, 62, 0.94));
  border: 1px solid var(--flash-shell-border);
  box-shadow: 0 16px 32px rgba(7, 14, 30, 0.18);
}

.control-card h2,
.summary-panel h2 {
  margin: 6px 0 8px;
  color: #f8fbff;
}

.tool-eyebrow {
  color: rgba(240, 196, 91, 0.94);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-card p,
.support-note,
.flashcard-tip,
.summary-panel p,
.feedback-message {
  color: var(--flash-soft);
  line-height: 1.55;
}

.flashcards-control {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.flashcards-control span,
.flashcards-toggle span,
.score-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--flash-muted);
}

.flashcards-control select,
.flashcards-toggle {
  min-height: 52px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(167, 193, 225, 0.28);
  background: transparent;
  color: #f8fbff;
  padding: 0 30px 0 0;
  font: inherit;
  box-shadow: none;
}

.flashcards-control select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d7e3f0' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 10px 6px;
}

.flashcards-control select:hover,
.flashcards-control select:focus,
.flashcards-toggle:hover,
.flashcards-toggle:focus-within {
  border-bottom-color: rgba(60, 184, 190, 0.7);
  outline: none;
}

.flashcards-control select option {
  color: #122244;
}

.flashcards-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-right: 0;
}

.flashcards-toggle input {
  accent-color: var(--flash-teal);
}

.flashcards-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.answer-option {
  border-radius: var(--btn-radius, 12px);
  font: inherit;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.btn-primary-accent {
  min-width: 148px;
}

.flashcards-page .btn-primary,
.progression-flashcards-page .btn-primary {
  font-weight: 800;
}

.btn-primary:hover,
.btn-ghost:hover,
.answer-option:hover:not([disabled]) {
  transform: translateY(-1px);
}

.answer-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

.score-grid strong,
.summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.7rem;
  color: #f8fbff;
}

.flashcards-statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill,
.status-chip {
  padding: 8px 0 9px;
  border-radius: 0;
  border-bottom: 1px solid rgba(60, 184, 190, 0.32);
  color: rgba(222, 243, 246, 0.96);
  background: transparent;
}

.status-pill-soft {
  color: #f8fbff;
  border-bottom-color: rgba(167, 193, 225, 0.22);
}

.flashcard-card-head,
.feedback-row,
.diagram-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.flashcard-main {
  margin-top: 18px;
  min-height: 360px;
  padding: 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8eb 0%, #f4ebd7 100%);
  color: #16233f;
  display: grid;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(22, 35, 63, 0.07);
}

.flashcard-empty {
  text-align: center;
  color: rgba(22, 35, 63, 0.6);
  font-size: 1.1rem;
}

.flashcard-visual {
  display: grid;
  gap: 20px;
}

.flashcard-visual.is-name-mode {
  justify-items: center;
  text-align: center;
}

.flashcard-visual-chart {
  justify-items: center;
}

.flashcard-visual-reveal {
  justify-items: stretch;
}

.flashcard-reveal-fixed {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5rem;
  margin: 0.5rem 0 1.5rem 0;
}
.flashcard-answer-name-area {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.2rem;
  margin-top: 0.5rem;
  /* Always reserve space, even if empty */
}
.flashcard-answer-label {
  font-size: 0.9rem;
  color: #888;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.1rem;
  min-height: 1.1em;
}
.flashcard-answer-name {
  font-size: 2.1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
  min-height: 2.3rem;
}
.flashcard-answer-type {
  font-size: 1.1rem;
  color: #666;
  margin-top: 0.1rem;
  min-height: 1.2em;
}
.flashcard-visual-reveal {
  justify-items: stretch;
}

.flashcard-reveal-copy {
  display: grid;
  gap: 6px;
  align-content: center;
}

.flashcard-reveal-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(22, 35, 63, 0.58);
}

.flashcard-reveal-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #16233f;
}

.flashcard-reveal-quality {
  font-size: 1rem;
  color: rgba(22, 35, 63, 0.74);
}

.flashcard-chord-card {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 240px);
  padding: 18px 16px 14px;
  border-radius: 6px;
  background: rgba(22, 35, 63, 0.04);
  border: 1px solid rgba(22, 35, 63, 0.12);
}

.flashcard-chord-card-prompt {
  background: rgba(22, 35, 63, 0.035);
}

.flashcard-card-meta {
  margin-top: 10px;
  color: rgba(22, 35, 63, 0.66);
  font-size: 12px;
  text-align: center;
}

.flashcard-question-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -46%);
  font-family: var(--font-heading);
  font-size: 2rem;
  color: rgba(22, 35, 63, 0.2);
  pointer-events: none;
}

.flashcard-word {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.flashcard-word-prompt {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -46%);
  max-width: calc(100% - 24px);
  text-align: center;
  color: rgba(22, 35, 63, 0.86);
}

.flashcard-subword {
  font-size: 1rem;
  color: rgba(22, 35, 63, 0.72);
}

.flashcard-chord-card .chord-diagram {
  width: 124px;
  height: 152px;
  max-width: none;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.answer-option-chart .chord-diagram {
  width: 86px;
  height: 106px;
}

.answer-option-chart .diagram-grid,
.answer-option-chart .diagram-top {
  stroke: rgba(239, 246, 252, 0.72);
}

.answer-option-chart .diagram-top {
  stroke-width: 2.2;
}

.answer-option-chart .diagram-nut {
  fill: rgba(239, 246, 252, 0.86);
}

.answer-option-chart .diagram-nut-label,
.answer-option-chart .diagram-open {
  fill: rgba(239, 246, 252, 0.82);
}

.diagram-grid,
.diagram-top {
  stroke: rgba(22, 35, 63, 0.28);
  stroke-width: 1.4;
}

.diagram-top {
  stroke-width: 2.4;
}

.diagram-nut {
  fill: #16233f;
}

.diagram-nut-label {
  fill: rgba(22, 35, 63, 0.7);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-anchor: end;
}

.diagram-dot {
  fill: #f0c45b;
}

.diagram-barre {
  stroke: #f0c45b;
  stroke-width: 13;
  stroke-linecap: round;
}

.diagram-finger {
  fill: #1b2137;
  font-size: 8.2px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.diagram-fret-number {
  fill: rgba(22, 35, 63, 0.62);
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
}

.diagram-open {
  fill: rgba(22, 35, 63, 0.72);
  font-size: 11px;
  text-anchor: middle;
}

.chord-diagram-prompt .diagram-dot {
  fill: rgba(22, 35, 63, 0.12);
}

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

.answer-option {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(167, 193, 225, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
  color: #f8fbff;
  cursor: pointer;
  text-align: left;
}

.answer-option.is-correct {
  border-color: rgba(143, 217, 158, 0.7);
  background: rgba(143, 217, 158, 0.18);
}

.answer-option.is-wrong {
  border-color: rgba(239, 141, 128, 0.58);
  background: rgba(239, 141, 128, 0.14);
}

.answer-option.is-dimmed {
  opacity: 0.32;
}

.answer-option-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.answer-option-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 0 0 6px;
  border-bottom: 1px solid rgba(60, 184, 190, 0.34);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.78);
  background: transparent;
}

.answer-option-chart {
  display: grid;
  justify-items: center;
  min-height: 112px;
}

.answer-option-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--flash-soft);
  font-size: 0.92rem;
}

.feedback-row {
  margin-top: 16px;
  flex-wrap: wrap;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-grid .summary-stat {
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
  .flashcards-hero,
  .flashcards-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .flashcards-hero,
  .flashcards-shell {
    margin-left: 12px;
    margin-right: 12px;
  }

  .flashcards-hero {
    padding: 20px;
  }

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

  .answer-grid,
  .score-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .flashcard-main {
    min-height: 300px;
    padding: 18px;
  }

  .flashcard-card,
  .answer-panel,
  .summary-panel,
  .control-card {
    padding: 18px;
    border-radius: 16px;
  }

  .flashcard-reveal-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .flashcard-card-head,
  .feedback-row,
  .diagram-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  body.flashcards-page .nav,
  body.progression-flashcards-page .nav {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Chord flashcard rebuild: final layout lock */
.flashcards-shell {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.flashcard-topbar {
  align-items: flex-start;
}

.flashcard-round-info {
  justify-content: flex-start;
}

.score-pill {
  background: rgba(32, 58, 104, 0.18);
  border: 1px solid rgba(167, 193, 225, 0.2);
  border-radius: 10px;
}

.answer-grid-2x2 {
  max-width: 560px;
}

.answer-option-2x2 {
  min-height: 148px;
  padding: 10px 4px;
}

.answer-option-2x2 .chord-diagram {
  width: 104px;
  height: 126px;
}

.flashcard-controls-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.flashcard-controls-row .feedback-message {
  margin-left: 0;
}

@media (max-width: 980px) {
  .flashcards-shell {
    grid-template-columns: 1fr;
  }

  .flashcards-sidebar {
    order: 1;
  }

  .flashcards-stage {
    order: 2;
  }
}

@media (max-width: 700px) {
  .answer-grid-2x2 {
    gap: 10px;
    max-width: 100%;
  }

  .answer-option-2x2 {
    min-height: 126px;
    padding: 8px 2px;
  }

  .answer-option-2x2 .chord-diagram {
    width: 82px;
    height: 102px;
  }
}

/* Visual parity pass: match site hero typography + improve card legibility */
.flashcards-hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(214, 223, 238, 0.2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.flashcards-hero .hero-kicker {
  color: #f0c45b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flashcards-hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 4.25vw, 3.25rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #f7fbff;
}

.flashcard-chord-name {
  font-size: clamp(2.95rem, 5.75vw, 4.25rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.answer-grid-2x2 {
  max-width: 668px;
  gap: 14px;
}

.answer-option-2x2 {
  min-height: 184px;
  padding: 14px 8px;
  border: 1px solid rgba(182, 207, 242, 0.4);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(58, 83, 126, 0.96) 0%, rgba(43, 65, 103, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(237, 245, 255, 0.1);
}

.answer-option-2x2:hover:not([disabled]) {
  border-color: rgba(214, 230, 253, 0.62);
  background: linear-gradient(180deg, rgba(64, 90, 136, 0.98) 0%, rgba(47, 70, 111, 0.99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(244, 249, 255, 0.16),
    0 8px 16px rgba(7, 14, 30, 0.2);
}

.answer-option-2x2 .chord-diagram {
  width: 136px;
  height: 166px;
}

.answer-option-2x2 .diagram-grid,
.answer-option-2x2 .diagram-top {
  stroke: rgba(236, 245, 255, 0.95);
  stroke-width: 1.7;
}

.answer-option-2x2 .diagram-top {
  stroke-width: 2.8;
}

.answer-option-2x2 .diagram-nut {
  fill: rgba(245, 251, 255, 0.98);
}

.answer-option-2x2 .diagram-nut-label,
.answer-option-2x2 .diagram-open {
  fill: rgba(236, 245, 255, 0.96);
}

.answer-option-2x2 .diagram-dot {
  fill: #ffd166;
}

.answer-option-2x2 .diagram-finger {
  fill: #203a68;
}

.flashcard-shape-prompt .diagram-grid,
.flashcard-shape-prompt .diagram-top {
  stroke: rgba(236, 245, 255, 0.95);
  stroke-width: 1.8;
}

.flashcard-shape-prompt .diagram-top {
  stroke-width: 2.9;
}

.flashcard-shape-prompt .diagram-nut {
  fill: rgba(245, 251, 255, 0.98);
}

.flashcard-shape-prompt .diagram-nut-label,
.flashcard-shape-prompt .diagram-open {
  fill: rgba(236, 245, 255, 0.96);
}

.flashcard-shape-prompt .diagram-dot,
.flashcard-shape-prompt .chord-diagram-prompt .diagram-dot {
  fill: #ffd166;
}

.flashcard-shape-prompt .diagram-finger {
  fill: #203a68;
}

@media (max-width: 720px) {
  .flashcards-hero {
    padding: 6px 0 10px;
  }

  .flashcards-hero h1 {
    font-size: clamp(2rem, 8.2vw, 2.5rem);
    line-height: 1.06;
  }

  .flashcard-chord-name {
    font-size: clamp(2.45rem, 11.5vw, 3.2rem);
  }

  .flashcard-round-info {
    gap: 8px;
  }

  .flashcard-round-info .score-pill {
    padding: 2px 8px;
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .flashcard-round-info .score-pill:first-of-type {
    flex-basis: 100%;
    width: fit-content;
  }

  .answer-grid-2x2 {
    gap: 10px;
  }

  .answer-option-2x2 {
    min-height: 146px;
    padding: 10px 4px;
  }

  .answer-option-2x2 .chord-diagram {
    width: 102px;
    height: 126px;
  }
}

@media (max-width: 380px) {
  .flashcard-round-info .score-pill {
    font-size: 0.84rem;
    padding: 2px 7px;
  }
}

/* ── Embed mode (?embed=1): from Practice Tools hub ───────────────── */
/* Close only: floating control — no full-width banner */
.dotbeat-embed-toolbar {
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  left: auto;
  width: auto;
  z-index: 200;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  align-items: center;
  justify-content: flex-end;
}

html.dotbeat-embed .dotbeat-embed-toolbar {
  display: flex;
}

.dotbeat-embed-close {
  width: auto !important;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  border-radius: 12px;
  box-shadow:
    0 2px 12px rgba(4, 10, 24, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

html.dotbeat-embed .nav,
html.dotbeat-embed header.flashcards-hero,
html.dotbeat-embed .siteFooter {
  display: none !important;
}

html.dotbeat-embed body.flashcards-page,
html.dotbeat-embed body.progression-flashcards-page {
  min-height: 100vh;
}

html.dotbeat-embed .flashcards-wrap,
html.dotbeat-embed .progression-flashcards-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 52px 16px 32px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

html.dotbeat-embed .flashcards-layout,
html.dotbeat-embed .progression-flashcards-layout {
  margin-top: 0;
  width: 100%;
  max-width: min(1120px, 100%);
  flex: 0 1 auto;
}

/* One Practice-Tools-style surface wrapping sidebar + stage */
html.dotbeat-embed .flashcards-shell {
  margin: 0 !important;
  width: 100%;
  max-width: min(1120px, 100%);
  padding: clamp(16px, 2.4vw, 26px);
  border-radius: 22px;
  border: 1px solid rgba(149, 198, 255, 0.22);
  border-left: 4px solid rgba(240, 196, 91, 0.85);
  background:
    linear-gradient(155deg, rgba(22, 40, 72, 0.96) 0%, rgba(14, 30, 56, 0.98) 52%, rgba(16, 52, 62, 0.42) 100%);
  box-shadow: 0 18px 44px rgba(4, 10, 24, 0.38);
  box-sizing: border-box;
  grid-template-columns: minmax(200px, 28vw) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
}

html.dotbeat-embed .control-card,
html.dotbeat-embed .summary-panel {
  background: linear-gradient(180deg, rgba(30, 49, 86, 0.55), rgba(20, 35, 62, 0.72));
  border-color: rgba(118, 163, 208, 0.16);
}

html.dotbeat-embed .answer-grid-2x2 {
  max-width: min(520px, 100%);
}

html.dotbeat-embed .answer-grid-2x2.progression-answer-grid-2x2 {
  max-width: min(880px, 100%);
}

html.dotbeat-embed .flashcards-stage,
html.dotbeat-embed .progression-flashcards-stage {
  min-width: 0;
}

@media (max-width: 900px) {
  html.dotbeat-embed .flashcards-wrap,
  html.dotbeat-embed .progression-flashcards-wrap {
    justify-content: flex-start;
    padding-top: 56px;
  }

  html.dotbeat-embed .flashcards-shell {
    grid-template-columns: 1fr;
  }
}
