:root {
  color-scheme: light;
  --ink: #1f2945;
  --muted: #62708a;
  --page: #fff8ee;
  --panel: #ffffff;
  --line: #ead8c8;
  --pink: #d73f86;
  --pink-dark: #a72866;
  --teal: #0f8d91;
  --gold: #f6b939;
  --lavender: #7f69c8;
  --green: #3f8b5d;
  --wrong: #c65d44;
  --shadow: 0 18px 40px rgba(75, 44, 74, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(246, 185, 57, 0.34), transparent 25rem),
    radial-gradient(circle at 88% 12%, rgba(15, 141, 145, 0.22), transparent 28rem),
    linear-gradient(180deg, #fff8ee, #fff2f8 46%, #eefafa);
}

button {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--line);
  font-weight: 800;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  outline: 4px solid rgba(15, 141, 145, 0.22);
  outline-offset: 2px;
}

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

.primary-button {
  color: #ffffff;
  background: var(--pink);
  border-color: var(--pink);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  z-index: 20;
  pointer-events: none;
}

.app-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 52px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.hero-art,
.toolbar,
.message,
.timeline-section,
.completion-panel,
.date-challenge,
.fact-or-fiddle,
.nine-to-five,
.fact-modal {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(234, 216, 200, 0.9);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 290px;
  padding: clamp(24px, 5vw, 46px);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  color: var(--pink-dark);
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  line-height: 1.04;
}

h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.hero p:not(.eyebrow),
.message,
.completion-panel p,
.fact-modal p,
.match-event p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-art {
  min-height: 290px;
  overflow: hidden;
  border-radius: 8px;
  background: #f8d58a;
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
  object-position: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
}

.toolbar.compact {
  margin: 18px 0 0;
  box-shadow: none;
}

.teacher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 800;
}

.teacher-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
}

.message {
  margin-bottom: 22px;
  padding: 15px 18px;
  border-left: 7px solid var(--teal);
  border-radius: 8px;
}

.timeline-section,
.date-challenge,
.fact-or-fiddle,
.nine-to-five,
.completion-panel {
  border-radius: 8px;
  padding: clamp(18px, 4vw, 28px);
}

.section-heading {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
}

.timeline-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}

.timeline-challenge-art,
.timeline-completion-art {
  display: block;
  width: 100%;
  border: 4px solid #ffffff;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 16px 26px rgba(75, 44, 74, 0.14);
}

.timeline-challenge-art {
  aspect-ratio: 1;
  max-height: 330px;
  justify-self: end;
}

.timeline-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(75, 44, 74, 0.08);
}

.timeline-card[draggable="true"] {
  cursor: grab;
}

.timeline-card.is-dragging {
  opacity: 0.58;
}

.timeline-card.is-over {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px rgba(15, 141, 145, 0.18);
}

.timeline-card.correct {
  border-color: var(--green);
  background: #f3fff6;
}

.timeline-card.incorrect {
  border-color: var(--wrong);
  background: #fff6f1;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.85rem;
  line-height: 1;
  box-shadow: inset 0 -5px 0 rgba(31, 41, 69, 0.12);
}

.timeline-card:nth-child(3n + 1) .card-icon {
  background: var(--pink);
}

.timeline-card:nth-child(3n + 2) .card-icon {
  background: var(--gold);
  color: var(--ink);
}

.card-copy {
  min-width: 0;
}

.card-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.card-copy span {
  color: var(--muted);
  line-height: 1.45;
}

.card-year {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 8px;
  padding: 0 10px;
  color: #ffffff;
  background: var(--pink-dark);
  border-radius: 999px;
  font-weight: 900;
}

.card-copy .card-year {
  color: #ffffff;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.move-button,
.fact-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 8px;
}

.status-mark {
  min-width: 30px;
  color: var(--green);
  font-size: 1.4rem;
  font-weight: 950;
  text-align: center;
}

.completion-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  border-color: rgba(215, 63, 134, 0.28);
  background:
    linear-gradient(135deg, rgba(215, 63, 134, 0.1), rgba(246, 185, 57, 0.14)),
    rgba(255, 255, 255, 0.94);
}

.completion-panel[hidden],
.date-challenge[hidden],
.fact-or-fiddle[hidden],
.nine-to-five[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.tribute-copy {
  margin-bottom: 0;
  padding-top: 10px;
}

.timeline-completion-art {
  grid-column: 2;
  grid-row: 1;
  width: min(260px, 28vw);
  aspect-ratio: 1;
}

#date-challenge-button {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.date-challenge {
  margin-top: 22px;
}

.which-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}

.which-challenge-art,
.which-results-art {
  display: block;
  width: 100%;
  border: 4px solid #ffffff;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 16px 26px rgba(75, 44, 74, 0.14);
}

.which-challenge-art {
  aspect-ratio: 1;
  max-height: 320px;
  justify-self: end;
}

.which-results-art {
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 0 auto 18px;
}

.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;
}

.which-game[hidden],
.which-results[hidden],
.which-feedback[hidden],
#next-round-button[hidden] {
  display: none;
}

.which-status {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.round-label,
.score-label {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.progress-dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: #ffffff;
}

.progress-dot.complete {
  background: var(--teal);
}

.which-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.which-card {
  display: grid;
  gap: 16px;
  min-height: 310px;
  padding: clamp(18px, 3vw, 26px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(75, 44, 74, 0.08);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.which-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 22px rgba(75, 44, 74, 0.12);
}

.which-card.answered:hover {
  transform: none;
}

.which-card.correct {
  border-color: var(--green);
  background: #f3fff6;
}

.which-card.incorrect {
  border-color: var(--wrong);
  background: #fff6f1;
}

.which-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.choice-label,
.result-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.choice-label {
  color: #ffffff;
  background: var(--teal);
}

.result-label {
  color: var(--ink);
  background: #fff8ee;
  border: 2px solid var(--line);
}

.result-label.first {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.result-label.your-choice {
  color: #ffffff;
  background: var(--pink-dark);
  border-color: var(--pink-dark);
}

.which-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.which-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.which-card button {
  align-self: end;
}

.vs-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ffffff;
  background: var(--pink);
  border: 4px solid #ffffff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 950;
}

.which-feedback,
.which-results {
  margin-top: 18px;
  padding: clamp(16px, 3vw, 22px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.which-feedback.correct {
  border-color: var(--green);
}

.which-feedback.incorrect {
  border-color: var(--wrong);
}

.which-feedback strong,
.score-title {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.which-feedback p,
.which-results p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.result-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.result-timeline span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff8ee;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
}

.result-timeline span.first {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.which-actions {
  justify-content: flex-end;
}

.final-score {
  margin: 4px 0 6px !important;
  color: var(--pink-dark) !important;
  font-size: clamp(3rem, 9vw, 5.5rem) !important;
  font-weight: 950;
  line-height: 0.95 !important;
}

.score-title {
  color: var(--teal);
}

.fact-or-fiddle {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
}

.fiddle-opening,
.fiddle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 24px;
  align-items: center;
}

.fiddle-title {
  font-family: "Cooper Black", Georgia, serif;
  color: var(--pink-dark);
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.fiddle-opening p:not(.eyebrow),
.statement-card p,
.answer-panel p,
.fiddle-results p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.guitar-stage {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 14px;
  border: 2px solid rgba(234, 216, 200, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 185, 57, 0.22), transparent 9rem),
    radial-gradient(circle at 82% 22%, rgba(15, 141, 145, 0.16), transparent 10rem),
    rgba(255, 248, 238, 0.7);
}

.opening-guitar-stage {
  overflow: hidden;
}

.opening-guitar-image {
  display: block;
  width: min(100%, 410px);
  max-height: 340px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(75, 44, 74, 0.16));
}

.decorative-guitar {
  position: relative;
  width: min(100%, 390px);
  height: 230px;
  transform: rotate(-7deg);
  transform-origin: 42% 58%;
}

.decorative-guitar.strum,
.fact-or-fiddle.is-strumming .decorative-guitar {
  animation: strum 520ms ease;
}

.guitar-body {
  position: absolute;
  left: 18px;
  top: 52px;
  width: 174px;
  height: 150px;
  border: 4px solid #8f4a26;
  border-radius: 50% 44% 48% 52%;
  background:
    radial-gradient(circle at 36% 48%, #5b2b1e 0 25px, transparent 27px),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.45), transparent 3rem),
    linear-gradient(135deg, #f8c763, #d99038);
  box-shadow:
    inset -12px -10px 0 rgba(143, 74, 38, 0.18),
    0 16px 24px rgba(75, 44, 74, 0.15);
}

.guitar-body::before {
  position: absolute;
  right: -56px;
  top: 34px;
  width: 84px;
  height: 82px;
  content: "";
  border: 4px solid #8f4a26;
  border-left: 0;
  border-radius: 0 52% 52% 0;
  background: linear-gradient(135deg, #f4b64e, #d58b34);
}

.sound-hole {
  position: absolute;
  left: 58px;
  top: 54px;
  width: 46px;
  height: 46px;
  border: 5px solid #f7d98e;
  border-radius: 999px;
  background: #442019;
}

.guitar-neck {
  position: absolute;
  left: 164px;
  top: 98px;
  z-index: 2;
  width: 182px;
  height: 34px;
  border: 3px solid #6b3824;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(255, 255, 255, 0.28) 10px 12px),
    linear-gradient(180deg, #9e5d35, #6f3d27);
}

.guitar-neck::before,
.guitar-neck::after {
  position: absolute;
  left: 0;
  right: 0;
  content: "";
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
}

.guitar-neck::before {
  top: 9px;
}

.guitar-neck::after {
  bottom: 9px;
}

.guitar-head {
  position: absolute;
  right: 0;
  top: 86px;
  width: 60px;
  height: 58px;
  border: 3px solid #6b3824;
  border-radius: 16px 8px 18px 8px;
  background: linear-gradient(135deg, #9e5d35, #6f3d27);
}

.guitar-head::before,
.guitar-head::after {
  position: absolute;
  left: 8px;
  right: 8px;
  content: "";
  height: 8px;
  border-radius: 999px;
  background: #f7d98e;
  box-shadow: 0 24px 0 #f7d98e;
}

.guitar-head::before {
  top: 8px;
}

.guitar-head::after {
  top: 20px;
}

.fret-markers {
  position: absolute;
  inset: -17px 6px auto;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 3px;
}

.opening-fret-markers {
  display: none;
}

.fret-marker {
  position: relative;
  width: 9px;
  height: 9px;
  border: 2px solid #fff8ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(31, 41, 69, 0.1);
}

.fret-marker.lit {
  background: var(--gold);
  box-shadow:
    0 0 0 2px rgba(246, 185, 57, 0.24),
    0 0 14px rgba(246, 185, 57, 0.82);
}

.guitar-pick,
.guitar-flower,
.guitar-butterfly,
.guitar-note {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 950;
}

.guitar-pick {
  right: 26px;
  bottom: 20px;
  width: 34px;
  height: 40px;
  border-radius: 50% 50% 54% 54%;
  background: var(--teal);
  transform: rotate(16deg);
}

.guitar-flower {
  left: 22px;
  top: 18px;
  color: var(--pink-dark);
  font-size: 1.6rem;
}

.guitar-butterfly {
  right: 20px;
  top: 18px;
  color: var(--lavender);
  font-size: 1.5rem;
}

.guitar-note {
  left: 28px;
  bottom: 14px;
  color: var(--teal);
  font-size: 1.6rem;
}

.completed-guitar .decorative-guitar {
  width: min(100%, 340px);
  transform: rotate(-6deg) scale(0.92);
}

.question-art-stage {
  display: grid;
  gap: 18px;
  min-height: 300px;
  place-items: center;
  padding: clamp(18px, 3vw, 26px);
  border: 2px solid rgba(234, 216, 200, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 185, 57, 0.22), transparent 9rem),
    radial-gradient(circle at 82% 22%, rgba(15, 141, 145, 0.16), transparent 10rem),
    rgba(255, 248, 238, 0.7);
}

.question-icon-frame {
  display: grid;
  width: min(100%, 280px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(15, 141, 145, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 24px rgba(75, 44, 74, 0.1);
}

.question-progress-track {
  position: relative;
  width: min(100%, 320px);
  padding: 16px 14px;
  border: 2px solid rgba(31, 41, 69, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.question-progress-track .fret-markers {
  position: relative;
  inset: auto;
}

.fiddle-play-area {
  min-width: 0;
}

.fiddle-game[hidden],
.fiddle-opening[hidden],
.fiddle-results[hidden],
.answer-panel[hidden] {
  display: none;
}

.statement-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 24px);
  align-items: center;
  justify-items: center;
  margin-bottom: 16px;
  padding: clamp(20px, 4vw, 30px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(75, 44, 74, 0.08);
}

.fiddle-question-icon {
  display: block;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 12px 12px rgba(75, 44, 74, 0.12));
}

.fact-or-fiddle.is-strumming .question-icon-frame {
  animation: icon-pop 520ms ease;
}

.statement-card p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 850;
  line-height: 1.22;
  text-align: center;
}

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

.answer-buttons button {
  min-height: 74px;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 950;
}

.fact-choice {
  background: var(--teal);
  border-color: var(--teal);
}

.fiddle-choice {
  background: var(--pink);
  border-color: var(--pink);
}

.answer-buttons button.selected {
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px rgba(31, 41, 69, 0.2);
}

.answer-panel {
  margin-top: 16px;
  padding: clamp(18px, 3vw, 24px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.answer-panel.correct {
  border-color: var(--green);
  background: #f3fff6;
}

.answer-panel.incorrect {
  border-color: var(--wrong);
  background: #fff6f1;
}

.answer-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 950;
}

.correct-answer-label,
.score-kicker {
  color: var(--pink-dark) !important;
  font-weight: 950;
  text-transform: uppercase;
}

.correct-sparkle {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--gold);
  font-size: 2.2rem;
  pointer-events: none;
  animation: sparkle-pop 780ms ease forwards;
}

.fiddle-results {
  position: relative;
  overflow: hidden;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  border: 2px solid rgba(246, 185, 57, 0.48);
  border-radius: 8px;
  text-align: center;
  background:
    repeating-conic-gradient(from -32deg at 50% 4%, rgba(246, 185, 57, 0.16) 0 7deg, transparent 7deg 15deg),
    linear-gradient(180deg, #fffaf1 0%, #fffdf8 52%, #fff7ea 100%);
  box-shadow: 0 22px 42px rgba(75, 44, 74, 0.14);
}

.fiddle-results > * {
  position: relative;
  z-index: 1;
}

.completion-topper {
  display: grid;
  place-items: center;
  margin-bottom: clamp(18px, 3vw, 26px);
}

.fiddle-results .completed-guitar {
  max-width: 520px;
  min-height: 210px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.completed-guitar-image {
  display: block;
  width: min(100%, 520px);
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(75, 44, 74, 0.16));
}

.completed-fret-markers {
  display: none;
}

.complete-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 340px);
  margin: -30px auto 0 !important;
  padding: 10px 28px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #ffffff !important;
  background: linear-gradient(180deg, #18aeb3, var(--teal));
  box-shadow: 0 12px 22px rgba(15, 141, 145, 0.22);
  font-size: clamp(1rem, 2.2vw, 1.28rem) !important;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1 !important;
  text-transform: uppercase;
}

.complete-ribbon span::before,
.complete-ribbon span::after {
  content: "✦";
  margin: 0 10px;
  color: var(--gold);
  letter-spacing: 0;
}

.fiddle-results h2 {
  margin-bottom: 18px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  line-height: 1;
}

.fiddle-results .score-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
  color: var(--pink-dark) !important;
  font-size: clamp(1rem, 2vw, 1.22rem) !important;
  letter-spacing: 0;
}

.fiddle-results .score-kicker::before,
.fiddle-results .score-kicker::after {
  content: "";
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.fiddle-results .final-score {
  margin: 0 0 18px !important;
  font-size: clamp(4rem, 12vw, 7rem) !important;
  text-shadow: 0 4px 0 rgba(246, 185, 57, 0.22);
}

.completion-badge {
  max-width: 720px;
  margin: 0 auto 14px !important;
  padding: 14px 20px;
  border: 2px solid rgba(246, 185, 57, 0.45);
  border-radius: 8px;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  font-size: clamp(1.3rem, 3vw, 1.8rem) !important;
  font-weight: 950;
  line-height: 1.25 !important;
}

.completion-badge::before,
.completion-badge::after {
  content: "✦";
  color: var(--gold);
  margin: 0 16px;
}

.completion-copy {
  max-width: 930px;
  margin: 0 auto;
  color: var(--ink) !important;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem) !important;
}

.celebration-row {
  max-width: 760px;
  margin: 18px auto 22px;
  padding-top: 10px;
  border-top: 3px dotted rgba(246, 185, 57, 0.82);
  color: var(--gold);
  font-size: 1.7rem;
  letter-spacing: 0;
}

.completion-actions {
  justify-content: center;
}

.completion-actions button {
  min-width: min(100%, 280px);
}

.completion-actions #return-dolly-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--teal);
}

.nine-to-five {
  margin-top: 22px;
}

.nine-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  gap: 24px;
  align-items: center;
}

.nine-title {
  color: var(--pink-dark);
  font-family: "Cooper Black", Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.nine-intro p:not(.eyebrow),
.nine-card p,
.nine-final-card p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.nine-number-hero {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(234, 216, 200, 0.82);
  border-radius: 8px;
  background: #fffaf1;
}

.nine-number-hero::before {
  position: absolute;
  inset: 10px;
  content: "";
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  pointer-events: none;
}

.nine-challenge-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center;
}

.number-orbit {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(90px, 19vw, 132px);
  aspect-ratio: 1;
  border: 4px solid #ffffff;
  border-radius: 999px;
  box-shadow:
    0 18px 28px rgba(75, 44, 74, 0.14),
    inset 0 -8px 0 rgba(31, 41, 69, 0.1);
  color: #ffffff;
  font-size: clamp(3.3rem, 8vw, 5.6rem);
  font-weight: 950;
  line-height: 1;
}

.number-orbit.nine {
  top: 38px;
  left: 42px;
  background: var(--teal);
}

.number-orbit.five {
  right: 42px;
  bottom: 42px;
  background: var(--pink);
}

.number-orbit.ninety-five {
  z-index: 1;
  width: clamp(122px, 24vw, 178px);
  background: linear-gradient(135deg, var(--gold), #f08f2f);
  color: var(--ink);
  font-size: clamp(3.6rem, 8vw, 5rem);
}

.number-sparkle {
  position: absolute;
  color: var(--gold);
  font-size: 1.8rem;
  font-weight: 950;
}

.number-sparkle.one {
  left: 18%;
  bottom: 22%;
}

.number-sparkle.two {
  right: 20%;
  top: 20%;
  color: var(--teal);
}

.number-sparkle.three {
  left: 49%;
  top: 10%;
  color: var(--pink-dark);
}

.nine-intro[hidden],
.nine-level-one[hidden],
.nine-level-one-complete[hidden],
.nine-level-two[hidden],
.nine-final[hidden],
.nine-number-choices[hidden],
.nine-fact-panel[hidden] {
  display: none;
}

.nine-card,
.nine-final-card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 4vw, 34px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 96% 0, rgba(246, 185, 57, 0.18), transparent 9rem),
    #ffffff;
  box-shadow: 0 12px 22px rgba(75, 44, 74, 0.1);
}

.nine-card h2,
.nine-final-card h2 {
  color: var(--ink);
}

.nine-status-pill,
.number-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 950;
}

.number-kicker {
  width: max-content;
  margin-bottom: 12px;
  color: var(--ink);
  background: rgba(246, 185, 57, 0.32);
  border: 2px solid rgba(246, 185, 57, 0.72);
  font-size: 1.35rem;
}

.nine-blank-statement {
  margin: 12px 0 22px;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  font-weight: 850;
  line-height: 1.35;
}

.nine-blank {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  min-height: 58px;
  margin: 4px 6px;
  color: var(--ink);
  background: #fff8ee;
  border: 3px dashed rgba(15, 141, 145, 0.62);
  border-radius: 8px;
  vertical-align: middle;
}

.nine-blank.active {
  border-style: solid;
  background: rgba(15, 141, 145, 0.1);
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px rgba(15, 141, 145, 0.22);
}

.nine-blank.filled {
  color: #ffffff;
  background: var(--pink);
  border-color: var(--pink);
  border-style: solid;
  font-size: 1.6rem;
}

.nine-number-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 18px;
}

.number-choice {
  min-width: 118px;
  min-height: 88px;
  color: #ffffff;
  border-width: 3px;
  cursor: grab;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 12px 20px rgba(75, 44, 74, 0.12);
  touch-action: none;
  user-select: none;
}

.number-choice:hover {
  transform: translateY(-2px);
}

.number-choice.is-dragging {
  opacity: 0.58;
}

.nine-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  pointer-events: none;
  border: 3px solid #ffffff;
  border-radius: 8px;
  color: #ffffff;
  box-shadow: 0 18px 28px rgba(75, 44, 74, 0.22);
  font-size: 3.5rem;
  font-weight: 950;
  line-height: 1;
}

.nine-dragging .nine-blank {
  border-style: solid;
  box-shadow: 0 0 0 5px rgba(15, 141, 145, 0.18);
}

.nine-choice {
  background: var(--teal);
  border-color: var(--teal);
}

.five-choice {
  background: var(--pink);
  border-color: var(--pink);
}

.nine-feedback {
  min-height: 32px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.nine-feedback.correct {
  color: var(--green);
}

.nine-feedback.incorrect {
  color: var(--wrong);
}

.nine-feedback.notice {
  color: var(--teal);
}

.level-complete-card,
.nine-final-card {
  text-align: center;
}

.nine-level-two h3 {
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.16;
}

.nine-options {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.nine-option {
  min-height: 64px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.nine-option:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
}

.nine-option.correct {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.nine-option.incorrect {
  color: #ffffff;
  background: var(--wrong);
  border-color: var(--wrong);
}

.nine-option.correct::before {
  content: "✓ ";
}

.nine-option.incorrect::before {
  content: "Try again: ";
}

.nine-fact-panel {
  margin-top: 18px;
  padding: clamp(16px, 3vw, 22px);
  border: 2px solid rgba(15, 141, 145, 0.3);
  border-radius: 8px;
  background: #eefafa;
}

.nine-fact-panel p:last-of-type {
  margin-bottom: 0;
}

.nine-final-card {
  background:
    radial-gradient(circle at 50% 0, rgba(255, 99, 188, 0.18), transparent 18rem),
    repeating-conic-gradient(from -24deg at 50% 0, rgba(246, 185, 57, 0.16) 0 7deg, transparent 7deg 16deg),
    linear-gradient(180deg, #fffaf1 0%, #ffffff 58%, #fff7ea 100%);
  border-color: rgba(215, 63, 134, 0.34);
  box-shadow: 0 24px 42px rgba(75, 44, 74, 0.16);
}

.nine-final-art {
  display: block;
  width: min(100%, 560px);
  aspect-ratio: 1;
  margin: 0 auto 20px;
  border: 4px solid #ffffff;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 18px 28px rgba(75, 44, 74, 0.18);
}

.nine-final-card h2 {
  color: var(--pink-dark);
  font-family: "Cooper Black", Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.nine-final-card .celebration-row {
  max-width: 560px;
}

@keyframes strum {
  0%,
  100% {
    transform: rotate(-7deg) translateX(0);
  }
  35% {
    transform: rotate(-5deg) translateX(4px);
  }
  65% {
    transform: rotate(-8deg) translateX(-3px);
  }
}

@keyframes sparkle-pop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.5);
  }
  40% {
    opacity: 1;
    transform: translateY(0) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.7);
  }
}

@keyframes icon-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-4px) scale(1.02);
  }
}

@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;
  }
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 41, 69, 0.45);
}

.fact-modal {
  position: relative;
  width: min(560px, 100%);
  padding: 26px;
  border-radius: 8px;
}

.fact-modal .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.fact-kicker {
  margin-bottom: 10px;
  color: var(--pink-dark);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-year {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 14px;
  color: #ffffff !important;
  background: var(--teal);
  border-radius: 999px;
  font-size: 1.4rem !important;
  font-weight: 950;
}

@media (max-width: 820px) {
  .hero,
  .completion-panel,
  .timeline-intro,
  .which-intro {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-art {
    min-height: 230px;
  }

  .timeline-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .timeline-challenge-art,
  .timeline-completion-art {
    width: min(100%, 330px);
    justify-self: center;
  }

  .timeline-completion-art,
  #date-challenge-button {
    grid-column: 1;
    grid-row: auto;
  }

  .which-board {
    grid-template-columns: 1fr;
  }

  .fiddle-opening,
  .fiddle-layout,
  .nine-intro {
    grid-template-columns: 1fr;
  }

  .guitar-stage {
    order: -1;
  }

  .vs-badge {
    justify-self: center;
  }

  .which-challenge-art {
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 520px);
    padding-top: 20px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar button,
  .teacher-toggle {
    width: 100%;
  }

  .which-status {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .which-card {
    min-height: 0;
  }

  .answer-buttons {
    grid-template-columns: 1fr;
  }

  .nine-number-hero {
    min-height: 240px;
  }

  .number-orbit.nine {
    left: 24px;
  }

  .number-orbit.five {
    right: 24px;
  }

  .nine-blank-statement {
    font-size: 1.35rem;
  }

  .nine-blank,
  .number-choice {
    width: 100%;
  }

  .nine-number-choices {
    display: grid;
    grid-template-columns: 1fr;
  }

  .fiddle-question-icon {
    max-width: 200px;
  }

  .decorative-guitar {
    transform: rotate(-7deg) scale(0.82);
  }
}
