﻿:root {
  --bg: #f4f0e5;
  --bg-soft: #fbf8f1;
  --surface: #fffdf8;
  --surface-strong: #f8f2e3;
  --ink: #1d2a3f;
  --ink-soft: #4f6078;
  --line: #d7caa6;
  --primary: #214f8b;
  --primary-strong: #163763;
  --accent: #c39a3d;
  --accent-soft: #e9d5a6;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 18px 36px rgba(13, 32, 62, 0.12);
  --toast-border: rgba(33, 79, 139, 0.24);
  --toast-bg: linear-gradient(160deg, rgba(250, 253, 255, 0.96), rgba(236, 244, 255, 0.94));
  --toast-text: #174279;
  --toast-accent: linear-gradient(90deg, rgba(33, 79, 139, 0.95), rgba(79, 139, 219, 0.95));
  --vh: 1vh;
  --mobile-header-height: 70px;
  --header-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(195, 154, 61, 0.14), transparent 34%),
    radial-gradient(circle at 85% 5%, rgba(33, 79, 139, 0.12), transparent 36%),
    linear-gradient(180deg, #fffdf8 0%, #f6f1e6 60%, #f1ead9 100%);
  line-height: 1.65;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
}

body.theme-dark {
  --bg: #0f1826;
  --bg-soft: #142033;
  --surface: #172538;
  --surface-strong: #1e3047;
  --ink: #e7edf8;
  --ink-soft: #b4c2d8;
  --line: #3f5373;
  --primary: #79aae9;
  --primary-strong: #5e8fd0;
  --accent: #d4ae61;
  --accent-soft: #f0dcae;
  --shadow-soft: 0 18px 36px rgba(4, 8, 14, 0.48);
  --toast-border: rgba(126, 164, 220, 0.5);
  --toast-bg: linear-gradient(160deg, rgba(248, 252, 255, 0.98), rgba(236, 245, 255, 0.97));
  --toast-text: #183f73;
  --toast-accent: linear-gradient(90deg, rgba(67, 122, 197, 0.96), rgba(112, 162, 232, 0.95));
  background:
    radial-gradient(circle at 8% 10%, rgba(212, 174, 97, 0.18), transparent 36%),
    radial-gradient(circle at 85% 5%, rgba(121, 170, 233, 0.2), transparent 40%),
    linear-gradient(180deg, #0d1623 0%, #101b2b 60%, #0d1724 100%);
}

.page-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(3px);
  opacity: 0.45;
  animation: float 14s ease-in-out infinite;
}

.orb-a {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 35% 35%, rgba(228, 199, 131, 0.8), rgba(228, 199, 131, 0));
  top: 70px;
  left: -60px;
}

.orb-b {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 45% 40%, rgba(71, 121, 186, 0.58), rgba(71, 121, 186, 0));
  right: -80px;
  top: 210px;
  animation-delay: -4s;
}

.orb-c {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, rgba(185, 143, 47, 0.44), rgba(185, 143, 47, 0));
  right: 18%;
  bottom: 8%;
  animation-delay: -8s;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.15;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(215, 202, 166, 0.52);
  background: rgba(255, 252, 245, 0.84);
  backdrop-filter: blur(12px);
}

main {
  padding-top: var(--header-height);
}

main section[id] {
  scroll-margin-top: var(--header-height);
}

.header-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, #1c4478, #2e639f, #d6ad55, #1c4478);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-soft);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.brand-text {
  display: grid;
  min-width: 0;
}

.brand-text strong {
  font-size: 1.06rem;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text small {
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-list {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  gap: 0;
  flex-direction: column;
  align-items: stretch;
  max-height: min(66vh, 520px);
  overflow: auto;
  z-index: 40;
  --menu-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 242, 227, 0.98) 100%);
  --menu-border-color: rgba(215, 202, 166, 0.85);
  --menu-item-color: var(--primary-strong);
  --menu-divider: rgba(33, 79, 139, 0.14);
  --menu-hover-bg: rgba(33, 79, 139, 0.1);
  --menu-active-bg: rgba(33, 79, 139, 0.16);
  --menu-back-bg: rgba(33, 79, 139, 0.14);
}

.menu-list.open {
  display: flex;
}

.menu-list .dl-menu,
.menu-list .dl-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 0;
  background: var(--menu-panel-bg);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--menu-border-color);
}

.menu-list .dl-menu li,
.menu-list .dl-submenu li {
  position: relative;
}

.menu-list .dl-menu li + li,
.menu-list .dl-submenu li + li {
  border-top: 1px solid var(--menu-divider);
}

.menu-list a,
.menu-list .menu-parent-trigger,
.menu-list .menu-back-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--menu-item-color);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.menu-list a:hover,
.menu-list a:focus-visible,
.menu-list .menu-parent-trigger:hover,
.menu-list .menu-parent-trigger:focus-visible,
.menu-list .menu-back-trigger:hover,
.menu-list .menu-back-trigger:focus-visible {
  background: var(--menu-hover-bg);
  color: var(--primary);
  outline: none;
}

.menu-list a.is-active-link {
  background: var(--menu-active-bg);
  color: var(--primary-strong);
  font-weight: 700;
}

.menu-list .menu-item-parent > .menu-parent-trigger::after {
  content: '\203A';
  margin-left: auto;
  font-size: 1rem;
  opacity: 0.82;
}

.menu-list .dl-back > .menu-back-trigger {
  font-weight: 700;
  background: var(--menu-back-bg);
}

.menu-list .dl-back > .menu-back-trigger::before {
  content: '\2039';
  margin-right: 7px;
  font-size: 1rem;
}

.menu-list .dl-submenu[hidden] {
  display: none;
}

.menu-list.is-submenu-open > .dl-menu > li {
  display: none;
}

.menu-list.is-submenu-open > .dl-menu > li.is-submenu-open {
  display: block;
}

.menu-list.is-submenu-open > .dl-menu > li.is-submenu-open > .menu-parent-trigger {
  display: none;
}

.menu-list.is-submenu-open > .dl-menu > li.is-submenu-open > .dl-submenu {
  display: block;
}

.menu-song-search {
  position: relative;
  flex: 0 0 auto;
  width: clamp(148px, 14vw, 210px);
  min-width: 148px;
  margin-left: auto;
  order: 2;
}

.menu-song-search .song-fetch-form {
  display: block;
}

.menu-song-search .song-fetch-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-song-search .song-fetch-row {
  display: block;
}

.menu-song-search .song-fetch-input-wrap {
  width: 100%;
}

.menu-song-search .song-fetch-input {
  height: 34px;
  padding: 7px 72px 7px 10px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.menu-song-search .song-search-trigger,
.menu-song-search .song-search-clear {
  width: 28px;
  height: 28px;
}

.menu-song-search .song-search-trigger {
  right: 37px;
}

.menu-song-search .song-search-clear {
  right: 5px;
}

.menu-song-search .song-search-trigger-icon,
.menu-song-search .song-search-clear-icon {
  width: 14px;
  height: 14px;
}

.menu-song-search .song-fetch-feedback {
  display: none;
}

.menu-song-search .song-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 18px));
  margin-top: 0;
  padding: 8px;
  z-index: 48;
  max-height: min(58vh, 320px);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 14px 22px rgba(16, 37, 67, 0.2);
}

.menu-song-search .song-search-results-title {
  font-size: 0.76rem;
}

.menu-song-search .song-search-item {
  padding: 7px;
  gap: 6px;
}

.menu-song-search .song-search-avatar {
  width: 34px;
  height: 34px;
}

.menu-song-search .song-search-action {
  min-height: 30px;
  font-size: 0.78rem;
  padding: 0 8px;
}

.menu-song-search .song-search-load-more {
  margin-top: 8px;
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(33, 79, 139, 0.4);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(234, 245, 255, 0.95));
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  box-shadow: 0 8px 14px rgba(15, 41, 76, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  cursor: pointer;
}

.menu-song-search .song-search-load-more:hover,
.menu-song-search .song-search-load-more:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(33, 79, 139, 0.58);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.99), rgba(222, 238, 255, 0.96));
  box-shadow: 0 10px 16px rgba(15, 41, 76, 0.18);
  outline: none;
}

.menu-song-search .song-search-load-more:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(15, 41, 76, 0.14);
}

.menu-song-search .song-search-load-more:disabled {
  opacity: 0.74;
  cursor: not-allowed;
  box-shadow: none;
}

.menu-song-search .song-search-load-more.is-loading {
  cursor: wait;
}

.menu-song-search .song-search-load-more.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(33, 79, 139, 0.24);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: song-search-load-more-spin 0.78s linear infinite;
}

@media (min-width: 921px) {
  .menu-list {
    width: min(320px, calc(100vw - 24px));
  }
}

.menu-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  order: 4;
  margin-left: 8px;
  flex: 0 0 auto;
}

.menu-toggle-icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle-icon::before {
  top: -6px;
}

.menu-toggle-icon::after {
  top: 6px;
}

.menu-panel-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid rgba(33, 79, 139, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary-strong);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.menu-panel-close:hover,
.menu-panel-close:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.font-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  order: 3;
  margin-left: 8px;
}

.font-btn {
  border: 1px solid rgba(33, 79, 139, 0.35);
  background: rgba(255, 255, 255, 0.64);
  color: var(--primary-strong);
  border-radius: 10px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.font-btn:hover,
.font-btn:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.theme-btn {
  min-width: 46px;
  padding: 0 6px;
  gap: 4px;
}

.theme-icon {
  font-size: 0.86rem;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.theme-icon-sun {
  opacity: 1;
}

.theme-icon-moon {
  opacity: 0.35;
}

body.theme-dark .theme-icon-sun {
  opacity: 0.35;
}

body.theme-dark .theme-icon-moon {
  opacity: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(125deg, var(--primary), var(--primary-strong));
  box-shadow: 0 10px 20px rgba(24, 57, 101, 0.25);
}

.btn-outline {
  color: var(--primary);
  border: 1px solid rgba(33, 79, 139, 0.35);
  background: rgba(255, 255, 255, 0.58);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(33, 79, 139, 0.24);
  background: rgba(255, 255, 255, 0.45);
}

body.theme-dark .site-header {
  border-bottom-color: rgba(63, 83, 115, 0.62);
  background: rgba(10, 17, 28, 0.88);
}

body.theme-dark .menu-list {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  --menu-panel-bg: linear-gradient(180deg, rgba(23, 37, 56, 0.98) 0%, rgba(30, 48, 71, 0.96) 100%);
  --menu-border-color: rgba(63, 83, 115, 0.78);
  --menu-item-color: var(--ink);
  --menu-divider: rgba(121, 170, 233, 0.2);
  --menu-hover-bg: rgba(121, 170, 233, 0.18);
  --menu-active-bg: rgba(121, 170, 233, 0.24);
  --menu-back-bg: rgba(121, 170, 233, 0.16);
}

body.theme-dark .menu-list .menu-parent-trigger:hover,
body.theme-dark .menu-list .menu-parent-trigger:focus-visible,
body.theme-dark .menu-list .menu-back-trigger:hover,
body.theme-dark .menu-list .menu-back-trigger:focus-visible,
body.theme-dark .menu-list a:hover,
body.theme-dark .menu-list a:focus-visible {
  background: var(--menu-hover-bg);
  color: var(--primary);
}

body.theme-dark .menu-panel-close {
  border-color: rgba(121, 170, 233, 0.48);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .menu-panel-close:hover,
body.theme-dark .menu-panel-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .menu-song-search {
  background: transparent;
}

body.theme-dark .font-btn,
body.theme-dark .btn-outline,
body.theme-dark .btn-ghost,
body.theme-dark .accordion-trigger,
body.theme-dark .story-tab {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.84);
  color: var(--ink);
}

body.theme-dark .font-btn:hover,
body.theme-dark .font-btn:focus-visible,
body.theme-dark .btn-outline:hover,
body.theme-dark .btn-ghost:hover,
body.theme-dark .accordion-trigger:hover,
body.theme-dark .story-tab:hover,
body.theme-dark .story-tab:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .today-card,
body.theme-dark .story-video-card,
body.theme-dark .story-narrative-card,
body.theme-dark .story-panel,
body.theme-dark .story-timeline-item,
body.theme-dark .step-card,
body.theme-dark .mystery-card,
body.theme-dark .song-card,
body.theme-dark .prayer-card,
body.theme-dark .resource-card,
body.theme-dark .sementes-card,
body.theme-dark .sanctuary-card,
body.theme-dark .mystery-modal-dialog,
body.theme-dark .today-list li {
  border-color: rgba(63, 83, 115, 0.78);
  background: rgba(17, 28, 43, 0.9);
}

body.theme-dark .step-card.step-card-expandable:hover {
  border-color: rgba(121, 170, 233, 0.5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

body.theme-dark .step-card.step-card-expandable:focus-visible {
  outline-color: rgba(121, 170, 233, 0.46);
}

body.theme-dark .step-card.step-card-expandable .step-card-hint {
  color: #b9cce9;
}

body.theme-dark .step-card-content {
  border-top-color: rgba(121, 170, 233, 0.38);
  color: #b9cce9;
}

body.theme-dark .step-card.open {
  border-color: rgba(121, 170, 233, 0.56);
  background: linear-gradient(150deg, rgba(24, 38, 58, 0.92), rgba(15, 27, 43, 0.9));
}

body.theme-dark .section-soft {
  border-top-color: rgba(63, 83, 115, 0.5);
  border-bottom-color: rgba(63, 83, 115, 0.5);
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.82), rgba(14, 24, 39, 0.64));
}

body.theme-dark .today-visual {
  border-color: rgba(63, 83, 115, 0.82);
  background: linear-gradient(150deg, rgba(14, 24, 38, 0.9), rgba(18, 30, 45, 0.9));
}

body.theme-dark .song-card pre {
  background: rgba(10, 17, 28, 0.78);
  color: #dce6f6;
}

body.theme-dark .song-fetch-card {
  border-color: rgba(63, 83, 115, 0.78);
  background: rgba(17, 28, 43, 0.9);
}

body.theme-dark .booklet-cantos-card,
body.theme-dark .booklet-cantos-item {
  border-color: rgba(63, 83, 115, 0.78);
  background: rgba(17, 28, 43, 0.9);
}

body.theme-dark .booklet-cantos-search-btn {
  border-color: rgba(121, 170, 233, 0.46);
  background: rgba(14, 24, 38, 0.88);
  color: #d8e7ff;
}

body.theme-dark .booklet-cantos-search-btn:hover,
body.theme-dark .booklet-cantos-search-btn:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .song-favorite-cover-btn {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.82);
}

body.theme-dark .song-favorite-title-btn:not(:disabled):hover .booklet-cantos-title,
body.theme-dark .song-favorite-title-btn:not(:disabled):focus-visible .booklet-cantos-title {
  color: #dbe8ff;
}

body.theme-dark .custom-songs-add-btn {
  color: #f4dda8;
  border-color: rgba(226, 191, 111, 0.52);
  background: linear-gradient(140deg, rgba(76, 57, 20, 0.96), rgba(54, 40, 14, 0.96));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

body.theme-dark .custom-songs-add-btn:hover,
body.theme-dark .custom-songs-add-btn:focus-visible {
  background: linear-gradient(140deg, rgba(93, 69, 25, 0.96), rgba(67, 49, 17, 0.96));
  border-color: rgba(240, 209, 132, 0.58);
}

body.theme-dark .custom-song-item {
  border-color: rgba(63, 83, 115, 0.72);
  background: rgba(12, 22, 34, 0.88);
}

body.theme-dark .custom-song-item.is-sortable:hover {
  border-color: rgba(121, 170, 233, 0.58);
}

body.theme-dark .custom-song-item.is-dragging {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
}

body.theme-dark .song-favorite-item.is-sortable:hover {
  border-color: rgba(121, 170, 233, 0.58);
}

body.theme-dark .song-favorite-item.is-dragging {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
}

body.theme-dark .custom-song-item-meta,
body.theme-dark .custom-song-item-updated,
body.theme-dark .custom-song-empty {
  color: #b9cce9;
}

body.theme-dark .song-favorite-usage {
  color: #a8c3ea;
}

body.theme-dark .custom-song-item-action {
  border-color: rgba(121, 170, 233, 0.44);
  background: rgba(14, 24, 38, 0.88);
  color: #d8e7ff;
}

body.theme-dark .custom-song-item-action:hover,
body.theme-dark .custom-song-item-action:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .custom-song-dialog {
  border-color: rgba(63, 83, 115, 0.82);
  background: linear-gradient(160deg, rgba(16, 28, 44, 0.97), rgba(10, 18, 29, 0.97));
}

body.theme-dark .custom-song-header h3 {
  color: #e8f0ff;
}

body.theme-dark .custom-song-close {
  border-color: rgba(121, 170, 233, 0.44);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .custom-song-close:hover,
body.theme-dark .custom-song-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .custom-song-field span,
body.theme-dark .custom-song-panel-label,
body.theme-dark .custom-song-draft-status {
  color: #b9cce9;
}

body.theme-dark .custom-song-input,
body.theme-dark .custom-song-textarea {
  border-color: rgba(121, 170, 233, 0.38);
  background: rgba(10, 17, 28, 0.86);
  color: #dce6f6;
}

body.theme-dark .custom-song-tab {
  border-color: rgba(121, 170, 233, 0.38);
  background: rgba(14, 24, 38, 0.88);
  color: #dce6f6;
}

body.theme-dark .custom-song-tab.is-active,
body.theme-dark .custom-song-tab.is-active:hover,
body.theme-dark .custom-song-tab.is-active:focus-visible {
  border-color: rgba(156, 202, 255, 0.72);
  background: linear-gradient(128deg, #5b8fce, #3a67a7);
  color: #f4f8ff;
  box-shadow: 0 8px 18px rgba(8, 20, 39, 0.35);
}

body.theme-dark .song-favorite-status {
  color: #b9cce9;
}

body.theme-dark .song-fetch-input {
  border-color: rgba(121, 170, 233, 0.36);
  background: rgba(10, 17, 28, 0.85);
  color: var(--ink);
}

body.theme-dark .song-search-trigger,
body.theme-dark .song-search-clear {
  border-color: rgba(121, 170, 233, 0.5);
  background: linear-gradient(160deg, rgba(14, 24, 38, 0.95), rgba(20, 33, 50, 0.95));
  color: #d8e7ff;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.25);
}

body.theme-dark .song-search-clear {
  border-color: rgba(255, 155, 148, 0.56);
  background: linear-gradient(160deg, rgba(52, 18, 17, 0.96), rgba(44, 15, 14, 0.96));
  color: #ff9f97;
}

body.theme-dark .song-search-trigger:hover,
body.theme-dark .song-search-trigger:focus-visible,
body.theme-dark .song-search-clear:hover,
body.theme-dark .song-search-clear:focus-visible {
  background: linear-gradient(160deg, rgba(24, 38, 57, 0.95), rgba(31, 50, 73, 0.95));
  border-color: rgba(158, 194, 255, 0.72);
}

body.theme-dark .song-search-clear:hover,
body.theme-dark .song-search-clear:focus-visible {
  border-color: rgba(255, 185, 179, 0.72);
  background: linear-gradient(160deg, rgba(62, 23, 21, 0.96), rgba(52, 19, 18, 0.96));
}

body.theme-dark .song-fetch-feedback.is-success {
  color: #7dd493;
}

body.theme-dark .song-fetch-feedback.is-error {
  color: #ff978e;
}

body.theme-dark .song-search-results {
  border-color: rgba(63, 83, 115, 0.78);
  background: rgba(10, 17, 28, 0.9);
}

body.theme-dark .song-search-item {
  border-color: rgba(63, 83, 115, 0.68);
  background: rgba(14, 24, 38, 0.94);
}

body.theme-dark .song-search-item strong {
  color: #e9f1ff;
}

body.theme-dark .song-search-item p {
  color: var(--ink-soft);
}

body.theme-dark .song-search-avatar {
  border-color: rgba(63, 83, 115, 0.7);
}

body.theme-dark .song-search-action {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .song-search-load-more {
  border-color: rgba(121, 170, 233, 0.52);
  background: linear-gradient(160deg, rgba(14, 24, 38, 0.95), rgba(20, 33, 50, 0.95));
  color: #d8e7ff;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.28);
}

body.theme-dark .song-search-load-more:hover,
body.theme-dark .song-search-load-more:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(158, 194, 255, 0.72);
  background: linear-gradient(160deg, rgba(24, 38, 57, 0.95), rgba(31, 50, 73, 0.95));
  box-shadow: 0 11px 18px rgba(0, 0, 0, 0.34);
}

body.theme-dark .song-search-load-more:active {
  transform: translateY(0);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

body.theme-dark .song-search-load-more:disabled {
  box-shadow: none;
}

body.theme-dark .song-search-load-more.is-loading::before {
  border-color: rgba(193, 214, 247, 0.32);
  border-top-color: currentColor;
}

body.theme-dark .song-search-action-chords,
body.theme-dark .song-favorite-action-chords,
body.theme-dark .custom-song-item-head-action-chords {
  color: #ff9f97;
}

body.theme-dark .song-search-action:hover,
body.theme-dark .song-search-action:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .song-search-action-favorite.is-active {
  color: #f0cf81;
}

body.theme-dark .song-modal-topbar {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.theme-dark .song-modal-tone-label {
  color: #dce6f6;
}

body.theme-dark .song-tone-option,
body.theme-dark .song-tone-reset {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .song-tone-option.is-active {
  color: #fff;
}

body.theme-dark .song-view-option {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .song-view-option.is-active {
  color: #fff;
}

body.theme-dark .fetched-song-body {
  border-top-color: rgba(63, 83, 115, 0.78);
}

body.theme-dark .fetched-song-lyrics {
  background: rgba(10, 17, 28, 0.78);
  color: #dce6f6;
}

body.theme-dark .song-modal-backdrop {
  background: rgba(3, 10, 20, 0.76);
}

body.theme-dark .song-modal-dialog {
  border-color: rgba(63, 83, 115, 0.84);
  background: rgba(13, 22, 34, 0.95);
  box-shadow: 0 28px 48px rgba(2, 6, 12, 0.58);
}

body.theme-dark .song-modal-close {
  border-color: rgba(121, 170, 233, 0.44);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .song-modal-close:hover,
body.theme-dark .song-modal-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .song-tone-reset:hover,
body.theme-dark .song-tone-reset:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .mystery-modal-backdrop {
  background: rgba(3, 10, 20, 0.72);
}

body.theme-dark .mystery-modal-link {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.84);
  color: var(--ink);
}

body.theme-dark .mystery-modal-link:hover,
body.theme-dark .mystery-modal-link:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .mystery-modal-link.is-active,
body.theme-dark .mystery-modal-link.is-active:hover,
body.theme-dark .mystery-modal-link.is-active:focus-visible {
  background: linear-gradient(128deg, #5f8fcd, #3f6aa8);
  border-color: rgba(145, 189, 247, 0.4);
  color: #f4f8ff;
}

body.theme-dark .mystery-modal-links {
  border-bottom-color: rgba(63, 83, 115, 0.58);
}

body.theme-dark .mystery-modal-dialog h3 {
  color: #e9f1ff;
}

body.theme-dark .mystery-modal-text {
  color: #dce6f6;
}

body.theme-dark .mystery-modal-song-toggle {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.88);
  color: #dce6f6;
}

body.theme-dark .mystery-modal-song-toggle:hover,
body.theme-dark .mystery-modal-song-toggle:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .mystery-modal-song-panel {
  border-color: rgba(121, 170, 233, 0.38);
  background: rgba(15, 27, 45, 0.95);
}

body.theme-dark .mystery-modal-song-title {
  color: #f4dca8;
}

body.theme-dark .mystery-modal-song-lyrics {
  color: #dce6f6;
}

body.theme-dark .mystery-modal-footer {
  border-top-color: rgba(63, 83, 115, 0.58);
}

body.theme-dark .mystery-jaculatory-toggle {
  border-color: rgba(121, 170, 233, 0.48);
  background: rgba(14, 24, 38, 0.92);
  color: var(--ink);
}

body.theme-dark .mystery-jaculatory-toggle:hover,
body.theme-dark .mystery-jaculatory-toggle:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .mystery-jaculatory-panel {
  border-color: rgba(121, 170, 233, 0.38);
  background: rgba(15, 27, 45, 0.95);
}

body.theme-dark .mystery-jaculatory-close {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(14, 24, 38, 0.88);
  color: #dce6f6;
}

body.theme-dark .mystery-jaculatory-close:hover,
body.theme-dark .mystery-jaculatory-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .mystery-jaculatory-title {
  color: #f4dca8;
}

body.theme-dark .mystery-jaculatory-list {
  color: #dce6f6;
}

body.theme-dark .mystery-modal-close {
  border-color: rgba(121, 170, 233, 0.44);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .mystery-modal-close:hover,
body.theme-dark .mystery-modal-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .section-kicker,
body.theme-dark .today-label,
body.theme-dark .mystery-day,
body.theme-dark .story-panel-eyebrow,
body.theme-dark .story-timeline-item span,
body.theme-dark .sementes-badge,
body.theme-dark .mystery-modal-group {
  color: #e3c47e;
}

body.theme-dark .story-video-fallback {
  color: #f4dca8;
  background: rgba(95, 66, 21, 0.36);
  border-color: rgba(227, 196, 126, 0.5);
}

body.theme-dark .story-video-fallback a {
  color: #9ec2ff;
}

body.theme-dark .site-footer {
  border-top-color: rgba(63, 83, 115, 0.5);
}

.section {
  padding: clamp(68px, 9vw, 108px) 0;
}

.hero {
  padding-top: clamp(74px, 10vw, 114px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(195, 154, 61, 0.35);
  background: rgba(255, 249, 233, 0.85);
  color: #8c6a2a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  max-width: none;
}

.hero-lead {
  margin-top: 16px;
  color: var(--ink-soft);
  max-width: none;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.today-card {
  background: linear-gradient(160deg, rgba(255, 253, 247, 0.94), rgba(245, 236, 214, 0.95));
  border: 1px solid rgba(195, 154, 61, 0.36);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.today-card::after {
  content: "";
  position: absolute;
  inset: auto -46px -58px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 32%, rgba(33, 79, 139, 0.25), rgba(33, 79, 139, 0));
}

.today-visual {
  margin: 0 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(215, 202, 166, 0.7);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.72), rgba(245, 236, 214, 0.72));
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(16, 37, 67, 0.12);
}

.today-visual img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.today-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8c6a2a;
  margin-bottom: 8px;
}

.today-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--primary-strong);
}

.today-day {
  margin-top: 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

.today-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.today-list li {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(215, 202, 166, 0.7);
  font-size: 0.92rem;
}

.today-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.section-header {
  max-width: 760px;
}

.section-kicker {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8c6a2a;
}

.section-header h2 {
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  margin-top: 8px;
}

.section-header > p:last-child {
  color: var(--ink-soft);
  margin-top: 10px;
}

.section-soft {
  border-top: 1px solid rgba(215, 202, 166, 0.45);
  border-bottom: 1px solid rgba(215, 202, 166, 0.45);
  background: linear-gradient(180deg, rgba(252, 248, 238, 0.78), rgba(255, 252, 247, 0.5));
}

.story-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.story-video-card,
.story-narrative-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(215, 202, 166, 0.62);
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  box-shadow: 0 10px 22px rgba(16, 37, 67, 0.08);
}

.story-video-wrap {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0e1f38;
}

.story-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.story-video-note {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.story-video-fallback {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #7a4b12;
  background: rgba(250, 231, 193, 0.65);
  border: 1px solid rgba(195, 154, 61, 0.4);
  border-radius: 10px;
  padding: 9px 11px;
}

.story-video-fallback a {
  color: #184985;
  font-weight: 700;
  text-decoration: underline;
}

.story-intro {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.story-tabs {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-tab {
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-strong);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
}

.story-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(128deg, var(--primary), var(--primary-strong));
}

.story-panel {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(215, 202, 166, 0.62);
  background: linear-gradient(150deg, rgba(255, 252, 243, 0.95), rgba(247, 239, 221, 0.95));
  padding: 16px;
}

.story-panel-eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8c6a2a;
}

.story-panel h3 {
  font-size: 1.85rem;
  margin-top: 4px;
}

.story-panel p + p {
  margin-top: 8px;
}

.story-meta {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.story-timeline {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.story-timeline-item {
  border-radius: 14px;
  border: 1px solid rgba(215, 202, 166, 0.62);
  background: rgba(255, 255, 255, 0.74);
  padding: 14px;
}

.story-timeline-item span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c6a2a;
}

.story-timeline-item p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.steps-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.step-card {
  background: var(--surface);
  border: 1px solid rgba(215, 202, 166, 0.58);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 8px 20px rgba(16, 37, 67, 0.08);
  display: grid;
  align-content: start;
  gap: 6px;
}

.step-card h3 {
  font-size: 1.35rem;
  margin-top: 8px;
  margin-bottom: 0;
}

.step-card p {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.step-card.step-card-expandable {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.step-card.step-card-expandable:hover {
  border-color: rgba(33, 79, 139, 0.36);
  box-shadow: 0 10px 24px rgba(16, 37, 67, 0.12);
}

.step-card.step-card-expandable:focus-visible {
  outline: 2px solid rgba(33, 79, 139, 0.34);
  outline-offset: 2px;
}

.step-card.step-card-expandable .step-card-hint {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary-strong);
}

.step-card-content {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed rgba(33, 79, 139, 0.32);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.step-card-content[hidden] {
  display: none !important;
}

.step-card.open {
  border-color: rgba(33, 79, 139, 0.42);
  box-shadow: 0 12px 28px rgba(16, 37, 67, 0.14);
  background: linear-gradient(140deg, rgba(252, 249, 240, 0.95), rgba(255, 255, 252, 0.95));
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(33, 79, 139, 0.12);
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.step-card.highlight {
  background: linear-gradient(140deg, rgba(248, 242, 227, 0.9), rgba(255, 252, 244, 0.9));
  border-color: rgba(195, 154, 61, 0.54);
}

.mystery-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mystery-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(215, 202, 166, 0.65);
  background: rgba(255, 254, 251, 0.9);
}

.mystery-day {
  color: #8c6a2a;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mystery-card h3 {
  font-size: 1.8rem;
  color: var(--primary-strong);
  margin-top: 4px;
}

.mystery-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  display: grid;
  gap: 5px;
}

.mystery-card li.mystery-interactive,
.today-list li.mystery-interactive {
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.mystery-card li.mystery-interactive:hover,
.mystery-card li.mystery-interactive:focus-visible,
.today-list li.mystery-interactive:hover,
.today-list li.mystery-interactive:focus-visible {
  background: rgba(33, 79, 139, 0.12);
  color: #163763;
  outline: none;
}

html.has-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.has-modal-open {
  overflow: hidden;
  position: fixed;
  top: var(--modal-lock-scroll-y, 0);
  left: 0;
  right: 0;
  width: 100%;
}

.song-toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 10px);
  transform: translate(-50%, -10px) scale(0.98);
  z-index: 170;
  width: auto;
  max-width: min(440px, calc(100vw - 24px));
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(33, 79, 139, 0.24);
  background: linear-gradient(160deg, rgba(250, 253, 255, 0.96), rgba(236, 244, 255, 0.94));
  color: #174279;
  box-shadow: 0 10px 24px rgba(8, 20, 39, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.84rem;
  line-height: 1.32;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  filter: saturate(0.95);
  transition: transform 0.24s cubic-bezier(0.2, 0.78, 0.24, 1), opacity 0.22s ease, filter 0.22s ease;
}

.song-toast::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(33, 79, 139, 0.95), rgba(79, 139, 219, 0.95));
  opacity: 0.96;
}

.song-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  filter: saturate(1);
}

.song-toast.is-warning {
  border-color: rgba(140, 106, 42, 0.3);
  background: linear-gradient(160deg, rgba(255, 252, 240, 0.98), rgba(255, 247, 221, 0.97));
  color: #7c5b22;
}

.song-toast.is-warning::before {
  background: linear-gradient(90deg, rgba(140, 106, 42, 0.95), rgba(205, 163, 81, 0.95));
}

.song-toast.is-error {
  border-color: rgba(173, 58, 50, 0.28);
  background: linear-gradient(160deg, rgba(255, 246, 244, 0.98), rgba(255, 236, 232, 0.97));
  color: #8f2e28;
}

.song-toast.is-error::before {
  background: linear-gradient(90deg, rgba(173, 58, 50, 0.95), rgba(226, 104, 96, 0.95));
}

.song-toast.is-success {
  border-color: rgba(50, 124, 71, 0.3);
  background: linear-gradient(160deg, rgba(241, 254, 245, 0.98), rgba(227, 247, 235, 0.97));
  color: #215b33;
}

.song-toast.is-success::before {
  background: linear-gradient(90deg, rgba(50, 124, 71, 0.95), rgba(84, 179, 113, 0.95));
}

.song-toast.is-loading {
  border-color: rgba(33, 79, 139, 0.3);
  background: linear-gradient(160deg, rgba(244, 249, 255, 0.98), rgba(232, 241, 255, 0.97));
  color: #1f4a83;
}

.song-toast.is-loading::before {
  background: linear-gradient(90deg, rgba(33, 79, 139, 0.95), rgba(93, 157, 234, 0.95));
}

body.theme-dark .song-toast {
  border-color: rgba(121, 170, 233, 0.34);
  background: linear-gradient(160deg, rgba(20, 38, 61, 0.96), rgba(12, 28, 47, 0.95));
  color: #deebff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
}

body.theme-dark .song-toast.is-warning {
  border-color: rgba(244, 220, 168, 0.32);
  background: linear-gradient(160deg, rgba(45, 35, 11, 0.97), rgba(33, 26, 9, 0.96));
  color: #f8dfac;
}

body.theme-dark .song-toast.is-warning::before {
  background: linear-gradient(90deg, rgba(226, 190, 111, 0.92), rgba(247, 220, 151, 0.92));
}

body.theme-dark .song-toast.is-error {
  border-color: rgba(255, 151, 142, 0.34);
  background: linear-gradient(160deg, rgba(43, 16, 16, 0.97), rgba(33, 13, 13, 0.96));
  color: #ffd0cb;
}

body.theme-dark .song-toast.is-error::before {
  background: linear-gradient(90deg, rgba(255, 139, 128, 0.92), rgba(255, 183, 175, 0.92));
}

body.theme-dark .song-toast.is-success {
  border-color: rgba(145, 212, 165, 0.32);
  background: linear-gradient(160deg, rgba(15, 41, 24, 0.97), rgba(11, 31, 19, 0.96));
  color: #ccf5d8;
}

body.theme-dark .song-toast.is-success::before {
  background: linear-gradient(90deg, rgba(127, 212, 151, 0.92), rgba(173, 236, 191, 0.92));
}

body.theme-dark .song-toast.is-loading {
  border-color: rgba(121, 170, 233, 0.34);
  background: linear-gradient(160deg, rgba(20, 38, 61, 0.96), rgba(12, 28, 47, 0.95));
  color: #d4e5ff;
}

body.theme-dark .song-toast.is-loading::before {
  background: linear-gradient(90deg, rgba(121, 170, 233, 0.92), rgba(168, 204, 247, 0.92));
}

/* Toast unified and theme-aware. */
.song-toast,
.song-toast.is-warning,
.song-toast.is-error,
.song-toast.is-success,
.song-toast.is-loading {
  border-color: var(--toast-border);
  background: var(--toast-bg);
  color: var(--toast-text);
}

.song-toast::before,
.song-toast.is-warning::before,
.song-toast.is-error::before,
.song-toast.is-success::before,
.song-toast.is-loading::before {
  background: var(--toast-accent);
}

body.theme-dark .song-toast.is-warning,
body.theme-dark .song-toast.is-error,
body.theme-dark .song-toast.is-success,
body.theme-dark .song-toast.is-loading {
  border-color: var(--toast-border);
  background: var(--toast-bg);
  color: var(--toast-text);
}

body.theme-dark .song-toast.is-warning::before,
body.theme-dark .song-toast.is-error::before,
body.theme-dark .song-toast.is-success::before,
body.theme-dark .song-toast.is-loading::before {
  background: var(--toast-accent);
}

.song-toast.is-error {
  color: #b3261e;
}

body.theme-dark .song-toast.is-error {
  color: #b3261e;
}

@media (max-width: 680px) {
  .song-toast {
    max-width: calc(100vw - 18px);
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 0.81rem;
  }
}

.favorite-confirm-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 140;
}

.favorite-confirm-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.favorite-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 39, 0.58);
  backdrop-filter: blur(2px);
}

.favorite-confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 28px));
  border-radius: 14px;
  border: 1px solid rgba(215, 202, 166, 0.65);
  background: linear-gradient(160deg, rgba(255, 255, 252, 0.98), rgba(247, 239, 221, 0.98));
  box-shadow: 0 22px 42px rgba(8, 20, 39, 0.28);
  padding: 16px;
}

.favorite-confirm-dialog h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.06rem;
}

.favorite-confirm-dialog p {
  margin: 8px 0 0;
  color: #2f3d54;
  font-size: 0.93rem;
}

.favorite-confirm-password-wrap {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.favorite-confirm-password-label {
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.favorite-confirm-password-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(33, 79, 139, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
  padding: 7px 10px;
}

.favorite-confirm-password-input:focus-visible {
  border-color: rgba(33, 79, 139, 0.52);
  box-shadow: 0 0 0 3px rgba(33, 79, 139, 0.14);
  outline: none;
}

.favorite-confirm-password-error {
  margin: 0;
  color: #b3261e;
  font-size: 0.76rem;
  line-height: 1.3;
  font-weight: 700;
}

.favorite-confirm-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.theme-dark .favorite-confirm-dialog {
  border-color: rgba(63, 83, 115, 0.82);
  background: linear-gradient(160deg, rgba(16, 28, 44, 0.97), rgba(10, 18, 29, 0.97));
}

body.theme-dark .favorite-confirm-dialog p {
  color: #d6e2f4;
}

body.theme-dark .favorite-confirm-password-label {
  color: #d6e2f4;
}

body.theme-dark .favorite-confirm-password-input {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(10, 21, 35, 0.9);
  color: #d8e7ff;
}

body.theme-dark .favorite-confirm-password-input:focus-visible {
  border-color: rgba(121, 170, 233, 0.62);
  box-shadow: 0 0 0 3px rgba(121, 170, 233, 0.18);
}

body.theme-dark .favorite-confirm-password-error {
  color: #ffb8b1;
}

.mystery-song-assign-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 133;
}

.mystery-song-assign-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.mystery-song-assign-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(222, 189, 120, 0.14), transparent 44%),
    radial-gradient(circle at 84% 12%, rgba(96, 148, 219, 0.16), transparent 42%),
    rgba(8, 20, 39, 0.62);
  backdrop-filter: blur(4px);
}

.mystery-song-assign-dialog {
  position: relative;
  z-index: 1;
  width: min(800px, calc(100vw - 24px));
  max-height: min(88vh, calc(100dvh - 22px));
  border-radius: 18px;
  border: 1px solid rgba(215, 202, 166, 0.68);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 242, 210, 0.78), transparent 46%),
    linear-gradient(160deg, rgba(255, 255, 252, 0.99), rgba(247, 239, 221, 0.99));
  box-shadow:
    0 28px 48px rgba(8, 20, 39, 0.34),
    0 8px 18px rgba(8, 20, 39, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mystery-song-assign-dialog::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, rgba(176, 136, 48, 0.95), rgba(63, 122, 207, 0.9));
}

.mystery-song-assign-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(215, 202, 166, 0.7);
}

.mystery-song-assign-heading-row h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.08rem;
  line-height: 1.2;
}

.mystery-song-assign-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 11px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 255, 0.98));
  color: var(--primary-strong);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.mystery-song-assign-close:hover,
.mystery-song-assign-close:focus-visible {
  background: rgba(33, 79, 139, 0.16);
  outline: none;
}

.mystery-song-assign-song {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px dashed rgba(33, 79, 139, 0.26);
  background: rgba(255, 255, 255, 0.62);
  color: #2f3d54;
  font-size: 0.88rem;
  font-weight: 700;
}

.mystery-song-assign-list {
  margin: 0;
  padding: 12px 14px 14px;
  display: grid;
  gap: 11px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mystery-song-assign-group {
  border: 1px solid rgba(215, 202, 166, 0.66);
  border-radius: 12px;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.9), rgba(250, 244, 232, 0.88));
  box-shadow: 0 8px 16px rgba(16, 37, 67, 0.06);
  padding: 10px;
}

.mystery-song-assign-group-title {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--primary-strong);
  font-size: 0.9rem;
  line-height: 1.25;
}

.mystery-song-assign-group-name {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mystery-song-assign-group-day {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(33, 79, 139, 0.22);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mystery-song-assign-items {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mystery-song-assign-item {
  min-height: 33px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: 1px solid rgba(33, 79, 139, 0.26);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.96));
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0 10px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.mystery-song-assign-item-label {
  min-width: 0;
}

.mystery-song-assign-item-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #214f8b;
}

.mystery-song-assign-item-icon svg {
  width: 14px;
  height: 14px;
}

.mystery-song-assign-item.is-assigned {
  border-color: rgba(42, 125, 86, 0.42);
  background: linear-gradient(165deg, rgba(243, 253, 248, 0.98), rgba(233, 248, 239, 0.96));
}

.mystery-song-assign-item:hover,
.mystery-song-assign-item:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(16, 37, 67, 0.12);
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.mystery-song-assign-item.is-assigned:hover,
.mystery-song-assign-item.is-assigned:focus-visible {
  background: rgba(30, 125, 84, 0.16);
}

.mystery-song-assign-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

body.theme-dark .mystery-song-assign-dialog {
  border-color: rgba(63, 83, 115, 0.82);
  background:
    radial-gradient(circle at 14% 0%, rgba(77, 64, 29, 0.22), transparent 48%),
    linear-gradient(160deg, rgba(16, 28, 44, 0.97), rgba(10, 18, 29, 0.97));
}

body.theme-dark .mystery-song-assign-heading-row {
  border-bottom-color: rgba(63, 83, 115, 0.62);
}

body.theme-dark .mystery-song-assign-song {
  color: #d6e2f4;
  border-bottom-color: rgba(121, 170, 233, 0.36);
  background: rgba(11, 22, 36, 0.72);
}

body.theme-dark .mystery-song-assign-group {
  border-color: rgba(63, 83, 115, 0.72);
  background: linear-gradient(165deg, rgba(16, 29, 45, 0.94), rgba(10, 21, 35, 0.92));
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

body.theme-dark .mystery-song-assign-group-day {
  border-color: rgba(121, 170, 233, 0.36);
  background: rgba(121, 170, 233, 0.14);
  color: #d6e2f4;
}

body.theme-dark .mystery-song-assign-close {
  border-color: rgba(121, 170, 233, 0.44);
  background: linear-gradient(160deg, rgba(21, 35, 54, 0.95), rgba(13, 24, 40, 0.95));
  color: #d8e7ff;
}

body.theme-dark .mystery-song-assign-item {
  border-color: rgba(121, 170, 233, 0.42);
  background: linear-gradient(160deg, rgba(20, 35, 54, 0.95), rgba(13, 24, 40, 0.94));
  color: #d8e7ff;
}

body.theme-dark .mystery-song-assign-item-icon {
  color: #7dd5a8;
}

body.theme-dark .mystery-song-assign-item.is-assigned {
  border-color: rgba(63, 173, 117, 0.58);
  background: linear-gradient(160deg, rgba(20, 48, 45, 0.88), rgba(15, 34, 36, 0.9));
}

body.theme-dark .mystery-song-assign-item:hover,
body.theme-dark .mystery-song-assign-item:focus-visible,
body.theme-dark .mystery-song-assign-close:hover,
body.theme-dark .mystery-song-assign-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .mystery-song-assign-item.is-assigned:hover,
body.theme-dark .mystery-song-assign-item.is-assigned:focus-visible {
  background: rgba(63, 173, 117, 0.24);
}

@media (max-width: 760px) {
  .mystery-song-assign-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 15px;
  }

  .mystery-song-assign-items {
    grid-template-columns: 1fr;
  }
}

.song-save-location-picker {
  position: fixed;
  z-index: 138;
  display: none;
  width: auto;
  min-width: 170px;
  max-width: calc(100vw - 20px);
  max-height: min(76vh, 460px);
  border: 1px solid rgba(215, 202, 166, 0.72);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 242, 210, 0.78), transparent 46%),
    linear-gradient(160deg, rgba(255, 255, 252, 0.99), rgba(247, 239, 221, 0.99));
  box-shadow:
    0 18px 34px rgba(8, 20, 39, 0.28),
    0 6px 16px rgba(8, 20, 39, 0.12);
  overflow: hidden;
  flex-direction: column;
}

.song-save-location-picker.open {
  display: flex;
}

.song-save-location-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px 8px;
  border-bottom: 1px solid rgba(215, 202, 166, 0.68);
}

.song-save-location-picker-head-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.song-save-location-picker-breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.song-save-location-picker-breadcrumb {
  flex: 1 1 auto;
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.74rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-save-location-picker-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 255, 0.98));
  color: var(--primary-strong);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.song-save-location-picker-close:hover,
.song-save-location-picker-close:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.song-save-location-picker-song {
  margin: 0;
  color: #2f3d54;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-save-location-picker-tools {
  padding: 7px 11px 0;
  display: grid;
  gap: 7px;
}

.song-save-location-picker-search {
  min-height: 32px;
  width: 100%;
  border: 1px solid rgba(33, 79, 139, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.3;
  padding: 6px 10px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.song-save-location-picker-search::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.song-save-location-picker-search:focus-visible {
  border-color: rgba(33, 79, 139, 0.52);
  box-shadow: 0 0 0 3px rgba(33, 79, 139, 0.15);
  background: rgba(255, 255, 255, 1);
  outline: none;
}

.song-save-location-picker-back {
  min-height: 29px;
  border: 1px solid rgba(33, 79, 139, 0.3);
  border-radius: 999px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 11px;
  cursor: pointer;
}

.song-save-location-picker-add {
  flex: 0 0 auto;
  width: 27px;
  min-width: 27px;
  height: 27px;
  border: 1px solid rgba(42, 125, 86, 0.36);
  border-radius: 8px;
  background: rgba(42, 125, 86, 0.14);
  color: #1f6546;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.song-save-location-picker-back:hover,
.song-save-location-picker-back:focus-visible {
  background: rgba(33, 79, 139, 0.16);
  outline: none;
}

.song-save-location-picker-add:hover,
.song-save-location-picker-add:focus-visible {
  background: rgba(42, 125, 86, 0.24);
  outline: none;
}

.song-save-location-picker-list {
  min-height: 0;
  overflow: auto;
  padding: 8px 11px 11px;
  display: grid;
  gap: 7px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.song-save-location-picker-item-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
  min-width: 0;
}

.song-save-location-picker-item {
  min-height: 35px;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(33, 79, 139, 0.24);
  border-radius: 11px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.96));
  color: var(--primary-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  padding: 7px 10px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.song-save-location-picker-item:hover,
.song-save-location-picker-item:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(16, 37, 67, 0.12);
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.song-save-location-picker-item.is-assigned {
  border-color: rgba(42, 125, 86, 0.42);
  background: linear-gradient(165deg, rgba(243, 253, 248, 0.98), rgba(233, 248, 239, 0.96));
}

.song-save-location-picker-item-remove {
  flex: 0 0 auto;
  width: 27px;
  min-width: 27px;
  min-height: 35px;
  border: 1px solid rgba(172, 58, 58, 0.38);
  border-radius: 10px;
  background: rgba(172, 58, 58, 0.12);
  color: #9f2f2f;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.song-save-location-picker-item-remove:hover,
.song-save-location-picker-item-remove:focus-visible {
  background: rgba(172, 58, 58, 0.22);
  outline: none;
}

.song-save-location-picker-item-remove:disabled {
  opacity: 0.6;
  cursor: wait;
}

.song-save-location-picker-item-main {
  min-width: 0;
}

.song-save-location-picker-item-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.24;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-save-location-picker-item-meta {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-save-location-picker-item-arrow {
  flex: 0 0 auto;
  color: rgba(33, 79, 139, 0.7);
  font-size: 0.9rem;
  line-height: 1;
}

.song-save-location-picker-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

body.theme-dark .song-save-location-picker {
  border-color: rgba(63, 83, 115, 0.82);
  background:
    radial-gradient(circle at 14% 0%, rgba(77, 64, 29, 0.22), transparent 48%),
    linear-gradient(160deg, rgba(16, 28, 44, 0.97), rgba(10, 18, 29, 0.97));
}

body.theme-dark .song-save-location-picker-head {
  border-bottom-color: rgba(63, 83, 115, 0.62);
}

body.theme-dark .song-save-location-picker-song {
  color: #d6e2f4;
}

body.theme-dark .song-save-location-picker-close {
  border-color: rgba(121, 170, 233, 0.44);
  background: linear-gradient(160deg, rgba(21, 35, 54, 0.95), rgba(13, 24, 40, 0.95));
  color: #d8e7ff;
}

body.theme-dark .song-save-location-picker-item {
  border-color: rgba(121, 170, 233, 0.42);
  background: linear-gradient(160deg, rgba(20, 35, 54, 0.95), rgba(13, 24, 40, 0.94));
  color: #d8e7ff;
}

body.theme-dark .song-save-location-picker-item-remove {
  border-color: rgba(225, 115, 115, 0.46);
  background: rgba(89, 34, 34, 0.7);
  color: #ffd8d8;
}

body.theme-dark .song-save-location-picker-search {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(10, 21, 35, 0.86);
  color: #d8e7ff;
}

body.theme-dark .song-save-location-picker-add {
  border-color: rgba(82, 188, 134, 0.44);
  background: rgba(26, 66, 52, 0.72);
  color: #d9ffec;
}

body.theme-dark .song-save-location-picker-search::placeholder {
  color: rgba(188, 210, 241, 0.78);
}

body.theme-dark .song-save-location-picker-search:focus-visible {
  border-color: rgba(121, 170, 233, 0.62);
  box-shadow: 0 0 0 3px rgba(121, 170, 233, 0.18);
  background: rgba(12, 24, 40, 0.95);
}

body.theme-dark .song-save-location-picker-item.is-assigned {
  border-color: rgba(63, 173, 117, 0.58);
  background: linear-gradient(160deg, rgba(20, 48, 45, 0.88), rgba(15, 34, 36, 0.9));
}

body.theme-dark .song-save-location-picker-item:hover,
body.theme-dark .song-save-location-picker-item:focus-visible,
body.theme-dark .song-save-location-picker-close:hover,
body.theme-dark .song-save-location-picker-close:focus-visible,
body.theme-dark .song-save-location-picker-add:hover,
body.theme-dark .song-save-location-picker-add:focus-visible,
body.theme-dark .song-save-location-picker-back:hover,
body.theme-dark .song-save-location-picker-back:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .song-save-location-picker-item-remove:hover,
body.theme-dark .song-save-location-picker-item-remove:focus-visible {
  background: rgba(161, 62, 62, 0.72);
}

body.theme-dark .song-save-location-picker-item.is-assigned:hover,
body.theme-dark .song-save-location-picker-item.is-assigned:focus-visible {
  background: rgba(63, 173, 117, 0.24);
}

body.theme-dark .song-save-location-picker-item-arrow {
  color: rgba(193, 214, 247, 0.76);
}

@media (max-width: 760px) {
  .song-save-location-picker {
    max-width: calc(100vw - 12px);
    max-height: min(74vh, calc(100dvh - 20px));
  }
}

.song-location-create-modal {
  position: fixed;
  inset: 0;
  z-index: 139;
  display: none;
}

.song-location-create-modal.open {
  display: block;
}

.song-location-create-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 39, 0.46);
  backdrop-filter: blur(2px);
}

.song-location-create-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 16px));
  margin: clamp(10px, 8vh, 62px) auto 0;
  border: 1px solid rgba(215, 202, 166, 0.72);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 242, 210, 0.72), transparent 42%),
    linear-gradient(160deg, rgba(255, 255, 252, 0.99), rgba(247, 239, 221, 0.99));
  box-shadow:
    0 16px 30px rgba(8, 20, 39, 0.28),
    0 5px 14px rgba(8, 20, 39, 0.13);
  padding: 11px 12px 12px;
  display: grid;
  gap: 8px;
}

.song-location-create-dialog h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.95rem;
  line-height: 1.3;
}

.song-location-create-dialog p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.3;
}

.song-location-create-parent {
  width: 100%;
  min-height: 134px;
  max-height: min(40vh, 280px);
  border: 1px solid rgba(33, 79, 139, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.28;
  padding: 5px 6px;
  overflow: auto;
}

.song-location-create-parent:focus-visible {
  border-color: rgba(33, 79, 139, 0.52);
  box-shadow: 0 0 0 3px rgba(33, 79, 139, 0.14);
  background: #fff;
  outline: none;
}

.song-location-create-parent option {
  padding: 4px 6px;
  border-radius: 6px;
}

.song-location-create-input {
  min-height: 35px;
  width: 100%;
  border: 1px solid rgba(33, 79, 139, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
  padding: 7px 10px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.song-location-create-input::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.song-location-create-input:focus-visible {
  border-color: rgba(33, 79, 139, 0.52);
  box-shadow: 0 0 0 3px rgba(33, 79, 139, 0.14);
  background: #fff;
  outline: none;
}

.song-location-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.song-location-create-actions .btn {
  min-height: 32px;
  padding-inline: 12px;
}

body.theme-dark .song-location-create-backdrop {
  background: rgba(4, 10, 17, 0.62);
}

body.theme-dark .song-location-create-dialog {
  border-color: rgba(63, 83, 115, 0.82);
  background:
    radial-gradient(circle at 14% 0%, rgba(77, 64, 29, 0.22), transparent 48%),
    linear-gradient(160deg, rgba(16, 28, 44, 0.97), rgba(10, 18, 29, 0.97));
}

body.theme-dark .song-location-create-dialog h3 {
  color: #d8e7ff;
}

body.theme-dark .song-location-create-dialog p {
  color: rgba(188, 210, 241, 0.78);
}

body.theme-dark .song-location-create-parent {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(10, 21, 35, 0.86);
  color: #d8e7ff;
}

body.theme-dark .song-location-create-parent:focus-visible {
  border-color: rgba(121, 170, 233, 0.62);
  box-shadow: 0 0 0 3px rgba(121, 170, 233, 0.18);
  background: rgba(12, 24, 40, 0.95);
}

body.theme-dark .song-location-create-input {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(10, 21, 35, 0.86);
  color: #d8e7ff;
}

body.theme-dark .song-location-create-input::placeholder {
  color: rgba(188, 210, 241, 0.78);
}

body.theme-dark .song-location-create-input:focus-visible {
  border-color: rgba(121, 170, 233, 0.62);
  box-shadow: 0 0 0 3px rgba(121, 170, 233, 0.18);
  background: rgba(12, 24, 40, 0.95);
}

@media (max-width: 760px) {
  .song-location-create-dialog {
    width: calc(100vw - 12px);
    margin-top: max(8px, env(safe-area-inset-top));
  }
}

.song-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 91;
}

.song-modal.open {
  display: block;
}

.song-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 39, 0.6);
  backdrop-filter: blur(2px);
}

.song-modal-dialog {
  --song-modal-gap: clamp(12px, 4vh, 28px);
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 10px));
  margin: calc(var(--song-modal-gap) + env(safe-area-inset-top)) auto calc(var(--song-modal-gap) + env(safe-area-inset-bottom));
  border-radius: 18px;
  border: 1px solid rgba(215, 202, 166, 0.65);
  background: linear-gradient(160deg, rgba(255, 255, 252, 0.98), rgba(247, 239, 221, 0.98));
  box-shadow: 0 28px 48px rgba(8, 20, 39, 0.28);
  padding: 0 12px 12px;
  max-height: calc(100vh - (var(--song-modal-gap) * 2));
  max-height: calc(100svh - (var(--song-modal-gap) * 2) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-height: calc(100dvh - (var(--song-modal-gap) * 2) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
}

.song-modal-topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 14;
  display: flex;
  justify-content: flex-end;
  height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.song-modal-tone-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.song-modal-tone-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.song-modal-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  margin-top: 22px;
  margin-right: 8px;
  flex: 0 0 auto;
  pointer-events: auto;
}

.song-tone-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 9px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  min-height: 30px;
  padding: 0 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.song-tone-reset:hover,
.song-tone-reset:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.song-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 10px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.song-modal-close:hover,
.song-modal-close:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.song-modal .fetched-song-card {
  border: 0;
  border-radius: 14px;
  overflow: visible;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.song-modal .song-head {
  position: sticky;
  top: 0;
  z-index: 11;
  padding: 4px 56px 12px 20px;
  border-bottom: 1px solid rgba(215, 202, 166, 0.62);
  background: #fffcf4;
}

.song-modal .song-head h3 {
  margin: 0;
  line-height: 1.22;
}

.song-modal .song-head p {
  margin: 2px 0 0;
}

.mystery-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}

.mystery-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(10px, env(safe-area-inset-top))
    14px
    max(10px, env(safe-area-inset-bottom));
}

.mystery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 39, 0.58);
  backdrop-filter: blur(2px);
}

.mystery-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  margin: 0;
  border-radius: 18px;
  border: 1px solid rgba(215, 202, 166, 0.65);
  background: linear-gradient(160deg, rgba(255, 255, 252, 0.98), rgba(247, 239, 221, 0.98));
  box-shadow: 0 28px 48px rgba(8, 20, 39, 0.28);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 16px;
  max-height: calc(100vh - min(16vh, 112px));
  max-height: calc(100svh - min(16vh, 112px));
  max-height: calc(100dvh - min(16vh, 112px));
  overflow: hidden;
}

.mystery-modal-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  scrollbar-width: thin;
}

.mystery-modal-heading-row {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mystery-modal-heading {
  min-width: 0;
  margin-bottom: 0;
}

.mystery-modal-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.mystery-modal-links {
  margin: 0 0 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(215, 202, 166, 0.72);
  scrollbar-width: thin;
}

.mystery-modal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mystery-modal-link:hover,
.mystery-modal-link:focus-visible {
  background: rgba(33, 79, 139, 0.12);
  outline: none;
}

.mystery-modal-link.is-active {
  background: linear-gradient(128deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  color: #fff;
}

@media (max-width: 920px) and (orientation: portrait) {
  .mystery-modal-links {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .mystery-modal-links::before {
    content: "Mistérios:";
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink-soft);
    margin-right: 2px;
    white-space: nowrap;
  }

  .mystery-modal-link {
    min-width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0;
  }

  .mystery-modal-link::after {
    content: attr(data-short-label);
    font-size: 0.86rem;
    line-height: 1;
  }
}

.mystery-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-top: 0;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 10px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.mystery-modal-group {
  margin-top: 0;
  color: #8c6a2a;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mystery-modal-dialog h3 {
  font-size: clamp(1.05rem, 2.15vw, 1.45rem);
  line-height: 1.28;
  color: var(--primary-strong);
  margin: 0;
}

.mystery-modal-song-toggle {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(33, 79, 139, 0.34);
  border-radius: 10px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.mystery-modal-song-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mystery-modal-song-toggle:hover,
.mystery-modal-song-toggle:focus-visible {
  background: rgba(33, 79, 139, 0.15);
  outline: none;
}

.mystery-modal-song-toggle.is-active {
  background: rgba(33, 79, 139, 0.2);
}

.mystery-modal-song-toggle.is-empty {
  opacity: 0.62;
}

.mystery-modal-song-toggle.is-loading {
  cursor: progress;
}

.mystery-modal-text {
  margin-top: 9px;
  color: #2f3d54;
  font-size: 0.98rem;
}

.mystery-modal-song-panel {
  margin-top: 10px;
  border: 1px solid rgba(33, 79, 139, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 11px;
}

.mystery-modal-song-title {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.mystery-modal-song-lyrics {
  margin: 8px 0 0;
  white-space: pre-wrap;
  font-family: "Source Code Pro", "Fira Code", Consolas, monospace;
  font-size: 0.83rem;
  line-height: 1.4;
  color: #2f3d54;
}

.mystery-modal-footer {
  margin-top: auto;
  border-top: 1px solid rgba(215, 202, 166, 0.72);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.mystery-jaculatory-toggle {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 11px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mystery-jaculatory-toggle:hover,
.mystery-jaculatory-toggle:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.mystery-jaculatory-toggle.is-active {
  border-color: rgba(33, 79, 139, 0.48);
}

.mystery-jaculatory-panel {
  margin-top: 0;
  border: 1px solid rgba(33, 79, 139, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
}

.mystery-jaculatory-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mystery-jaculatory-title {
  margin: 0;
  color: #8c6a2a;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  flex: 1 1 auto;
}

.mystery-jaculatory-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 8px;
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.mystery-jaculatory-close:hover,
.mystery-jaculatory-close:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.mystery-jaculatory-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #2f3d54;
  font-size: 0.92rem;
  display: grid;
  gap: 4px;
}

.song-grid {
  margin-top: 30px;
  display: grid;
  gap: 14px;
}

.song-fetch-card {
  margin-top: 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(215, 202, 166, 0.66);
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.song-fetch-card-cantos {
  margin-top: 14px;
}

.booklet-cantos-card {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(215, 202, 166, 0.66);
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.song-favorites-card {
  margin-top: 14px;
}

.custom-songs-card {
  margin-top: 14px;
}

.custom-songs-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.custom-songs-header-row h3 {
  margin-top: 0;
}

.custom-songs-add-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
  border-radius: 10px;
  white-space: nowrap;
  flex: 0 0 auto;
  color: #5f4315;
  border: 1px solid rgba(181, 143, 56, 0.45);
  background: linear-gradient(140deg, rgba(252, 239, 201, 0.98), rgba(238, 217, 164, 0.98));
  box-shadow: 0 8px 16px rgba(90, 64, 20, 0.16);
}

.custom-songs-add-btn:hover,
.custom-songs-add-btn:focus-visible {
  background: linear-gradient(140deg, rgba(254, 244, 216, 0.99), rgba(242, 223, 178, 0.99));
  border-color: rgba(181, 143, 56, 0.56);
}

.custom-song-item {
  border: 1px solid rgba(215, 202, 166, 0.62);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  padding: 7px 9px;
  display: grid;
  gap: 4px;
  height: 100%;
}

.custom-song-item.is-sortable {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.custom-song-item.is-sortable:active {
  cursor: grabbing;
}

.custom-song-item.is-sortable:hover {
  border-color: rgba(33, 79, 139, 0.38);
}

.custom-song-item.is-dragging {
  opacity: 0.64;
  border-style: dashed;
  box-shadow: 0 10px 20px rgba(16, 37, 67, 0.15);
}

.custom-song-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.custom-song-item-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
  color: var(--primary-strong);
  min-width: 0;
}

.custom-song-item-head-actions {
  margin-left: auto;
}

.custom-song-item-meta,
.custom-song-item-updated {
  margin: 0;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.custom-song-item-actions {
  margin-top: 2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.custom-song-item-action {
  min-height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(33, 79, 139, 0.3);
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0 9px;
  cursor: pointer;
}

.custom-song-item-action:hover,
.custom-song-item-action:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.custom-song-empty {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.song-favorites-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.song-favorite-item {
  padding: 8px 10px;
  gap: 5px;
  height: 100%;
  align-content: start;
}

.song-favorite-item.is-sortable {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.song-favorite-item.is-sortable:active {
  cursor: grabbing;
}

.song-favorite-item.is-sortable:hover {
  border-color: rgba(33, 79, 139, 0.38);
}

.song-favorite-item.is-dragging {
  opacity: 0.64;
  border-style: dashed;
  box-shadow: 0 10px 20px rgba(16, 37, 67, 0.15);
}

.song-favorites-empty {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.song-favorites-loading {
  opacity: 0.8;
}

.song-favorite-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.song-favorite-cover-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(33, 79, 139, 0.06);
}

.song-favorite-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-favorite-head .booklet-cantos-title {
  display: flex;
  align-items: center;
  min-height: 58px;
  line-height: 1.2;
  margin: 0;
  min-width: 0;
}

.song-favorite-title-btn {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  text-align: left;
  min-width: 0;
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.song-favorite-title-btn:disabled {
  cursor: default;
}

.song-favorite-title-btn:not(:disabled):hover .booklet-cantos-title,
.song-favorite-title-btn:not(:disabled):focus-visible .booklet-cantos-title {
  color: #174279;
}

.song-favorite-title-btn:focus-visible {
  outline: 2px solid rgba(33, 79, 139, 0.35);
  outline-offset: 2px;
  border-radius: 8px;
}

.song-favorite-head-actions {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(2, 34px);
  grid-template-rows: repeat(2, 34px);
  grid-template-areas:
    "lyrics chords"
    "spotify youtube";
  align-items: center;
  align-content: center;
  justify-content: end;
  justify-items: center;
  column-gap: 1px;
  row-gap: 1px;
  flex: 0 0 auto;
  min-height: 58px;
  align-self: center;
}

.song-favorite-action-lyrics {
  grid-area: lyrics;
}

.song-favorite-action-chords {
  grid-area: chords;
}

.song-favorite-action-spotify {
  grid-area: spotify;
}

.song-favorite-action-youtube {
  grid-area: youtube;
}

.song-favorite-head-actions .song-search-action {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  padding: 0;
  gap: 0;
  line-height: 0;
}

.song-favorite-head-actions .song-favorite-head-action {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.song-favorite-head-actions .song-favorite-head-action:hover,
.song-favorite-head-actions .song-favorite-head-action:focus-visible {
  background: transparent;
  border-color: transparent;
}

.song-favorite-head-actions .song-favorite-head-action .song-search-action-icon {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.song-favorite-head-actions .song-search-action.song-search-action-external {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  gap: 0;
}

.song-favorite-status {
  margin-top: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding-left: 30px;
}

.song-favorite-actions {
  margin-top: 3px;
  padding-left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.song-search-actions.song-favorite-actions .song-search-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.74rem;
}

.song-favorite-actions .song-search-action.song-search-action-external,
.song-favorite-actions .song-search-action.song-search-action-favorite {
  width: 24px;
  min-width: 24px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  gap: 0;
}

.booklet-cantos-header h3 {
  font-size: 1.45rem;
  margin-top: 6px;
}

.booklet-cantos-header p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.booklet-cantos-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.booklet-cantos-item {
  border: 1px solid rgba(215, 202, 166, 0.62);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  padding: 7px 9px;
  display: grid;
  gap: 4px;
  height: 100%;
}

.booklet-cantos-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.booklet-cantos-title {
  display: inline-block;
  font-size: 0.84rem;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.booklet-cantos-meta {
  margin-top: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding-left: 30px;
}

.song-favorite-item .booklet-cantos-meta {
  padding-left: 0;
}

.song-favorite-usage {
  margin: 0;
  font-size: 0.69rem;
  line-height: 1.28;
  color: #446289;
  padding-left: 0;
}

.booklet-cantos-search-btn {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.booklet-cantos-search-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booklet-cantos-search-btn:hover,
.booklet-cantos-search-btn:focus-visible {
  background: rgba(33, 79, 139, 0.15);
  outline: none;
}

.custom-song-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 150;
}

.custom-song-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.custom-song-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 39, 0.58);
  backdrop-filter: blur(2px);
}

.custom-song-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 26px));
  max-height: min(88vh, calc(100dvh - 24px));
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(215, 202, 166, 0.68);
  background: linear-gradient(160deg, rgba(255, 255, 252, 0.98), rgba(247, 239, 221, 0.98));
  box-shadow: 0 24px 44px rgba(8, 20, 39, 0.28);
  padding: 14px;
}

.custom-song-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.custom-song-header h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.12rem;
}

.custom-song-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  font: inherit;
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.custom-song-close:hover,
.custom-song-close:focus-visible {
  background: rgba(33, 79, 139, 0.16);
  outline: none;
}

.custom-song-fields {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
}

.custom-song-field {
  display: grid;
  gap: 4px;
}

.custom-song-field span {
  font-size: 0.77rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.custom-song-input {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  padding: 0 10px;
}

.custom-song-input:focus-visible {
  outline: 2px solid rgba(33, 79, 139, 0.35);
  outline-offset: 1px;
}

.custom-song-tabs {
  margin-top: 12px;
  display: flex;
  gap: 6px;
}

.custom-song-tab {
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.86);
  color: var(--primary-strong);
  border-radius: 999px;
  min-height: 30px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.custom-song-tab.is-active {
  border-color: transparent;
  background: linear-gradient(128deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.custom-song-panel {
  margin-top: 10px;
}

.custom-song-panel-label {
  display: inline-block;
  font-size: 0.77rem;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 5px;
}

.custom-song-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  padding: 10px 11px;
}

.custom-song-textarea:focus-visible {
  outline: 2px solid rgba(33, 79, 139, 0.35);
  outline-offset: 1px;
}

.custom-song-draft-status {
  margin: 8px 0 0;
  min-height: 18px;
  font-size: 0.73rem;
  color: var(--ink-soft);
}

.custom-song-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.custom-song-draft-status.is-success {
  color: #2e6f42;
}

.custom-song-draft-status.is-error {
  color: #9b352e;
}

@media (max-width: 920px) {
  .custom-songs-header-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .custom-songs-add-btn {
    width: 100%;
    justify-content: center;
  }

  .custom-song-fields {
    grid-template-columns: 1fr;
  }

  .custom-song-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }
}

@media (max-width: 680px) {
  .custom-song-dialog {
    padding: 12px;
    border-radius: 14px;
  }

  .custom-song-textarea {
    min-height: 180px;
  }
}

.song-fetch-form {
  display: grid;
  gap: 8px;
}

.song-fetch-form label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.song-fetch-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.song-fetch-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.song-fetch-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(33, 79, 139, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 10px 80px 10px 12px;
  font: inherit;
  font-size: 0.92rem;
}

.song-fetch-input:focus-visible {
  outline: 2px solid rgba(33, 79, 139, 0.38);
  outline-offset: 1px;
}

.song-fetch-submit {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(125deg, var(--primary), var(--primary-strong));
  color: #fff;
  height: 40px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.song-fetch-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.song-search-trigger,
.song-search-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid rgba(33, 79, 139, 0.34);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(241, 248, 255, 0.92));
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(15, 41, 76, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.song-search-trigger {
  right: 43px;
}

.song-search-clear {
  right: 7px;
  border-color: rgba(179, 38, 30, 0.46);
  background: linear-gradient(165deg, rgba(255, 245, 244, 0.98), rgba(255, 233, 231, 0.96));
  color: #b3261e;
  box-shadow: 0 6px 12px rgba(129, 35, 29, 0.14);
}

.song-search-trigger:hover,
.song-search-trigger:focus-visible,
.song-search-clear:hover,
.song-search-clear:focus-visible {
  transform: translateY(calc(-50% - 1px));
  border-color: rgba(33, 79, 139, 0.52);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(225, 240, 255, 0.95));
  box-shadow: 0 9px 16px rgba(15, 41, 76, 0.17);
  outline: none;
}

.song-search-clear:hover,
.song-search-clear:focus-visible {
  border-color: rgba(179, 38, 30, 0.64);
  background: linear-gradient(165deg, rgba(255, 239, 237, 0.98), rgba(255, 222, 219, 0.96));
  box-shadow: 0 9px 16px rgba(129, 35, 29, 0.18);
}

.song-search-trigger:active,
.song-search-clear:active {
  transform: translateY(-50%);
  box-shadow: 0 4px 9px rgba(15, 41, 76, 0.14);
}

.song-search-trigger:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.song-search-trigger-icon,
.song-search-clear-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  line-height: 1;
}

.song-fetch-feedback {
  min-height: 1.2em;
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.song-fetch-feedback.is-loading {
  color: var(--primary);
}

.song-fetch-feedback.is-success {
  color: #2f7a3f;
}

.song-fetch-feedback.is-error {
  color: #a93a32;
}

.song-search-results {
  margin-top: 10px;
  border: 1px solid rgba(215, 202, 166, 0.62);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  max-height: min(62vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  backdrop-filter: blur(2px);
}

.song-search-results-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.song-search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.song-search-load-more {
  margin-top: 10px;
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(33, 79, 139, 0.34);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 255, 0.92));
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  box-shadow: 0 7px 13px rgba(15, 41, 76, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  cursor: pointer;
}

.song-search-load-more:hover,
.song-search-load-more:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(33, 79, 139, 0.52);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(225, 240, 255, 0.95));
  box-shadow: 0 10px 16px rgba(15, 41, 76, 0.18);
  outline: none;
}

.song-search-load-more:active {
  transform: translateY(0);
  box-shadow: 0 5px 9px rgba(15, 41, 76, 0.14);
}

.song-search-load-more:disabled {
  opacity: 0.74;
  cursor: not-allowed;
  box-shadow: none;
}

.song-search-load-more.is-loading {
  cursor: wait;
}

.song-search-load-more.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(33, 79, 139, 0.24);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: song-search-load-more-spin 0.78s linear infinite;
}

@keyframes song-search-load-more-spin {
  to {
    transform: rotate(360deg);
  }
}

.song-search-item {
  border: 1px solid rgba(215, 202, 166, 0.65);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.song-search-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.song-search-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(215, 202, 166, 0.8);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.85);
}

.song-search-info {
  min-width: 0;
}

.song-search-item strong {
  display: block;
  font-size: 0.93rem;
  line-height: 1.3;
}

.song-search-item p {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.song-search-actions {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 1px;
  flex: 0 0 auto;
}

.song-search-action {
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-strong);
  border-radius: 9px;
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.song-search-action-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}

.song-search-action-favorite {
  width: 26px;
  min-width: 26px;
  min-height: 32px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0;
  line-height: 0;
}

.song-search-action-favorite .song-search-action-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.song-search-action-lyrics,
.song-search-action-chords {
  width: 30px;
  min-width: 30px;
  min-height: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0;
  line-height: 0;
}

.song-search-action-chords,
.song-favorite-action-chords,
.custom-song-item-head-action-chords {
  color: #b3261e;
  font-weight: 800;
}

.song-search-action-lyrics .song-search-action-icon,
.song-search-action-chords .song-search-action-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.song-search-action-assign-mystery {
  width: 26px;
  min-width: 26px;
  min-height: 32px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0;
  line-height: 0;
}

.song-search-action-assign-mystery .song-search-action-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.song-search-action.song-search-action-assign-mystery:hover,
.song-search-action.song-search-action-assign-mystery:focus-visible {
  border-color: transparent;
  background: transparent;
  outline: none;
}

.song-search-action.song-search-action-lyrics:hover,
.song-search-action.song-search-action-lyrics:focus-visible,
.song-search-action.song-search-action-chords:hover,
.song-search-action.song-search-action-chords:focus-visible {
  border-color: transparent;
  background: transparent;
  outline: none;
}

.song-search-action-favorite.is-active {
  color: #8f6a20;
}

.song-search-action-favorite.is-active .song-search-action-icon {
  fill: currentColor;
}

.song-search-action.song-search-action-favorite:hover,
.song-search-action.song-search-action-favorite:focus-visible {
  border-color: transparent;
  background: transparent;
  outline: none;
}

.song-search-action-label {
  line-height: 1;
}

.song-search-action-external {
  min-width: 30px;
  width: 30px;
  min-height: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0;
  line-height: 0;
  justify-self: center;
}

.song-search-action-external .song-search-action-icon {
  width: 24px;
  height: 24px;
}

.song-search-action-external .song-search-action-icon-spotify {
  width: 26px;
  height: 26px;
}

.song-search-action-external .song-search-action-icon-youtube {
  width: 26px;
  height: 19px;
}

.song-search-action.song-search-action-external:hover,
.song-search-action.song-search-action-external:focus-visible {
  background: transparent;
  border-color: transparent;
  outline: none;
}

.song-search-action.song-search-action-external.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

.song-search-action:hover,
.song-search-action:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.song-search-action:disabled {
  opacity: 0.62;
  cursor: wait;
}

.fetched-song-card {
  border-color: rgba(33, 79, 139, 0.26);
}

.song-view-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px 12px;
}

.song-view-option {
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary-strong);
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.song-view-option:hover,
.song-view-option:focus-visible {
  background: rgba(33, 79, 139, 0.14);
  outline: none;
}

.song-view-option.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(125deg, var(--primary), var(--primary-strong));
}

.song-tone-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(33, 79, 139, 0.28);
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary-strong);
  border-radius: 999px;
  min-height: 30px;
  min-width: 30px;
  padding: 0 8px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.song-tone-option:hover {
  background: rgba(33, 79, 139, 0.14);
}

.song-tone-grid {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0 2px;
  scrollbar-width: thin;
}

.song-modal-tone-row.is-disabled {
  opacity: 0.66;
}

.song-modal.is-lyrics-mode {
  --lyrics-closebar-height: 0px;
}

.song-modal.is-lyrics-mode .song-modal-tone-row,
.song-modal.is-lyrics-mode .song-tone-reset {
  display: none;
}

.song-modal.is-lyrics-mode .fetched-song-body {
  border-top: 0;
}

.song-modal.is-lyrics-mode .fetched-song-lyrics {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.72;
}

body.theme-dark .song-modal .song-head {
  border-bottom-color: rgba(63, 83, 115, 0.78);
  background: #0e1826;
}

.song-tone-option.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(125deg, var(--primary), var(--primary-strong));
}

.song-tone-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.song-tone-reset:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.song-view-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fetched-song-body {
  border-top: 1px solid rgba(215, 202, 166, 0.62);
}

.fetched-song-lyrics {
  margin: 0;
  padding: 18px 20px 20px;
  font-family: "Fira Code", monospace;
  font-size: 0.84rem;
  line-height: 1.58;
  color: #2f3d54;
  white-space: pre-wrap;
  overflow-x: auto;
  background: rgba(251, 247, 239, 0.76);
}

.fetched-song-lyrics .song-chord-token {
  color: #b3261e;
  font-weight: 800;
}

body.theme-dark .fetched-song-lyrics .song-chord-token {
  color: #ff8a80;
}

.song-card,
.prayer-card {
  background: var(--surface);
  border: 1px solid rgba(215, 202, 166, 0.66);
  border-radius: var(--radius-md);
  overflow: clip;
}

.song-head {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.song-head h3,
.prayer-card h3 {
  font-size: 1.45rem;
}

.song-head p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.accordion-trigger {
  border: 1px solid rgba(33, 79, 139, 0.35);
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  border-radius: 999px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.accordion-trigger-icon {
  display: none;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.accordion-trigger-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accordion-trigger-icon svg path {
  fill: none;
}

.accordion-trigger-icon .eye-pupil {
  fill: currentColor;
  stroke: none;
}

.accordion-trigger-icon .eye-glint {
  fill: #fff;
  stroke: none;
}

.accordion-trigger[data-eye-state="open"] .accordion-trigger-icon-open {
  display: inline-flex;
}

.accordion-trigger[data-eye-state="closed"] .accordion-trigger-icon-closed {
  display: inline-flex;
}

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

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.34s ease;
}

.song-card.open .accordion-body,
.prayer-card.open .accordion-body {
  border-top: 1px solid rgba(215, 202, 166, 0.62);
}

.song-card pre {
  margin: 0;
  padding: 18px 20px 20px;
  font-family: "Fira Code", monospace;
  font-size: 0.84rem;
  line-height: 1.58;
  color: #2f3d54;
  overflow-x: auto;
  background: rgba(251, 247, 239, 0.76);
}

.prayer-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  align-items: start;
  gap: 14px;
}

.prayer-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.prayer-grid .prayer-card.open {
  grid-column: 1 / -1;
  width: 100%;
  justify-self: center;
}

.prayer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  min-height: 38px;
}

.prayer-card-head h3 {
  flex: 1 1 auto;
  width: 100%;
  padding-right: 50px;
  text-align: left;
}

.prayer-card .accordion-trigger {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  margin-left: 0;
}

.prayer-card p {
  padding-top: 2px;
  color: var(--ink-soft);
}

.sementes-card {
  margin-top: 30px;
  border-radius: 20px;
  border: 1px solid rgba(215, 202, 166, 0.62);
  background: linear-gradient(145deg, rgba(254, 250, 239, 0.96), rgba(243, 232, 203, 0.94));
  box-shadow: 0 14px 30px rgba(16, 37, 67, 0.1);
  padding: clamp(20px, 3.2vw, 30px);
}

.sementes-badge {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8c6a2a;
}

.sementes-card h3 {
  margin-top: 6px;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  color: var(--primary-strong);
}

.sementes-card p {
  margin-top: 9px;
  color: var(--ink-soft);
  max-width: 70ch;
}

.sementes-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sanctuary-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.sanctuary-card {
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(215, 202, 166, 0.62);
  background: linear-gradient(155deg, rgba(255, 253, 247, 0.95), rgba(243, 236, 220, 0.92));
  display: grid;
  gap: 8px;
}

.sanctuary-card h3 {
  font-size: 1.35rem;
  color: var(--primary-strong);
}

.sanctuary-city {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c6a2a;
}

.sanctuary-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.sanctuary-link {
  width: fit-content;
  margin-top: 2px;
}

.resource-card {
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(215, 202, 166, 0.62);
  background: linear-gradient(155deg, rgba(255, 253, 247, 0.95), rgba(243, 236, 220, 0.92));
}

.resource-card h3 {
  font-size: 1.4rem;
  color: var(--primary-strong);
}

.resource-card p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.section-cta {
  padding-top: 44px;
}

.cta-box {
  background: linear-gradient(140deg, rgba(25, 59, 108, 0.96), rgba(19, 45, 83, 0.96));
  border: 1px solid rgba(220, 200, 154, 0.35);
  color: #f4f8ff;
  border-radius: 26px;
  padding: clamp(28px, 4.4vw, 52px);
  box-shadow: 0 18px 36px rgba(11, 29, 55, 0.3);
}

.cta-box .section-kicker {
  color: var(--accent-soft);
}

.cta-box h2 {
  margin-top: 8px;
  font-size: clamp(1.9rem, 3.1vw, 2.8rem);
}

.cta-box p {
  margin-top: 10px;
  color: rgba(237, 243, 255, 0.9);
  max-width: 66ch;
}

.cta-box .btn {
  margin-top: 20px;
  background: linear-gradient(130deg, var(--accent), #ad8028);
  color: #fff;
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid rgba(215, 202, 166, 0.48);
  margin-top: 38px;
}

.footer-row {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-row a {
  color: var(--primary);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.portal-mode {
  overflow: hidden;
  height: calc(var(--vh, 1vh) * 100);
  height: 100svh;
  height: 100dvh;
}

body.portal-mode main {
  --portal-window-width: min(1120px, 92vw);
  --portal-enter-shift: 36px;
  --portal-leave-shift: -30px;
  margin-top: var(--header-height);
  height: calc((var(--vh, 1vh) * 100) - var(--header-height));
  height: calc(100svh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  width: 100%;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
}

body.portal-mode main.is-portal-nav-forward {
  --portal-enter-shift: 36px;
  --portal-leave-shift: -30px;
}

body.portal-mode main.is-portal-nav-backward {
  --portal-enter-shift: -36px;
  --portal-leave-shift: 30px;
}

body.portal-mode .section {
  display: block;
  grid-area: 1 / 1;
  width: var(--portal-window-width);
  height: calc((var(--vh, 1vh) * 100) - var(--header-height) - 24px);
  height: calc(100svh - var(--header-height) - 24px);
  height: calc(100dvh - var(--header-height) - 24px);
  max-width: var(--portal-window-width);
  max-height: calc((var(--vh, 1vh) * 100) - var(--header-height) - 24px);
  max-height: calc(100svh - var(--header-height) - 24px);
  max-height: calc(100dvh - var(--header-height) - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  overscroll-behavior-y: contain;
  opacity: 0;
  transform: translate3d(var(--portal-enter-shift), 0, 0) scale(0.988);
  pointer-events: none;
  visibility: hidden;
  z-index: 1;
  will-change: opacity, transform;
  transition:
    opacity 300ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 420ms;
}

body.portal-mode .section.is-portal-leaving {
  opacity: 0;
  transform: translate3d(var(--portal-leave-shift), 0, 0) scale(0.992);
  pointer-events: none;
  visibility: visible;
  z-index: 1;
  transition:
    opacity 220ms ease,
    transform 340ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0s;
}

body.portal-mode .section.is-portal-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
  visibility: visible;
  z-index: 2;
  transition-delay: 0s, 0s, 0s;
}

body.portal-mode .section > .container {
  width: var(--portal-window-width);
  margin: 0 auto;
  padding-inline: clamp(14px, 2.6vw, 34px);
  padding-block: 16px;
  min-height: calc(100% - 32px);
  display: grid;
  align-content: center;
}

body.portal-mode .hero {
  padding-top: 0;
}

body.portal-mode .site-footer {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  body.portal-mode main {
    --portal-enter-shift: 0px;
    --portal-leave-shift: 0px;
  }

  body.portal-mode .section {
    transform: none;
    transition: none;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px) translateX(0px);
  }

  50% {
    transform: translateY(-18px) translateX(6px);
  }

  100% {
    transform: translateY(0px) translateX(0px);
  }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
    gap: clamp(20px, 3.2vw, 34px);
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-lead {
    max-width: none;
  }

  .section-header {
    max-width: 100%;
  }

  .sementes-card p,
  .cta-box p {
    max-width: 100%;
  }

  .story-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booklet-cantos-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.portal-mode {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
    height: auto;
    min-height: 100dvh;
  }

  body.portal-mode main {
    --portal-window-width: 100vw;
    display: grid;
    place-items: stretch;
    height: calc((var(--vh, 1vh) * 100) - var(--header-height));
    height: calc(100svh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    min-height: calc((var(--vh, 1vh) * 100) - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
  }

  body.portal-mode .section {
    width: 100%;
    max-width: 100%;
    height: calc((var(--vh, 1vh) * 100) - var(--header-height));
    height: calc(100svh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    max-height: calc((var(--vh, 1vh) * 100) - var(--header-height));
    max-height: calc(100svh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
    padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
    overscroll-behavior-y: auto;
  }

  body.portal-mode .section > .container {
    width: min(1120px, 94vw);
    padding-inline: clamp(12px, 3.4vw, 20px);
    padding-block: 0;
    min-height: 0;
    display: block;
    align-content: normal;
  }

  .header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(112px, 24vw, 180px) auto auto;
    grid-template-areas: "brand search controls menu";
    align-items: center;
    min-height: 70px;
    padding: 12px 0;
    gap: 6px;
    row-gap: 0;
    position: relative;
  }

  .brand {
    grid-area: brand;
    grid-column: auto;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .brand-text small {
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.03em;
    text-transform: none;
  }

  .brand-text strong {
    font-size: 0.9rem;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.18;
  }

  .menu-toggle {
    grid-area: menu;
    grid-column: auto;
    display: inline-flex;
    margin-left: auto;
    flex: 0 0 auto;
    width: 33px;
    height: 33px;
    border-radius: 8px;
  }

  .font-controls {
    grid-area: controls;
    grid-column: auto;
    margin-left: 0;
    gap: 4px;
  }

  .font-btn {
    min-width: 33px;
    height: 33px;
    font-size: 0.74rem;
    border-radius: 8px;
    padding: 0 6px;
  }

  #font-decrease,
  #font-increase {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .menu-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
    margin-top: 0;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    justify-content: flex-start;
    gap: 0;
    max-height: calc((var(--vh, 1vh) * 100) - 110px);
    max-height: calc(100svh - 110px);
    max-height: calc(100dvh - 110px);
    overflow: auto;
    z-index: 40;
  }

  body.theme-dark .menu-list {
    border-color: transparent;
    background: transparent;
  }

  .menu-list.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .menu-list a,
  .menu-list .menu-parent-trigger,
  .menu-list .menu-back-trigger {
    min-height: 42px;
    padding: 0 14px;
  }

  .menu-song-search {
    display: block;
    grid-area: search;
    grid-column: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    justify-self: stretch;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .site-header,
  .header-row,
  .menu-list,
  .menu-song-search,
  .menu-song-search .song-search-results {
    max-width: 100%;
  }

  .menu-song-search .song-fetch-input {
    height: 36px;
    width: 100%;
    min-width: 0;
    padding: 8px 72px 8px 10px;
    font-size: 0.84rem;
  }

  .menu-song-search .song-search-results {
    position: fixed;
    top: calc(var(--header-height) + 6px);
    left: 7px;
    right: 7px;
    transform: none;
    width: auto;
    max-width: none;
    max-height: min(58vh, calc(100dvh - var(--header-height) - 14px));
    overflow-x: hidden;
    overflow-y: auto;
  }

  .menu-song-search .song-search-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 222px;
    align-items: center;
    gap: 8px;
  }

  .menu-song-search .song-search-main {
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
  }

  .menu-song-search .song-search-info {
    min-width: 0;
  }

  .menu-song-search .song-search-item strong,
  .menu-song-search .song-search-item p {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

.menu-song-search .song-search-actions {
  width: 209px;
  min-width: 209px;
  display: grid;
  grid-template-columns: repeat(6, 34px);
  gap: 1px;
  align-self: center;
}

  .menu-song-search .song-search-actions .song-search-action {
    width: auto;
    min-width: 0;
    min-height: 28px;
    padding: 0 4px;
    font-size: 0.66rem;
  }

  .menu-song-search .song-search-action-external .song-search-action-label {
    display: none;
  }

  .menu-song-search .song-search-action-external {
    padding: 0;
    gap: 0;
  }

  .menu-song-search .song-search-actions .song-search-action-external {
    width: 30px;
    min-width: 30px;
    min-height: 34px;
    height: 34px;
    justify-self: center;
  }

  .menu-song-search .song-search-actions .song-search-action-lyrics,
  .menu-song-search .song-search-actions .song-search-action-chords {
    width: 30px;
    min-width: 30px;
    min-height: 34px;
    height: 34px;
    justify-self: center;
  }

  .menu-song-search .song-search-actions .song-search-action-favorite {
    width: 24px;
    min-width: 24px;
    min-height: 28px;
    height: 28px;
    justify-self: center;
  }

  .menu-song-search .song-search-actions .song-search-action-assign-mystery {
    width: 24px;
    min-width: 24px;
    min-height: 28px;
    height: 28px;
    justify-self: center;
  }

  .menu-song-search .song-search-action-external .song-search-action-icon {
    width: 20px;
    height: 20px;
  }

  .menu-song-search .song-search-action-external .song-search-action-icon-spotify {
    width: 22px;
    height: 22px;
  }

  .menu-song-search .song-search-action-external .song-search-action-icon-youtube {
    width: 22px;
    height: 15px;
  }

  .header-row > .btn {
    display: none;
  }

  .hero-grid,
  .story-layout,
  .mystery-grid,
  .prayer-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .booklet-cantos-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .header-row {
    min-height: var(--mobile-header-height);
    padding: 6px 0;
    gap: 6px;
    row-gap: 4px;
  }

  body.landscape-mobile .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  body.landscape-mobile .brand-mark {
    width: 34px;
    height: 34px;
  }

  body.landscape-mobile .brand-text small {
    display: block;
    font-size: 0.58rem;
    line-height: 1.1;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  body.landscape-mobile .brand-text strong {
    font-size: 0.82rem;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.landscape-mobile .font-controls {
    gap: 3px;
  }

  body.landscape-mobile .menu-song-search {
    margin-top: 0;
  }

  body.landscape-mobile {
    min-height: calc(var(--vh, 1vh) * 100);
    min-height: 100svh;
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  main {
    padding-top: var(--header-height);
  }

  .section {
    min-height: calc((var(--vh, 1vh) * 100) - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
    padding: clamp(16px, 4vh, 30px) 0;
  }

  .hero {
    padding-top: 4px;
  }

  body.landscape-mobile.portal-mode {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: calc(var(--vh, 1vh) * 100);
    min-height: 100svh;
    min-height: 100dvh;
  }

  body.landscape-mobile.portal-mode main {
    display: block;
    height: auto;
    min-height: calc((var(--vh, 1vh) * 100) - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
    overflow: visible;
    padding-top: var(--header-height);
  }

  body.landscape-mobile.portal-mode .section {
    display: none;
    grid-area: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: none;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  }

  body.landscape-mobile.portal-mode .section.is-portal-active {
    display: block;
  }

  body.landscape-mobile.portal-mode .section > .container {
    width: min(1120px, 94vw);
    padding-inline: clamp(12px, 3.4vw, 20px);
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 920px) {
  .menu-song-search .song-search-results {
    left: max(7px, env(safe-area-inset-left));
    right: max(7px, env(safe-area-inset-right));
    max-height: min(58vh, calc(100vh - var(--header-height) - 14px));
    max-height: min(58vh, calc(100svh - var(--header-height) - 14px));
    max-height: min(58vh, calc(100dvh - var(--header-height) - 14px));
  }
}

@media (max-width: 680px) {
  .booklet-cantos-list {
    grid-template-columns: 1fr;
  }

  .song-favorites-list {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .song-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .song-fetch-row {
    flex-direction: column;
    align-items: stretch;
  }

  .song-fetch-submit {
    width: 100%;
  }

  .song-search-item {
    flex-direction: column;
  }

  .song-search-actions {
    width: 100%;
  }

  .song-search-actions .song-search-action {
    flex: 1 1 0;
  }

  .song-search-actions .song-search-action.song-search-action-external {
    flex: 0 0 auto;
    width: 30px;
    min-width: 30px;
    padding: 0;
    gap: 0;
  }

  .song-search-actions .song-search-action.song-search-action-lyrics,
  .song-search-actions .song-search-action.song-search-action-chords {
    flex: 0 0 auto;
    width: 30px;
    min-width: 30px;
    padding: 0;
    gap: 0;
  }

  .song-search-actions .song-search-action.song-search-action-favorite {
    flex: 0 0 auto;
    width: 24px;
    min-width: 24px;
    padding: 0;
    gap: 0;
  }

  .song-search-actions .song-search-action.song-search-action-assign-mystery {
    flex: 0 0 auto;
    width: 24px;
    min-width: 24px;
    padding: 0;
    gap: 0;
  }

  .menu-song-search .song-search-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 222px;
    align-items: center;
  }

  .menu-song-search .song-search-actions {
    width: 209px;
    min-width: 209px;
    display: grid;
    grid-template-columns: repeat(6, 34px);
    gap: 1px;
    justify-content: stretch;
  }

  .menu-song-search .song-search-actions .song-search-action {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 0 4px;
    font-size: 0.66rem;
  }

  .menu-song-search .song-search-action-external .song-search-action-label {
    display: none;
  }

  .menu-song-search .song-search-action-external {
    padding: 0;
    gap: 0;
  }

  .menu-song-search .song-search-actions .song-search-action-external {
    width: 30px;
    min-width: 30px;
    min-height: 34px;
    height: 34px;
    justify-self: center;
  }

  .menu-song-search .song-search-actions .song-search-action-lyrics,
  .menu-song-search .song-search-actions .song-search-action-chords {
    width: 30px;
    min-width: 30px;
    min-height: 34px;
    height: 34px;
    justify-self: center;
  }

  .menu-song-search .song-search-actions .song-search-action-favorite {
    width: 24px;
    min-width: 24px;
    min-height: 28px;
    height: 28px;
    justify-self: center;
  }

  .menu-song-search .song-search-actions .song-search-action-assign-mystery {
    width: 24px;
    min-width: 24px;
    min-height: 28px;
    height: 28px;
    justify-self: center;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .story-tabs {
    flex-direction: column;
  }

  .story-tab {
    width: 100%;
    text-align: left;
  }

  .story-timeline {
    grid-template-columns: 1fr;
  }

  .mystery-modal-dialog {
    margin: 0;
    padding: 17px 15px 18px;
  }

  .song-modal-dialog {
    width: calc(100vw - 12px);
    margin-top: 8px;
    border-radius: 14px;
    padding: 0 8px 8px;
    max-height: calc(100dvh - 12px);
  }

  .song-modal-topbar {
    padding: 0;
  }

  .song-modal-top-actions {
    margin-top: 18px;
    margin-right: 8px;
  }

  .song-modal-tone-row {
    gap: 6px;
  }

  .song-view-switch {
    padding: 0 16px 10px;
  }

  .song-view-option {
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.69rem;
  }

  .song-modal-tone-label {
    font-size: 0.76rem;
  }

  .song-tone-option {
    min-height: 28px;
    min-width: 28px;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .song-tone-reset {
    min-height: 28px;
    padding: 0 7px;
    font-size: 0.66rem;
  }

  .song-modal-close {
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }

  .sementes-actions {
    flex-direction: column;
  }

  .footer-row {
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }
}

@media (max-width: 680px) and (orientation: portrait) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand controls menu";
  }

  .menu-song-search {
    display: none;
  }

  #font-decrease,
  #font-increase {
    display: none;
  }
}

/* Prevent iOS Safari auto-zoom when focusing inputs on phones. */
@media (hover: none) and (pointer: coarse) {
  .song-fetch-input,
  .menu-song-search .song-fetch-input {
    font-size: 16px;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .mystery-modal.open {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .mystery-modal-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: 0;
    padding: max(12px, env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .mystery-modal-content {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mystery-modal-song-lyrics {
    font-size: 0.8rem;
    line-height: 1.36;
  }

}

.song-search-item.is-title-wrapped .song-search-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-areas:
    "lyrics chords assign"
    "spotify youtube favorite";
  align-items: center;
  justify-content: end;
  gap: 1px;
}

.song-search-item.is-title-wrapped .song-search-action-lyrics {
  grid-area: lyrics;
}

.song-search-item.is-title-wrapped .song-search-action-chords {
  grid-area: chords;
}

.song-search-item.is-title-wrapped .song-search-action-spotify {
  grid-area: spotify;
}

.song-search-item.is-title-wrapped .song-search-action-youtube {
  grid-area: youtube;
}

.song-search-item.is-title-wrapped .song-search-action-favorite {
  grid-area: favorite;
}

.song-search-item.is-title-wrapped .song-search-action-assign-mystery {
  grid-area: assign;
}
