:root {
  --bg: #fffaf0;
  --surface: #ffffff;
  --text: #2b2b33;
  --muted: #6b6b78;
  --accent: #d6402b;
  --border: #e6dfd0;
  --error-bg: #fde8e6;
  --error-text: #8a1c10;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171c;
    --surface: #22222a;
    --text: #ecebf0;
    --muted: #a3a3b2;
    --accent: #ff7b64;
    --border: #35353f;
    --error-bg: #4a1f1a;
    --error-text: #ffc9c0;
  }
}

:root[data-theme="dark"] {
  --bg: #17171c;
  --surface: #22222a;
  --text: #ecebf0;
  --muted: #a3a3b2;
  --accent: #ff7b64;
  --border: #35353f;
  --error-bg: #4a1f1a;
  --error-text: #ffc9c0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

.site-header, .site-footer, main {
  max-width: 960px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header { padding-top: 20px; }

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.site-footer {
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer p { margin: 0 0 4px; }

main { padding-top: 16px; padding-bottom: 48px; }

h1 { margin: 8px 0 16px; font-size: 1.6rem; }

.search {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  display: block;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.card:hover, .card:focus-visible { border-color: var(--accent); }

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body { padding: 12px; }
.card-title { margin: 0; font-size: 1rem; font-weight: 600; }
.card-meta { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }

.toy-image {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin-bottom: 16px;
  border-radius: 12px;
}

.back { display: inline-block; margin-top: 8px; }

.stage-heading {
  margin: 24px 0 8px;
  font-size: 1.1rem;
  color: var(--muted);
}

details {
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

summary {
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
}

.lyrics {
  margin: 0;
  padding: 0 14px 14px;
  white-space: pre-line;
}

.empty { color: var(--muted); }

.error-box {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: var(--error-text);
  background: var(--error-bg);
  border-radius: 8px;
}

.error-box ul { margin: 4px 0 0; padding-left: 20px; }

/* Auth and editing */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.auth { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.9rem; }
.who { color: var(--muted); }

.button {
  display: inline-block;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { color: var(--accent); background: transparent; }
.button.danger { color: var(--error-text); background: var(--error-bg); border-color: var(--error-text); }
.button:disabled { opacity: 0.6; cursor: default; }

.link-button {
  padding: 0;
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
.link-button.danger { color: var(--error-text); }

.form { display: grid; gap: 16px; max-width: 640px; }
.field { display: grid; gap: 4px; }
.field-label { font-weight: 600; font-size: 0.9rem; }
.hint { font-size: 0.8rem; color: var(--muted); }
.field-input {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.field-input[readonly] { color: var(--muted); }

.songs { display: grid; gap: 16px; }
.song-row { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; }
.status { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.people { padding-left: 0; list-style: none; }
.people li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Fisher-Price inspired, unofficial fan-site theme */
:root {
  color-scheme: light;
  --bg: #fffdf7;
  --surface: #fff;
  --text: #20242a;
  --muted: #515861;
  --accent: #b40035;
  --border: #dbe4e7;
  --error-bg: #ffe8ec;
  --error-text: #9a1230;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #fffdf7; --surface: #fff; --text: #20242a; --muted: #515861; --accent: #b40035; --border: #dbe4e7; --error-bg: #ffe8ec; --error-text: #9a1230; }
}
:root[data-theme="dark"] { --bg: #fffdf7; --surface: #fff; --text: #20242a; --muted: #515861; --accent: #b40035; --border: #dbe4e7; --error-bg: #ffe8ec; --error-text: #9a1230; }
body { font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif; }
:focus-visible { outline: 3px solid #005d75; outline-offset: 3px; }
.site-header, .site-footer, main { max-width: none; }
.site-header { min-height: 104px; padding: 15px max(24px, calc((100vw - 1160px) / 2)); background: #68cddd; }
.site-title { display: inline-flex; align-items: center; gap: 16px; color: #092b35; font-size: 1.3rem; font-weight: 900; }
.brand-badge { display: grid; place-content: center; width: 96px; height: 72px; background: #e9003b; color: white; border-radius: 15px 15px 22px 22px; font-size: 1.5rem; line-height: .86; letter-spacing: -.09em; text-align: center; transform: rotate(-3deg); box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.brand-dot { color: #ffd211; }
.site-title-text { letter-spacing: -.035em; }
.who { color: #163e47; }
main { max-width: 1160px; padding: 32px 24px 72px; min-height: 60dvh; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.045em; }
h1 { font-size: clamp(1.9rem, 5vw, 4.3rem); margin: 0 0 18px; }
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; min-height: 330px; overflow: hidden; margin: 0 0 45px; border-radius: 28px; background: #fceca3; }
.hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(30px, 5vw, 62px); }
.eyebrow { margin: 0 0 12px; color: #9c1736; font-size: .85rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero-description { margin: 0; max-width: 34ch; font-size: 1.16rem; }
.hero-art { position: relative; min-height: 280px; overflow: hidden; background: #bfeef3; }
.sun { position: absolute; top: 38px; right: 23%; width: 100px; aspect-ratio: 1; border-radius: 50%; background: #ffd211; box-shadow: 0 0 0 15px rgba(255,210,17,.2); }
.hill { position: absolute; width: 125%; height: 240px; border-radius: 50% 50% 0 0; }
.hill-back { left: -25%; bottom: -145px; background: #72c86b; transform: rotate(-12deg); }
.hill-front { right: -36%; bottom: -150px; background: #20a65a; transform: rotate(14deg); }
.music-note { position: absolute; z-index: 1; color: #e9003b; font-family: Arial, sans-serif; font-size: 7rem; font-weight: bold; transform: rotate(-16deg); }
.note-one { left: 20%; top: 18%; }
.note-two { right: 18%; top: 40%; color: #1266b0; font-size: 5rem; transform: rotate(15deg); }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.search { max-width: 490px; padding: 14px 18px; margin-bottom: 24px; border: 2px solid var(--border); border-radius: 999px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.card { border: 2px solid #e7eef0; border-radius: 22px; box-shadow: 0 6px 0 #e9f0f1; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 0 #cde9ed; border-color: #42bacd; }
.card img { object-fit: contain; background: #f5f9f9; padding: 12px; }
.card-body { padding: 18px; }
.card-title { font-size: 1.1rem; font-weight: 900; }
.card-meta { display: inline-block; white-space: nowrap; margin-top: 10px; padding: 4px 11px; border-radius: 999px; background: #fff2bd; color: #503f00; font-size: .82rem; font-weight: 800; }
.back { margin: 4px 0 24px; font-weight: 800; text-decoration: none; }
.back:hover { text-decoration: underline; }
.toy-image { max-width: min(100%, 470px); max-height: 370px; object-fit: contain; margin: 8px 0 28px; padding: 20px; border-radius: 24px; background: #f1f9fa; }
.stage-heading { margin: 32px 0 12px; padding-left: 16px; border-left: 7px solid #ffd211; font-size: 1.5rem; color: var(--text); }
details { margin-bottom: 12px; border: 2px solid #e4ecee; border-radius: 16px; }
details[open] { border-color: #9bdde6; }
summary { padding: 16px 20px; font-weight: 900; }
.lyrics { padding: 0 20px 20px; line-height: 1.75; }
.button { padding: 10px 18px; color: #242014; background: #ffd211; border: 2px solid #ffd211; border-radius: 999px; font-weight: 900; }
.button:hover { background: #ffe05d; }
.button.secondary { color: #9c1230; background: white; border-color: #9c1230; }
.button.danger { color: var(--error-text); background: var(--error-bg); border-color: var(--error-text); }
.field-input { border-radius: 12px; padding: 10px 13px; }
.song-row { background: white; border: 2px solid var(--border); border-radius: 16px; }
.site-footer { padding: 28px max(24px, calc((100vw - 1160px) / 2)) 36px; background: #eaf7f8; color: #344a50; }
@media (max-width: 680px) {
  .site-header { min-height: 86px; padding: 12px 18px; }
  .brand-badge { width: 78px; height: 60px; font-size: 1.25rem; }
  .site-title { gap: 11px; font-size: 1.1rem; }
  main { padding: 20px 18px 55px; }
  .hero { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
  .hero-copy { padding: 30px 26px; }
  .hero-art { min-height: 150px; }
  .sun { top: 15px; width: 70px; }
  .music-note { top: 0; font-size: 5rem; }
  .note-two { top: 15%; font-size: 4rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .card-body { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* Responsive */
.form, .songs, .song-row, .field, .people { grid-template-columns: minmax(0, 1fr); }
.site-header > *, .auth > * { min-width: 0; }
.field-input, .search { font-size: max(16px, 1rem); }
.form .toolbar {
  position: sticky;
  bottom: 0;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}
@media (pointer: coarse) {
  .button, .link-button, .back, .auth a, summary, .field-input, .search { min-height: 44px; }
  .link-button, .back, .auth a { display: inline-flex; align-items: center; padding-inline: 4px; }
  .auth, .toolbar, .people li { gap: 12px; }
}
.site-footer .auth { margin-top: 12px; }
.site-header { justify-content: center; }

.intro { margin: 0 0 20px; color: var(--muted); }
.related { margin-top: 40px; }
.related h2 { font-size: 1.2rem; }
.related ul { margin: 0; padding: 0; list-style: none; }
.related .card-title { font-size: 1rem; }
.quiet-link { color: var(--muted); font-size: 0.85rem; text-decoration: underline; }
.quiet-link:hover { color: var(--accent); }
