html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 0% 0%, #fff7fb 0%, #fff1f7 45%, #ffffff 100%);
  color: #4a2f44;
}

.app-top-nav {
  background: #ffeef7;
  border-bottom-color: #efcde0 !important;
}

.app-top-brand {
  color: #2f5da8 !important;
  font-weight: 700;
}

.app-top-brand-icon {
  display: inline-flex;
  align-items: center;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.app-brand-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(46vw, 260px);
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .app-brand-logo {
    height: 44px;
    max-width: 58vw;
  }
}

.app-top-link {
  color: #2f5da8 !important;
}

.app-top-link:hover,
.app-top-link:focus {
  color: #244a86 !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.lyrics-header-inner {
  background: linear-gradient(145deg, #fff3f9 0%, #ffe8f3 50%, #fff7fb 100%);
  border: 1px solid #f2cde0;
  border-radius: 1.1rem;
  padding: 2.2rem 2.1rem 1rem;
  box-shadow: 0 14px 34px rgba(156, 94, 132, 0.14);
  max-width: 1260px;
  margin: 0 auto;
}

.lyrics-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.lyrics-hero-copy {
  flex: 1 1 760px;
  min-width: 0;
  max-width: 940px;
  margin: 0 auto;
}

.lyrics-hero-photo-wrap {
  flex: 0 0 auto;
  margin-top: 0.35rem;
  padding: 0.15rem;
  border: 1px solid #f0cfe1;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.55);
}

.lyrics-hero-photo {
  display: block;
  width: clamp(165px, 18vw, 255px);
  height: auto;
  object-fit: contain;
  object-position: center top;
  border-radius: 0.85rem;
  border: 1px solid #e8cfdd;
  box-shadow: 0 8px 18px rgba(156, 94, 132, 0.14);
  background: #fff;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
}

.lyrics-header-title {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  text-align: center;
  color: #8a2d5f;
  margin: 0;
  line-height: 1.1;
}

.lyrics-header-subtitle {
  margin: 0.4rem 0 0.95rem;
  text-align: center;
  color: #9a5b7d;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767.98px) {
  .lyrics-hero-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .lyrics-header-inner {
    padding: 1.2rem 0.9rem 1rem;
  }

  .lyrics-header-title {
    text-align: center;
  }

  .lyrics-header-subtitle {
    text-align: center;
    margin: 0.35rem auto 0;
  }

  .lyrics-hero-photo {
    width: min(62vw, 240px);
    height: auto;
  }

  .search-input-wrap {
    flex-wrap: wrap;
  }
}

.lyrics-header-search {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem;
  margin: 0.1rem 0 0.95rem;
  max-width: none;
}

.live-search-shell {
  max-width: 820px;
  margin: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.search-field-group {
  flex: 1 1 auto;
  width: 100%;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a5b7d;
  margin-bottom: 0.05rem;
  text-align: left;
}

.search-input-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
}

.search-input-shell {
  position: relative;
  flex: 1 1 auto;
  min-width: 260px;
  max-width: none;
}

.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid #efcde0;
  border-radius: 0.8rem;
  box-shadow: 0 14px 28px rgba(156, 94, 132, 0.16);
  overflow: hidden;
}

.suggestions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}

.suggestion-item {
  border-bottom: 1px solid #f7e2ed;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-link {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  color: #6f2f53;
}

.suggestion-link:hover {
  background: #fff4fa;
}

.suggestion-title {
  font-weight: 700;
}

.suggestion-composer {
  color: #a16887;
  font-size: 0.9rem;
}

.lyrics-search-input {
  border: 1px solid #e9bfd6;
  border-radius: 0.9rem;
  padding: 0.69rem 2.1rem 0.69rem 0.8rem;
  min-width: 100%;
  width: 100%;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.lyrics-search-input:focus {
  border-color: #d58db4;
  box-shadow: 0 0 0 0.2rem rgba(213, 141, 180, 0.2);
  outline: none;
}

.search-clear-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 999px;
  background: #f5dcea;
  color: #7d3f62;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-clear-btn:hover {
  background: #efcde0;
}

.btn-songbook-primary {
  background: linear-gradient(120deg, #de7fb0 0%, #bf5b93 100%);
  color: #fff;
  border: 1px solid #b05086;
  border-radius: 0.8rem;
  padding: 0.64rem 1.05rem;
  white-space: nowrap;
}

#songDetailPanel {
  min-height: 92px;
  background: rgba(255, 246, 252, 0.62);
}

.btn-songbook-primary:hover {
  color: #fff;
  filter: brightness(1.05);
}

.songbook-shell {
  border-radius: 1.1rem;
  box-shadow: 0 14px 34px rgba(156, 94, 132, 0.14);
  border: 1px solid #f4d7e7;
  overflow: visible;
}

.song-side-title {
  color: #7e315a;
}

.lyrics-tab-header {
  display: inline-flex;
  gap: 0.4rem;
  background: #fff3fa;
  border: 1px solid #f1d2e4;
  border-radius: 0.9rem;
  padding: 0.3rem;
}

.lyrics-tab-btn {
  border: none;
  border-radius: 0.7rem;
  background: transparent;
  color: #8c4d70;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  line-height: 1.2;
}

.lyrics-tab-btn.active {
  background: linear-gradient(120deg, #de7fb0 0%, #bf5b93 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(191, 91, 147, 0.25);
}

.lyrics-tab-btn:focus {
  outline: 2px solid #d58db4;
  outline-offset: 1px;
}

.lyrics-tab-pane {
  display: none;
}

.lyrics-tab-pane.active {
  display: block;
}

.song-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  color: #8c4d70;
}

.multilingual-lyrics {
  white-space: pre-wrap;
  line-height: 1.65;
  color: #4a2f44;
  background: #fff7fb;
  border: 1px solid #f1d2e4;
  border-radius: 0.8rem;
  padding: 1rem;
  overflow: visible;
  max-height: none;
}

.admin-shell {
  background: linear-gradient(145deg, #fff3f9 0%, #ffeef8 55%, #ffffff 100%);
  border: 1px solid #f2cde0;
  border-radius: 1.1rem;
  padding: 1.2rem;
  box-shadow: 0 12px 30px rgba(156, 94, 132, 0.12);
}

.admin-title {
  margin: 0;
  color: #7e315a;
  font-size: 1.8rem;
}

.admin-subtitle {
  color: #8c4d70;
  margin: 0.35rem 0 1rem;
}

.admin-warning {
  background: #fff2d9;
  border: 1px solid #f5d08b;
  color: #875a16;
  border-radius: 0.7rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.admin-auth-row {
  margin-bottom: 1rem;
}

.admin-auth-controls,
.admin-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
}

.admin-card {
  background: #ffffffc9;
  border: 1px solid #f1d2e4;
  border-radius: 0.95rem;
  padding: 0.95rem;
}

.admin-card-title {
  color: #7e315a;
  margin: 0 0 0.75rem;
}

.admin-table {
  margin-bottom: 0;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-textarea {
  border: 1px solid #e9bfd6;
  border-radius: 0.85rem;
  background: #fff;
  color: #4a2f44;
  padding: 0.65rem 0.75rem;
}

.admin-form-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.admin-pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 991.98px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}