.account-button {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 80;
  min-width: 76px;
  height: 38px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #07523b;
  background: rgba(255,253,248,.92);
  border: 1px solid #b9cbbd;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(22, 46, 36, .08);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}
.account-button:hover, .account-button:focus-visible { color: #fffdf8; background: #07523b; outline: 0; }
.account-avatar { width: 23px; height: 23px; display: grid; place-items: center; overflow: hidden; color: #fffdf8; background: #07523b; border-radius: 50%; font-size: 8px; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-button:hover .account-avatar, .account-button:focus-visible .account-avatar { color: #07523b; background: #f5b316; }
.account-button-label { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button.signed-in {
  min-width: 38px;
  width: 38px;
  padding: 0;
}
.account-button.signed-in .account-button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.account-menu {
  position: fixed;
  top: max(60px, calc(env(safe-area-inset-top) + 52px));
  right: max(18px, env(safe-area-inset-right));
  z-index: 90;
  width: min(242px, calc(100vw - 24px));
  padding: 8px;
  color: #17140f;
  background: rgba(255, 253, 248, .98);
  border: 1px solid #b9cbbd;
  border-radius: 15px;
  box-shadow: 0 18px 52px rgba(22, 46, 36, .18);
  backdrop-filter: blur(16px);
  transform-origin: top right;
  animation: account-menu-in 120ms ease-out;
}
.account-menu[hidden] { display: none; }
.account-menu-identity {
  min-height: 48px;
  padding: 5px 8px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #e4dccf;
}
.account-menu-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fffdf8;
  background: #07523b;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}
.account-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu-identity strong,
.account-menu-identity small,
.account-menu button strong,
.account-menu button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-identity strong { color: #07523b; font-size: 12px; }
.account-menu-identity small { margin-top: 2px; color: #7c766c; font-size: 9px; }
.account-menu > button {
  width: 100%;
  min-height: 49px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #07523b;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
}
.account-menu > button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-menu > button strong { font-size: 11px; }
.account-menu > button small { margin-top: 2px; color: #7c766c; font-size: 9px; font-weight: 600; }
.account-menu > button:hover,
.account-menu > button:focus-visible { color: #fffdf8; background: #07523b; outline: 0; }
.account-menu > button:hover small,
.account-menu > button:focus-visible small { color: rgba(255, 253, 248, .75); }
@keyframes account-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.reading .account-button, .artist-view .account-button { top: max(17px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); min-width: 34px; width: 34px; height: 34px; padding: 0; }
.reading .account-button-label, .artist-view .account-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.reading .search-stage, .artist-view .search-stage { padding-right: 58px; }

.save-cifra-button {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #07523b;
  background: #fffdf8;
  border: 1px solid #b9cbbd;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.save-cifra-button span { font-size: 18px; line-height: 1; }
.save-cifra-button:hover, .save-cifra-button.saved { color: #fffdf8; background: #07523b; border-color: #07523b; }

.library-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(12, 37, 28, .66);
  backdrop-filter: blur(7px);
}
.library-modal[hidden] { display: none; }
.library-modal-open { overflow: hidden; }
.library-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 48px);
  padding: 28px;
  overflow-y: auto;
  color: #17140f;
  background: #fffaf1;
  border: 1px solid #d8d0c3;
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
}
.account-dialog { width: min(560px, 100%); }
.playlist-library-dialog { width: min(720px, 100%); }
.library-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #6f6a61;
  background: #f0e9dd;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
}
.library-close:hover { color: #fff; background: #07523b; }
.library-heading { padding-right: 34px; display: flex; align-items: center; gap: 14px; }
.library-heading > img { flex: 0 0 auto; }
.library-heading span:not(.profile-avatar) { display: block; margin-bottom: 3px; color: #07523b; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.library-heading h2 { margin: 0; font: 700 30px/1 Georgia, serif; letter-spacing: -.025em; }
.library-lead { margin: 18px 0 20px; color: #6f6a61; font-size: 13px; line-height: 1.5; }

.auth-tabs { margin-bottom: 17px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #eee5d7; border-radius: 10px; }
.auth-tabs button { height: 38px; color: #6f6a61; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-weight: 900; }
.auth-tabs button.active { color: #fffdf8; background: #07523b; }
.library-form { display: grid; gap: 13px; }
.library-form label { display: grid; gap: 6px; color: #6f6a61; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.library-form input, .library-form textarea, .playlist-create-form input, .playlist-create-form textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  color: #17140f;
  background: #fffdf8;
  border: 1px solid #cbc1b2;
  border-radius: 9px;
  outline: 0;
  font: 500 14px/1.35 system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.library-form input:focus, .library-form textarea:focus, .playlist-create-form input:focus, .playlist-create-form textarea:focus { border-color: #07523b; box-shadow: 0 0 0 3px rgba(7,82,59,.1); }
.library-form input:disabled { color: #7c766c; background: #eee9df; }
.library-form textarea { resize: vertical; }
.library-form small { margin-top: -6px; color: #878076; font-size: 10px; }
.library-primary, .library-secondary {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 900;
}
.library-primary { color: #fffdf8; background: #07523b; border: 1px solid #07523b; }
.library-primary:hover { background: #17140f; border-color: #17140f; }
.library-secondary { color: #07523b; background: #fffdf8; border: 1px solid #9bb6a6; }
.library-secondary:hover { color: #fffdf8; background: #07523b; }
.library-primary:disabled, .library-secondary:disabled { cursor: wait; opacity: .55; }
.auth-divider { margin: 18px 0; display: flex; align-items: center; gap: 10px; color: #8b8479; font-size: 10px; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; content: ''; background: #d8d0c3; }
.google-login { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #25211c; background: #fff; border: 1px solid #cbc1b2; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 850; }
.google-login:hover { border-color: #07523b; }
.google-login-primary { min-height: 50px; border-color: #9bb6a6; box-shadow: 0 8px 24px rgba(7,82,59,.08); }
.google-login-primary:hover { box-shadow: 0 10px 30px rgba(7,82,59,.14); }
.google-login.disabled { cursor: not-allowed; opacity: .52; pointer-events: none; }
.google-mark { width: 25px; height: 25px; display: grid; place-items: center; color: #4285f4; background: #fff; border: 1px solid #dedede; border-radius: 50%; font-weight: 900; }
.library-message { min-height: 18px; margin: 13px 0 0; color: #a13b20; font-size: 11px; text-align: center; }
.library-message.success { color: #07523b; }

.profile-view { display: grid; gap: 19px; }
.profile-avatar, .picker-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; color: #fffdf8; background: #07523b; border-radius: 50%; font: 800 18px Georgia, serif; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit { position: relative; width: 48px; height: 48px; padding: 0; flex: 0 0 auto; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.profile-avatar-edit .profile-avatar { transition: filter .16s, transform .16s; }
.profile-avatar-edit:hover .profile-avatar { filter: brightness(.82); transform: scale(.98); }
.profile-avatar-edit > i { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; display: grid; place-items: center; color: #fffdf8; background: #07523b; border: 2px solid #fffaf0; border-radius: 50%; font: 800 10px/1 system-ui, sans-serif; }
.profile-avatar-actions { margin-top: -8px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; }
.profile-avatar-actions button { padding: 0; color: #07523b; background: transparent; border: 0; cursor: pointer; font-size: 10px; font-weight: 850; }
.profile-avatar-actions button:hover { text-decoration: underline; }
.profile-avatar-actions small { margin: 0; flex-basis: 100%; }
.profile-form { padding-bottom: 2px; }
.appearance-fieldset { min-width: 0; margin: 3px 0 2px; padding: 0; border: 0; }
.appearance-fieldset legend { padding: 0; color: #6f6a61; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.appearance-fieldset > p { margin: 5px 0 10px; color: #878076; font-size: 11px; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.appearance-option { position: relative; display: block; cursor: pointer; }
.appearance-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.appearance-option span { min-height: 72px; padding: 10px 8px; display: grid; place-items: center; align-content: center; gap: 2px; color: #6f6a61; background: #fffdf8; border: 1px solid #cbc1b2; border-radius: 10px; text-align: center; transition: color .16s, background .16s, border-color .16s, transform .16s; }
.appearance-option i { color: #d18b00; font-size: 17px; font-style: normal; line-height: 1; }
.appearance-option strong { color: #17140f; font-size: 11px; text-transform: none; letter-spacing: 0; }
.appearance-option small { margin: 0; color: #878076; font-size: 8px; text-transform: none; letter-spacing: 0; }
.appearance-option:hover span { border-color: #8caf9a; transform: translateY(-1px); }
.appearance-option input:checked + span { color: #fffdf8; background: #07523b; border-color: #07523b; }
.appearance-option input:checked + span strong,
.appearance-option input:checked + span small,
.appearance-option input:checked + span i { color: inherit; }
.appearance-option input:focus-visible + span { outline: 3px solid rgba(7,82,59,.22); outline-offset: 2px; }
.playlist-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.playlist-heading span { color: #07523b; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.playlist-heading h3 { margin: 3px 0 0; font: 700 23px/1 Georgia, serif; }
.playlist-heading strong { color: #756f65; font-size: 10px; text-transform: uppercase; }
.playlist-library-heading { margin-bottom: 20px; }
.playlist-library-actions { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.playlist-library-actions strong { color: #07523b; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.playlist-library-actions p { margin: 5px 0 0; color: #7c766c; font-size: 12px; }
.compact-primary { min-height: 40px; flex: 0 0 auto; }
.playlist-create-form { margin-bottom: 18px; padding: 16px; display: grid; gap: 12px; background: #f0e9dd; border: 1px solid #d8d0c3; border-radius: 12px; }
.playlist-create-form[hidden] { display: none; }
.playlist-create-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.playlist-create-heading strong { font: 700 20px Georgia, serif; }
.playlist-create-heading span { color: #7c766c; font-size: 10px; }
.playlist-create-form label { display: grid; gap: 6px; color: #6f6a61; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.playlist-create-form label small { justify-self: end; margin-top: -16px; color: #999187; font-size: 8px; }
.playlist-create-form textarea { resize: vertical; }
.playlist-create-actions { display: flex; justify-content: flex-end; gap: 8px; }
.playlist-create-actions button { min-width: 120px; }
.profile-playlists, .picker-playlists { display: grid; gap: 8px; }
.playlist-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-playlist-card { width: 100%; min-height: 92px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; color: #17140f; background: #fffdf8; border: 1px solid #d8d0c3; border-radius: 12px; cursor: pointer; text-align: left; }
.profile-playlist-card:hover { background: #f7f0d9; border-color: #b7aa96; }
.profile-playlist-card strong { overflow: hidden; font: 700 17px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.profile-playlist-card small { grid-column: 1; color: #7c766c; font-size: 10px; }
.profile-playlist-card .playlist-card-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-playlist-card .playlist-card-count { text-transform: uppercase; letter-spacing: .05em; }
.profile-playlist-card span { grid-column: 2; grid-row: 1 / span 3; color: #d18b00; font-size: 20px; }
.playlist-detail { padding: 16px; background: #f1eadf; border-radius: 12px; }
.playlist-detail-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.playlist-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.playlist-detail-title { display: flex; align-items: center; gap: 10px; }
.playlist-back { width: 32px; height: 32px; padding: 0; color: #07523b; background: #fffdf8; border: 1px solid #b9cbbd; border-radius: 50%; cursor: pointer; font-size: 18px; }
.playlist-detail-head h4 { margin: 0; font: 700 20px Georgia, serif; }
.playlist-detail-description { margin: 4px 0 0; color: #7c766c; font-size: 10px; }
.playlist-detail-head button { color: #a13b20; background: transparent; border: 0; cursor: pointer; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.playlist-detail-head .playlist-print-button { min-height: 34px; padding: 0 11px; color: #07523b; background: #fffdf8; border: 1px solid #9bb6a6; border-radius: 8px; font-size: 9px; }
.playlist-detail-head .playlist-print-button:hover { color: #fffdf8; background: #07523b; }
.playlist-detail-head .playlist-print-button:disabled { cursor: wait; opacity: .55; }
.playlist-song-list { display: grid; gap: 6px; }
.playlist-song { padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; color: inherit; background: #fffdf8; border: 1px solid #d8d0c3; border-radius: 8px; text-decoration: none; }
.playlist-song strong, .playlist-song small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-song strong { font: 700 14px Georgia, serif; }
.playlist-song small { color: #7c766c; font-size: 10px; }
.playlist-song span { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #d18b00; }
.playlist-empty { margin: 0; padding: 12px; color: #7c766c; background: #fffdf8; border-radius: 8px; font-size: 12px; text-align: center; }
.logout-button { justify-self: start; padding: 0; color: #8d3a28; background: transparent; border: 0; cursor: pointer; font-size: 11px; font-weight: 900; text-decoration: underline; text-underline-offset: 4px; }

.picker-song { margin: 18px 0 14px; padding: 11px 13px; color: #07523b; background: #edf3ed; border-radius: 9px; font: 700 15px Georgia, serif; }
.picker-playlists { max-height: 280px; overflow-y: auto; }
.picker-option { min-height: 55px; padding: 10px 12px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; background: #fffdf8; border: 1px solid #d8d0c3; border-radius: 9px; cursor: pointer; }
.picker-option:has(input:checked) { background: #edf3ed; border-color: #8caf9a; }
.picker-option input { width: 19px; height: 19px; accent-color: #07523b; }
.picker-option strong { overflow: hidden; font: 700 15px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.picker-option small { color: #7c766c; font-size: 10px; }
.picker-create-toggle { width: 100%; min-height: 42px; margin: 12px 0; color: #07523b; background: #fffdf8; border: 1px dashed #8caf9a; border-radius: 9px; cursor: pointer; font-weight: 900; }
.picker-create-toggle:hover { background: #edf3ed; }
.compact-create-form { margin: 12px 0; padding: 13px; }
.contribution-dialog { width: min(840px, 100%); }
.contribution-form { margin-top: 18px; }
.contribution-grid { display: grid; grid-template-columns: 1.3fr 1.3fr .9fr; gap: 12px; }
.contribution-grid label small { margin: 5px 0 0; color: #878076; font-size: 8px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.contribution-form input[readonly] { color: #6f6a61; background: #eee9df; cursor: default; }
.contribution-content-head { margin-bottom: -7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contribution-content-head label { color: #6f6a61; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.contribution-content-head button { padding: 0; color: #07523b; background: transparent; border: 0; cursor: pointer; font-size: 10px; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.contribution-content { width: 100%; min-height: 330px; padding: 12px 13px; color: #17140f; background: #fffdf8; border: 1px solid #cbc1b2; border-radius: 9px; outline: 0; resize: vertical; font: 500 13px/1.48 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; tab-size: 4; white-space: pre; overflow: auto; }
.contribution-content:focus { border-color: #07523b; box-shadow: 0 0 0 3px rgba(7,82,59,.1); }
.contribution-notice { padding: 12px 14px; display: grid; gap: 3px; color: #6f6a61; background: #f4eddf; border-left: 3px solid #d18b00; border-radius: 7px; font-size: 11px; line-height: 1.45; }
.contribution-notice strong { color: #17140f; }
.profile-contributions { padding-top: 17px; border-top: 1px solid #d8d0c3; }
.profile-contributions-heading { margin-bottom: 10px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.profile-contributions-heading span { color: #07523b; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.profile-contributions-heading h3 { margin: 3px 0 0; font: 700 22px/1 Georgia, serif; }
.profile-contributions-heading button { min-height: 36px; font-size: 10px; }
.profile-contribution-list { display: grid; gap: 7px; }
.profile-contribution-card { padding: 11px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 12px; background: #fffdf8; border: 1px solid #d8d0c3; border-radius: 9px; }
.profile-contribution-card strong, .profile-contribution-card small { display: block; }
.profile-contribution-card strong { overflow: hidden; font: 700 15px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.profile-contribution-card small { margin-top: 3px; color: #7c766c; font-size: 9px; }
.profile-contribution-card p, .profile-contribution-card a { grid-column: 1 / -1; margin: 3px 0 0; font-size: 10px; line-height: 1.45; }
.profile-contribution-card a { color: #07523b; font-weight: 850; text-decoration: none; }
.contribution-status { padding: 5px 7px; border-radius: 999px; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.status-pending, .status-reviewing { color: #725200; background: #f8e9ac; }
.status-approved { color: #07523b; background: #dcecdf; }
.status-rejected { color: #8d3a28; background: #f4ddd6; }
.library-toast { position: fixed; right: 18px; bottom: 18px; z-index: 1200; max-width: min(360px, calc(100vw - 36px)); padding: 12px 15px; color: #fffdf8; background: #07523b; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.2); font-size: 12px; font-weight: 800; }
.library-toast[hidden] { display: none; }
.account-nudge {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 950;
  width: min(370px, calc(100vw - 36px));
  padding: 20px;
  color: #17140f;
  background: rgba(255,253,248,.98);
  border: 1px solid #b9cbbd;
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(22,46,36,.22);
  backdrop-filter: blur(16px);
  animation: account-nudge-in 220ms ease-out;
}
.account-nudge[hidden] { display: none; }
.account-nudge-eyebrow { display: block; padding-right: 26px; color: #07523b; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.account-nudge > strong { display: block; margin-top: 7px; padding-right: 24px; font: 700 22px/1.08 Georgia, serif; }
.account-nudge > p { margin: 8px 0 16px; color: #6f6a61; font-size: 12px; line-height: 1.45; }
.account-nudge-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; padding: 0; color: #7c766c; background: #f0e9dd; border: 0; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.account-nudge-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.account-nudge-actions a, .account-nudge-actions button { min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; font-size: 10px; font-weight: 900; text-decoration: none; }
.account-nudge-actions a { color: #fffdf8; background: #07523b; border: 1px solid #07523b; }
.account-nudge-actions a span { width: 21px; height: 21px; display: grid; place-items: center; color: #07523b; background: #fffdf8; border-radius: 50%; }
.account-nudge-actions a.disabled { pointer-events: none; opacity: .45; }
.account-nudge-actions button { color: #07523b; background: transparent; border: 1px solid #b9cbbd; cursor: pointer; }
.account-nudge-actions a:hover, .account-nudge-actions button:hover { transform: translateY(-1px); }
@keyframes account-nudge-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

html[data-theme="dark"] .account-button { color: var(--accent-dark); background: rgba(25,35,31,.94); border-color: #496057; box-shadow: 0 8px 28px rgba(0,0,0,.24); }
html[data-theme="dark"] .account-button:hover,
html[data-theme="dark"] .account-button:focus-visible { color: #101915; background: var(--accent-dark); }
html[data-theme="dark"] .account-menu { color: #f2eadb; background: rgba(21,30,26,.98); border-color: #496057; box-shadow: 0 18px 52px rgba(0,0,0,.42); }
html[data-theme="dark"] .account-menu-identity { border-color: #3b4b44; }
html[data-theme="dark"] .account-menu-identity strong,
html[data-theme="dark"] .account-menu > button { color: var(--accent-dark); }
html[data-theme="dark"] .account-menu-identity small,
html[data-theme="dark"] .account-menu > button small { color: #a7aea8; }
html[data-theme="dark"] .account-menu > button:hover,
html[data-theme="dark"] .account-menu > button:focus-visible { color: #101915; background: var(--accent-dark); }
html[data-theme="dark"] .account-menu > button:hover small,
html[data-theme="dark"] .account-menu > button:focus-visible small { color: rgba(16,25,21,.7); }
html[data-theme="dark"] .save-cifra-button { color: var(--accent-dark); background: #19231f; border-color: #496057; }
html[data-theme="dark"] .save-cifra-button:hover,
html[data-theme="dark"] .save-cifra-button.saved { color: #101915; background: var(--accent-dark); border-color: var(--accent-dark); }
html[data-theme="dark"] .library-modal { background: rgba(2,8,6,.76); }
html[data-theme="dark"] .library-dialog { color: #f2eadb; background: #151e1a; border-color: #3b4b44; box-shadow: 0 28px 90px rgba(0,0,0,.56); }
html[data-theme="dark"] .library-close { color: #a7aea8; background: #25302b; }
html[data-theme="dark"] .library-close:hover { color: #101915; background: var(--accent-dark); }
html[data-theme="dark"] .library-heading span:not(.profile-avatar),
html[data-theme="dark"] .playlist-heading span,
html[data-theme="dark"] .playlist-library-actions strong { color: var(--accent-dark); }
html[data-theme="dark"] .library-lead,
html[data-theme="dark"] .library-form label,
html[data-theme="dark"] .playlist-create-form label,
html[data-theme="dark"] .playlist-library-actions p,
html[data-theme="dark"] .playlist-create-heading span,
html[data-theme="dark"] .profile-playlist-card small,
html[data-theme="dark"] .playlist-detail-description,
html[data-theme="dark"] .playlist-song small,
html[data-theme="dark"] .picker-option small,
html[data-theme="dark"] .appearance-fieldset legend { color: #a7aea8; }
html[data-theme="dark"] .appearance-fieldset > p,
html[data-theme="dark"] .appearance-option small { color: #8f9993; }
html[data-theme="dark"] .auth-tabs { background: #222d28; }
html[data-theme="dark"] .auth-tabs button { color: #a7aea8; }
html[data-theme="dark"] .auth-tabs button.active { color: #101915; background: var(--accent-dark); }
html[data-theme="dark"] .library-form input,
html[data-theme="dark"] .library-form textarea,
html[data-theme="dark"] .playlist-create-form input,
html[data-theme="dark"] .playlist-create-form textarea { color: #f2eadb; background: #1b2521; border-color: #43544d; }
html[data-theme="dark"] .library-form input:disabled { color: #87918b; background: #202925; }
html[data-theme="dark"] .library-form input::placeholder,
html[data-theme="dark"] .library-form textarea::placeholder,
html[data-theme="dark"] .playlist-create-form input::placeholder,
html[data-theme="dark"] .playlist-create-form textarea::placeholder { color: #747f79; }
html[data-theme="dark"] .library-secondary { color: var(--accent-dark); background: #1b2521; border-color: #526b60; }
html[data-theme="dark"] .library-secondary:hover { color: #101915; background: var(--accent-dark); }
html[data-theme="dark"] .auth-divider { color: #87918b; }
html[data-theme="dark"] .auth-divider::before,
html[data-theme="dark"] .auth-divider::after { background: #3b4b44; }
html[data-theme="dark"] .google-login { color: #25211c; background: #f8f8f6; }
html[data-theme="dark"] .playlist-create-form,
html[data-theme="dark"] .playlist-detail { background: #202a26; border-color: #3b4b44; }
html[data-theme="dark"] .profile-playlist-card,
html[data-theme="dark"] .playlist-song,
html[data-theme="dark"] .playlist-empty,
html[data-theme="dark"] .picker-option,
html[data-theme="dark"] .picker-create-toggle { color: #f2eadb; background: #1b2521; border-color: #3b4b44; }
html[data-theme="dark"] .profile-playlist-card:hover,
html[data-theme="dark"] .picker-create-toggle:hover { background: #26332d; border-color: #526b60; }
html[data-theme="dark"] .picker-song,
html[data-theme="dark"] .picker-option:has(input:checked) { color: #dff5eb; background: #20362d; border-color: #547c6b; }
html[data-theme="dark"] .playlist-back { color: var(--accent-dark); background: #1b2521; border-color: #526b60; }
html[data-theme="dark"] .playlist-detail-head .playlist-print-button { color: var(--accent-dark); background: #1b2521; border-color: #526b60; }
html[data-theme="dark"] .playlist-detail-head .playlist-print-button:hover { color: #101915; background: var(--accent-dark); }
html[data-theme="dark"] .appearance-option span { color: #a7aea8; background: #1b2521; border-color: #43544d; }
html[data-theme="dark"] .appearance-option strong { color: #f2eadb; }
html[data-theme="dark"] .appearance-option input:checked + span { color: #101915; background: var(--accent-dark); border-color: var(--accent-dark); }
html[data-theme="dark"] .appearance-option input:focus-visible + span { outline-color: rgba(131,210,175,.3); }
html[data-theme="dark"] .profile-avatar-edit > i { color: #101915; background: var(--accent-dark); border-color: #151e1a; }
html[data-theme="dark"] .profile-avatar-actions button { color: var(--accent-dark); }
html[data-theme="dark"] .contribution-form input[readonly] { color: #87918b; background: #202925; }
html[data-theme="dark"] .contribution-grid label small { color: #8f9993; }
html[data-theme="dark"] .contribution-content-head label { color: #a7aea8; }
html[data-theme="dark"] .contribution-content-head button { color: var(--accent-dark); }
html[data-theme="dark"] .contribution-content { color: #f2eadb; background: #1b2521; border-color: #43544d; }
html[data-theme="dark"] .contribution-notice { color: #a7aea8; background: #202a26; }
html[data-theme="dark"] .contribution-notice strong { color: #f2eadb; }
html[data-theme="dark"] .profile-contributions { border-color: #3b4b44; }
html[data-theme="dark"] .profile-contributions-heading span,
html[data-theme="dark"] .profile-contribution-card a { color: var(--accent-dark); }
html[data-theme="dark"] .profile-contribution-card { color: #f2eadb; background: #1b2521; border-color: #3b4b44; }
html[data-theme="dark"] .profile-contribution-card small { color: #8f9993; }
html[data-theme="dark"] .account-nudge { color: #f2eadb; background: rgba(21,30,26,.98); border-color: #496057; box-shadow: 0 22px 70px rgba(0,0,0,.5); }
html[data-theme="dark"] .account-nudge-eyebrow { color: var(--accent-dark); }
html[data-theme="dark"] .account-nudge > p { color: #a7aea8; }
html[data-theme="dark"] .account-nudge-close { color: #a7aea8; background: #25302b; }
html[data-theme="dark"] .account-nudge-actions a { color: #101915; background: var(--accent-dark); border-color: var(--accent-dark); }
html[data-theme="dark"] .account-nudge-actions button { color: var(--accent-dark); border-color: #526b60; }

@media (max-width: 700px) {
  .account-button { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); min-width: 36px; width: 36px; height: 36px; padding: 0; }
  .account-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .account-menu { top: max(56px, calc(env(safe-area-inset-top) + 48px)); right: max(12px, env(safe-area-inset-right)); width: min(230px, calc(100vw - 24px)); }
  .search-shell { gap: 7px; }
  .library-modal { padding: 0; align-items: end; }
  .library-dialog { width: 100%; max-height: min(91dvh, 760px); padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .library-heading h2 { font-size: 26px; }
  .playlist-library-actions { align-items: stretch; flex-direction: column; }
  .compact-primary { width: 100%; }
  .playlist-library-grid { grid-template-columns: 1fr; }
  .playlist-create-heading { align-items: flex-start; flex-direction: column; }
  .playlist-create-actions button { min-width: 0; flex: 1; }
  .playlist-detail-head { align-items: flex-start; flex-direction: column; }
  .playlist-detail-actions { width: 100%; justify-content: space-between; }
  .song-header { flex-wrap: wrap; }
  .save-cifra-button { min-height: 38px; }
  .contribution-grid { grid-template-columns: 1fr 1fr; }
  .contribution-content { min-height: 42dvh; }
  .profile-contributions-heading { align-items: stretch; flex-direction: column; }
  .account-nudge { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); padding: 18px; }
}

@media (max-width: 460px) {
  .contribution-grid { grid-template-columns: 1fr; }
  .account-nudge-actions { grid-template-columns: 1fr; }
}
