:root {
  color-scheme: light;
  --bg: #f6f0e6;
  --paper: #fffaf2;
  --paper-strong: #fffdf8;
  --panel: rgba(255, 250, 242, 0.86);
  --panel-strong: #fffaf2;
  --text: #29251f;
  --muted: #817568;
  --line: #e3d8c8;
  --accent: #bf7f2f;
  --accent-2: #1f6f99;
  --olive: #687f55;
  --danger: #b95b4c;
  --shadow: 0 22px 60px rgba(72, 55, 38, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 250, 242, 0.95), transparent 28rem),
    radial-gradient(circle at 84% 8%, rgba(183, 201, 214, 0.55), transparent 24rem),
    linear-gradient(155deg, #f6f0e6 0%, #efe2cf 58%, #fff8ec 100%),
    var(--bg);
  color: var(--text);
  font-family: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(91, 158, 196, 0.42);
  outline-offset: 2px;
}

.hidden { display: none !important; }

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 250, 242, 0.98), transparent 34%),
    linear-gradient(155deg, #f6f0e6 0%, #efe2cf 62%, #fff8ec 100%);
  opacity: 1;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.app-ready .app-splash {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.splash-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(340px, 100%);
  text-align: center;
}

.splash-icon {
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 18px 34px rgba(72, 55, 38, 0.16));
}

.splash-card h1 {
  margin: 0;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.splash-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 34px) 80px;
}

.topbar, .drawer-head, .editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 30;
  display: flex;
  justify-content: space-between;
  padding: 0;
  pointer-events: none;
}
.topbar-left { display: flex; gap: 10px; align-items: center; }

.brand { display: grid; gap: 2px; }
.brand strong { font-size: 18px; letter-spacing: 0.02em; }
.brand-kicker { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }

.icon-btn, .favorite-fab, .favorite-btn, .font-tools button, .chip, .admin-actions button, .editor-actions button, .wizard-actions button, .color-btn, .line-play {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.86);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(72, 55, 38, 0.07);
}

.icon-btn {
  width: 42px;
  height: 42px;
  font-size: 22px;
}
.edge-tab {
  position: fixed;
  top: 50vh;
  z-index: 35;
  width: 22px;
  height: 64px;
  transform: translateY(-50%);
  border: 1px solid rgba(129, 117, 104, 0.28);
  background: rgba(255, 250, 242, 0.72);
  color: var(--accent-2);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(72, 55, 38, 0.1);
  pointer-events: auto;
}
.edge-tab-left {
  left: max(0px, env(safe-area-inset-left));
  border-radius: 0 14px 14px 0;
  border-left: 0;
}
.edge-tab-right {
  right: max(0px, env(safe-area-inset-right));
  border-radius: 14px 0 0 14px;
  border-right: 0;
}
.menu-fab { box-shadow: 0 12px 28px rgba(72, 55, 38, 0.18); }
.favorite-fab {
  width: 46px;
  height: 46px;
  border-color: rgba(191, 127, 47, 0.34);
  background: linear-gradient(135deg, #fff7e8, #f3d7a7);
  color: #9a621e;
  font-size: 28px;
  font-weight: 900;
}
.favorite-fab.active { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fffaf2; }

.admin-badge {
  border: 1px solid rgba(91, 158, 196, 0.34);
  border-radius: 999px;
  background: #ecf8ff;
  color: #1f6f99;
  padding: 7px 10px;
  font-size: 12px;
  text-transform: uppercase;
}

.reader {
  border: 0;
  border-radius: 0;
  padding: clamp(18px, 4vw, 40px) 0;
  background: transparent;
  box-shadow: none;
}

.song-artist { margin: 0 0 7px; color: var(--muted); }

.favorite-btn {
  min-width: 50px;
  height: 50px;
  font-size: 28px;
}
.song-actions { display: flex; align-items: center; gap: 10px; }
.edit-song-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.86);
  color: var(--text);
  min-height: 44px;
  padding: 12px 15px;
}
.favorite-btn.active, .admin-actions button.active { color: #7a4c17; border-color: rgba(191, 127, 47, 0.6); background: #fff0d8; }
.favorite-btn.locked { opacity: 0.5; cursor: not-allowed; }
button:disabled { opacity: 0.48; cursor: not-allowed; }

.font-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  flex-wrap: wrap;
}
.font-tools button { padding: 6px 11px; }
.scroll-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 250, 242, 0.78);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.scroll-toggle input {
  width: 28px;
  height: 16px;
  margin: 0;
  accent-color: #d85b91;
}
.scroll-speed-input {
  width: 58px;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 999px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}
.scroll-speed-control { display: inline-flex; align-items: center; gap: 4px; }
.scroll-speed-control button {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 8px;
  color: #1f6f99;
  border: 1px solid rgba(91, 158, 196, 0.34);
  background: linear-gradient(135deg, #ecf8ff, #b9def7);
  font-size: 15px;
  font-weight: 900;
}

.lyrics { display: grid; gap: 14px; font-size: var(--lyrics-font, 22px); line-height: 1.42; }
.section { display: grid; gap: 5px; }
.section + .section { margin-top: 5px; padding-top: 15px; border-top: 1px solid rgba(129, 117, 104, 0.22); }
.section-header { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; }
.line-play {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(72, 55, 38, 0.06);
}
.line { display: flex; align-items: flex-start; gap: 6px; padding: 0; }
.line-text { flex: 1; }
.word { border: 0; background: transparent; color: inherit; padding: 0 1px; border-radius: 6px; }
.word:hover, .word:focus-visible { background: rgba(191, 127, 47, 0.13); color: #7a4c17; }

.empty-state {
  min-height: 62vh;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  color: var(--muted);
}
.empty-state h1 { margin: 0; color: var(--text); font-size: clamp(30px, 7vw, 54px); letter-spacing: -0.055em; }
.empty-state p { max-width: 420px; margin: 0; line-height: 1.5; }

.drawer-backdrop, .word-backdrop, .editor-backdrop, .folder-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(47, 47, 45, 0.2);
  backdrop-filter: blur(4px);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: min(420px, 100%);
  padding: 16px;
  font-size: 16px;
  overflow: auto;
  background: rgba(255, 250, 242, 0.98);
  border-left: 1px solid var(--line);
  box-shadow: -26px 0 80px rgba(72, 55, 38, 0.2);
}
.left-drawer {
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  border-left: 0;
  box-shadow: 26px 0 80px rgba(72, 55, 38, 0.2);
}
.right-drawer { inset: 0 0 0 auto; }
.admin-drawer { width: min(460px, 100%); }
.drawer h2, .drawer h3 { margin: 0; }
.drawer h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-item { display: grid; justify-items: center; gap: 7px; min-width: 0; border: 0; background: transparent; padding: 0; text-align: center; }
button.stat-item { cursor: pointer; }
.stat-orb {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 999px;
  padding: 8px 5px;
  text-align: center;
  color: #fffaf2;
  box-shadow: 0 14px 28px rgba(72, 55, 38, 0.12);
}
.stat-orb strong { font-size: clamp(20px, 7vw, 34px); line-height: 0.95; letter-spacing: -0.05em; }
.stat-orb.digits-4 strong { font-size: clamp(17px, 5.8vw, 28px); letter-spacing: -0.06em; }
.stat-orb.digits-5 strong { font-size: clamp(15px, 4.8vw, 23px); letter-spacing: -0.07em; }
.stat-orb.digits-6 strong { font-size: clamp(13px, 4vw, 19px); letter-spacing: -0.08em; }
.stat-item span { max-width: 86px; font-size: 9px; font-weight: 900; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-translated .stat-orb { background: linear-gradient(135deg, #77b7df, #1f6f99); }
.stat-phonetic .stat-orb { background: linear-gradient(135deg, #8dbb75, #4d7f43); }
.stat-temporary .stat-orb { background: linear-gradient(135deg, #f0bf62, #c47a2c); }
.stat-untranslated .stat-orb { background: linear-gradient(135deg, #d9708d, #a34262); }
.stat-translated span { color: #1f6f99; }
.stat-phonetic span { color: #4d7f43; }
.stat-temporary span { color: #c47a2c; }
.stat-untranslated span { color: #a34262; }
.admin-log-panel { max-height: min(58vh, 560px); overflow: auto; }
.admin-log-list { display: grid; gap: 8px; margin-top: 10px; }
.log-entry {
  border: 1px solid rgba(185, 91, 76, 0.2);
  border-radius: 14px;
  padding: 9px;
  background: rgba(255, 250, 242, 0.78);
}
.log-entry strong { display: block; color: #8a3d32; font-size: 13px; line-height: 1.25; }
.log-entry small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.log-entry pre { margin: 6px 0 0; max-height: 120px; overflow: auto; white-space: pre-wrap; color: #5d5145; font-size: 11px; line-height: 1.35; }
.admin-word-dialog { top: max(10px, env(safe-area-inset-top)); bottom: max(10px, env(safe-area-inset-bottom)); max-height: none; display: grid; grid-template-rows: auto auto auto auto 1fr; }
.admin-word-list { display: grid; align-content: start; gap: 7px; min-height: 0; overflow: auto; }
.admin-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 8px 10px;
  background: rgba(255, 253, 248, 0.78);
}
.admin-word-row strong { font-size: 16px; }
.admin-word-row small { color: var(--muted); font-size: 12px; text-align: right; }

.panel-block {
  margin-top: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.74);
}
.panel-block + .panel-block { border-top-color: rgba(129, 117, 104, 0.28); }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.primary-btn, .danger-btn, .color-btn, .door-btn {
  border: 0;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 13px;
  color: #1f6f99;
  background: linear-gradient(135deg, #ecf8ff, #b9def7);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(77, 142, 181, 0.14);
}
.auth-icon-row { display: flex; justify-content: center; padding: 6px 0 2px; }
.door-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 23px;
  background: linear-gradient(135deg, #f0a846, #bf7f2f);
}
.door-btn.active { background: linear-gradient(135deg, #ecf8ff, #b9def7); color: #1f6f99; }
.danger-btn { background: linear-gradient(135deg, #d9705f, #a34235); color: #fffaf2; box-shadow: 0 12px 28px rgba(185, 91, 76, 0.22); }
.folder-create-btn { background: linear-gradient(135deg, #f0a846, #bf7f2f); color: #fffaf2; box-shadow: 0 12px 28px rgba(191, 127, 47, 0.22); }
.edit-btn { background: linear-gradient(135deg, #ecf8ff, #b9def7); color: #1f6f99; }
.admin-actions button:nth-child(1) { background: linear-gradient(135deg, #ecf8ff, #b9def7); color: #1f6f99; border: 0; }
.admin-actions button:nth-child(2) { background: linear-gradient(135deg, #f0a846, #bf7f2f); color: #fffaf2; border: 0; }
.wide { width: 100%; }
.inline-form, .admin-actions, .quick-filters, .editor-actions { display: flex; gap: 10px; flex-wrap: wrap; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-strong);
  color: var(--text);
  padding: 10px 12px;
}
.field-label { display: block; margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.inline-form input { flex: 1; min-width: 160px; }
.search-input { margin-bottom: 12px; }
.chip { padding: 8px 13px; color: var(--muted); }
.chip.active { border-color: rgba(91, 158, 196, 0.42); background: #ecf8ff; color: #1f6f99; }
.error-text { margin: 8px 0 0; color: var(--danger); font-size: 13px; }

.folder-tree, .song-list { display: grid; gap: 5px; }
.folder-btn, .song-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 11px;
  min-height: 34px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--text);
  padding: 6px 9px;
  text-align: left;
  font-size: 16px;
}
.folder-btn { display: flex; align-items: center; justify-content: flex-start; gap: 7px; }
.folder-btn.active, .song-btn.active { border-color: rgba(191, 127, 47, 0.42); background: #fff0d8; }
.song-row.active .song-btn { border-color: rgba(191, 127, 47, 0.42); background: #fff0d8; }
.song-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-row, .song-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.folder-row .folder-btn { flex: 1; }
.song-row .song-btn { flex: 1; min-width: 0; }
.mini-btn { min-width: 28px; min-height: 28px; border: 1px solid var(--line); border-radius: 999px; background: rgba(241, 231, 216, 0.62); color: var(--text); padding: 2px 6px; font-size: 15px; font-weight: 900; box-shadow: none; }
.create-mini { color: #fffaf2; border: 0; background: linear-gradient(135deg, #f0a846, #bf7f2f); }
.danger-mini { color: #8a3d32; background: #f7dfda; border-color: rgba(185, 91, 76, 0.28); }
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4a6c4, #d85b91);
  color: #fffaf2;
  font-size: 10px;
  font-weight: 900;
}
.compact-status { margin: 4px 2px; }

.word-sheet, .editor, .folder-dialog, .song-wizard {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  width: min(560px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.98);
  box-shadow: var(--shadow);
  padding: 18px;
}
.word-sheet { display: grid; gap: 8px; padding: 14px; }
.word-sheet h2 { margin: 0; font-size: clamp(32px, 10vw, 46px); line-height: 0.95; letter-spacing: -0.055em; }
.phonetic { margin: 0; color: var(--accent-2); font-size: clamp(20px, 6vw, 28px); line-height: 1.1; }
.word-translation { margin: 0; color: var(--text); font-size: 18px; font-weight: 900; line-height: 1.2; }
.status-text { min-height: 22px; color: var(--muted); }
.word-sheet .status-text { min-height: 0; margin: 0; font-size: 13px; }
.word-sheet .primary-btn { justify-self: start; min-height: 42px; padding: 9px 16px; }
.sheet-close { position: absolute; top: 14px; right: 14px; }

.editor { top: 24px; bottom: 24px; overflow: auto; }
.song-wizard {
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
  overflow: auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(18px, 5vw, 44px) max(22px, env(safe-area-inset-bottom));
}
.folder-dialog {
  bottom: max(14px, env(safe-area-inset-bottom));
  max-height: min(74vh, 520px);
  overflow: auto;
}
.song-form { display: grid; gap: 14px; }
.song-form label { display: grid; gap: 7px; color: var(--muted); }
.song-form textarea { min-height: 320px; resize: vertical; line-height: 1.5; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.check-label input { width: auto; }
.folder-dialog { display: grid; gap: 14px; align-content: start; }
.folder-form { display: grid; gap: 12px; }
.folder-form label { color: var(--muted); font-size: 12px; font-weight: 800; }
.choice-actions { display: grid; gap: 12px; align-content: start; }
.choice-actions button { width: min(280px, 100%); min-height: 42px; justify-self: center; }
.song-wizard { align-content: start; gap: 24px; }
.song-wizard-form { display: grid; gap: 18px; }
.wizard-step { display: grid; gap: 12px; }
.wizard-step label { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; }
.wizard-step input, .wizard-step textarea {
  min-height: 58px;
  border-radius: 22px;
  font-size: clamp(20px, 5vw, 30px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76), 0 14px 34px rgba(72, 55, 38, 0.08);
}
.folder-form input {
  min-height: 44px;
  border-radius: 16px;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76), 0 10px 24px rgba(72, 55, 38, 0.06);
}
.wizard-step textarea { min-height: 52vh; font-size: 18px; line-height: 1.45; }
.wizard-actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.wizard-actions button { min-height: 48px; padding: 0 18px; font-weight: 900; }
.compact-actions { align-items: center; }
.compact-actions button { min-height: 40px; padding: 8px 14px; }
.confirm-text { margin: 0; color: var(--muted); line-height: 1.45; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 12px 16px;
  background: #29251f;
  color: #fffaf2;
  box-shadow: 0 18px 50px rgba(72, 55, 38, 0.24);
}

@media (max-width: 640px) {
  .shell { padding: 14px 22px 42px; }
  .reader { border-radius: 0; padding: 12px 0; }
  .lyrics { line-height: 1.42; gap: 12px; }
  .line { gap: 5px; }
  .line-play { flex-basis: 28px; width: 28px; height: 28px; font-size: 11px; }
  .drawer { padding: 14px; }
  .word-sheet, .editor { border-radius: 24px 24px 0 0; bottom: 0; width: 100%; }
  .folder-dialog { bottom: 0; width: 100%; border-radius: 22px 22px 0 0; max-height: 76vh; }
  .song-wizard { border-radius: 0; }
  .editor { top: 12px; }
}

html, body { overscroll-behavior: none; }
body { overflow: hidden; }
.shell { height: 100dvh; padding: 18px clamp(18px, 4vw, 34px) max(18px, env(safe-area-inset-bottom)); }
.reader {
  display: grid;
  grid-template-rows: auto 1fr;
  height: calc(100dvh - 36px - env(safe-area-inset-bottom));
  padding: 0;
}
.song-frame-title { margin: 0 0 8px 6px; color: var(--accent); }
.reader-frame {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.55);
  padding: 14px;
}
.lyrics { gap: 10px; line-height: 1.34; }
.section { gap: 3px; }
.section + .section { margin-top: 3px; padding-top: 10px; }
.line { gap: 5px; }
.line-play { flex: 0 0 26px; width: 26px; height: 26px; font-size: 10px; }
.drawer { overscroll-behavior: contain; }
.tools-panel { padding: 6px; }
.font-tools { gap: 6px; margin: 0; flex-wrap: nowrap; }
.font-tools button { min-height: 30px; padding: 4px 9px; font-size: 13px; }
.scroll-toggle { min-height: 30px; padding: 3px 7px; }
.scroll-toggle span { font-size: 16px; line-height: 1; }
.scroll-speed-input { width: 42px; min-height: 30px; padding: 4px 5px; }
.scroll-speed-control { gap: 3px; }
.scroll-speed-control button { min-width: 28px; min-height: 30px; padding: 3px 7px; }
.door-btn, .door-btn.active {
  width: 32px;
  height: 32px;
  margin-left: auto;
  background: linear-gradient(135deg, #ecf8ff, #b9def7);
  color: #1f6f99;
  border: 1px solid rgba(91, 158, 196, 0.34);
  box-shadow: 0 8px 18px rgba(77, 142, 181, 0.14);
}
.panel-block { margin-top: 8px; padding: 7px; }
.search-input { margin-bottom: 0; }
.folder-tree, .song-list { gap: 3px; }
.folder-btn, .song-btn { min-height: 31px; padding: 5px 8px; }
.folder-dialog { top: max(14px, env(safe-area-inset-top)); bottom: auto; max-height: min(74vh, 520px); }
.folder-form { gap: 8px; }
.folder-form input { min-height: 40px; }
.editor-actions button, .wizard-actions button { color: #1f6f99; border: 0; background: linear-gradient(135deg, #ecf8ff, #b9def7); }
.editor-actions button[type="button"], .wizard-actions button[type="button"] { background: linear-gradient(135deg, #f0a846, #bf7f2f); color: #fffaf2; }
.song-pager { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.song-pager button {
  border: 0;
  border-radius: 999px;
  min-width: 78px;
  min-height: 42px;
  color: #1f6f99;
  background: linear-gradient(135deg, #ecf8ff, #b9def7);
  border: 1px solid rgba(91, 158, 196, 0.34);
  box-shadow: 0 8px 18px rgba(77, 142, 181, 0.14);
  font-size: 24px;
  font-weight: 900;
}
.song-pager .pager-edit-btn { min-width: 58px; }
.youtube-block { margin-top: 12px; }
.youtube-block iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; }
.drag-mode { outline: 2px dashed rgba(216, 91, 145, 0.42); border-radius: 12px; }
.drag-mode .song-btn, .drag-mode .folder-btn { cursor: grab; }

@media (max-width: 640px) {
  .shell { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
  .reader { height: calc(100dvh - 24px - env(safe-area-inset-bottom)); padding: 0; }
  .reader-frame { padding: 11px; border-radius: 18px; }
  .lyrics { line-height: 1.34; gap: 9px; }
  .line { gap: 4px; }
  .line-play { flex-basis: 24px; width: 24px; height: 24px; font-size: 10px; }
  .folder-dialog { top: max(10px, env(safe-area-inset-top)); bottom: auto; width: calc(100% - 20px); border-radius: 22px; max-height: 58vh; }
  .admin-word-dialog { top: max(10px, env(safe-area-inset-top)); bottom: max(10px, env(safe-area-inset-bottom)); max-height: none; }
}
