﻿: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));
  --page-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%);
  --vh: 1vh;
  --mobile-header-height: 70px;
  --header-height: 78px;
  --anchor-scroll-gap: 32px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito Sans", sans-serif;
  color: var(--ink);
  background: var(--page-background);
  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));
  --page-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: calc(var(--header-height) + var(--anchor-scroll-gap));
}

.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 .menu-auth-mobile-item {
  display: none;
}

.menu-list .menu-auth-mobile-parent {
  display: none;
}

.menu-list .menu-auth-action-mobile {
  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 .menu-auth-action-mobile:hover,
.menu-list .menu-auth-action-mobile:focus-visible {
  background: var(--menu-hover-bg);
  color: var(--primary);
  outline: none;
}

.menu-list .menu-auth-mobile-item[hidden],
.menu-list .menu-auth-action-mobile[hidden] {
  display: none !important;
}

.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: 5;
  margin-left: 8px;
  flex: 0 0 auto;
}

.auth-menu {
  position: relative;
  order: 4;
  margin-left: 6px;
  flex: 0 0 auto;
}

.mobile-app-btn {
  display: none;
}

@media (min-width: 1024px) {
  .mobile-app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(33, 79, 139, 0.34);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--primary-strong);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.22s ease, border-color 0.22s ease;
    order: 3;
    margin-left: 6px;
  }
  .mobile-app-btn svg {
    width: 20px;
    height: 20px;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-app-btn:hover {
    background: rgba(33, 79, 139, 0.14);
    border-color: rgba(33, 79, 139, 0.52);
  }
}

.auth-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(33, 79, 139, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--primary-strong);
  padding: 0;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.auth-menu-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-menu-trigger:hover,
.auth-menu-trigger:focus-visible,
.auth-menu.is-open .auth-menu-trigger {
  background: rgba(33, 79, 139, 0.14);
  border-color: rgba(33, 79, 139, 0.52);
  outline: none;
}

.auth-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 46;
  min-width: 154px;
  border-radius: 12px;
  border: 1px solid rgba(215, 202, 166, 0.78);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(247, 239, 221, 0.98));
  box-shadow: 0 14px 24px rgba(16, 37, 67, 0.2);
  padding: 5px;
  display: grid;
  gap: 3px;
}

.auth-menu-dropdown[hidden] {
  display: none;
}

.auth-menu-option {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.auth-menu-option:hover,
.auth-menu-option:focus-visible {
  background: rgba(33, 79, 139, 0.12);
  outline: none;
}

.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: 6px;
}

.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: 36px;
  padding: 0;
}

.mobile-search-toggle {
  display: none;
  min-width: 36px;
  padding: 0;
}

.mobile-search-toggle-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-search-toggle-icon * {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-search-toggle[aria-pressed="true"] {
  background: rgba(33, 79, 139, 0.2);
}

.theme-icon-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  font-size: 0.96rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.theme-icon-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-btn:active .theme-icon-glyph {
  transform: scale(0.9);
}

.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 .auth-menu-trigger {
  border-color: rgba(121, 170, 233, 0.48);
  background: rgba(14, 24, 38, 0.88);
  color: var(--ink);
}

body.theme-dark .auth-menu-trigger:hover,
body.theme-dark .auth-menu-trigger:focus-visible,
body.theme-dark .auth-menu.is-open .auth-menu-trigger {
  background: rgba(121, 170, 233, 0.2);
  border-color: rgba(121, 170, 233, 0.64);
}

body.theme-dark .auth-menu-dropdown {
  border-color: rgba(63, 83, 115, 0.82);
  background: linear-gradient(160deg, rgba(16, 28, 44, 0.97), rgba(10, 18, 29, 0.97));
  box-shadow: 0 16px 28px rgba(2, 7, 12, 0.44);
}

body.theme-dark .auth-menu-option {
  color: #dce8fb;
}

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

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-favorites-search-input {
  border-color: rgba(121, 170, 233, 0.36);
  background: rgba(10, 17, 28, 0.85);
  color: var(--ink);
}

body.theme-dark .song-favorites-share-btn {
  color: #d8e7ff;
  border-color: rgba(121, 170, 233, 0.5);
  background: rgba(121, 170, 233, 0.16);
}

body.theme-dark .song-share-import-btn {
  color: #d8e7ff;
  border-color: rgba(121, 170, 233, 0.5);
  background: rgba(121, 170, 233, 0.16);
}

body.theme-dark .song-favorites-share-btn:hover,
body.theme-dark .song-favorites-share-btn:focus-visible,
body.theme-dark .song-share-import-btn:hover,
body.theme-dark .song-share-import-btn:focus-visible {
  background: rgba(121, 170, 233, 0.24);
  border-color: rgba(158, 194, 255, 0.72);
}

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 .bible-search-results .bible-search-reading-text {
  color: #e9f1ff;
}

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-font-btn {
  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-modal-font-btn:hover,
body.theme-dark .song-modal-font-btn:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

body.theme-dark .song-modal-font-btn:disabled,
body.theme-dark .song-modal-font-btn:disabled:hover,
body.theme-dark .song-modal-font-btn:disabled:focus-visible {
  background: rgba(23, 34, 50, 0.92);
  border-color: rgba(121, 170, 233, 0.42);
  color: #c8d6ea;
}

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-group-switch {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(23, 34, 50, 0.92);
  color: #c8d6ea;
}

body.theme-dark .mystery-modal-group-switch:hover,
body.theme-dark .mystery-modal-group-switch:focus-visible {
  background: rgba(41, 58, 83, 0.95);
  border-color: rgba(145, 189, 247, 0.58);
  color: #dce7f8;
}

body.theme-dark .mystery-modal-group-switch.is-active,
body.theme-dark .mystery-modal-group-switch.is-active:hover,
body.theme-dark .mystery-modal-group-switch.is-active:focus-visible {
  background: rgba(58, 80, 112, 0.98);
  border-color: rgba(145, 189, 247, 0.6);
  color: #e7f0ff;
}

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 .rosary-modal-prayer-card {
  border-color: rgba(121, 170, 233, 0.38);
  background: rgba(15, 27, 45, 0.95);
}

body.theme-dark .rosary-modal-prayer-head h4 {
  color: #f4dca8;
}

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

body.theme-dark .mystery-ave-maria-panel {
  border-color: transparent;
  background: transparent;
}

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

body.theme-dark .mystery-ave-maria-option {
  border-color: rgba(240, 207, 129, 0.56);
  background: rgba(103, 74, 24, 0.78);
  color: #ffe8b6;
}

body.theme-dark .mystery-ave-maria-option:hover,
body.theme-dark .mystery-ave-maria-option:focus-visible {
  background: rgba(143, 102, 30, 0.84);
}

body.theme-dark .mystery-ave-maria-option.is-complete {
  border-color: rgba(125, 211, 164, 0.72);
  background: rgba(36, 108, 70, 0.86);
  color: #e8ffef;
}

body.theme-dark .mystery-ave-maria-option.is-active {
  border-color: rgba(240, 207, 129, 0.72);
  background: linear-gradient(128deg, rgba(176, 130, 39, 0.95), rgba(146, 106, 27, 0.95));
  color: #fff;
}

body.theme-dark .mystery-modal .mystery-ave-maria-option.is-complete {
  border-color: rgba(125, 211, 164, 0.78) !important;
  background: rgba(36, 108, 70, 0.9) !important;
  color: #e8ffef !important;
}

body.theme-dark .mystery-modal .mystery-ave-maria-option.is-active {
  border-color: rgba(255, 226, 157, 0.92) !important;
  background: linear-gradient(128deg, rgba(203, 151, 45, 0.98), rgba(171, 123, 32, 0.98)) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(255, 226, 157, 0.2), 0 0 12px rgba(255, 197, 86, 0.35);
}

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 .rosary-modal-dot {
  border-color: rgba(121, 170, 233, 0.44);
  background: rgba(14, 24, 38, 0.9);
  color: #dce6f6;
}

body.theme-dark .rosary-modal-dot:hover,
body.theme-dark .rosary-modal-dot:focus-visible {
  background: rgba(121, 170, 233, 0.22);
}

body.theme-dark .rosary-modal-dot.is-completed {
  border-color: rgba(125, 211, 164, 0.64);
  background: rgba(20, 70, 48, 0.84);
  color: #d8ffe8;
}

body.theme-dark .rosary-modal-dot.is-active {
  border-color: rgba(240, 207, 129, 0.62);
  background: linear-gradient(135deg, rgba(111, 82, 31, 0.95), rgba(86, 62, 19, 0.95));
  color: #fff3d4;
}

body.theme-dark .rosary-modal-step-counter {
  color: #b9cce9;
}

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 .mystery-group-modal-dialog {
  border-color: rgba(121, 170, 233, 0.38);
  background: linear-gradient(165deg, rgba(18, 30, 47, 0.98), rgba(10, 19, 31, 0.98));
}

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

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

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

body.theme-dark .mystery-group-modal-option.is-active {
  border-color: rgba(240, 207, 129, 0.6);
  background: rgba(99, 75, 28, 0.74);
  color: #ffeec3;
}

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(34px, 4vw, 60px);
  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);
  white-space: pre-line;
}

.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%;
  background: var(--page-background);
  background-attachment: fixed;
}

.song-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 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: 146;
}

.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-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.favorite-confirm-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-size: 1.34rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.favorite-confirm-close:hover,
.favorite-confirm-close:focus-visible {
  background: rgba(33, 79, 139, 0.12);
  color: var(--primary);
  outline: none;
}

.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-wrap[hidden] {
  display: none !important;
}

.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-close {
  color: #d6e2f4;
}

body.theme-dark .favorite-confirm-close:hover,
body.theme-dark .favorite-confirm-close:focus-visible {
  background: rgba(121, 170, 233, 0.18);
  color: #e8f1ff;
}

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

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 142;
}

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

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

.auth-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 26px));
  border-radius: 14px;
  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 22px 42px rgba(8, 20, 39, 0.28);
  padding: 14px;
}

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

.auth-modal-header h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.06rem;
}

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

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

.auth-form {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

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

.auth-field[hidden] {
  display: none !important;
}

.auth-field span {
  font-size: 0.79rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.auth-qr-option-field {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.auth-qr-option-field[hidden] {
  display: none !important;
}

.auth-qr-open-btn {
  border: 1px solid rgba(33, 79, 139, 0.34);
  background: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 32px;
  padding: 0 11px;
  cursor: pointer;
}

.auth-qr-open-btn:hover,
.auth-qr-open-btn:focus-visible {
  background: rgba(33, 79, 139, 0.16);
  border-color: rgba(33, 79, 139, 0.48);
  outline: none;
}

.auth-qr-open-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.auth-qr-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(33, 79, 139, 0.24);
  background: rgba(33, 79, 139, 0.05);
  border-radius: 12px;
  padding: 10px;
}

.auth-qr-panel[hidden] {
  display: none !important;
}

.auth-qr-copy {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.auth-qr-image-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-qr-image {
  width: min(220px, calc(100vw - 96px));
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(33, 79, 139, 0.2);
  background: #fff;
}

.auth-qr-status {
  margin: 0;
  min-height: 16px;
  font-size: 0.76rem;
  line-height: 1.25;
  color: var(--ink-soft);
  font-weight: 700;
}

.auth-qr-status.is-warning {
  color: #9d2d12;
}

.auth-qr-status.is-success {
  color: #1f6f45;
}

.auth-qr-status.is-error {
  color: #b3261e;
}

.auth-qr-status.is-loading {
  color: #245288;
}

.auth-qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .auth-input {
  padding-left: 36px;
}

.auth-input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(33, 79, 139, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-input-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-input-icon svg path,
.auth-input-icon svg rect {
  fill: none;
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrap .auth-input {
  padding-left: 36px;
  padding-right: 70px;
}

.auth-password-lock {
  left: 11px;
}

.auth-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(33, 79, 139, 0.84);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  background: rgba(33, 79, 139, 0.12);
  border-color: rgba(33, 79, 139, 0.28);
  outline: none;
}

.auth-password-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.auth-password-eye {
  display: none;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.auth-password-eye svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-password-eye svg path {
  fill: none;
}

.auth-password-eye .eye-pupil {
  fill: currentColor;
  stroke: none;
}

.auth-password-eye .eye-glint {
  fill: #fff;
  stroke: none;
}

.auth-password-toggle:not(.is-visible) .auth-password-eye-closed {
  display: inline-flex;
}

.auth-password-toggle.is-visible .auth-password-eye-open {
  display: inline-flex;
}

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

.auth-form-feedback {
  margin: 0;
  min-height: 18px;
  font-size: 0.76rem;
  line-height: 1.3;
  color: #b3261e;
  font-weight: 700;
}

.auth-register-cta {
  min-height: 31px;
  padding-inline: 11px;
  font-size: 0.76rem;
  margin-right: auto;
}

.auth-register-cta[hidden] {
  display: none !important;
}

.auth-form-actions {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auth-form-actions.has-register-cta {
  justify-content: flex-start;
}

.auth-form-actions.is-account-mode {
  justify-content: space-between;
}

#auth-delete-btn[hidden] {
  display: none !important;
}

#auth-delete-btn {
  color: #b3261e;
  border-color: rgba(179, 38, 30, 0.44);
  background: rgba(255, 66, 54, 0.08);
}

#auth-delete-btn:hover,
#auth-delete-btn:focus-visible {
  background: rgba(255, 66, 54, 0.16);
  border-color: rgba(179, 38, 30, 0.64);
}

body.theme-dark .auth-modal-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 .auth-field span {
  color: #d6e2f4;
}

body.theme-dark .auth-qr-open-btn {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(121, 170, 233, 0.14);
  color: #dceafe;
}

body.theme-dark .auth-qr-open-btn:hover,
body.theme-dark .auth-qr-open-btn:focus-visible {
  background: rgba(121, 170, 233, 0.22);
  border-color: rgba(121, 170, 233, 0.58);
}

body.theme-dark .auth-qr-panel {
  border-color: rgba(121, 170, 233, 0.36);
  background: rgba(121, 170, 233, 0.12);
}

body.theme-dark .auth-qr-copy,
body.theme-dark .auth-qr-status {
  color: #d6e2f4;
}

body.theme-dark .auth-qr-status.is-warning {
  color: #ffc26c;
}

body.theme-dark .auth-qr-status.is-success {
  color: #86dcae;
}

body.theme-dark .auth-qr-status.is-error {
  color: #ffb8b1;
}

body.theme-dark .auth-qr-status.is-loading {
  color: #b8d5ff;
}

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

body.theme-dark .auth-input-icon {
  color: rgba(187, 214, 255, 0.92);
}

body.theme-dark .auth-password-toggle {
  color: rgba(187, 214, 255, 0.9);
}

body.theme-dark .auth-password-toggle:hover,
body.theme-dark .auth-password-toggle:focus-visible {
  background: rgba(121, 170, 233, 0.16);
  border-color: rgba(121, 170, 233, 0.4);
}

body.theme-dark .auth-input:focus-visible {
  outline-color: rgba(121, 170, 233, 0.6);
}

body.theme-dark .auth-form-feedback {
  color: #ffb8b1;
}

body.theme-dark .auth-register-cta {
  color: #d8e7ff;
  border-color: rgba(121, 170, 233, 0.52);
  background: rgba(121, 170, 233, 0.16);
}

body.theme-dark .auth-register-cta:hover,
body.theme-dark .auth-register-cta:focus-visible {
  background: rgba(121, 170, 233, 0.24);
  border-color: rgba(158, 194, 255, 0.72);
}

body.theme-dark #auth-delete-btn {
  color: #ffb4ab;
  border-color: rgba(255, 141, 129, 0.56);
  background: rgba(255, 84, 73, 0.2);
}

body.theme-dark #auth-delete-btn:hover,
body.theme-dark #auth-delete-btn:focus-visible {
  background: rgba(255, 84, 73, 0.28);
  border-color: rgba(255, 141, 129, 0.72);
}

.auth-sessions-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 143;
}

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

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

.auth-sessions-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 26px));
  max-height: min(86vh, calc(100dvh - 26px));
  border-radius: 14px;
  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 22px 42px rgba(8, 20, 39, 0.28);
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.auth-sessions-header h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.06rem;
}

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

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

.auth-sessions-close:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.auth-sessions-feedback {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #b3261e;
  font-weight: 700;
}

.auth-sessions-feedback.is-warning {
  color: #9d2d12;
}

.auth-sessions-feedback.is-success {
  color: #1f6f45;
}

.auth-sessions-feedback.is-loading {
  color: #245288;
}

.auth-sessions-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  max-height: min(58vh, calc(100dvh - 220px));
  overflow: auto;
}

.auth-sessions-item {
  border-radius: 12px;
  border: 1px solid rgba(33, 79, 139, 0.25);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.auth-sessions-item.is-current {
  border-color: rgba(36, 82, 136, 0.44);
  background: rgba(219, 235, 255, 0.46);
}

.auth-sessions-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-sessions-item-details {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.auth-sessions-item-label {
  margin: 0;
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.2;
}

.auth-sessions-item-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.3;
}

.auth-sessions-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  font-size: 0.66rem;
  font-weight: 700;
  color: #245288;
  border: 1px solid rgba(36, 82, 136, 0.34);
  background: rgba(36, 82, 136, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
}

.auth-sessions-item-action {
  min-height: 34px;
  padding: 8px 12px;
  white-space: nowrap;
  color: #b3261e;
  border-color: rgba(179, 38, 30, 0.44);
  background: rgba(255, 66, 54, 0.08);
}

.auth-sessions-item-action:hover,
.auth-sessions-item-action:focus-visible {
  background: rgba(255, 66, 54, 0.16);
  border-color: rgba(179, 38, 30, 0.64);
}

.auth-sessions-item-action:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

body.theme-dark .auth-sessions-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 .auth-sessions-close {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(121, 170, 233, 0.14);
  color: #dceafe;
}

body.theme-dark .auth-sessions-close:hover,
body.theme-dark .auth-sessions-close:focus-visible {
  background: rgba(121, 170, 233, 0.22);
  border-color: rgba(121, 170, 233, 0.58);
}

body.theme-dark .auth-sessions-feedback {
  color: #ffb8b1;
}

body.theme-dark .auth-sessions-feedback.is-warning {
  color: #ffc26c;
}

body.theme-dark .auth-sessions-feedback.is-success {
  color: #86dcae;
}

body.theme-dark .auth-sessions-feedback.is-loading {
  color: #b8d5ff;
}

body.theme-dark .auth-sessions-item {
  border-color: rgba(121, 170, 233, 0.36);
  background: rgba(10, 21, 35, 0.88);
}

body.theme-dark .auth-sessions-item.is-current {
  border-color: rgba(121, 170, 233, 0.62);
  background: rgba(24, 44, 69, 0.84);
}

body.theme-dark .auth-sessions-item-label {
  color: #d8e7ff;
}

body.theme-dark .auth-sessions-item-meta {
  color: #bfd6f6;
}

body.theme-dark .auth-sessions-item-badge {
  color: #d8e7ff;
  border-color: rgba(184, 214, 255, 0.44);
  background: rgba(121, 170, 233, 0.24);
}

body.theme-dark .auth-sessions-item-action {
  color: #ffb4ab;
  border-color: rgba(255, 141, 129, 0.56);
  background: rgba(255, 84, 73, 0.2);
}

body.theme-dark .auth-sessions-item-action:hover,
body.theme-dark .auth-sessions-item-action:focus-visible {
  background: rgba(255, 84, 73, 0.28);
  border-color: rgba(255, 141, 129, 0.72);
}

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

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

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

.song-share-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 26px));
  max-height: min(86vh, calc(100dvh - 26px));
  border-radius: 14px;
  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 22px 42px rgba(8, 20, 39, 0.28);
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow: auto;
}

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

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

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

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

.song-share-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.36;
}

.song-share-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0;
}

.song-share-qr-image {
  width: min(220px, calc(100vw - 110px));
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(33, 79, 139, 0.22);
  background: #fff;
}

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

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

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

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

.song-share-feedback {
  margin: 0;
  min-height: 18px;
  font-size: 0.76rem;
  line-height: 1.3;
  color: var(--ink-soft);
  font-weight: 700;
}

.song-share-feedback.is-warning {
  color: #9d2d12;
}

.song-share-feedback.is-success {
  color: #1f6f45;
}

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

.song-share-feedback.is-loading {
  color: #245288;
}

.song-share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.theme-dark .song-share-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 .song-share-header h3 {
  color: #d8e7ff;
}

body.theme-dark .song-share-close {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(121, 170, 233, 0.14);
  color: #dceafe;
}

body.theme-dark .song-share-close:hover,
body.theme-dark .song-share-close:focus-visible {
  background: rgba(121, 170, 233, 0.22);
  border-color: rgba(121, 170, 233, 0.58);
}

body.theme-dark .song-share-copy,
body.theme-dark .song-share-link-field span,
body.theme-dark .song-share-feedback {
  color: #d6e2f4;
}

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

body.theme-dark .song-share-link-input:focus-visible {
  outline-color: rgba(121, 170, 233, 0.6);
}

body.theme-dark .song-share-feedback.is-warning {
  color: #ffc26c;
}

body.theme-dark .song-share-feedback.is-success {
  color: #86dcae;
}

body.theme-dark .song-share-feedback.is-error {
  color: #ffb8b1;
}

body.theme-dark .song-share-feedback.is-loading {
  color: #b8d5ff;
}

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

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

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

.song-share-merge-dialog {
  position: relative;
  z-index: 1;
  width: min(660px, calc(100vw - 26px));
  max-height: min(86vh, calc(100dvh - 26px));
  border-radius: 14px;
  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 22px 42px rgba(8, 20, 39, 0.28);
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow: auto;
}

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

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

.song-share-merge-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;
}

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

.song-share-merge-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.83rem;
  line-height: 1.34;
}

.song-share-merge-subtitle {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.79rem;
  font-weight: 700;
}

.song-share-merge-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.song-share-merge-item {
  border: 1px solid rgba(33, 79, 139, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}

.song-share-merge-item-slot {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.song-share-merge-item-song {
  font-size: 0.79rem;
  color: var(--ink);
}

.song-share-merge-item-existing {
  font-size: 0.74rem;
  color: #9d2d12;
}

.song-share-merge-conflicts-list {
  display: grid;
  gap: 7px;
}

.song-share-merge-conflict-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(158, 64, 43, 0.28);
  border-radius: 10px;
  background: rgba(255, 239, 233, 0.9);
  padding: 8px 10px;
}

.song-share-merge-conflict-option input[type='checkbox'] {
  margin-top: 2px;
}

.song-share-merge-conflict-empty {
  margin: 0;
  border: 1px solid rgba(33, 79, 139, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.79rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.82);
}

.song-share-merge-feedback {
  margin: 0;
  min-height: 18px;
  font-size: 0.76rem;
  line-height: 1.3;
  color: var(--ink-soft);
  font-weight: 700;
}

.song-share-merge-feedback.is-error {
  color: #b3261e;
}

.song-share-merge-feedback.is-loading {
  color: #245288;
}

.song-share-merge-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.theme-dark .song-share-merge-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 .song-share-merge-header h3,
body.theme-dark .song-share-merge-subtitle,
body.theme-dark .song-share-merge-summary,
body.theme-dark .song-share-merge-feedback,
body.theme-dark .song-share-merge-item-song {
  color: #d6e2f4;
}

body.theme-dark .song-share-merge-close {
  border-color: rgba(121, 170, 233, 0.42);
  background: rgba(121, 170, 233, 0.14);
  color: #dceafe;
}

body.theme-dark .song-share-merge-close:hover,
body.theme-dark .song-share-merge-close:focus-visible {
  background: rgba(121, 170, 233, 0.22);
  border-color: rgba(121, 170, 233, 0.58);
}

body.theme-dark .song-share-merge-item {
  border-color: rgba(121, 170, 233, 0.34);
  background: rgba(10, 21, 35, 0.86);
}

body.theme-dark .song-share-merge-item-slot {
  color: #c4d7f4;
}

body.theme-dark .song-share-merge-item-existing {
  color: #ffbfaf;
}

body.theme-dark .song-share-merge-conflict-option {
  border-color: rgba(255, 154, 138, 0.42);
  background: rgba(70, 30, 30, 0.72);
}

body.theme-dark .song-share-merge-conflict-empty {
  border-color: rgba(121, 170, 233, 0.34);
  background: rgba(10, 21, 35, 0.84);
  color: #d6e2f4;
}

body.theme-dark .song-share-merge-feedback.is-error {
  color: #ffb8b1;
}

body.theme-dark .song-share-merge-feedback.is-loading {
  color: #b8d5ff;
}

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

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

.mystery-song-search-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-search-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 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;
  min-height: min(64vh, 560px);
}

.mystery-song-search-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-search-head {
  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-search-head-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mystery-song-search-head h3 {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1.08rem;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}

.mystery-song-search-target {
  margin: 0;
  color: #5d6f8b;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mystery-song-search-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-search-close:hover,
.mystery-song-search-close:focus-visible {
  background: rgba(33, 79, 139, 0.16);
  outline: none;
}

.mystery-song-search-dialog .song-fetch-form {
  padding: 12px 14px 0;
}

.mystery-song-search-results {
  margin: 10px 14px 14px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.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-search-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-search-head {
  border-bottom-color: rgba(63, 83, 115, 0.62);
}

body.theme-dark .mystery-song-search-target {
  color: #b7c9e4;
}

body.theme-dark .mystery-song-search-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-search-close:hover,
body.theme-dark .mystery-song-search-close:focus-visible {
  background: rgba(121, 170, 233, 0.2);
}

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-search-dialog {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
    min-height: min(72vh, 520px);
    border-radius: 15px;
  }

  .mystery-song-search-dialog .song-fetch-form {
    padding: 10px 10px 0;
  }

  .mystery-song-search-results {
    margin: 8px 10px 10px;
  }

  .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: max-content;
  min-width: min(420px, calc(100vw - 16px));
  max-width: min(92vw, 860px);
  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;
  overflow: visible;
}

.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: 35px;
  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.8rem;
  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-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::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.song-location-create-parent-picker {
  width: max-content;
  min-width: 100%;
  max-width: min(84vw, 780px);
  border: 1px solid rgba(33, 79, 139, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  max-height: min(48vh, 420px);
  overflow: auto;
  padding: 6px 7px;
}

.song-location-create-parent-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.song-location-create-parent-tree ul {
  margin: 6px 0 0;
  padding-left: 13px;
  list-style: none;
  border-left: 1px dashed rgba(33, 79, 139, 0.26);
}

.song-location-create-parent-tree > ul {
  margin-top: 0;
  padding-left: 0;
  border-left: 0;
}

.song-location-create-parent-tree {
  min-width: 100%;
  width: max-content;
}

.song-location-create-parent-tree-item {
  margin-top: 5px;
}

.song-location-create-parent-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.song-location-create-parent-delete {
  min-height: 29px;
  min-width: 29px;
  width: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(172, 58, 58, 0.44);
  background: rgba(172, 58, 58, 0.12);
  color: #9f2f2f;
  cursor: pointer;
  flex: 0 0 auto;
}

.song-location-create-parent-delete:hover,
.song-location-create-parent-delete:focus-visible {
  background: rgba(172, 58, 58, 0.22);
  outline: none;
}

.song-location-create-parent-delete:disabled {
  opacity: 0.6;
  cursor: wait;
}

.song-location-create-parent-label {
  min-width: 0;
  width: auto;
  flex: 1 1 auto;
  min-height: 29px;
  box-sizing: border-box;
  border: 1px solid #d5e1f0;
  border-radius: 10px;
  padding: 6px 8px;
  background: #f9fbff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.79rem;
  line-height: 1.24;
  white-space: nowrap;
  overflow: hidden;
}

.song-location-create-parent-label.song-location-create-parent-toggle {
  appearance: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.song-location-create-parent-label.song-location-create-parent-toggle:hover,
.song-location-create-parent-label.song-location-create-parent-toggle:focus-visible {
  background: #eef5ff;
  border-color: #b8cce5;
  outline: none;
}

.song-location-create-parent-label-text {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
}

.song-location-create-parent-caret {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-left: 1px;
  border-right: 2px solid #5f7594;
  border-bottom: 2px solid #5f7594;
  transform: rotate(-45deg);
  transition: transform 0.14s ease;
}

.song-location-create-parent-toggle[aria-expanded="true"] .song-location-create-parent-caret {
  transform: rotate(45deg);
}

.song-location-create-parent-meta {
  flex: 0 0 auto;
  color: #6e819b;
  font-size: 0.72rem;
  margin-left: auto;
  white-space: nowrap;
}

.song-location-create-parent-select {
  min-height: 29px;
  min-width: 29px;
  width: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 8px;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #b9d4f2;
  background: #e8f3ff;
  color: #15406d;
  cursor: pointer;
}

.song-location-create-parent-select:hover,
.song-location-create-parent-select:focus-visible {
  background: #dcedff;
  outline: none;
}

.song-location-create-parent-tree-item.is-selected > .song-location-create-parent-tree-row .song-location-create-parent-label {
  border-color: rgba(42, 125, 86, 0.46);
  background: rgba(42, 125, 86, 0.15);
}

.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::placeholder {
  color: rgba(188, 210, 241, 0.78);
}

body.theme-dark .song-location-create-parent-picker {
  border-color: rgba(121, 170, 233, 0.36);
  background: rgba(8, 18, 30, 0.92);
}

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

body.theme-dark .song-location-create-parent-tree ul {
  border-left-color: rgba(121, 170, 233, 0.32);
}

body.theme-dark .song-location-create-parent-label {
  border-color: rgba(121, 170, 233, 0.34);
  background: rgba(16, 29, 46, 0.92);
  color: #d8e7ff;
}

body.theme-dark .song-location-create-parent-delete {
  border-color: rgba(225, 115, 115, 0.46);
  background: rgba(89, 34, 34, 0.7);
  color: #ffd8d8;
}

body.theme-dark .song-location-create-parent-delete:hover,
body.theme-dark .song-location-create-parent-delete:focus-visible {
  background: rgba(161, 62, 62, 0.72);
}

body.theme-dark .song-location-create-parent-label.song-location-create-parent-toggle:hover,
body.theme-dark .song-location-create-parent-label.song-location-create-parent-toggle:focus-visible {
  background: rgba(38, 62, 91, 0.92);
  border-color: rgba(141, 182, 236, 0.54);
}

body.theme-dark .song-location-create-parent-caret {
  border-right-color: #9db8de;
  border-bottom-color: #9db8de;
}

body.theme-dark .song-location-create-parent-meta {
  color: rgba(188, 210, 241, 0.76);
}

body.theme-dark .song-location-create-parent-select {
  border-color: rgba(121, 170, 233, 0.48);
  background: rgba(25, 47, 73, 0.9);
  color: #d8e7ff;
}

body.theme-dark .song-location-create-parent-select:hover,
body.theme-dark .song-location-create-parent-select:focus-visible {
  background: rgba(39, 67, 98, 0.95);
}

body.theme-dark .song-location-create-parent-tree-item.is-selected > .song-location-create-parent-tree-row .song-location-create-parent-label {
  border-color: rgba(63, 173, 117, 0.58);
  background: rgba(25, 71, 61, 0.8);
}

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.is-overlay-front {
  z-index: 147;
}

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

.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);
  --song-panel-font-scale: 1;
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 10px));
  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);
  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-row[hidden] {
  display: none;
}

.mystery-modal-song-tone-row {
  flex-wrap: nowrap;
}

.mystery-modal-song-tone-row > .song-tone-grid {
  flex: 0 1 auto;
}

.mystery-modal-song-tone-row > .song-tone-reset {
  flex-shrink: 0;
}

.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: 4px;
  padding: 0;
  margin-top: 22px;
  margin-right: 8px;
  flex: 0 0 auto;
  pointer-events: auto;
}

.song-modal-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.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-font-btn {
  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: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

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

.song-modal-font-btn:disabled,
.song-modal-font-btn:disabled:hover,
.song-modal-font-btn:disabled:focus-visible {
  opacity: 0.48;
  cursor: default;
  background: rgba(235, 232, 223, 0.92);
  border-color: rgba(124, 137, 160, 0.4);
  color: #6b778c;
  outline: none;
}

.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;
  font-size: calc(1.45rem * var(--song-panel-font-scale, 1));
  line-height: 1.22;
}

.song-modal .song-head p {
  margin: 2px 0 0;
  font-size: calc(0.88rem * var(--song-panel-font-scale, 1));
}

.song-modal-meta-row {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 4px;
  width: fit-content;
  max-width: 100%;
}

.song-modal .song-head .song-modal-meta-row #fetched-song-meta {
  margin: 0;
  flex: 0 1 auto;
}

.song-modal-external-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 0;
}

.song-modal-external-actions[hidden] {
  display: none !important;
}

.song-modal-external-action {
  flex: 0 0 auto;
}

.song-modal-view-swap {
  width: 30px;
  min-width: 30px;
  min-height: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0;
  line-height: 0;
  color: var(--primary-strong);
}

.song-modal-view-swap .song-search-action-icon {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.song-modal-view-swap.is-target-chords {
  color: #b3261e;
}

.song-modal-view-swap:hover,
.song-modal-view-swap:focus-visible {
  border-color: transparent;
  background: transparent;
  outline: none;
}

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

.rosary-modal {
  z-index: 118;
}

.rosary-modal.open {
  align-items: center;
  justify-content: center;
  padding: 0;
}

.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;
  --mystery-modal-inline-scale: 1;
  width: min(calc(620px * var(--mystery-modal-inline-scale, 1)), 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-font-scale: 1;
}

.mystery-modal:not(.rosary-modal).is-window-expanded .mystery-modal-dialog {
  width: 98vw;
  max-width: 98vw;
  height: 98vh;
  height: 98svh;
  height: 98dvh;
  max-height: 98vh;
  max-height: 98svh;
  max-height: 98dvh;
}

.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;
  position: relative;
}

.mystery-modal-heading-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mystery-modal-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mystery-modal-font-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  font-size: 0.82rem;
  line-height: 1;
}

.mystery-modal-font-btn:disabled,
.mystery-modal-font-btn:disabled:hover,
.mystery-modal-font-btn:disabled:focus-visible {
  opacity: 0.48;
  cursor: default;
  background: rgba(235, 232, 223, 0.92);
  border-color: rgba(124, 137, 160, 0.4);
  color: #6b778c;
  outline: none;
}

.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-title-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mystery-modal-links {
  margin: 6px 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: calc(0.8rem * var(--mystery-modal-font-scale, 1));
  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: attr(data-label);
    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-heading-actions .mystery-modal-close {
  margin-left: 0;
}

.mystery-modal-group {
  margin-top: 0;
  color: #8c6a2a;
  font-size: calc(0.76rem * var(--mystery-modal-font-scale, 1));
  letter-spacing: 0.09em;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mystery-modal-group-switch {
  width: 30px;
  min-width: 30px;
  height: 28px;
  border: 1px solid rgba(124, 137, 160, 0.4);
  border-radius: 8px;
  background: rgba(235, 232, 223, 0.92);
  color: #6b778c;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 0.9;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.mystery-modal-group-switch.is-switchable {
  cursor: pointer;
}

.mystery-modal-group-switch:hover,
.mystery-modal-group-switch:focus-visible {
  background: rgba(226, 221, 209, 0.96);
  border-color: rgba(103, 116, 139, 0.5);
  color: #5f6d84;
  outline: none;
}

.mystery-modal-group-switch.is-active,
.mystery-modal-group-switch.is-active:hover,
.mystery-modal-group-switch.is-active:focus-visible {
  border-color: rgba(88, 105, 132, 0.6);
  background: rgba(219, 214, 201, 0.98);
  color: #4d5b74;
}

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

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

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

.mystery-group-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(380px, calc(100vw - 30px));
  border-radius: 14px;
  border: 1px solid rgba(215, 202, 166, 0.64);
  background: linear-gradient(160deg, rgba(255, 255, 252, 0.99), rgba(247, 239, 221, 0.99));
  box-shadow: 0 24px 44px rgba(8, 20, 39, 0.28);
  padding: 14px;
  display: grid;
  gap: 10px;
}

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

#mystery-group-modal-title {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.98rem;
  line-height: 1.2;
}

.mystery-group-modal-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: rgba(33, 79, 139, 0.08);
  color: var(--primary-strong);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

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

.mystery-group-modal-options {
  display: grid;
  gap: 7px;
}

.mystery-group-modal-option {
  min-height: 36px;
  border: 1px solid rgba(33, 79, 139, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--primary-strong);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}

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

.mystery-group-modal-option.is-active {
  border-color: rgba(176, 136, 48, 0.64);
  background: rgba(255, 243, 214, 0.94);
  color: #6d4f18;
}

.mystery-group-modal-option:disabled,
.mystery-group-modal-option.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.mystery-modal-dialog h3 {
  font-size: calc(clamp(1.05rem, 2.15vw, 1.45rem) * var(--mystery-modal-font-scale, 1));
  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-size-toggle {
  margin-right: 0;
}

.mystery-modal-text {
  margin-top: 9px;
  color: #2f3d54;
  font-size: calc(0.98rem * var(--mystery-modal-font-scale, 1));
}

.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;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  --song-panel-font-scale: 1;
}

.mystery-modal-song-panel[hidden] {
  display: none !important;
}

.mystery-modal-song-scroll {
  min-height: 0;
  padding-right: 0;
}

.mystery-modal-song-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 92px;
  position: relative;
}

.mystery-modal-song-swap {
  margin-top: 0;
  align-self: center;
  flex: 0 0 auto;
}

.mystery-modal-song-swap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mystery-modal-song-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  position: absolute;
  top: 2px;
  right: 39px;
}

.mystery-modal-panel-font-controls {
  top: 11px;
  right: 43px;
  z-index: 2;
}

.mystery-modal-song-font-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  font-size: 0.9rem;
  line-height: 1;
}

.mystery-modal-song-font-btn:disabled,
.mystery-modal-song-font-btn:disabled:hover,
.mystery-modal-song-font-btn:disabled:focus-visible {
  opacity: 0.48;
  cursor: default;
  background: rgba(235, 232, 223, 0.92);
  border-color: rgba(124, 137, 160, 0.4);
  color: #6b778c;
  outline: none;
}

body.theme-dark .mystery-modal-song-font-btn:disabled,
body.theme-dark .mystery-modal-song-font-btn:disabled:hover,
body.theme-dark .mystery-modal-song-font-btn:disabled:focus-visible {
  background: rgba(23, 34, 50, 0.92);
  border-color: rgba(121, 170, 233, 0.42);
  color: #c8d6ea;
}

body.theme-dark .mystery-modal-font-btn:disabled,
body.theme-dark .mystery-modal-font-btn:disabled:hover,
body.theme-dark .mystery-modal-font-btn:disabled:focus-visible {
  background: rgba(23, 34, 50, 0.92);
  border-color: rgba(121, 170, 233, 0.42);
  color: #c8d6ea;
}

body.theme-dark .rosary-modal-font-btn:disabled,
body.theme-dark .rosary-modal-font-btn:disabled:hover,
body.theme-dark .rosary-modal-font-btn:disabled:focus-visible {
  background: rgba(23, 34, 50, 0.92);
  border-color: rgba(121, 170, 233, 0.42);
  color: #c8d6ea;
}

.mystery-modal-song-title {
  margin: 0;
  color: var(--primary-strong);
  font-size: calc(0.86rem * var(--song-panel-font-scale, 1));
  font-weight: 700;
  line-height: 1.25;
  flex: 1 1 auto;
}

.mystery-modal-song-meta-row {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 4px;
  width: fit-content;
  max-width: 100%;
}

.mystery-modal-song-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: calc(0.77rem * var(--song-panel-font-scale, 1));
  font-weight: 700;
  line-height: 1.28;
  flex: 0 1 auto;
}

.mystery-modal-song-external-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 0;
}

.mystery-modal-song-external-actions[hidden] {
  display: none !important;
}

.mystery-modal-song-external-action {
  flex: 0 0 auto;
}

.mystery-modal-song-close {
  margin-left: 0;
  position: absolute;
  top: 10px;
  right: 11px;
  z-index: 2;
}

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

.mystery-ave-maria-panel {
  margin-top: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: calc(8px * var(--mystery-modal-font-scale, 1));
  min-width: 0;
}

.mystery-prayer-text-panel {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(244, 235, 213, 0.72);
  border: 1px solid rgba(195, 154, 61, 0.32);
}

.rosary-step-prayer-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  margin: 0 2px;
  border-radius: 999px;
  border: 1px solid rgba(33, 79, 139, 0.42);
  background: rgba(232, 241, 255, 0.78);
  color: #174279;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.25;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rosary-step-prayer-pill:hover,
.rosary-step-prayer-pill:focus-visible {
  background: rgba(33, 79, 139, 0.18);
  border-color: rgba(33, 79, 139, 0.7);
}

.rosary-step-prayer-pill.is-active {
  background: rgba(33, 79, 139, 0.92);
  color: #fff;
  border-color: rgba(33, 79, 139, 0.95);
}

body.theme-dark .rosary-step-prayer-pill {
  background: rgba(20, 38, 61, 0.7);
  border-color: rgba(121, 170, 233, 0.5);
  color: #d4e5ff;
}

body.theme-dark .rosary-step-prayer-pill:hover,
body.theme-dark .rosary-step-prayer-pill:focus-visible {
  background: rgba(67, 122, 197, 0.32);
}

body.theme-dark .rosary-step-prayer-pill.is-active {
  background: rgba(121, 170, 233, 0.92);
  color: #0d1623;
  border-color: rgba(121, 170, 233, 0.95);
}

.mystery-prayer-text {
  margin: 0;
  font-size: calc(0.98rem * var(--mystery-modal-font-scale, var(--content-font-scale, 1)));
  line-height: 1.55;
  color: #2f3d54;
  font-style: italic;
}

body.theme-dark .mystery-prayer-text-panel {
  background: rgba(20, 38, 61, 0.68);
  border-color: rgba(121, 170, 233, 0.32);
}

body.theme-dark .mystery-prayer-text {
  color: #deebff;
}

.mystery-ave-maria-title {
  margin: 0;
  color: #8c6a2a;
  font-size: calc(0.76rem * var(--mystery-modal-font-scale, 1));
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
}

.mystery-ave-maria-options {
  margin-top: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: calc(8px * var(--mystery-modal-font-scale, 1));
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.mystery-ave-maria-option {
  width: calc(32px * var(--mystery-modal-font-scale, 1));
  min-width: calc(32px * var(--mystery-modal-font-scale, 1));
  height: calc(32px * var(--mystery-modal-font-scale, 1));
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-strong);
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: calc(0.78rem * var(--mystery-modal-font-scale, 1));
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

.mystery-ave-maria-option.is-complete {
  border-color: rgba(194, 155, 63, 0.54);
  background: rgba(194, 155, 63, 0.22);
  color: #7d5e22;
}

.mystery-ave-maria-option.is-active {
  border-color: rgba(194, 155, 63, 0.62);
  background: linear-gradient(128deg, rgba(176, 130, 39, 0.92), rgba(146, 106, 27, 0.92));
  color: #fff;
}

.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 {
  --mystery-jaculatory-font-scale: 1;
  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;
  max-height: min(44vh, 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

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

.mystery-jaculatory-font-controls {
  margin-left: auto;
  gap: 3px;
}

.mystery-jaculatory-font-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  font-size: 0.88rem;
  line-height: 1;
}

.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-head .mystery-jaculatory-close {
  margin-left: 6px;
}

.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;
  padding-bottom: 4px;
  color: #2f3d54;
  font-size: calc(0.92rem * var(--mystery-jaculatory-font-scale, 1));
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mystery-jaculatory-list li {
  margin: 0;
  line-height: 1.3;
}

.mystery-modal.is-jaculatory-focus .mystery-modal-content {
  display: none;
}

.mystery-modal.is-jaculatory-focus .mystery-modal-footer {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.mystery-modal.is-jaculatory-focus .mystery-jaculatory-panel {
  margin-top: 0;
  max-height: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mystery-modal.is-jaculatory-focus .mystery-jaculatory-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.mystery-modal.is-song-focus .mystery-modal-footer {
  display: none;
}

.mystery-modal.is-song-focus .mystery-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.mystery-modal.is-song-focus .mystery-modal-heading-row,
.mystery-modal.is-song-focus #mystery-modal-links,
.mystery-modal.is-song-focus .mystery-modal-heading,
.mystery-modal.is-song-focus #mystery-modal-text,
.mystery-modal.is-song-focus #mystery-pai-nosso-panel,
.mystery-modal.is-song-focus #mystery-ave-maria-panel {
  display: none;
}

.mystery-modal.is-song-focus #mystery-modal-song-panel {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rosary-modal-dialog {
  --rosary-modal-inline-scale: 1;
  width: min(calc(620px * var(--rosary-modal-inline-scale, 1)), 100%);
  --rosary-modal-font-scale: 1;
  --rosary-modal-fluid-scale: clamp(0.9, 0.76rem + 0.38vmin, 1.22);
}

.rosary-modal.is-window-expanded .rosary-modal-dialog {
  width: 98vw;
  max-width: 98vw;
  height: 98vh;
  height: 98svh;
  height: 98dvh;
  max-height: 98vh;
  max-height: 98svh;
  max-height: 98dvh;
}

.mystery-modal.is-song-focus #mystery-modal-song-panel .mystery-modal-song-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mystery-modal.is-song-focus #mystery-modal-song-lyrics {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.rosary-modal.is-song-focus .rosary-modal-footer {
  display: none;
}

.rosary-modal.is-song-focus .rosary-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.rosary-modal.is-song-focus .rosary-modal-heading-row,
.rosary-modal.is-song-focus .rosary-modal-heading,
.rosary-modal.is-song-focus #rosary-modal-step-text,
.rosary-modal.is-song-focus #rosary-modal-bible-results,
.rosary-modal.is-song-focus #rosary-modal-prayers,
.rosary-modal.is-song-focus #rosary-modal-prayer-panel,
.rosary-modal.is-song-focus #rosary-modal-dots {
  display: none;
}

.rosary-modal.is-song-focus #rosary-modal-song-panel {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rosary-modal.is-song-focus #rosary-modal-song-panel .mystery-modal-song-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.rosary-modal.is-song-focus #rosary-modal-song-lyrics {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.rosary-modal.is-prayer-focus .rosary-modal-footer {
  display: none;
}

.rosary-modal.is-prayer-focus .rosary-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.rosary-modal.is-prayer-focus .rosary-modal-heading-row,
.rosary-modal.is-prayer-focus .rosary-modal-heading,
.rosary-modal.is-prayer-focus #rosary-modal-step-text,
.rosary-modal.is-prayer-focus #rosary-modal-bible-results,
.rosary-modal.is-prayer-focus #rosary-modal-prayers,
.rosary-modal.is-prayer-focus #rosary-modal-song-panel,
.rosary-modal.is-prayer-focus #rosary-modal-dots {
  display: none;
}

.rosary-modal.is-prayer-focus #rosary-modal-prayer-panel {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rosary-modal.is-prayer-focus #rosary-modal-prayer-panel .mystery-modal-song-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.rosary-modal.is-prayer-focus #rosary-modal-prayer-text {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.rosary-modal-step-text {
  margin-top: 9px;
  font-size: calc(0.98rem * var(--rosary-modal-font-scale, 1));
  white-space: pre-line;
}

.rosary-modal-prayers {
  margin-top: 10px;
}

.rosary-modal-prayers[hidden] {
  display: none !important;
}

.rosary-modal-prayer-grid {
  display: grid;
  gap: 9px;
}

.rosary-modal-prayer-card {
  border: 1px solid rgba(215, 202, 166, 0.66);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.rosary-modal-prayer-head {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.rosary-modal-prayer-head:hover,
.rosary-modal-prayer-head:focus-visible {
  background: rgba(33, 79, 139, 0.08);
  outline: none;
}

.rosary-modal-prayer-head h4 {
  margin: 0;
  flex: 1 1 auto;
  color: var(--primary-strong);
  font-size: calc(0.88rem * var(--rosary-modal-font-scale, 1));
  line-height: 1.28;
}

.rosary-modal-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rosary-modal-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.rosary-modal-font-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  font-size: 0.82rem;
  line-height: 1;
}

.rosary-modal-font-btn:disabled,
.rosary-modal-font-btn:disabled:hover,
.rosary-modal-font-btn:disabled:focus-visible {
  opacity: 0.48;
  cursor: default;
  background: rgba(235, 232, 223, 0.92);
  border-color: rgba(124, 137, 160, 0.4);
  color: #6b778c;
  outline: none;
}

.rosary-modal-title-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.rosary-modal-group {
  font-size: calc(0.76rem * var(--rosary-modal-font-scale, 1));
}

#rosary-modal-title {
  font-size: calc(clamp(1.05rem, 2.15vw, 1.45rem) * var(--rosary-modal-font-scale, 1));
}

.rosary-modal-title-row.has-bible-search {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
}

.rosary-modal-bible-form {
  width: 100%;
  margin-top: 2px;
}

.rosary-modal-bible-form[hidden] {
  display: none !important;
}

.rosary-modal-bible-input-wrap {
  width: 100%;
}

.rosary-modal-bible-results {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  max-height: none;
  overflow: visible;
}

@media (max-width: 760px) {
  .rosary-modal-title-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rosary-modal-song-toggle {
  margin-right: 0;
}

.rosary-modal-size-toggle {
  margin-right: 0;
}

.rosary-modal-dots {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rosary-modal-dot {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid rgba(33, 79, 139, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-strong);
  font: inherit;
  font-size: calc(0.72rem * var(--rosary-modal-font-scale, 1));
  font-weight: 700;
  line-height: 1.15;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

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

.rosary-modal-dot.is-completed {
  border-color: rgba(58, 140, 91, 0.6);
  background: rgba(58, 140, 91, 0.14);
  color: #2f7a3f;
}

.rosary-modal-dot.is-active {
  border-color: rgba(194, 155, 63, 0.62);
  background: linear-gradient(128deg, rgba(176, 130, 39, 0.92), rgba(146, 106, 27, 0.92));
  color: #fff;
}

.rosary-modal-action {
  margin-top: 12px;
  width: 100%;
}

.rosary-modal-footer {
  gap: 10px;
}

.rosary-modal-step-counter {
  margin: 0;
  font-size: calc(0.8rem * var(--rosary-modal-font-scale, 1));
  font-weight: 700;
  color: var(--ink-soft);
}

.rosary-modal-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.rosary-modal-nav-btn {
  min-width: 110px;
}

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

.song-favorites-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.song-favorites-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.song-favorites-title-row h3 {
  margin: 0;
}

.song-share-import-btn {
  min-height: 31px;
  width: auto;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 0.76rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.song-favorites-description-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.song-favorites-description-row p {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.song-favorites-share-btn {
  min-height: 31px;
  width: auto;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 0.76rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.song-favorites-search-wrap {
  margin-left: auto;
  flex: 0 1 300px;
  min-width: 180px;
}

.song-favorites-search-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: 8px 11px;
  font: inherit;
  font-size: 0.88rem;
}

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

.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-head-actions .song-favorite-head-action {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0;
  gap: 0;
  line-height: 0;
}

.custom-song-item-head-actions .song-favorite-head-action .song-search-action-icon {
  width: 28px;
  height: 28px;
}

.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;
  overflow-x: hidden;
}

.song-favorites-list.is-scrollable {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 4px;
}

.song-favorites-list.is-scrollable::-webkit-scrollbar {
  width: 8px;
}

.song-favorites-list.is-scrollable::-webkit-scrollbar-thumb {
  background: rgba(33, 79, 139, 0.34);
  border-radius: 8px;
}

.song-favorites-list.is-scrollable::-webkit-scrollbar-track {
  background: rgba(33, 79, 139, 0.08);
  border-radius: 8px;
}

.song-favorite-item {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  gap: 5px;
  height: 100%;
}

.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);
  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: block;
  line-height: 1.2;
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.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 .song-favorite-head-actions {
  order: 1;
  flex: 1 0 100%;
  margin-left: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 1px;
  min-height: 34px;
  min-width: 0;
}

.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 {
  flex: 0 0 auto;
}

.song-favorite-head-actions .song-favorite-head-action {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.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 {
  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,
.song-favorite-head-actions .song-search-action.song-search-action-favorite,
.song-favorite-head-actions .song-search-action.song-search-action-assign-mystery {
  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: auto;
  padding-left: 0;
  padding-top: 4px;
  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,
.song-favorite-actions .song-search-action.song-search-action-assign-mystery {
  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;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.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;
  height: 34px;
  border: 1px solid rgba(33, 79, 139, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 7px 72px 7px 10px;
  font: inherit;
  font-size: 0.82rem;
}

.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: 28px;
  height: 28px;
  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: 37px;
}

.song-search-clear {
  right: 5px;
  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: 14px;
  height: 14px;
  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-item.is-active-selection {
  border-color: rgba(33, 79, 139, 0.65);
  background: rgba(232, 241, 255, 0.96);
  box-shadow: 0 0 0 2px rgba(33, 79, 139, 0.18);
}

body.theme-dark .song-search-item.is-active-selection {
  border-color: rgba(121, 170, 233, 0.7);
  background: rgba(20, 38, 61, 0.92);
  box-shadow: 0 0 0 2px rgba(121, 170, 233, 0.22);
}

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

.bible-search-results {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  max-height: none;
  overflow: visible;
}

.bible-search-results .song-search-item {
  align-items: flex-start;
}

.bible-search-results .song-search-main {
  align-items: flex-start;
}

.bible-search-results .bible-search-reading-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bible-search-results .bible-search-reading-text {
  margin-top: 6px;
  color: var(--ink);
  font-size: calc(0.92rem * var(--bible-reading-font-scale, 1));
  line-height: 1.7;
  white-space: normal;
}

.bible-search-results .bible-search-font-controls {
  margin-left: auto;
  flex: 0 0 auto;
}

.bible-search-results .bible-search-font-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  font-size: 0.84rem;
}

.bible-search-results .bible-search-reading-verse {
  display: inline;
}

.bible-search-results .bible-search-verse-number {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--primary-strong);
  margin-right: 2px;
  vertical-align: super;
}

body.theme-dark .bible-search-results .bible-search-verse-number {
  color: #f4dca8;
}

.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: calc(1rem * var(--song-panel-font-scale, 1));
  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: calc(0.84rem * var(--song-panel-font-scale, 1));
  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,
.mystery-modal-song-lyrics .song-chord-token,
.rosary-modal-song-lyrics .song-chord-token {
  color: #b3261e;
  font-weight: 800;
  font-size: inherit;
  line-height: inherit;
}

body.theme-dark .fetched-song-lyrics .song-chord-token,
body.theme-dark .mystery-modal-song-lyrics .song-chord-token,
body.theme-dark .rosary-modal-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 auto;
    grid-template-areas: "brand search controls auth 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;
  }

  .auth-menu {
    grid-area: auth;
    margin-left: 0;
    justify-self: end;
  }

  .auth-menu-trigger {
    width: 33px;
    height: 33px;
    border-radius: 8px;
  }

  .auth-menu-trigger svg {
    width: 16px;
    height: 16px;
  }

  .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) {
  .rosary-modal-footer {
    display: none;
  }

  .booklet-cantos-list {
    grid-template-columns: 1fr;
  }

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

  .song-favorites-header-row {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .song-favorites-title-row {
    width: 100%;
  }

  .song-favorites-description-row {
    align-items: flex-start;
  }

  .song-favorites-share-btn.btn {
    width: auto;
  }

  .song-favorites-search-wrap {
    flex: 1 1 100%;
    min-width: 0;
    margin-left: 0;
  }

  .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;
    align-items: stretch;
  }

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

  .song-search-actions {
    width: 100%;
    align-self: stretch;
    justify-content: flex-start;
  }

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

  .song-favorite-head-actions.song-search-actions .song-search-action {
    flex: 0 0 auto;
  }

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

  .mystery-modal-footer {
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .mystery-ave-maria-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .mystery-ave-maria-title {
    width: 100%;
  }

  .mystery-ave-maria-options {
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .mystery-jaculatory-panel {
    max-height: min(34vh, 240px);
  }

  .rosary-modal-footer-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .rosary-modal-nav-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .song-modal-dialog {
    width: calc(100vw - 12px);
    margin: 0;
    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;
  }

  .song-modal-font-btn {
    width: 26px;
    min-width: 26px;
    height: 26px;
    font-size: 0.82rem;
  }

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

  .footer-row {
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .auth-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-form-actions .btn {
    width: 100%;
  }

  .auth-form-actions.has-register-cta {
    flex-direction: row;
    align-items: center;
  }

  .auth-form-actions.has-register-cta .btn {
    width: auto;
  }

  .auth-form-actions.has-register-cta .auth-register-cta {
    margin-right: auto;
  }

  .auth-form-actions.is-account-mode {
    flex-direction: row;
    align-items: center;
  }

  .auth-form-actions.is-account-mode .btn {
    width: auto;
  }

  .auth-sessions-dialog {
    width: min(620px, calc(100vw - 18px));
    max-height: min(88vh, calc(100dvh - 18px));
    padding: 12px;
  }

  .auth-sessions-item-row {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-sessions-item-action {
    width: 100%;
    justify-content: center;
  }

  .song-share-dialog {
    width: min(520px, calc(100vw - 18px));
    max-height: min(88vh, calc(100dvh - 18px));
    padding: 12px;
  }

  .song-share-merge-dialog {
    width: min(660px, calc(100vw - 18px));
    max-height: min(88vh, calc(100dvh - 18px));
    padding: 12px;
  }

  .song-share-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .song-share-actions .btn {
    width: 100%;
  }

  .song-share-merge-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .song-share-merge-actions .btn {
    width: 100%;
  }
}

@media (max-width: 680px) and (hover: none) and (pointer: coarse) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) clamp(112px, 24vw, 180px) auto auto auto;
    grid-template-areas: "brand search controls auth menu";
    row-gap: 0;
  }

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

  #font-decrease,
  #font-increase {
    display: none;
  }

  #mobile-search-toggle {
    display: none;
  }

  .mystery-modal.is-song-focus.open {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .rosary-modal.is-song-focus.open {
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .mystery-modal.is-song-focus .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.is-song-focus .mystery-modal-content,
  .rosary-modal.is-song-focus .rosary-modal-content {
    min-height: 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 680px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .auth-menu {
    display: none;
  }

  .menu-list .menu-auth-mobile-parent {
    display: block;
  }

  .menu-list .menu-auth-mobile-item {
    display: block;
  }

  .brand-text small {
    display: none;
  }

  #theme-toggle {
    display: none;
  }

  .menu-song-search .song-fetch-input {
    padding-right: 42px;
  }

  .menu-song-search .song-search-clear {
    display: none !important;
  }

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

  body.mobile-header-search-open .header-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "brand controls auth menu"
      "search search search search";
    row-gap: 6px;
  }

  body.mobile-header-search-open .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;
  }

  .menu-song-search .song-search-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .menu-song-search .song-search-main {
    width: 100%;
    align-items: flex-start;
  }

  .menu-song-search .song-search-actions,
  .menu-song-search .song-search-item.is-title-wrapped .song-search-actions {
    width: auto;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-left: auto;
    align-self: flex-end;
  }

  .menu-song-search .song-search-item.is-title-wrapped .song-search-actions .song-search-action {
    grid-area: auto;
  }
}

@media (max-width: 680px) and (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) clamp(112px, 24vw, 180px) auto auto auto;
    grid-template-areas: "brand search controls auth menu";
    row-gap: 0;
  }

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

  #mobile-search-toggle {
    display: none;
  }
}

/* Prevent mobile auto-zoom when focusing form fields. */
@media (max-width: 1024px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .mystery-modal.open {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .rosary-modal.open {
    align-items: center;
    justify-content: center;
    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:not(.rosary-modal):not(.is-song-focus) .mystery-modal-dialog {
    width: min(calc(95vw * var(--mystery-modal-inline-scale, 1)), 100vw);
    max-width: min(calc(95vw * var(--mystery-modal-inline-scale, 1)), 100vw);
    height: 98vh;
    height: 98svh;
    height: 98dvh;
    max-height: 98vh;
    max-height: 98svh;
    max-height: 98dvh;
    margin: auto;
    border-radius: 14px;
    border: 1px solid rgba(215, 202, 166, 0.65);
    padding: max(12px, env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .mystery-modal:not(.rosary-modal).is-window-expanded:not(.is-song-focus) .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;
  }

  .rosary-modal .rosary-modal-dialog {
    width: min(calc(95vw * var(--rosary-modal-inline-scale, 1)), 100vw);
    max-width: min(calc(95vw * var(--rosary-modal-inline-scale, 1)), 100vw);
    height: 98vh;
    height: 98svh;
    height: 98dvh;
    max-height: 98vh;
    max-height: 98svh;
    max-height: 98dvh;
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(215, 202, 166, 0.65);
    padding: max(12px, env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .rosary-modal.is-window-expanded .rosary-modal-dialog {
    width: 98vw;
    max-width: 98vw;
    height: 98vh;
    height: 98svh;
    height: 98dvh;
    max-height: 98vh;
    max-height: 98svh;
    max-height: 98dvh;
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(215, 202, 166, 0.65);
    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;
  }

  .rosary-modal-content {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rosary-modal-footer {
    display: none;
  }

  .mystery-modal:not(.rosary-modal):not(.is-song-focus):not(.is-jaculatory-focus) .mystery-modal-dialog {
    display: block;
    overflow-y: auto;
  }

  .mystery-modal:not(.rosary-modal):not(.is-song-focus):not(.is-jaculatory-focus) .mystery-modal-content {
    overflow-y: visible;
    min-height: unset;
  }

  .mystery-modal:not(.rosary-modal):not(.is-song-focus):not(.is-jaculatory-focus) .mystery-modal-footer {
    margin-top: 0;
  }

  .mystery-modal.is-song-focus .mystery-modal-song-title,
  .rosary-modal.is-song-focus .mystery-modal-song-title {
    font-size: calc(1.02rem * var(--song-panel-font-scale, 1));
    line-height: 1.34;
  }

  .mystery-modal.is-song-focus .mystery-modal-song-meta,
  .rosary-modal.is-song-focus .mystery-modal-song-meta {
    font-size: calc(0.92rem * var(--song-panel-font-scale, 1));
    line-height: 1.34;
  }

  .mystery-modal.is-song-focus .mystery-modal-song-lyrics,
  .rosary-modal.is-song-focus .rosary-modal-song-lyrics {
    font-size: calc(1.04rem * var(--song-panel-font-scale, 1));
    line-height: 1.58;
  }

}

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

@media (max-width: 680px) {
  .song-search-item.is-title-wrapped .song-search-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
  }

  .song-search-item.is-title-wrapped .song-search-actions .song-search-action {
    grid-area: auto;
  }
}
