:root {
  --tc-touch-target: 44px;
  --tc-mobile-gutter: 12px;
  --tc-motion-fast: 140ms;
  --tc-mobile-display: clamp(40px, 11vw, 44px);
  --tc-mobile-section: clamp(28px, 8vw, 32px);
  --tc-mobile-body: 15px;
  --tc-mobile-small: 13px;
  --tc-mobile-micro: 11.5px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Light surfaces need their own text scale. The dark theme's pale lavender,
   blue, and gold accents become washed out when inherited by paper cards. */
:root[data-theme="light"] {
  --tc-light-text: #30292e;
  --tc-light-muted: #51474d;
  --tc-light-faint: #5f555d;
  --tc-light-blue: #315e84;
  --tc-light-gold: #795112;
  --tc-light-green: #2d6c49;
  --tc-light-rose: #91413e;
}

.theme-toggle {
  flex: none;
  display: grid;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid light-dark(#c8c3bb, #443c4e);
  border-radius: 50%;
  background: light-dark(transparent, #221d29);
  color: light-dark(#4e4850, #d2c7d4);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { border-color: light-dark(#81796f, #786b7e); background: light-dark(#e7e4df, #302936); color: light-dark(#252227, #f5eee7); }
.theme-toggle:focus-visible { outline: 2px solid light-dark(#356d96, #8ab4d8); outline-offset: 2px; }
.theme-toggle[data-theme-choice="light"] { color: light-dark(#5c4b34, #e4b45e); }
.theme-toggle-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

html[data-theme-page="tanda-builder"] .language-pick,
html[data-theme-page="tanda-graph"] .language-pick { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

/* The PWA controls belong to every page, so their palette changes here too. */
html[data-theme="light"] .pwa-swipe-indicator {
  border-color: rgba(66, 108, 145, .45);
  background: rgba(249, 245, 239, .94);
  color: #315e84;
  box-shadow: 0 8px 28px rgba(45, 39, 35, .16);
}
html[data-theme="light"] body.pwa-standalone .pwa-app-nav {
  border-top-color: rgba(118, 102, 113, .32);
  background: rgba(250, 246, 240, .96);
  box-shadow: 0 -12px 32px rgba(45, 39, 35, .1);
}
html[data-theme="light"] .pwa-app-nav button { color: #5f555d; }
html[data-theme="light"] .pwa-app-nav button:active { background: #e7e4df; color: #282227; }
html[data-theme="light"] .pwa-app-nav button:disabled { color: #9d968d; }
html[data-theme="light"] body.mobile-folder-sheet-open .pwa-app-nav button[data-pwa-nav="folders"] {
  background: #e7e4df; color: #282227;
}

/* Main application and home. In light mode every interface surface is light;
   only photographic content keeps its original tonal range. */
html[data-theme="light"][data-theme-page="home"] body { background: #f1efeb; color: #2d272c; }
html[data-theme="light"][data-theme-page="home"] .home-hero {
  border-color: #d2cec7;
  background: linear-gradient(145deg, #faf9f6 0%, #eae7e2 72%);
  box-shadow: 0 16px 42px rgba(45, 39, 35, .09);
}
html[data-theme="light"][data-theme-page="home"] .home-hero-figure { background: #e8e5df; }
html[data-theme-page="home"] .theme-logo-light { display: none; }
html[data-theme="light"][data-theme-page="home"] .theme-logo-dark { display: none; }
html[data-theme="light"][data-theme-page="home"] .theme-logo-light { display: block; }
html[data-theme-page="home"] [data-theme-logo="light"] { display: none; }
html[data-theme="light"][data-theme-page="home"] [data-theme-logo="dark"] { display: none; }
html[data-theme="light"][data-theme-page="home"] [data-theme-logo="light"] { display: block; }
html[data-theme="light"][data-theme-page="home"] :is(.home-title, .home-language-heading, .home-section-title) { color: #2d272c; }
html[data-theme="light"][data-theme-page="home"] :is(.home-intro, .home-journey-copy, .home-section-note) { color: #685d56; }
html[data-theme="light"][data-theme-page="home"] .header-builder-link { color: #744608; }
html[data-theme="light"][data-theme-page="home"] #guideBtn {
  border-color: #c8c3bb;
  background: #fbfaf7;
  color: #315e84;
}
html[data-theme="light"][data-theme-page="home"] #guideBtn:hover { border-color: #7a9bb5; color: #244e70; }
html[data-theme="light"][data-theme-page="home"] :is(.header-language-pick > summary, .workspace-tools > summary) {
  border-color: #c8c3bb; background: #fbfaf7; color: #514750;
}
html[data-theme="light"][data-theme-page="home"] .workspace-tools[open] > #toolbar {
  border-color: #d1ccc5; background: #f8f6f2;
}
html[data-theme="light"][data-theme-page="home"] .search-more > summary {
  border-color: #9bb6c9; background: #e8f1f6; color: #315e84;
}
html[data-theme="light"][data-theme-page="home"] .search-more[open] > .search-more-actions {
  border-color: #c7d5df; background: #f4f8fa;
}
html[data-theme="light"][data-theme-page="home"] :is(.home-language-picker, .home-journey, .home-access-card, .home-feedback, .home-license, .home-notice, .home-project-journal) {
  border-color: #d2cec7;
  background-color: #fbfaf7;
  box-shadow: 0 10px 28px rgba(45, 39, 35, .06);
}
html[data-theme="light"][data-theme-page="home"] .home-language-picker { background: rgba(246, 244, 240, .94); }
html[data-theme="light"][data-theme-page="home"] .home-language-picker .home-font-pick { border-top-color: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .language-choice {
  border-color: #cbc6be;
  background: #ebe8e3;
  color: #675c65;
}
html[data-theme="light"][data-theme-page="home"] .language-choice:hover:not(:disabled) { color: #282227; }
html[data-theme="light"][data-theme-page="home"] .language-choice[aria-pressed="true"] {
  border-color: #4d7fa6;
  background: #dcebf4;
  color: #264f6d;
}
html[data-theme="light"][data-theme-page="home"] :is(.home-builder-entry, .home-sample, .home-resource-card) {
  border-color: #d1ccc4;
  background-color: #f5f3ef;
  color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .home-builder-entry {
  border-color: #c7a56d;
  background: linear-gradient(135deg, #f4ead8, #eee3cf);
  box-shadow: 0 7px 20px rgba(116, 70, 8, .08);
}
html[data-theme="light"][data-theme-page="home"] .home-builder-entry:hover,
html[data-theme="light"][data-theme-page="home"] .home-builder-entry:focus-visible {
  border-color: #a9782d;
  background: linear-gradient(135deg, #f2e4cc, #eadcc2);
}
html[data-theme="light"][data-theme-page="home"] :is(.home-builder-entry-kicker, .home-builder-entry-arrow) { color: #744608; }
html[data-theme="light"][data-theme-page="home"] .home-builder-entry-copy { color: #66543a; }
html[data-theme="light"][data-theme-page="home"] .home-secondary {
  border-color: #c8c3bb;
  background: #f5f3ef;
  color: #514b45;
}
html[data-theme="light"][data-theme-page="home"] .home-secondary:hover,
html[data-theme="light"][data-theme-page="home"] .home-secondary:focus-visible { border-color: #7a9bb5; color: #244e70; }
html[data-theme="light"][data-theme-page="home"] :is(.home-journey-title, .home-access-title, .home-feedback-title, .home-license-title, .home-notice-title) { color: #342d31; }
html[data-theme="light"][data-theme-page="home"] :is(.home-access-intro, .home-feedback-intro, .home-license-copy, .home-license-disclaimer, .home-notice-body) { color: #695e65; }
html[data-theme="light"][data-theme-page="home"] #toolbar button,
html[data-theme="light"][data-theme-page="home"] :is(.folder-chip, .folder-action, .random-button, .select-action, .select-all, .select-box, .date-heading .select-day, .load-older-songs, .personal-note-toggle, .personal-note-actions button, .version-confirm-btn, .version-decision-btn) {
  border-color: #c8c3bb;
  background: #e7e4df;
  color: #514750;
}
html[data-theme="light"][data-theme-page="home"] :is(input, textarea, select) {
  border-color: #c8c3bb;
  background-color: #fbfaf7;
  color: #2d272c;
}
html[data-theme="light"][data-theme-page="home"] :is(.auth-card, .guide-card, .users-card, .folder-menu, .recommendations, .recognizer-results, .feedback-chat-messages, .personal-note-body) {
  border-color: #d1ccc5;
  background: #fbfaf7;
  color: #2d272c;
  box-shadow: 0 18px 48px rgba(45, 39, 35, .18);
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-modal { background: rgba(72, 66, 62, .34); }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-sheet {
  border-color: #c9c2ba; background: #f8f6f2; color: #30292e;
  box-shadow: 0 18px 55px rgba(45, 39, 35, .2);
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-sheet::before { background: #bbb4ac; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-head { border-bottom-color: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-title span { color: #776d65; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-close {
  border-color: #c8c3bb; background: #ebe8e3; color: #514750;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-choice {
  border-color: #d5d0c9; background: #fffefa; color: #40383d;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-choice:hover,
html[data-theme="light"][data-theme-page="home"] .mobile-folder-choice:focus-visible {
  border-color: #a89ba9; background: #f2eeea;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-choice[aria-current="true"] {
  border-color: #c39045; background: #f5e8d2; color: #704a12;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-choice.favorite[aria-current="true"] {
  border-color: #d18b99; background: #f7e2e7; color: #843a49;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-choice-count {
  background: #ece8e3; color: #71666d;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-new {
  border-color: #8eb2ca; background: #e8f1f6; color: #315e84;
}
html[data-theme="light"][data-theme-page="home"] :is(.folder-chip.folder-search-add, .mobile-folder-search, .folder-search-toggle) {
  border-color: #b47a28; background: #f5e8d2; color: #704a12;
}
html[data-theme="light"][data-theme-page="home"] :is(.folder-chip.folder-search-add, .mobile-folder-search, .folder-search-toggle):hover,
html[data-theme="light"][data-theme-page="home"] :is(.folder-chip.folder-search-add, .mobile-folder-search, .folder-search-toggle):focus-visible {
  border-color: #8f5d18; background: #eed9b7; color: #5b390b;
}
html[data-theme="light"][data-theme-page="home"] .folder-search-toggle[aria-pressed="true"] {
  border-color: #79a18a; background: #e2eee6; color: #315e43;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher {
  border-color: #c9a66c;
  background: radial-gradient(circle at 100% 0, rgba(181, 126, 43, .12), transparent 52%), #faf6ee;
  color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher:hover,
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher:focus-visible { border-color: #a9782d; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher-kicker { color: #795112; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher-name { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher-note { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher-count {
  background: #f1e2c9; color: #744608;
}
html[data-theme="light"][data-theme-page="home"] .mobile-folder-launcher-chevron { color: #776d65; }
html[data-theme="light"][data-theme-page="home"] :is(.auth-modal, .users-modal) { background: rgba(86, 78, 69, .24); }
html[data-theme="light"][data-theme-page="home"] :is(.auth-tab, .milonga-name-cancel, #guideDone) {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: #5e535b;
}
html[data-theme="light"][data-theme-page="home"] .auth-tab.active { border-color: #4d7fa6; background: #4d7fa6; color: white; }
html[data-theme="light"][data-theme-page="home"] :is(.song, .rec-block) { border-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .date-heading::after { border-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] :is(.song .title, .auth-title, .guide-steps, .font-pick output) { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.song .artist, #sessionInfo, #authInfo, .font-pick, #empty, .auth-form label, .auth-note, .feedback-chat-intro) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] #selectBar { background: #f1efeb; border-bottom-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .feedback-chat-bubble { background: #e7e4df; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .feedback-chat-message.user .feedback-chat-bubble { background: #d9eaf5; color: #254e6c; }
html[data-theme="light"][data-theme-page="home"] .guide-actions,
html[data-theme="light"][data-theme-page="home"] #controls {
  border-color: #d2cec7;
  background: rgba(248, 243, 238, .95);
}
html[data-theme="light"][data-theme-page="home"] #identifyBtn { background: #e2dfda; color: #342d31; }

/* The signed-in/guest workspace lives on the home document but has its own
   high-specificity dark styles. Keep every reading and search surface paper
   light; dark color is reserved for photographs and the brand artwork. */
html[data-theme="light"][data-theme-page="home"] #searchInput {
  border-color: #c8c3bb;
  background: #fbfaf7;
  color: #2d272c;
  box-shadow: inset 0 1px 2px rgba(45, 39, 35, .035);
}
html[data-theme="light"][data-theme-page="home"] #searchInput::placeholder { color: #81786f; }
html[data-theme="light"][data-theme-page="home"] :is(#searchClear, .random-button, .neo-filter-button, .neo-shuffle, .neo-page-button, .rep-close, .rep-more) {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: #514750;
}
html[data-theme="light"][data-theme-page="home"] :is(.random-doorway-button, .random-rabbit-button) { background-image: none; }
html[data-theme="light"][data-theme-page="home"] .random-doorway-button { border-color: #c6a36b; background: #f3e7d2; color: #744f16; }
html[data-theme="light"][data-theme-page="home"] .random-rabbit-button { border-color: #b8a7c5; background: #eee7f1; color: #664b78; }
html[data-theme="light"][data-theme-page="home"] .search-lyric-snippet {
  border-left-color: #9d7aab;
  background: #eee8f0;
  color: #514750;
}
html[data-theme="light"][data-theme-page="home"] .search-lyric-snippet mark { background: #f0d397; color: #4c350f; }
html[data-theme="light"][data-theme-page="home"] :is(.search-meta, .neo-meta, .neo-empty, .neo-page-summary) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .neo-row .title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .neo-playlist { border-color: #a9c7b4; background: #e3efe6; color: #365d45; }
html[data-theme="light"][data-theme-page="home"] .neo-artist-filter input { border-color: #c8c3bb; background: #fbfaf7; color: #30292e; }

html[data-theme="light"][data-theme-page="home"] :is(.artist-chip, .artist-profile-link, .artist-timeline-link, .rep-profile-link, .rep-timeline-link, .rep-todotango-link) {
  border-color: #b8c8d4;
  background: #e8f0f5;
  color: #315e84;
}
html[data-theme="light"][data-theme-page="home"] .favorite-toggle { border-color: #c8c3bb; background: #f0ede8; color: #776c74; }
html[data-theme="light"][data-theme-page="home"] .favorite-toggle[aria-pressed="true"] { border-color: #c96878; background: #f4ced5; color: #843a49; }
html[data-theme="light"][data-theme-page="home"] .song .links a {
  border-color: #d4b57f;
  background: #f5ead8;
  color: #704a12;
  box-shadow: 0 1px 2px rgba(74, 55, 31, .05);
}
html[data-theme="light"][data-theme-page="home"] .song .links a::after { color: #9a7138; }
html[data-theme="light"][data-theme-page="home"] .song .links a:hover,
html[data-theme="light"][data-theme-page="home"] .song .links a:focus-visible {
  border-color: #a9782d;
  background: #edddc2;
  color: #583807;
}
html[data-theme="light"][data-theme-page="home"] .song .links a.local-explore-link {
  border-color: #a9c2d4;
  background: #e7f0f5;
  color: #315e84;
}
html[data-theme="light"][data-theme-page="home"] .song .links a.local-explore-link::after { color: #6689a3; }
html[data-theme="light"][data-theme-page="home"] .song .links a.local-explore-link:hover,
html[data-theme="light"][data-theme-page="home"] .song .links a.local-explore-link:focus-visible {
  border-color: #6f9aba;
  background: #d9e9f2;
  color: #244e70;
}

html[data-theme="light"][data-theme-page="home"] .recording-view-switch { border-color: #cbc5bd; background: #e9e6e1; }
html[data-theme="light"][data-theme-page="home"] .recording-view-option { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .recording-view-option.active { background: #fbfaf7; color: #30292e; box-shadow: 0 1px 5px rgba(45, 39, 35, .1), inset 0 0 0 1px #c8c3bb; }
html[data-theme="light"][data-theme-page="home"] .recording-timeline {
  border-color: #d2cec7;
  background: radial-gradient(circle at 8% 0, rgba(61, 113, 155, .08), transparent 34%), linear-gradient(155deg, #faf9f6, #ece9e4 78%);
  box-shadow: 0 10px 28px rgba(45, 39, 35, .055);
}
html[data-theme="light"][data-theme-page="home"] .recording-timeline-heading strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recording-timeline-axis { background: linear-gradient(90deg, #cbc4cc, #8f8497 50%, #cbc4cc); }
html[data-theme="light"][data-theme-page="home"] .recording-timeline-tick::after { background: #c8c1c9; }
html[data-theme="light"][data-theme-page="home"] .recording-timeline-dot { border-color: #faf9f6; }
html[data-theme="light"][data-theme-page="home"] .recording-timeline-node-label,
html[data-theme="light"][data-theme-page="home"] .recording-timeline-node:hover .recording-timeline-node-label,
html[data-theme="light"][data-theme-page="home"] .recording-timeline-node:focus-visible .recording-timeline-node-label,
html[data-theme="light"][data-theme-page="home"] .recording-timeline-node.active .recording-timeline-node-label {
  border-color: #d7d2cb;
  background: rgba(251, 250, 247, .94);
  color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .recording-timeline-node-label strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recording-timeline-node-label span { color: #746a72; }
html[data-theme="light"][data-theme-page="home"] .recording-timeline-focus { border-color: #d2cec7; background: rgba(247, 245, 241, .9); }
html[data-theme="light"][data-theme-page="home"] :is(.recording-compare-toggle, .recording-comparison-clear) { border-color: #c8c3bb; background: #ebe8e3; color: #625861; }
html[data-theme="light"][data-theme-page="home"] .recording-compare-toggle.selected { border-color: #b58a47; background: #f1e2c7; color: #704b12; }
html[data-theme="light"][data-theme-page="home"] .recording-comparison { border-color: #d2cec7; background: #fbfaf7; }
html[data-theme="light"][data-theme-page="home"] .recording-comparison-head { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recording-comparison-label { background: #eeebe6; color: #665c64; }
html[data-theme="light"][data-theme-page="home"] .recording-comparison-value { border-left-color: #d2cec7; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .recording-comparison-value.different { background: #f5ecd9; color: #725016; }
html[data-theme="light"][data-theme-page="home"] .recording-comparison-row.header .recording-comparison-value { background: #e7eff4; color: #315e84; }

html[data-theme="light"][data-theme-page="home"] .song-content { border-color: #d2cec7; background: #fbfaf7; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .song-content :is(textarea, input) { border-color: #c8c3bb; background: #fffefa; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .song-content button { border-color: #c8c3bb; background: #ebe8e3; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .one-more-doorway {
  border-color: #d7bf99;
  background:
    radial-gradient(circle at 100% 0, rgba(181, 126, 43, .12), transparent 42%),
    linear-gradient(135deg, #fbf7ef, #f1ebe2 72%);
  box-shadow: 0 10px 28px rgba(76, 57, 38, .08);
}
html[data-theme="light"][data-theme-page="home"] .one-more-doorway::after { border-color: rgba(157, 105, 35, .38); }
html[data-theme="light"][data-theme-page="home"] .doorway-eyebrow { color: #8b5c1c; }
html[data-theme="light"][data-theme-page="home"] .doorway-title { color: #352b25; }
html[data-theme="light"][data-theme-page="home"] .doorway-copy { color: #675d55; }
html[data-theme="light"][data-theme-page="home"] .doorway-chip { border-color: #d8cfc2; background: #f5f0e8; color: #71665d; }
html[data-theme="light"][data-theme-page="home"] .doorway-local { color: #82776f; }
html[data-theme="light"][data-theme-page="home"] .doorway-compare { border-top-color: #ddd4c8; }
html[data-theme="light"][data-theme-page="home"] .doorway-recording { background: #fffdfa; }
html[data-theme="light"][data-theme-page="home"] .doorway-recording-label,
html[data-theme="light"][data-theme-page="home"] .doorway-recording-meta { color: #776d65; }
html[data-theme="light"][data-theme-page="home"] .doorway-recording-title { color: #3c332d; }
html[data-theme="light"][data-theme-page="home"] .rabbit-hole {
  border-color: #cdbbd6;
  background:
    radial-gradient(circle at 0 0, rgba(142, 92, 170, .12), transparent 34%),
    linear-gradient(145deg, #faf6fb, #eee8f0 74%);
  color: #403640;
  box-shadow: 0 10px 30px rgba(69, 50, 75, .08);
}
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-eyebrow,
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-step-label { color: #765283; }
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-title { color: #3c303f; }
html[data-theme="light"][data-theme-page="home"] :is(.rabbit-hole-copy, .rabbit-hole-summary, .rabbit-hole-stop) { color: #71656f; }
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-progress span {
  border-color: #cbbfd0;
  background: #f5f1f6;
  color: #817683;
}
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-progress span.revealed {
  border-color: #9f74b2;
  background: #e9ddef;
  color: #684776;
}
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-progress i { background: #cbbfd0; }
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-step + .rabbit-hole-step::before {
  background: linear-gradient(#bca7c5, #9f74b2);
}
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-next {
  border-color: #9f74b2;
  background: #e5d7eb;
  color: #583b65;
}
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-next:hover,
html[data-theme="light"][data-theme-page="home"] .rabbit-hole-next:focus-visible { background: #d9c5e2; }
html[data-theme="light"][data-theme-page="home"] .lyric-tab { border-color: #cbc5bd; background: #eeeae5; color: #665c64; }
html[data-theme="light"][data-theme-page="home"] .lyric-tab.matched { border-color: #6f9aba; color: #315e84; }
html[data-theme="light"][data-theme-page="home"] .lyric-tab.active { border-color: #5f8caf; background: #dcebf4; color: #264f6d; }
html[data-theme="light"][data-theme-page="home"] .lyric-similar-hit { border-color: #d2cec7; background: #f4f0f3; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .lyric-similar-title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .introduction-evidence-chip { border-color: #bdcbd4; background: #eaf1f5; color: #315e84; }
html[data-theme="light"][data-theme-page="home"] :is(.lyric-text, .translation-md) { border-color: #d2cec7; background: #fffefa; color: #40383d; }
html[data-theme="light"][data-theme-page="home"] .translation-disclaimer { background: #f4ead8; color: #66543a; }
html[data-theme="light"][data-theme-page="home"] .lyric-language-toolbar { border-color: #d2cec7; background: linear-gradient(135deg, #f7f4f0, #ece8e4); }
html[data-theme="light"][data-theme-page="home"] .lyric-language-title { color: #40383d; }
html[data-theme="light"][data-theme-page="home"] .song-content :is(.lyric-language-toggle, .lyric-version-toggle) { border-color: #c8c3bb; background: #f4f1ed; color: #665c64; }
html[data-theme="light"][data-theme-page="home"] .song-content .lyric-language-toggle.active { border-color: #b67b29; background: #f0d59e; color: #54380d; }
html[data-theme="light"][data-theme-page="home"] .song-content .lyric-version-toggle.active { border-color: #6f9aba; background: #dcebf4; color: #264f6d; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-scroll { border-color: #d2cec7; background: #fffefa; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 22px rgba(45,39,35,.07); }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table { color: #40383d; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table thead th { border-color: #d2cec7; background: rgba(244, 241, 237, .97); color: #665c64; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table thead .lyric-column-original { color: #815718; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table thead .lyric-column-english { color: #315e84; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table thead .lyric-column-chinese { color: #755585; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table tbody td { border-color: #e0dcd6; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table tbody tr:not(.lyric-stanza-gap):hover > td { background: #f4f1ed; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table .lyric-line-number,
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table .lyric-line-number-head { border-color: #ded9d3; background: #eeebe6; color: #8a7f86; }
html[data-theme="light"][data-theme-page="home"] .lyric-aligned-table .lyric-stanza-gap td { border-color: #ddd8d2; background: #f1eee9; }
html[data-theme="light"][data-theme-page="home"] .lyric-alignment-note { border-color: #d2cec7; background: #f3f0eb; color: #746a72; }

html[data-theme="light"][data-theme-page="home"] :is(.trial-limits-admin, .invites-admin) { border-color: #d2cec7; background: #f5f3ef; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] #usersInviteCreate { border-color: #c8c3bb; background: #ebe8e3; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .lunf-reg { border-color: #c9bfd0; background: #eee8f0; color: #6c5278; }

/* Account, recognition, and monitoring dialogs are rendered inside the home
   document too. Their compact cards and controls otherwise keep the original
   near-black admin palette even after the surrounding modal turns light. */
html[data-theme="light"][data-theme-page="home"] :is(.user-data-pane, .user-row, .user-data-row, .invite-row) { border-color: #ddd8d2; }
html[data-theme="light"][data-theme-page="home"] :is(.user-data-title, .user-data-stat-number, .invites-title) { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.user-data-meta, .user-data-preview, .user-data-stat-label, .invite-meta, .users-empty, .user-row span, .metrics-route-head) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] :is(.user-data-section h3, .metrics-status-line, .invite-state) { color: #514750; }
html[data-theme="light"][data-theme-page="home"] .user-data-stat {
  border-color: #d5d0c9;
  background: #f5f3ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}
html[data-theme="light"][data-theme-page="home"] .metrics-timeline {
  border-color: #d5d0c9;
  background: linear-gradient(180deg, #faf9f6, #efede8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}
html[data-theme="light"][data-theme-page="home"] .metrics-bar { background: #648aa4; }
html[data-theme="light"][data-theme-page="home"] .metrics-bar.error { background: #bd675b; }
html[data-theme="light"][data-theme-page="home"] .metrics-periods button {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: #625861;
}
html[data-theme="light"][data-theme-page="home"] .metrics-periods button.active {
  border-color: #6f9aba;
  background: #dcebf4;
  color: #264f6d;
}
html[data-theme="light"][data-theme-page="home"] .metrics-route-row { border-color: #ddd8d2; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .metrics-route-name { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.user-actions button, .invites-head button, .invite-row button) {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: #514750;
}
html[data-theme="light"][data-theme-page="home"] .user-actions .users-data { border-color: #a9c2d4; color: #315e84; }
html[data-theme="light"][data-theme-page="home"] .user-actions .users-data.active { border-color: #5f8caf; background: #dcebf4; color: #264f6d; }
html[data-theme="light"][data-theme-page="home"] .user-actions .users-delete { border-color: #d9aaa6; background: #f6e5e3; color: #93483f; }
html[data-theme="light"][data-theme-page="home"] .user-actions .users-purge { border-color: #d8b58d; background: #f5eadb; color: #87521f; }

/* Milonga summaries, recovery, playlist review, and the lyric explorer are
   rendered on demand. They must be themed explicitly because their base
   rules predate the shared light palette and use literal near-black colors. */
html[data-theme="light"][data-theme-page="home"] .milonga-panel { border-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .milonga-count-settings {
  border-color: #d2cec7; background: #f7f5f1; color: #675f66;
}
html[data-theme="light"][data-theme-page="home"] .milonga-count-settings > strong { color: #403940; }
html[data-theme="light"][data-theme-page="home"] .milonga-count-settings input {
  border-color: #c8c1c8; background: #fff; color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .milonga-count-settings button {
  border-color: #c9a66d; background: #fff7e8; color: #7b541b;
}
html[data-theme="light"][data-theme-page="home"] .milonga-count-note { color: #857d84; }
html[data-theme="light"][data-theme-page="home"] .milonga-title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .milonga-refresh {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: #625861;
}
html[data-theme="light"][data-theme-page="home"] .milonga-refresh:hover { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .milonga-headline { color: #514750; }
html[data-theme="light"][data-theme-page="home"] :is(.milonga-source, .milonga-caveat, .milonga-empty, .tanda-note, .tanda-study-note) { color: #746a72; }
html[data-theme="light"][data-theme-page="home"] .milonga-empty.error { color: #a8443c; }
html[data-theme="light"][data-theme-page="home"] .milonga-stats { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .milonga-stat {
  border-color: #d2cec7;
  background: #f7f5f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}
html[data-theme="light"][data-theme-page="home"] .milonga-stat-number { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .milonga-stat-label { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .milonga-section-title { color: #514750; }
html[data-theme="light"][data-theme-page="home"] :is(.tanda-block, .milonga-folder-card) {
  border-color: #d2cec7;
  background: #fbfaf7;
  color: #40383d;
  box-shadow: 0 5px 16px rgba(45, 39, 35, .045);
}
html[data-theme="light"][data-theme-page="home"] .tanda-block.incomplete { border-color: #c8a66c; }
html[data-theme="light"][data-theme-page="home"] :is(.tanda-name, .milonga-folder-name) { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.tanda-meta, .tanda-version, .milonga-folder-counts) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] :is(.tanda-songs, .milonga-folder-line) { color: #514750; }
html[data-theme="light"][data-theme-page="home"] :is(.tanda-source-link, .tanda-song-meta, .dance-rating-status) { color: #817580 !important; }
html[data-theme="light"][data-theme-page="home"] .tanda-songs a:hover,
html[data-theme="light"][data-theme-page="home"] .tanda-song-head:hover,
html[data-theme="light"][data-theme-page="home"] .milonga-folder-name:hover { color: #315e84; }
html[data-theme="light"][data-theme-page="home"] .tanda-song-head::before { color: #8b8087; }
html[data-theme="light"][data-theme-page="home"] .tanda-song-details {
  border-left-color: #9a879f;
  background: #f3f0f2;
}
html[data-theme="light"][data-theme-page="home"] .tanda-style-editor {
  border-color: #d2cec7;
  background: #f2efeb;
}
html[data-theme="light"][data-theme-page="home"] .tanda-style-edit-label { color: #625861; }
html[data-theme="light"][data-theme-page="home"] .tanda-style-edit-select {
  border-color: #c8c3bb;
  background: #fffefa;
  color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] :is(.tanda-style-edit-save, .tanda-style-edit-cancel, .tanda-decision-button) {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: #514750;
}
html[data-theme="light"][data-theme-page="home"] .tanda-decision { border-top-color: #ddd8d2; }
html[data-theme="light"][data-theme-page="home"] .tanda-decision-prompt { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .dance-rating { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .dance-rating-label { color: #625861; }
html[data-theme="light"][data-theme-page="home"] .dance-rating-star { color: #c5bdc4; }
html[data-theme="light"][data-theme-page="home"] .cortina-block {
  border-color: #aaa0a9;
  background: #f1eee9;
  color: #625861;
}
html[data-theme="light"][data-theme-page="home"] .cortina-label { background: #d8d1d8; color: #4f464d; }

html[data-theme="light"][data-theme-page="home"] .milonga-recovery {
  border-color: #bdc9d2;
  background:
    radial-gradient(circle at 100% 0, rgba(61, 113, 155, .09), transparent 34%),
    linear-gradient(145deg, #fbfaf7, #eeece8 72%);
  box-shadow: 0 14px 36px rgba(45, 39, 35, .08);
}
html[data-theme="light"][data-theme-page="home"] .milonga-recovery.has-pending { border-color: #c6a36b; }
html[data-theme="light"][data-theme-page="home"] .recovery-head h3 { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-head p { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .recovery-score span { color: #817580; }
html[data-theme="light"][data-theme-page="home"] .recovery-progress { background: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .recovery-stat {
  border-color: #d5d0c9;
  background: rgba(255, 254, 250, .72);
}
html[data-theme="light"][data-theme-page="home"] .recovery-stat strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-stat span { color: #746a72; }
html[data-theme="light"][data-theme-page="home"] .recovery-guide-launch {
  border-color: #cfb889; background: rgba(247, 239, 223, .82);
}
html[data-theme="light"][data-theme-page="home"] .recovery-guide-launch span { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] :is(
  .recovery-guide-launch button, .recovery-guide-exit, .recovery-guide-nav button,
  .recovery-guide-complete button, .recovery-guide-undo button
) {
  border-color: #bd9b64; background: #f2e6d0; color: #704a18;
}
html[data-theme="light"][data-theme-page="home"] :is(
  .recovery-guide-launch button, .recovery-guide-exit, .recovery-guide-nav button,
  .recovery-guide-complete button, .recovery-guide-undo button
):hover,
html[data-theme="light"][data-theme-page="home"] :is(
  .recovery-guide-launch button, .recovery-guide-exit, .recovery-guide-nav button,
  .recovery-guide-complete button, .recovery-guide-undo button
):focus-visible { border-color: #9c7337; background: #ead7b8; }
html[data-theme="light"][data-theme-page="home"] .recovery-guide {
  border-color: #cfc5b7; background: rgba(255, 254, 250, .62);
}
html[data-theme="light"][data-theme-page="home"] .recovery-guide-head strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.recovery-guide-head span, .recovery-guide-nav span, .recovery-guide-complete span) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .recovery-guide-exit {
  border-color: #c8c3bb; background: #ebe8e3; color: #625861;
}
html[data-theme="light"][data-theme-page="home"] .recovery-guide-undo {
  border-color: #9fbfae; background: #e4efe7;
}
html[data-theme="light"][data-theme-page="home"] .recovery-guide-undo.has-error {
  border-color: #d4a09c; background: #f7e8e6;
}
html[data-theme="light"][data-theme-page="home"] .recovery-guide-undo strong { color: #365d45; }
html[data-theme="light"][data-theme-page="home"] .recovery-guide-undo span { color: #55705f; }
html[data-theme="light"][data-theme-page="home"] .recovery-guide-undo button {
  border-color: #7aa58d; background: #d6e9dc; color: #2f6242;
}
html[data-theme="light"][data-theme-page="home"] .recovery-guide-undo.has-error :is(strong, span) { color: #8a4945; }
html[data-theme="light"][data-theme-page="home"] .recovery-history {
  border-color: #d2cec7; background: rgba(251, 250, 247, .74);
}
html[data-theme="light"][data-theme-page="home"] .recovery-history > summary { color: #514750; }
html[data-theme="light"][data-theme-page="home"] .recovery-history > summary span,
html[data-theme="light"][data-theme-page="home"] .recovery-history > summary::after { color: #746a72; }
html[data-theme="light"][data-theme-page="home"] .recovery-history-list { border-top-color: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .recovery-history-item { border-top-color: #e0dcd6; }
html[data-theme="light"][data-theme-page="home"] .recovery-history-item > div strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-history-item > div span { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .recovery-history-item button {
  border-color: #c8c3bb; background: #ebe8e3; color: #625861;
}
html[data-theme="light"][data-theme-page="home"] .recovery-history-item button:hover,
html[data-theme="light"][data-theme-page="home"] .recovery-history-item button:focus-visible {
  border-color: #9a879f; background: #eee9ef; color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .recovery-done { border-color: #9fbfae; background: #e4efe7; color: #365d45; }
html[data-theme="light"][data-theme-page="home"] .recovery-group > h4 { color: #514750; }
html[data-theme="light"][data-theme-page="home"] .recovery-card { border-color: #d2cec7; background: rgba(251, 250, 247, .9); }
html[data-theme="light"][data-theme-page="home"] .recovery-card.open { border-color: #aa9bad; }
html[data-theme="light"][data-theme-page="home"] .recovery-card-toggle:hover,
html[data-theme="light"][data-theme-page="home"] .recovery-card-toggle:focus-visible { background: #f0ede8; }
html[data-theme="light"][data-theme-page="home"] .recovery-card-toggle strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-card-toggle small,
html[data-theme="light"][data-theme-page="home"] .recovery-card-toggle > b { color: #746a72; }
html[data-theme="light"][data-theme-page="home"] .recovery-card-body { border-top-color: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .recovery-card-body h5 { color: #625861; }
html[data-theme="light"][data-theme-page="home"] :is(.recovery-note, .recovery-message) { color: #746a72; }
html[data-theme="light"][data-theme-page="home"] .recovery-choice {
  border-color: #d2cec7;
  background: #f7f5f1;
  color: #40383d;
}
html[data-theme="light"][data-theme-page="home"] .recovery-choice:hover,
html[data-theme="light"][data-theme-page="home"] .recovery-choice:focus-visible { border-color: #9a879f; background: #eee9ef; }
html[data-theme="light"][data-theme-page="home"] .recovery-choice strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-choice span { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .recovery-choice b { color: #315e84; }
html[data-theme="light"][data-theme-page="home"] .recovery-search input { border-color: #c8c3bb; background: #fffefa; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-search button { border-color: #7fa0ba; background: #e2edf4; color: #244f70; }
html[data-theme="light"][data-theme-page="home"] .recovery-recognizer-choice {
  border-color: #c8c3bb; background: #fffefa; color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .recovery-recognizer-choice:hover,
html[data-theme="light"][data-theme-page="home"] .recovery-recognizer-choice:focus-visible { border-color: #9a879f; background: #eee9ef; }
html[data-theme="light"][data-theme-page="home"] .recovery-recognizer-choice strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .recovery-recognizer-choice :is(b, span) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .recovery-recognizer-choice.local { border-color: #8fb49f; }
html[data-theme="light"][data-theme-page="home"] .recovery-song-list { color: #514750; }
html[data-theme="light"][data-theme-page="home"] .recovery-version-list .vblock { border-top-color: #d8d3cc; }

html[data-theme="light"][data-theme-page="home"] .youtube-verdict { border-color: #c6b3ce; background: #f1e8f2; color: #704e79; }
html[data-theme="light"][data-theme-page="home"] .youtube-verdict.is-tanda { border-color: #9fbfae; background: #e4efe7; color: #365d45; }
html[data-theme="light"][data-theme-page="home"] .youtube-opinion-label { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] :is(.youtube-folder-import, .imported-tanda-head) { border-color: #d2cec7; background: #fbfaf7; color: #625861; }
html[data-theme="light"][data-theme-page="home"] .youtube-folder-explanation { color: #625861; }
html[data-theme="light"][data-theme-page="home"] .youtube-folder-question { border-top-color: #d8d3cc; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .youtube-folder-choices button { border-color: #c8c3bb; background: #ebe8e3; color: #514750; }
html[data-theme="light"][data-theme-page="home"] .youtube-folder-controls input { border-color: #c8c3bb; background: #fffefa; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .imported-tanda-title { color: #30292e; }

html[data-theme="light"][data-theme-page="home"] .lyric-explorer-layout button { border-color: #c8c3bb; background: #ebe8e3; color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-layout button.active { border-color: #8d8279; background: #8d8279; color: #fff; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-mosaic { background: #e5e1dc; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-tile { border-color: #e5e1dc; color: #fffefa; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-bar,
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-word-song { border-top-color: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] :is(.lyric-explorer-name, .lyric-explorer-popular-title, .lyric-explorer-sample-lyric) { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.lyric-explorer-name-translation, .lyric-explorer-value, .lyric-explorer-popular-meta, .lyric-explorer-sample-translation, .lyric-explorer-sample-status) { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-track { background: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-detail { border-top-color: #cfc8d1; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-detail-title { color: #514750; }
html[data-theme="light"][data-theme-page="home"] .lyric-explorer-chip { border-color: #c9bfd0; background: #eee8f0; color: #5f4b68; }
html[data-theme="light"][data-theme-page="home"] button.lyric-explorer-chip { color: #315e84; }

/* Home landing content. These selectors intentionally use `background`
   shorthand so the dark-mode gradients from the page stylesheet cannot show
   through in light mode. */
html[data-theme="light"][data-theme-page="home"] :is(.home-access, .home-playlist-section, .home-how, .home-feedback, .home-notice) {
  border-color: #d2cec7;
  background: #fbfaf7;
  box-shadow: 0 10px 28px rgba(45, 39, 35, .055);
}
html[data-theme="light"][data-theme-page="home"] .home-sample {
  border-color: #d2cec7;
  background: #f8f6f2;
}
html[data-theme="light"][data-theme-page="home"] .home-sample:hover,
html[data-theme="light"][data-theme-page="home"] .home-sample:focus-visible { border-color: #b3833d; background: #f4eee4; }
html[data-theme="light"][data-theme-page="home"] .home-sample-label { border-bottom-color: #ded5c7; color: #8b5c18; }
html[data-theme="light"][data-theme-page="home"] .home-sample strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-sample-meta { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-sample-action { color: #744608; }
html[data-theme="light"][data-theme-page="home"] .home-doorway-invite {
  border-color: #c8ae83;
  background: radial-gradient(circle at 92% 0, rgba(191, 132, 48, .12), transparent 36%), #f7f1e7;
  color: #30292e;
  box-shadow: inset 3px 0 0 #c48a36;
}
html[data-theme="light"][data-theme-page="home"] .home-doorway-invite:hover,
html[data-theme="light"][data-theme-page="home"] .home-doorway-invite:focus-visible {
  border-color: #a9782d;
  box-shadow: inset 3px 0 0 #a9782d, 0 10px 26px rgba(45, 39, 35, .08);
}
html[data-theme="light"][data-theme-page="home"] .home-doorway-title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-doorway-meta { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-doorway-label,
html[data-theme="light"][data-theme-page="home"] .home-doorway-action { color: #815718; }
html[data-theme="light"][data-theme-page="home"] .home-access-card { background: #f7f5f1; }
html[data-theme="light"][data-theme-page="home"] .home-access-card h4 { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-access-list li { color: #665e57; }
html[data-theme="light"][data-theme-page="home"] .home-access-card.public .home-access-list li {
  border-color: #d7cec0;
  background: #f1ece3;
  color: #5e554c;
}
html[data-theme="light"][data-theme-page="home"] .home-access-card .home-text-button {
  border-color: #b9c9d5;
  background: #edf3f7;
  color: #315e84;
}
html[data-theme="light"][data-theme-page="home"] .home-pwa-install {
  border-color: #c9a56c;
  background: radial-gradient(circle at 5% 15%, rgba(191, 132, 48, .12), transparent 34%), #f7f2e9;
  box-shadow: 0 10px 28px rgba(45, 39, 35, .07);
}
html[data-theme="light"][data-theme-page="home"] .home-pwa-title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-pwa-body { color: #645b53; }
html[data-theme="light"][data-theme-page="home"] .home-pwa-step,
html[data-theme="light"][data-theme-page="home"] .home-pwa-status { color: #7b7067; }
html[data-theme="light"][data-theme-page="home"] .pwa-install-instructions {
  border-color: #d7c7ae;
  background: rgba(251, 250, 247, .82);
}
html[data-theme="light"][data-theme-page="home"] .pwa-install-steps { color: #5f574f; }

/* Playlist entry points. */
html[data-theme="light"][data-theme-page="home"] .home-playlist-summary,
html[data-theme="light"][data-theme-page="home"] .home-playlist-evidence li {
  border-color: #d2cec7;
  background: #f0ede8;
  color: #665e57;
}
html[data-theme="light"][data-theme-page="home"] .home-playlist-card {
  border-color: #d2cec7;
  background: #f8f6f2;
  color: #30292e;
}
html[data-theme="light"][data-theme-page="home"] .home-playlist-card:hover { border-color: #a9a096; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-platform.spotify { background: #dcece1; color: #286041; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-platform.youtube { background: #f3dfdd; color: #8a3d3a; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-platform.live { background: #e3e2f2; color: #514f87; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-quality { border-color: #cab992; color: #74561d; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-card h4,
html[data-theme="light"][data-theme-page="home"] .home-playlist-metric strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] :is(.home-playlist-owner, .home-playlist-note, .home-playlist-footnote) { color: #746b64; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-metric {
  border: 1px solid #ded9d2;
  background: #f0ede8;
}
html[data-theme="light"][data-theme-page="home"] .home-playlist-metric span { color: #776e66; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-style { background: #e8e4de; color: #605851; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-limit {
  border-color: #d4bc91;
  background: #f4ead8;
  color: #744f16;
}
html[data-theme="light"][data-theme-page="home"] .home-playlist-import {
  border-color: #7fa0ba;
  background: #e2edf4;
  color: #244f70;
}
html[data-theme="light"][data-theme-page="home"] .home-playlist-import:hover,
html[data-theme="light"][data-theme-page="home"] .home-playlist-import:focus-visible { background: #d4e5ef; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-source {
  border-color: #cbc5bd;
  background: #f0ede8;
  color: #5f5750;
}
html[data-theme="light"][data-theme-page="home"] .home-playlist-source:hover,
html[data-theme="light"][data-theme-page="home"] .home-playlist-source:focus-visible { border-color: #91887f; color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-playlist-state { border-color: #c8c3bb; color: #71686f; }

/* Every feature preview gets a paper canvas in light mode. */
html[data-theme="light"][data-theme-page="home"] .home-journey {
  border-color: #d2cec7;
  background: #fbfaf7;
}
html[data-theme="light"][data-theme-page="home"] .home-journey:hover,
html[data-theme="light"][data-theme-page="home"] .home-journey:focus-visible { border-color: #a9a096; background: #f7f5f1; }
html[data-theme="light"][data-theme-page="home"] .home-journey-title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-journey-kicker { color: #356d96; }
html[data-theme="light"][data-theme-page="home"] .home-journey-visual {
  border-color: #d2cec7;
  background: #f0ede8;
}
html[data-theme="light"][data-theme-page="home"] .home-musicality-preview { background: radial-gradient(circle at 16% 44%, #e6e0e7, #f2efeb 58%); }
html[data-theme="light"][data-theme-page="home"] .home-musicality-orbit { border-color: #ab9bb3; color: #79591e; }
html[data-theme="light"][data-theme-page="home"] .home-musicality-step { color: #756d66; }
html[data-theme="light"][data-theme-page="home"] .home-musicality-step.active { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-listening-score-preview { background: linear-gradient(145deg, #f5edea, #f7f5f1); }
html[data-theme="light"][data-theme-page="home"] .home-score-melody {
  border-color: #d7d0ca;
  background: repeating-linear-gradient(90deg, transparent 0 24.8%, #dfd9d3 25%);
}
html[data-theme="light"][data-theme-page="home"] .home-score-pulses { border-bottom-color: #d7d0ca; }
html[data-theme="light"][data-theme-page="home"] .home-resource-preview { background: #f3efeb; }
html[data-theme="light"][data-theme-page="home"] .home-resource-card {
  border-color: #d7c7c5;
  border-left-color: #b65855;
  background: #fbf8f5;
}
html[data-theme="light"][data-theme-page="home"] .home-resource-card strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-resource-meta { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-resource-arrow { border-color: #c6c0b9; color: #356d96; }
html[data-theme="light"][data-theme-page="home"] .home-recording-preview { background: #f0ede8; }
html[data-theme="light"][data-theme-page="home"] .home-preview-search {
  border-color: #d4bc91;
  background: #f5ecdc;
  color: #744f16;
}
html[data-theme="light"][data-theme-page="home"] .home-recording-row { background: #fbfaf7; }
html[data-theme="light"][data-theme-page="home"] .home-recording-name { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-recording-meta { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-mates-preview { background: radial-gradient(circle at 12% 38%, #eee5d7, #f3f0eb 58%); }
html[data-theme="light"][data-theme-page="home"] .home-tanda-mates-seed { border-right-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-mates-seed strong,
html[data-theme="light"][data-theme-page="home"] .home-tanda-mate-title { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-mates-seed-meta { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-mate-row { border-bottom-color: #d8d3cc; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-mate-fit { background: #dcece1; color: #286041; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-preview {
  background: linear-gradient(rgba(98, 78, 102, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(98, 78, 102, .07) 1px, transparent 1px), radial-gradient(circle at 35% 48%, #eee7ec, #f5f2ee 68%);
  background-size: 28px 28px, 28px 28px, auto;
}
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-node { border-color: #f7f3ef; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-node em { color: #5f575f; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-node.seed em { color: #4c3f38; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-evidence {
  border-left-color: #d2cec7;
  background: rgba(244, 241, 237, .9);
}
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-evidence > span {
  border-color: #d8d3cc;
  background: #fbfaf7;
}
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-evidence b { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-evidence small { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-city-map-preview,
html[data-theme="light"][data-theme-page="home"] .home-tango-where-preview { background: #e8e5df; }
html[data-theme-page="home"] .home-tango-where-snapshot-light { display: none; }
html[data-theme="light"][data-theme-page="home"] .home-tango-where-snapshot-dark { display: none; }
html[data-theme="light"][data-theme-page="home"] .home-tango-where-snapshot-light { display: block; }
html[data-theme="light"][data-theme-page="home"] .home-city-map-mini {
  border-color: rgba(138, 102, 43, .38);
  background: rgba(249, 246, 240, .9);
  box-shadow: 0 8px 20px rgba(45, 39, 35, .16);
}
html[data-theme="light"][data-theme-page="home"] .home-city-map-shape { background: #8ba2ab; }
html[data-theme="light"][data-theme-page="home"] .home-city-map-map-label { color: #665440; }
html[data-theme="light"][data-theme-page="home"] .home-reading-preview { background: #f5f2ee; }
html[data-theme="light"][data-theme-page="home"] .home-reading-column + .home-reading-column,
html[data-theme="light"][data-theme-page="home"] .home-reading-tool + .home-reading-tool { border-left-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .home-reading-line { background: #b7afb9; }
html[data-theme="light"][data-theme-page="home"] .home-reading-column.translation .home-reading-line { background: #b79d6e; }
html[data-theme="light"][data-theme-page="home"] .home-reading-chip { background: #eee1ca; color: #744f16; }
html[data-theme="light"][data-theme-page="home"] .home-reading-tools { border-top-color: #d2cec7; background: #ebe8e3; }
html[data-theme="light"][data-theme-page="home"] .home-reading-hit { color: #5f575f; }
html[data-theme="light"][data-theme-page="home"] .home-reading-neighbors { color: #735d80; }
html[data-theme="light"][data-theme-page="home"] .home-lyric-culture-preview { background: #f1ede6; }
html[data-theme="light"][data-theme-page="home"] .home-culture-world { background: #e7e2da; }
html[data-theme="light"][data-theme-page="home"] .home-culture-thread {
  border-color: rgba(138, 102, 43, .34);
  background: rgba(249, 246, 240, .9);
  color: #744f16;
}
html[data-theme="light"][data-theme-page="home"] .home-people-preview { background: radial-gradient(circle at 24% 50%, rgba(191, 132, 48, .1), transparent 25%), linear-gradient(135deg, #f0e9ee, #f7f4f0 68%); }
html[data-theme="light"][data-theme-page="home"] .home-person-portrait {
  border-color: #c6bec9;
  background: #ebe7ec;
  box-shadow: 0 6px 18px rgba(45, 39, 35, .12);
}
html[data-theme="light"][data-theme-page="home"] .home-people-subject strong { color: #30292e; }
html[data-theme="light"][data-theme-page="home"] .home-people-branch {
  border-color: #d2cad4;
  background: rgba(251, 250, 247, .92);
  box-shadow: 0 6px 16px rgba(45, 39, 35, .08);
}
html[data-theme="light"][data-theme-page="home"] .home-people-branch-copy strong { color: #3a3338; }
html[data-theme="light"][data-theme-page="home"] .home-people-branch-copy em { color: #756c73; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-preview { background: #f2efeb; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-block { border-bottom-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-lines span { background: #aaa2ad; }
html[data-theme="light"][data-theme-page="home"] .home-tanda-lines span:last-child { background: #d2ccd3; }
html[data-theme="light"][data-theme-page="home"] .home-discover-preview { background: linear-gradient(112deg, rgba(133, 104, 148, .15), transparent 54%), #f2efeb; }
html[data-theme="light"][data-theme-page="home"] .home-discover-routes path { stroke: #9c8ba2; }
html[data-theme="light"][data-theme-page="home"] .home-discover-seed {
  border-color: #c8c0ca;
  background: #fbfaf7;
  box-shadow: 0 4px 10px rgba(45, 39, 35, .1);
}
html[data-theme="light"][data-theme-page="home"] .home-discover-seed::after { background: #aaa1ac; box-shadow: 0 -5px 0 #d3cdd4; }
html[data-theme="light"][data-theme-page="home"] .home-discover-pick {
  border-color: #b99a68;
  background: linear-gradient(145deg, #f3e7d4, #eee9e4 72%);
  box-shadow: 0 7px 18px rgba(45, 39, 35, .12);
}
html[data-theme="light"][data-theme-page="home"] .home-discover-caption { color: #71666d; }
html[data-theme="light"][data-theme-page="home"] .home-lyrics-map-preview { background: #f2efeb; }
html[data-theme="light"][data-theme-page="home"] .home-lyrics-bar { background: #b18c68; }
html[data-theme="light"][data-theme-page="home"] .home-lyrics-bar:nth-child(2n) { background: #7899aa; }
html[data-theme="light"][data-theme-page="home"] .home-lyrics-bar:nth-child(3n) { background: #927b9a; }
html[data-theme="light"][data-theme-page="home"] .home-neo-preview { background: #f2efeb; }
html[data-theme="light"][data-theme-page="home"] .home-neo-cover {
  border-color: #ccd8dd;
  background: linear-gradient(180deg, transparent 48%, rgba(238, 244, 246, .92)), linear-gradient(145deg, #cfe5ed, #edf3f4 68%);
}
html[data-theme="light"][data-theme-page="home"] .home-neo-cover:nth-child(2) {
  border-color: #ddc9ba;
  background: linear-gradient(180deg, transparent 48%, rgba(247, 239, 232, .92)), linear-gradient(145deg, #e5c5ab, #f2e8e0 68%);
}
html[data-theme="light"][data-theme-page="home"] .home-neo-cover:nth-child(3) {
  border-color: #d8c9da;
  background: linear-gradient(180deg, transparent 48%, rgba(244, 238, 244, .92)), linear-gradient(145deg, #ddc5df, #f0e8f0 68%);
}
html[data-theme="light"][data-theme-page="home"] .home-neo-cover span { color: #403b3e; }

/* Explanations, feedback and footer surfaces. */
html[data-theme="light"][data-theme-page="home"] .home-how-list li { border-left-color: #d2cec7; color: #625950; }
html[data-theme="light"][data-theme-page="home"] .home-feedback .guide-feedback {
  grid-column: auto;
  grid-row: auto;
  border-color: #d2cec7;
  background: #f5f3ef;
}
html[data-theme="light"][data-theme-page="home"] #authorFeedbackSubmit {
  border-color: #7fa0ba;
  background: #e2edf4;
  color: #244f70;
}
html[data-theme="light"][data-theme-page="home"] .home-notice-summary::after { border-color: #c6b48f; color: #79591e; }
html[data-theme="light"][data-theme-page="home"] .home-notice-intro { color: #665e57; }
html[data-theme="light"][data-theme-page="home"] .home-notice-body { border-top-color: #d8d2c9; }
html[data-theme="light"][data-theme-page="home"] .home-notice-list li {
  border-color: #d8d2c9;
  background: #f7f4ef;
}
html[data-theme="light"][data-theme-page="home"] .home-notice-list strong { color: #79591e; }
html[data-theme="light"][data-theme-page="home"] .home-notice-list span { color: #665e57; }
html[data-theme="light"][data-theme-page="home"] .home-license { border-top-color: #d2cec7; }
html[data-theme="light"][data-theme-page="home"] .home-license-copy .home-license-disclaimer {
  border-left-color: #a9782d;
  background: #f4ead8;
  color: #64543a;
}
html[data-theme="light"][data-theme-page="home"] :is(.home-project-journal-title, .home-license-title) { color: #514941; }

/* Relationship graph. The timeline itself was already designed as paper and
   therefore needs no inversion. */
html[data-theme="light"][data-theme-page="graph"] {
  --bg: #f1efeb; --panel: #fbfaf7; --panel-soft: #ebe8e3; --line: #d2cec7;
  --text: var(--tc-light-text); --muted: var(--tc-light-muted); --quiet: var(--tc-light-faint); --blue: #356d96;
  --pink: #9c496a; --gold: #8e651f; --green: #367755; --red: #b34841;
}
html[data-theme="light"][data-theme-page="graph"] .topbar { border-bottom-color: #d2cec7; background: rgba(250, 246, 241, .9); }
html[data-theme="light"][data-theme-page="graph"] .language-choice { background: #ebe8e3; color: #746873; }
html[data-theme="light"][data-theme-page="graph"] .language-choice[aria-pressed="true"] { background: #dcebf4; color: #264f6d; }
html[data-theme="light"][data-theme-page="graph"] :is(.intro, .details-panel, .method-note, .career-feature) { background-color: #fbfaf7; border-color: #d2cec7; }
html[data-theme="light"][data-theme-page="graph"] .search {
  border-color: #d2cec7;
  background: #fbfaf7;
  box-shadow: 0 14px 36px rgba(45, 39, 35, .08);
}
html[data-theme="light"][data-theme-page="graph"] :is(.search input, .person-result, .relationship-button, .evidence-card) { background: #f5f3ef; color: #30292e; }
html[data-theme="light"][data-theme-page="graph"] .person-result:hover { background: #e4eef5; }

/* Tanda graph and builder. */
html[data-theme="light"][data-theme-page="tanda-graph"] {
  --bg: #f1efeb; --panel: #fbfaf7; --panel-raised: #edeae5; --line: #d2cec7;
  --line-bright: #bbaab8; --ink: var(--tc-light-text); --muted: var(--tc-light-muted); --faint: var(--tc-light-faint);
  --gold: #82560f; --coral: #b75543; --rose: #9e4968; --teal: #397f77;
  --blue: #3d719b; --shadow: 0 18px 60px rgba(45, 39, 35, .13);
}
html[data-theme="light"][data-theme-page="tanda-builder"] {
  --bg: #f1efeb; --panel: #fbfaf7; --panel-deep: #edeae5; --line: #d2cec7;
  --line-bright: #bbaab8; --ink: var(--tc-light-text); --muted: var(--tc-light-muted); --faint: var(--tc-light-faint);
  --gold: #82560f; --gold-soft: rgba(130, 86, 15, .1); --coral: #b75543;
  --teal: #397f77; --violet: #715c8b;
}
html[data-theme="light"]:is([data-theme-page="tanda-graph"], [data-theme-page="tanda-builder"]) .topbar { background: rgba(250, 246, 241, .9); }
html[data-theme="light"]:is([data-theme-page="tanda-graph"], [data-theme-page="tanda-builder"]) .language-choice[aria-pressed="true"] { background: #eee0cd; color: #6b4711; }
html[data-theme="light"][data-theme-page="tanda-builder"] :is(.seed-search, .draft-section, .analysis-section, .dimension-section, .suggestion-section, .evidence-section, .method-section) {
  border-color: #d2cec7;
  background: #fbfaf7;
  color: #30292e;
  box-shadow: 0 16px 42px rgba(45, 39, 35, .08);
}
html[data-theme="light"][data-theme-page="tanda-builder"] :is(.seed-panel, .recording-choice, .draft-slot, .signal-card, .dimension-card, .suggestion-card, .pair-card, .sequence-card) { background: #f7f5f1; border-color: #d2cec7; color: #30292e; }
html[data-theme="light"][data-theme-page="tanda-builder"] .draft-slot.filled { background: linear-gradient(145deg, #f5e9dd, #fbfaf7 68%); border-color: #caa995; }
html[data-theme="light"][data-theme-page="tanda-builder"] :is(.seed-form input, .slot-actions button, .draft-actions button) { background: #eeebe6; color: #5f545c; }
html[data-theme="light"][data-theme-page="tanda-builder"] :is(.seed-form button, .suggestion-add, .recording-choice button) { border-color: #c6a36b; background: #f1e5d1; color: #704a12; }
html[data-theme="light"][data-theme-page="tanda-graph"] :is(.controls, .graph-filters, .graph-controls, .graph-stage, .inspector, .person-search-panel, .person-results, .mate-card, .tanda-card, .method-card) { background-color: #fbfaf7; border-color: #d2cec7; color: #30292e; }
html[data-theme="light"][data-theme-page="tanda-graph"] :is(input, select, .language-choice, .person-view-tabs button, .search-result, .mate-evidence, .mate-explore, .tanda-song) { background-color: #ebe8e3; color: #4f464d; }
html[data-theme="light"][data-theme-page="tanda-graph"] .controls { box-shadow: 0 -10px 34px rgba(45, 39, 35, .06); }
html[data-theme="light"][data-theme-page="tanda-graph"] :is(.graph-source-control select, .year-control input, .segmented-control, .search-control input, .person-context, .person-tanda-song, .person-tanda-summary, .person-tanda-song.matched) { border-color: #d2cec7; background: #f5f3ef; color: #30292e; }
html[data-theme="light"][data-theme-page="tanda-graph"] .segmented-control > div { background: #ebe8e3; }
html[data-theme="light"][data-theme-page="tanda-graph"] .segmented-control button { color: #6b6068; }
html[data-theme="light"][data-theme-page="tanda-graph"] .segmented-control button[aria-pressed="true"] { background: #d9e5ec; color: #294f69; }
html[data-theme="light"][data-theme-page="tanda-graph"] .graph-toolbar { background: #eeebe6; }
html[data-theme="light"][data-theme-page="tanda-graph"] .zoom-controls button { border-color: #cbc5bd; background: #fbfaf7; color: #625861; }
html[data-theme="light"][data-theme-page="tanda-graph"] .canvas-shell {
  background:
    linear-gradient(rgba(88, 105, 112, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 105, 112, .08) 1px, transparent 1px),
    radial-gradient(circle at 50% 46%, #f9faf8, #e8ece9 72%);
  background-size: 44px 44px, 44px 44px, auto;
}
html[data-theme="light"][data-theme-page="tanda-graph"] .graph-status { background: rgba(246, 245, 241, .82); color: #625861; }
html[data-theme="light"][data-theme-page="tanda-graph"] .loader { border-color: #cfc8c0; border-top-color: #91651b; }
html[data-theme="light"][data-theme-page="tanda-graph"] .tooltip { border-color: #c8bfb5; background: rgba(251, 250, 247, .97); color: #30292e; }

/* City and cultural maps. */
html[data-theme="light"][data-theme-page="city-map"] {
  --map-bg: #f1eee8; --map-panel: #fbfaf7; --map-panel-2: #ece9e4;
  --map-ink: #302b2d; --map-muted: #62595b; --map-faint: #6b6367;
  --map-line: #d2cec7; --map-gold: #795112; --map-teal: #2d6c64;
  --map-rose: #91413e; --map-blue: #315e84;
}
html[data-theme="light"][data-theme-page="city-map"] .map-topbar { border-bottom-color: #d2cec7; background: rgba(247, 244, 239, .9); }
html[data-theme="light"][data-theme-page="city-map"] .language-choice { background: #ebe8e3; }
html[data-theme="light"][data-theme-page="city-map"] .language-choice[aria-pressed="true"] { background: #eadfce; color: #5f4317; }
html[data-theme="light"][data-theme-page="city-map"] :is(.map-intro-stats span, .map-controls, .map-timeline, .place-drawer, .place-fact, .mention-card, .mention-translation, .chronology-frame, .photo-archive-empty, .photo-card, .load-more) {
  border-color: #d2cec7; background-color: #fbfaf7; color: #302b2d;
}
html[data-theme="light"][data-theme-page="city-map"] .place-drawer {
  background: linear-gradient(160deg, #fbfaf7, #f0ede8 72%);
}
html[data-theme="light"][data-theme-page="city-map"] .map-intro-visual { border-color: #c9c3ba; background: #e8e5df; box-shadow: 0 22px 58px rgba(45, 39, 35, .13); }
html[data-theme="light"][data-theme-page="city-map"] .intro-photo-panel { background: #e8e5df; }
html[data-theme="light"][data-theme-page="city-map"] .map-intro-visual::after { background: linear-gradient(180deg, transparent 48%, rgba(248, 244, 237, .2) 66%, rgba(238, 232, 223, .92)); }
html[data-theme="light"][data-theme-page="city-map"] .map-intro-visual figcaption { color: #332d2d; text-shadow: 0 1px 0 rgba(255, 255, 255, .72); }
html[data-theme="light"][data-theme-page="city-map"] .map-intro-visual figcaption a { color: #704b12; }
html[data-theme="light"][data-theme-page="city-map"] .map-workspace { background: #fbfaf7; box-shadow: 0 24px 64px rgba(45, 39, 35, .13); }
html[data-theme="light"][data-theme-page="city-map"] .map-filterbar { background: rgba(248, 246, 242, .96); }
html[data-theme="light"][data-theme-page="city-map"] :is(.map-usage button[aria-pressed="true"], .map-layers button[aria-pressed="true"]) { border-color: #c4bbb2; background: #e5e1dc; color: #302b2d; }
html[data-theme="light"][data-theme-page="city-map"] .map-viewport { background: radial-gradient(ellipse at 72% 34%, rgba(75, 126, 139, .11), transparent 42%), linear-gradient(145deg, #edf0ee, #e3e8e7 58%, #eef0ed); }
html[data-theme="light"][data-theme-page="city-map"] .map-barrio { fill: #dde1df; stroke: #afb9b7; }
html[data-theme="light"][data-theme-page="city-map"] .map-barrio.has-data { fill: #c6d4d2; stroke: #78938f; }
html[data-theme="light"][data-theme-page="city-map"] .map-barrio.has-data:hover { fill: #b3c9c5; stroke: #527b75; }
html[data-theme="light"][data-theme-page="city-map"] .map-barrio.is-selected { fill: color-mix(in srgb, var(--map-accent) 42%, #dfe8e5); stroke: #77541b; }
html[data-theme="light"][data-theme-page="city-map"] .map-label { fill: #4d5552; stroke: #eef0ed; }
html[data-theme="light"][data-theme-page="city-map"] .map-label.is-selected { fill: #563b10; }
html[data-theme="light"][data-theme-page="city-map"] :is(.map-stage, .map-status, .map-place-rail) { background-color: #e9eef0; }
html[data-theme="light"][data-theme-page="city-map"] .map-place-rail button[aria-pressed="true"] { background: #dbe4e7; color: #302b2d; }

html[data-theme="light"]:is([data-theme-page="tango-where"], [data-theme-page="tango-where-cats"]) {
  --ink: #332d27; --muted: #6d655d; --paper: #f1efe9; --panel: #fbfaf6;
  --panel-2: #eee7dc; --line: rgba(62, 49, 37, .16); --line-strong: rgba(62, 49, 37, .3);
  --gold: #82560f; --gold-light: #795112; --coral: #a44738; --sea: #316c69;
  --map-land: #d8d3ca;
}
html[data-theme="light"]:is([data-theme-page="tango-where"], [data-theme-page="tango-where-cats"]) :is(.where-topbar, .cats-topbar) { background: rgba(248, 244, 236, .93); }
html[data-theme="light"]:is([data-theme-page="tango-where"], [data-theme-page="tango-where-cats"]) .language-choice { color: #766e65; }
html[data-theme="light"]:is([data-theme-page="tango-where"], [data-theme-page="tango-where-cats"]) .language-choice[aria-pressed="true"] { color: #fffaf1; }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-principle, .where-map-shell, .where-city-list, .where-method) { background: #fbfaf6; color: #332d27; }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-topbar > p, .where-hero-body, .where-drawer-summary) { color: #625a52; }
html[data-theme="light"][data-theme-page="tango-where"] .where-hero-lede { color: #725e3e; }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-verified time, .where-footer strong) { color: #51483f; }
html[data-theme="light"][data-theme-page="tango-where"] .pulse-globe {
  background:
    radial-gradient(circle at 50% 50%, rgba(169, 119, 39, .1), transparent 44%),
    linear-gradient(90deg, transparent 49.7%, rgba(169, 119, 39, .16) 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, rgba(169, 119, 39, .16) 50%, transparent 50.3%);
  box-shadow: 0 0 70px rgba(169, 119, 39, .06), inset 0 0 70px rgba(93, 82, 66, .11);
}
html[data-theme="light"][data-theme-page="tango-where"] .pulse-city { border-color: #f1efe9; }
html[data-theme="light"][data-theme-page="tango-where"] .where-hero-pulse b { color: #665b4c; }
html[data-theme="light"][data-theme-page="tango-where"] .where-search input {
  border-color: #c9c2b8;
  background: #fbfaf6;
  color: #332d27;
}
html[data-theme="light"][data-theme-page="tango-where"] .where-search input::placeholder { color: #81786f; }
html[data-theme="light"][data-theme-page="tango-where"] .where-filters button { color: #675f57; }
html[data-theme="light"][data-theme-page="tango-where"] .where-map-shell {
  border-color: #c9c2b8;
  box-shadow: 0 18px 48px rgba(55, 46, 38, .11);
}
html[data-theme="light"][data-theme-page="tango-where"] .where-map-viewport {
  background: radial-gradient(circle at 50% 52%, rgba(63, 119, 116, .09), transparent 44%), #e9e7e1;
}
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .map-sphere {
  fill: #edeae4;
  stroke: rgba(63, 119, 116, .42);
}
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .map-graticule { stroke: rgba(81, 91, 86, .2); }
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .country {
  fill: #d5d0c7;
  stroke: rgba(79, 70, 61, .28);
}
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .country.has-city {
  fill: #c5bdaa;
  stroke: rgba(141, 100, 31, .62);
}
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .country.has-city:hover,
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .country.has-city:focus { fill: #b6aa90; }
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .country.active { fill: #b99e6c; }
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .city-node .city-core { stroke: #f5f2ec; }
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .city-node.active .city-core { stroke: #74501a; }
html[data-theme="light"][data-theme-page="tango-where"] #worldMap .city-label {
  fill: #3f3933;
  stroke: #edeae4;
}
html[data-theme="light"][data-theme-page="tango-where"] .where-map-status { background: rgba(237, 234, 228, .94); color: #625a52; }
html[data-theme="light"][data-theme-page="tango-where"] .where-map-navigation {
  border-color: rgba(141, 100, 31, .34);
  background: rgba(251, 250, 246, .94);
  box-shadow: 0 7px 20px rgba(55, 46, 38, .13);
}
html[data-theme="light"][data-theme-page="tango-where"] .where-map-navigation button {
  color: #51483f;
  background: rgba(251, 250, 246, .94);
}
html[data-theme="light"][data-theme-page="tango-where"] .where-map-navigation button:hover,
html[data-theme="light"][data-theme-page="tango-where"] .where-map-navigation button:focus-visible { color: #74501a; background: #eee7dc; }
html[data-theme="light"][data-theme-page="tango-where"] .where-map-navigation button:disabled { color: #aaa198; background: rgba(244, 241, 235, .92); }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-map-gesture-hint, .where-map-legend) {
  border-color: rgba(79, 70, 61, .18);
  background: rgba(251, 250, 246, .9);
  color: #665e56;
}
html[data-theme="light"][data-theme-page="tango-where"] .country-swatch { border-color: rgba(141, 100, 31, .55); background: #c5bdaa; }
html[data-theme="light"][data-theme-page="tango-where"] .where-city-button {
  border-color: #d4cec5;
  background: #f0e9de;
  color: #3f3933;
}
html[data-theme="light"][data-theme-page="tango-where"] .where-city-button small { color: #756d65; }
html[data-theme="light"][data-theme-page="tango-where"] .where-city-button.active { background: #eee1c9; color: #332d27; }
html[data-theme="light"][data-theme-page="tango-where"] .where-drawer {
  background: linear-gradient(160deg, #f7f4ef, #eee9e2 64%);
  color: #332d27;
  scrollbar-color: #c3b8a8 transparent;
}
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-drawer-empty small, .where-city-snapshot-note, .where-resource-card > p) { color: #6c645c; }
html[data-theme="light"][data-theme-page="tango-where"] .drawer-compass :is(b, em) { color: #6f665b; }
html[data-theme="light"][data-theme-page="tango-where"] .where-city-mark { background: #e7e2da; }
html[data-theme="light"][data-theme-page="tango-where"] .where-city-snapshot {
  border-color: rgba(141, 100, 31, .3);
  background: #f8f5f0;
}
html[data-theme="light"][data-theme-page="tango-where"] .where-article-excerpt { color: #514a43; }
html[data-theme="light"][data-theme-page="tango-where"] .where-resource-card {
  border-color: #d5cec5;
  background: rgba(251, 250, 246, .72);
  color: #332d27;
}
html[data-theme="light"][data-theme-page="tango-where"] .where-resource-card:hover,
html[data-theme="light"][data-theme-page="tango-where"] .where-resource-card:focus-visible { background: #f1e8d8; }
html[data-theme="light"][data-theme-page="tango-where"] .where-resource-meta span { background: #e5e0d9; color: #625a52; }
html[data-theme="light"][data-theme-page="tango-where"] .where-resource-source { color: #795718; }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-resource-verified, .where-check-note, .where-footer) { color: #6f675f; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cat-card { background: rgba(255, 250, 242, .9); color: #332d27; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cat-welcome-card { background: linear-gradient(145deg, #fbfaf6, #eee7dc 72%); box-shadow: 0 30px 90px rgba(77, 57, 37, .2); }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cats-filters button { border-color: #d0c8bd; background: rgba(251, 248, 241, .94); color: #655d54; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cats-filters button[aria-pressed="true"] { border-color: #9d7028; background: #ead9b8; color: #5c3d0d; }

/* Editorial and reference pages. */
html[data-theme="light"]:is([data-theme-page="resources"], [data-theme-page="musicality"]) {
  --ink: #f1efeb; --ink-raised: #fbfaf7; --ink-soft: #ebe8e3;
  --line: #d2cec7; --line-strong: #bbaab8; --paper: #30292e;
  --muted: var(--tc-light-muted); --faint: var(--tc-light-faint); --gold: #91601a; --gold-soft: #795112;
  --blue: #356d96; --green: #347451; --rose: #a04f49;
}
html[data-theme="light"]:is([data-theme-page="resources"], [data-theme-page="musicality"]) .site-header { border-bottom-color: #d2cec7; background: rgba(250, 246, 241, .92); }
html[data-theme="light"]:is([data-theme-page="resources"], [data-theme-page="musicality"]) .language-choice { background: #ebe8e3; color: #746873; }
html[data-theme="light"]:is([data-theme-page="resources"], [data-theme-page="musicality"]) .language-choice[aria-pressed="true"] { background: #eadfce; color: #654514; }
html[data-theme="light"][data-theme-page="resources"] :is(.resource-card, .resource-feature, .resource-method, .resource-status, .resource-list) { background: #fbfaf7; color: #30292e; }
html[data-theme="light"][data-theme-page="resources"] .curation-note {
  border-color: #d7c4a6;
  background: linear-gradient(110deg, #f5ecdf, #f8f4ee);
}
html[data-theme="light"][data-theme-page="resources"] .curation-note p { color: #6e6256; }
html[data-theme="light"][data-theme-page="resources"] .cornerstone-intro {
  border-color: #c6a36b;
  background:
    radial-gradient(circle at 88% 18%, rgba(181, 126, 43, .13), transparent 22rem),
    linear-gradient(135deg, #f7eddd, #f4f0ea);
  box-shadow: 0 22px 58px rgba(76, 57, 38, .1);
}
html[data-theme="light"][data-theme-page="resources"] .cornerstone-intro > p:last-child { color: #695e52; }
html[data-theme="light"][data-theme-page="resources"] .resource-card {
  background:
    radial-gradient(circle at 92% 10%, rgba(160, 79, 73, .06), transparent 24rem),
    #fbfaf7;
  box-shadow: 0 18px 46px rgba(45, 39, 35, .09);
}
html[data-theme="light"][data-theme-page="resources"] .resource-card-featured {
  border-color: #c9b58f;
  background:
    radial-gradient(circle at 92% 10%, rgba(181, 126, 43, .1), transparent 25rem),
    #fbfaf7;
}
html[data-theme="light"][data-theme-page="resources"] .resource-summary { color: #675e66; }
html[data-theme="light"][data-theme-page="resources"] .resource-card-featured .resource-aside { border-color: #d8cbb7; }
html[data-theme="light"][data-theme-page="resources"] .resource-link { background: #f5e5e2; color: #873f3a; }
html[data-theme="light"][data-theme-page="resources"] .score-center { background: #eee4d4; color: #79551a; }
html[data-theme="light"][data-theme-page="musicality"] :is(.lab-hero, .principle-card, .concept-card, .detail-panel, .detail-card, .guide-card, .legend-card, .source-card) { background: #fbfaf7; color: #30292e; }
html[data-theme="light"][data-theme-page="musicality"] :is(.filter-button, .meta-pill) { background: #ebe8e3; color: #625761; }
html[data-theme="light"][data-theme-page="musicality"] .language-switch { background: #ebe8e3; }
html[data-theme="light"][data-theme-page="musicality"] .language-switch button[aria-pressed="true"] { background: #fbfaf7; color: #30292e; }
html[data-theme="light"][data-theme-page="musicality"] :is(.pulse-center, .orbit-label, .concept-toolbar, .editorial-boundary, .review-pill) { border-color: #d2cec7; background: #f5f1e9; color: #51474d; }
html[data-theme="light"][data-theme-page="musicality"] .pulse-center { background: radial-gradient(circle at 35% 30%, #f3e4ca, #e7d5b7 70%); box-shadow: 0 18px 45px rgba(133, 91, 30, .13); }
html[data-theme="light"][data-theme-page="musicality"] .orbit-three { border-color: #c7c0c8; }
html[data-theme="light"][data-theme-page="musicality"] .filter-row.categories { border-top-color: #d8d2cc; }
html[data-theme="light"][data-theme-page="musicality"] .concept-detail {
  border-color: #d2cec7;
  background: linear-gradient(160deg, #fbfaf7, #f0ede8 72%);
  scrollbar-color: #bdb5bd transparent;
}
html[data-theme="light"][data-theme-page="musicality"] .guide-shell {
  border-color: #d2cec7;
  background: #fbfaf7;
  box-shadow: 0 24px 65px rgba(45, 39, 35, .1);
}
html[data-theme="light"][data-theme-page="musicality"] .guide-masthead {
  border-bottom-color: #d7cec3;
  background: linear-gradient(115deg, #f5e8d8, #f6f1eb 55%, #eaf0f4);
}
html[data-theme="light"][data-theme-page="musicality"] .audio-boundary {
  border-bottom-color: #d7cec3;
  background: #f5ecdf;
  color: #66543a;
}
html[data-theme="light"][data-theme-page="musicality"] .guide-question {
  border-color: #cfc1d3;
  background: #f3edf4;
}
html[data-theme="light"][data-theme-page="musicality"] .guide-sources {
  border-color: #d2cec7;
  background: #f3f0eb;
}
html[data-theme="light"][data-theme-page="musicality"] .source-item { border-bottom-color: #ddd7d1; }
html[data-theme="light"][data-theme-page="musicality"] .source-title { color: #51474d; }

html[data-theme="light"][data-theme-page="people"] {
  --ink: #f1efeb; --ink-soft: #ebe8e3; --ink-raised: #e7e4df;
  --paper: var(--tc-light-text); --paper-warm: #51474d; --paper-muted: var(--tc-light-faint);
  --line: #d2cec7; --line-soft: #e2dfda; --plum: #83506b; --plum-light: #9e607f;
  --gold: #8f641d; --blue: #3c7190; --green: #47795b; --red: #a94f49;
}
html[data-theme="light"][data-theme-page="people"] .site-header { border-bottom-color: #d2cec7; background: rgba(250, 246, 241, .92); }
html[data-theme="light"][data-theme-page="people"] .language-choice { background: #ebe8e3; color: #746873; }
html[data-theme="light"][data-theme-page="people"] .language-choice[aria-pressed="true"] { background: #eadfce; color: #654514; }
html[data-theme="light"][data-theme-page="people"] :is(.people-search, .quick-fact, .career-item, .source-attribution-panel, .adaptation-notice, .full-translation, .related-card) { background: #fbfaf7; border-color: #d2cec7; color: #30292e; }
html[data-theme="light"][data-theme-page="people"] .filter-panel {
  border-color: #d2cec7;
  background: linear-gradient(145deg, #fbfaf7, #f0ede8 92%);
  color: #30292e;
}
html[data-theme="light"][data-theme-page="people"] .person-card {
  border-color: #d8d1c9;
  background: #fbfaf7;
  color: #292227;
  box-shadow: 0 18px 46px rgba(45, 39, 35, .1);
}
html[data-theme="light"][data-theme-page="people"] .portrait-shell { background: #e7e1db; }
html[data-theme="light"][data-theme-page="people"] .portrait-fallback { color: #685c64; }
html[data-theme="light"][data-theme-page="people"] :is(.search-row input, .place-filter-group select, .sort-control select, .filter-chip, .load-more) { background: #eeebe6; color: #51474d; }
html[data-theme="light"][data-theme-page="people"] #searchButton { border-color: #b78b53; background: #ead9bd; color: #5c3d17; }

html[data-theme="light"][data-theme-page="lyric-culture"] {
  --culture-bg: #f1efeb; --culture-panel: #fbfaf6; --culture-panel-warm: #f0e5d5;
  --culture-ink: #342e29; --culture-muted: #625a52; --culture-faint: #675e55;
  --culture-line: #d2cec7; --culture-gold: #795112; --culture-teal: #2d6c64;
  --culture-rust: #9b4f39;
}
html[data-theme="light"][data-theme-page="lyric-culture"] .culture-topbar { border-bottom-color: #d2cec7; background: rgba(249, 245, 237, .92); }
html[data-theme="light"][data-theme-page="lyric-culture"] .language-choice { background: #f0e8dc; }
html[data-theme="light"][data-theme-page="lyric-culture"] .language-choice[aria-pressed="true"] { background: #eadcc6; color: #5e4218; }
html[data-theme="light"][data-theme-page="lyric-culture"] :is(.culture-stats span, .culture-topic, .song-card, .culture-method, .topic-browse-controls button) { background-color: #fbfaf6; color: #342e29; }
html[data-theme="light"][data-theme-page="lyric-culture"] .lyric-evidence-line mark { color: #704b10; }

html[data-theme="light"][data-theme-page="data-sources"] {
  --ink: var(--tc-light-text); --muted: var(--tc-light-muted); --quiet: var(--tc-light-faint); --paper: #f1efeb;
  --panel: #fbfaf7; --line: #d2cec7; --gold: #91601a; --blue: #356d96; --green: #347451;
}
html[data-theme="light"][data-theme-page="data-sources"] .language-choice { background: #ebe8e3; color: #746873; }
html[data-theme="light"][data-theme-page="data-sources"] .language-choice[aria-pressed="true"] { background: #eadfce; color: #654514; }
html[data-theme="light"][data-theme-page="data-sources"] :is(.hero, .source-feature, .use-card, .rights-card, .license-panel, .boundary-note, .closing) { border-color: #d2cec7; background: #fbfaf7; color: #30292e; box-shadow: 0 18px 55px rgba(45, 39, 35, .1); }
html[data-theme="light"][data-theme-page="data-sources"] :is(.hero-lede, .hero-zh, .source-copy, .use-card p, .rights-card p, .license-text, .boundary-note, .closing p) { color: #71666d; }
html[data-theme="light"][data-theme-page="data-sources"] .source-facts div { background: #f5f3ef; }
html[data-theme="light"][data-theme-page="data-sources"] .citation { background: #f3eee5; color: #655b52; }
html[data-theme="light"][data-theme-page="data-sources"] .citation strong { color: #4b4038; }
html[data-theme="light"][data-theme-page="data-sources"] .independent { border-color: #a8c7b3; background: #e4f0e7; color: #326447; }

/* Contrast corrections for light mode. Several components predate the theme
   switch and contain literal pale colors chosen for a near-black canvas. */
html[data-theme="light"][data-theme-page="home"] :is(
  .home-language-status, .home-privacy-note, .home-license-copy p,
  .guide-feedback-account-note, .guide-feedback-title
) { color: var(--tc-light-muted); }
html[data-theme="light"][data-theme-page="home"] .home-mascot-note { color: #745d3d; }
html[data-theme="light"][data-theme-page="home"] :is(
  .home-eyebrow, .home-reading-label, .home-reading-query,
  .home-tanda-mates-seed-label, .home-tanda-number, .home-pwa-eyebrow,
  .home-access-card.public .home-access-label
) { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="home"] :is(
  .home-recording-date, .home-reading-tool-label,
  .home-access-card.account .home-access-label, .home-project-journal-link,
  .home-license-source-link, .home-notice a
) { color: var(--tc-light-blue); }
html[data-theme="light"][data-theme-page="home"] .home-resource-type { color: var(--tc-light-rose); }
html[data-theme="light"][data-theme-page="home"] .home-tanda-score { color: var(--tc-light-green); }
html[data-theme="light"][data-theme-page="home"] .home-tanda-graph-evidence strong { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="home"] :is(.home-project-journal-link, .home-license-source-link, .home-notice a):hover { color: #244e70; }

html[data-theme="light"][data-theme-page="graph"] .graph-language-options button {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: var(--tc-light-muted);
}
html[data-theme="light"][data-theme-page="graph"] .graph-language-options button[aria-pressed="true"] {
  border-color: #5f8caf;
  background: #dcebf4;
  color: #264f6d;
}
html[data-theme="light"][data-theme-page="graph"] .search button { border-color: #315e84; background: #315e84; color: #fff; }
html[data-theme="light"][data-theme-page="graph"] .search button:hover { background: #244e70; }

html[data-theme="light"][data-theme-page="tanda-builder"] .lede,
html[data-theme="light"][data-theme-page="tanda-graph"] .lede { color: var(--tc-light-muted); }
html[data-theme="light"][data-theme-page="tanda-builder"] :is(
  .analysis-headline, .signal-card strong, .dimension-card h3,
  .dimension-subhead, .dimension-tag, .dimension-recording strong,
  .pair-card strong, .method-grid strong
) { color: var(--tc-light-text); }
html[data-theme="light"][data-theme-page="tanda-builder"] .graph-action {
  border-color: #9b7fa1;
  color: #63436d;
}
html[data-theme="light"][data-theme-page="tanda-builder"] .graph-action:hover { border-color: #795112; color: #5f400e; }
html[data-theme="light"][data-theme-page="tanda-graph"] :is(
  .search-result.person strong, .person-tanda-source a,
  .person-tanda-song strong, .section-heading h3,
  .mate-evidence strong, .tanda-card-head a, .tanda-song strong
) { color: var(--tc-light-text); }
html[data-theme="light"][data-theme-page="tanda-graph"] :is(.person-tanda-song b, .tanda-song::before) { color: var(--tc-light-faint); }
html[data-theme="light"][data-theme-page="tanda-graph"] .search-wrap kbd {
  border-color: #c8c3bb;
  background: #ebe8e3;
  color: var(--tc-light-faint);
}

html[data-theme="light"][data-theme-page="city-map"] .map-culture-link { border-color: #a47b3f; color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="city-map"] .map-culture-link i { color: #2d6c64; }
html[data-theme="light"][data-theme-page="city-map"] .map-place-rail .rail-kind.district { color: #674a8a; }
html[data-theme="light"][data-theme-page="city-map"] .map-place-rail .rail-kind.landmark { color: #91413e; }
html[data-theme="light"][data-theme-page="city-map"] .map-place-rail .rail-kind.street { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="city-map"] .map-place-rail .rail-kind.station { color: var(--tc-light-blue); }
html[data-theme="light"][data-theme-page="city-map"] .map-place-rail .rail-kind.city_edge { color: #674a8a; }
html[data-theme="light"][data-theme-page="city-map"] :is(
  .place-introduction-text, .place-fact h3, .mention-meta a,
  .mention-line, .mention-translation-line, .photo-archive-selection strong
) { color: var(--tc-light-text); }
html[data-theme="light"][data-theme-page="city-map"] :is(
  .place-fact > p, .place-summary, .mention-context,
  .mention-translation-context, .mention-translation-note,
  .chronology-frame figcaption span
) { color: #5f555d; }
html[data-theme="light"][data-theme-page="city-map"] :is(
  .place-introduction-sources, .place-fact-meta, .place-fact-citation small,
  .mention-sort-note, .mention-tags span, .place-sources,
  .photo-archive-selection i, .chronology-frame figcaption small,
  .chronology-frame figcaption a, .photo-archive-note, .photo-atlas-note
) { color: var(--tc-light-faint); }
html[data-theme="light"][data-theme-page="city-map"] :is(
  .place-introduction-sources a, .place-fact-heading i,
  .place-fact-citation strong, .place-fact-meta a,
  .mention-popularity, .mention-translation-head strong,
  .similar-lyrics, .place-photo-jump, .photo-chronology-label,
  .chronology-frame figcaption strong
) { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="city-map"] :is(
  .place-fact-meta time, .mention-translation > a,
  .mention-people a, .similar-results a
) { color: #2d6c64; }
html[data-theme="light"][data-theme-page="city-map"] .place-fact-heading span { color: var(--tc-light-faint); }

html[data-theme="light"][data-theme-page="tango-where"] .where-stats i { color: #675f57; }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-hero-action, .where-contribute) { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="tango-where"] .where-filters button[aria-pressed="true"] {
  border-color: #9d7028;
  background: #ead9b8;
  color: #5c3d0d;
}
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-map-head p, .where-map-status, .where-city-empty, .where-resource-empty) { color: #675f57; }
html[data-theme="light"][data-theme-page="tango-where"] :is(.where-verified b, .where-city-rail-head span) { color: #625a52; }
html[data-theme="light"]:is([data-theme-page="tango-where"], [data-theme-page="tango-where-cats"]) .skip-link {
  background: #ead9b8;
  color: #4b300a;
}
html[data-theme="light"][data-theme-page="tango-where-cats"] :is(
  .cats-topbar > p, .cats-hero-bottom > p:first-child, .cats-total,
  .cats-region > header span, .cat-country, .cat-tagline,
  .cats-footer, .cats-token-footnote
) { color: #625a52; }
html[data-theme="light"][data-theme-page="tango-where-cats"] :is(.cat-card.linked .cat-tagline, .cats-eyebrow, .cats-region > header p) { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cats-footer a { color: #51483f; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cat-welcome-body { color: #625a52; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cat-welcome-enter { border-color: #9d7028; background: #ead9b8; color: #4b300a; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cat-welcome-later { color: #625a52; }
html[data-theme="light"][data-theme-page="tango-where-cats"] .cats-token-footnote sup { color: var(--tc-light-gold); }

html[data-theme="light"]:is([data-theme-page="resources"], [data-theme-page="musicality"]) .language-choice,
html[data-theme="light"][data-theme-page="people"] .language-choice,
html[data-theme="light"][data-theme-page="data-sources"] .language-choice { color: var(--tc-light-muted); }
html[data-theme="light"][data-theme-page="musicality"] :is(
  .detail-section p, .reflection-list li, .statement-card p,
  .source-title
) { color: var(--tc-light-muted); }
html[data-theme="light"][data-theme-page="musicality"] .guide-question p { color: var(--tc-light-text); }
html[data-theme="light"][data-theme-page="musicality"] .primary-link { border-color: #795112; background: #795112; color: #fff; }
html[data-theme="light"][data-theme-page="musicality"] .primary-link:hover { background: #65430f; }

html[data-theme="light"][data-theme-page="people"] .hero-lede { color: var(--tc-light-muted); }
html[data-theme="light"][data-theme-page="people"] :is(.header-note, .coverage-note, .results-note, .sort-control, .site-footer) { color: var(--tc-light-faint); }
html[data-theme="light"][data-theme-page="people"] .filter-count { color: var(--tc-light-faint); }
html[data-theme="light"][data-theme-page="people"] .footer-links a { color: #5f555d; }

html[data-theme="light"][data-theme-page="lyric-culture"] .culture-principle { color: #514b47; }
html[data-theme="light"][data-theme-page="lyric-culture"] :is(
  #topicIndex a, .topic-copy h2, .song-card header a
) { color: var(--tc-light-text); }
html[data-theme="light"][data-theme-page="lyric-culture"] :is(
  .topic-body, .topic-terms dd, .lyric-evidence-line,
  .lyric-evidence-line.is-match, .lyric-excerpt-unavailable,
  .source-card p
) { color: #625a52; }
html[data-theme="light"][data-theme-page="lyric-culture"] :is(
  .topic-dek, .section-heading h3, .topic-terms dt,
  .song-open, .song-list-toggle, .source-card a, .culture-method > a
) { color: var(--tc-light-gold); }
html[data-theme="light"][data-theme-page="lyric-culture"] :is(.topic-review-badge, .song-evidence-terms) { color: #2d6c64; }

html[data-theme="light"][data-theme-page="data-sources"] :is(
  .source-byline, .source-facts dd, .boundary-note strong,
  .license-panel strong
) { color: var(--tc-light-text); }
html[data-theme="light"][data-theme-page="data-sources"] :is(.source-facts dt, .license-verbatim, footer) { color: var(--tc-light-faint); }
html[data-theme="light"][data-theme-page="data-sources"] :is(.source-actions a, .license-panel a) { color: var(--tc-light-gold); }

html[data-theme="light"][data-theme-page="listening-score"] #el-flete-listening-score :is(
  .accent-row-label, .body-guide-note, .melody-register,
  .score-rights-note
) { color: #675863; }
html[data-theme="light"][data-theme-page="listening-score"] .score-rights-note { color: #675863; }

@media (max-width: 760px) {
  .theme-toggle { width: var(--tc-touch-target); height: var(--tc-touch-target); }
  html[data-theme-page="home"] .home-hero-copy { padding: 16px 18px 22px; }
  html[data-theme-page="home"] .home-language-picker { margin-bottom: 11px; padding: 10px 11px 9px; }
  html[data-theme-page="home"] .home-language-head {
    display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px;
  }
  html[data-theme-page="home"] .home-language-status {
    min-width: 0; margin: 0 0 0 auto; overflow: hidden;
    text-align: right; text-overflow: ellipsis; white-space: nowrap;
  }
  html[data-theme-page="home"] .home-language-picker .language-choice-grid { padding-bottom: 2px; }
  html[data-theme-page="home"] .home-language-picker .home-font-pick {
    min-height: 34px; margin-top: 5px; padding-top: 6px;
  }
  html[data-theme-page="home"] .home-title {
    font-size: clamp(calc(34px * var(--app-font-scale)), 10.75vw, calc(44px * var(--app-font-scale)));
    line-height: 1.02;
  }
  html[data-theme-page="home"] .home-intro { margin-top: 11px; }
  html[data-theme-page="home"] .home-search { margin-top: 14px; }

  html[data-theme-page="home"] :is(.auth-close, .users-close) {
    min-width: var(--tc-touch-target); min-height: var(--tc-touch-target);
    display: inline-grid; place-items: center; padding: 0; border-radius: 999px;
  }
  html[data-theme-page="home"] .metrics-periods button,
  html[data-theme-page="home"] .favorite-toggle,
  html[data-theme-page="home"] .personal-note-toggle,
  html[data-theme-page="home"] .personal-note-actions button,
  html[data-theme-page="home"] .song-content .lyric-language-toggle,
  html[data-theme-page="home"] .song-content .lyric-version-toggle {
    min-height: var(--tc-touch-target);
  }
  html[data-theme-page="home"] .favorite-toggle { width: var(--tc-touch-target); height: var(--tc-touch-target); }
  html[data-theme-page="home"] .personal-note-toggle,
  html[data-theme-page="home"] .personal-note-actions button { padding: 8px 12px; }
  html[data-theme-page="home"] .metrics-periods button { padding: 8px 13px; }
  html[data-theme-page="home"] .song .links { gap: 8px; }
  html[data-theme-page="home"] .song .links a {
    min-height: var(--tc-touch-target); display: inline-flex; align-items: center;
    margin: 0; padding: 7px 10px; border-radius: 8px;
  }
  html[data-theme-page="home"] #searchInput { font-size: calc(15px * var(--app-font-scale)); line-height: 1.45; }
  html[data-theme-page="home"] :is(.search-meta, .song .links, .personal-note) { font-size: calc(13px * var(--app-font-scale)); }
  html[data-theme-page="home"] :is(.doorway-copy, .rabbit-hole-copy) {
    font-size: calc(14px * var(--app-font-scale)); line-height: 1.5;
  }
  html[data-theme-page="home"] :is(.doorway-title, .rabbit-hole-title) { font-size: calc(16px * var(--app-font-scale)); }

  html:is([data-theme-page="resources"], [data-theme-page="musicality"], [data-theme-page="people"]) .hero h1 {
    font-size: var(--tc-mobile-display);
    line-height: 1.04;
  }
  html[data-theme-page="resources"] :is(.section-heading h2, .next-note h2),
  html[data-theme-page="musicality"] .section-heading h2,
  html[data-theme-page="people"] :is(.filter-heading h2, .results-heading h2) {
    font-size: var(--tc-mobile-section);
    line-height: 1.1;
  }

  html[data-theme-page="resources"] :is(.hero-lede, .section-intro, .cornerstone-intro > p:last-child) {
    font-size: var(--tc-mobile-body);
    line-height: 1.65;
  }
  html[data-theme-page="resources"] .curation-note p { font-size: 14px; line-height: 1.55; }
  html[data-theme-page="resources"] .cornerstone-intro h3 { font-size: var(--tc-mobile-section); line-height: 1.08; }
  html[data-theme-page="resources"] .resource-main h3 { font-size: 29px; line-height: 1.1; }
  html[data-theme-page="resources"] .resource-summary { font-size: 14px; line-height: 1.65; }
  html[data-theme-page="resources"] .resource-note { font-size: var(--tc-mobile-small); line-height: 1.6; }
  html[data-theme-page="resources"] :is(.resource-tag, .resource-meta, .resource-kicker, .resource-aside-label) {
    font-size: var(--tc-mobile-micro);
  }

  html[data-theme-page="musicality"] .hero-lede { font-size: var(--tc-mobile-body); line-height: 1.65; }
  html[data-theme-page="musicality"] .header-actions { min-width: 0; width: 100%; gap: 8px; }
  html[data-theme-page="musicality"] .resources-link { display: none; }
  html[data-theme-page="musicality"] .language-switch { min-width: 0; overflow-x: auto; }
  html[data-theme-page="musicality"] .concept-card p { font-size: 14px; line-height: 1.55; }
  html[data-theme-page="musicality"] :is(.concept-level, .concept-category, .meta-pill) { font-size: var(--tc-mobile-micro); }
  html[data-theme-page="musicality"] .guide-masthead h3 { font-size: 29px; line-height: 1.08; }
  html[data-theme-page="musicality"] .audio-boundary { font-size: 13.5px; line-height: 1.55; }
  html[data-theme-page="musicality"] .source-title { font-size: 12.5px; line-height: 1.5; }
  html[data-theme-page="musicality"] .source-access { font-size: 10.5px; }

  html[data-theme-page="people"] .hero-lede { font-size: var(--tc-mobile-body); line-height: 1.65; }
  html[data-theme-page="people"] :is(.filter-group h3, .place-filter-group label) { font-size: 12px; }
  html[data-theme-page="people"] .filter-chip { font-size: 12px; line-height: 1.25; }
  html[data-theme-page="people"] .filter-count { font-size: 10.5px; }
  html[data-theme-page="people"] .card-name { font-size: 25px; line-height: 1.08; }
  html[data-theme-page="people"] .card-life { font-size: var(--tc-mobile-micro); }
  html[data-theme-page="people"] .role-tag { font-size: 10.5px; }
  html[data-theme-page="people"] .card-tagline { font-size: 13.5px; line-height: 1.58; }
  html[data-theme-page="people"] .card-fact { font-size: 12.5px; line-height: 1.5; }
  html[data-theme-page="people"] .card-footer { font-size: 10.5px; }
  html[data-theme="light"][data-theme-page="home"] .home-tango-where-map,
  html[data-theme="light"][data-theme-page="home"] .home-tango-where-local-label,
  html[data-theme="light"][data-theme-page="home"] .home-tango-where-stats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
