:root {
  --bg: #08162f;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-solid: #ffffff;
  --ink: #14233d;
  --muted: #64748b;
  --line: #e4ecfb;
  --blue: #2f7dff;
  --blue-deep: #1a5cff;
  --purple: #7c5cff;
  --pink: #ff5ad9;
  --yellow: #ffe14d;
  --coral: #ff5d6c;
  --mint: #24e2a0;
  --shadow: 0 18px 50px rgba(8, 22, 47, 0.18);
  --shadow-soft: 0 10px 28px rgba(20, 40, 80, 0.08);
  --radius: 24px;
  --glass: rgba(255, 255, 255, 0.14);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body, #app {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: #cfe0ff; }

body {
  overflow-x: hidden;
  background:
    radial-gradient(1100px 640px at -8% -18%, #2a63ff 0%, transparent 58%),
    radial-gradient(820px 540px at 108% 4%, #c44bff 0%, transparent 52%),
    radial-gradient(720px 460px at 78% 112%, #00c6ff 0%, transparent 48%),
    #08162f;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255,255,255,0.16) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
}

.blob, .blob-2, .blob-3 {
  position: fixed;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
.blob {
  width: 38vw;
  height: 38vw;
  left: -10vw;
  top: -12vw;
  background: #3d82ff;
  animation: drift 18s ease-in-out infinite;
}
.blob-2 {
  width: 30vw;
  height: 30vw;
  right: -8vw;
  top: 10vh;
  background: #e14dff;
  animation: drift 22s ease-in-out infinite reverse;
}
.blob-3 {
  width: 24vw;
  height: 24vw;
  right: 16vw;
  bottom: -12vw;
  background: #ffe14d;
  animation: drift 20s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(22px, -18px) scale(1.05); }
}

.auth-wrap, .shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.shell {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 18px;
  padding: 18px 24px 24px;
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, #6ee7ff, #7c5cff 52%, #ff7ad9);
  box-shadow: 0 10px 22px rgba(90, 120, 255, 0.38);
  position: relative;
}
.mark::after {
  content: "";
  position: absolute;
  inset: 11px 9px 9px 11px;
  border-radius: 7px;
  background: #fff;
  transform: rotate(-10deg);
}

.hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), transparent 42%),
    linear-gradient(120deg, #2ea7ff 0%, #5b6dff 40%, #b24bff 76%, #ff6ad4 100%);
  background-size: 160% 160%;
  animation: sheen 14s ease infinite;
  color: #fff;
  border-radius: 30px;
  padding: 28px 32px;
  box-shadow: 0 22px 48px rgba(40, 70, 210, 0.28);
  position: relative;
  overflow: hidden;
  min-height: 176px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255,255,255,0.18);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.hero::before { width: 240px; height: 240px; right: -70px; top: -90px; }
.hero::after { width: 150px; height: 150px; right: 150px; bottom: -80px; background: rgba(255, 225, 77, 0.22); }
@keyframes sheen {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-copy { position: relative; z-index: 1; max-width: 70%; }
.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 8px;
  font-weight: 700;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.04em; font-weight: 780; }
.hero p { margin: 0 0 16px; opacity: 0.94; font-size: 15px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }

.stats {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.stat {
  min-width: 96px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(14px);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.stat b { display: block; font-size: 30px; line-height: 1; letter-spacing: -0.04em; }
.stat span { font-size: 12px; opacity: 0.86; }

.card {
  background: var(--paper-solid);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-wrap {
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 34px 32px 30px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(18px);
}
.auth-card h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -0.03em; }
.auth-card p { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.auth-wrap .logo { position: absolute; top: 24px; left: 24px; }

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  background: #f3f6ff;
  border-radius: 999px;
  width: fit-content;
}
.tab, .btn, .ghost { border: 0; background: transparent; }
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
}
.tab.active {
  background: #fff;
  color: var(--blue-deep);
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(47, 125, 255, 0.12);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 12px; color: var(--muted); font-weight: 700; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8faff;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
input:focus, select:focus {
  background: #fff;
  border-color: #9bbcff;
  box-shadow: 0 0 0 4px rgba(47, 125, 255, 0.12);
}

.btn {
  background: linear-gradient(180deg, #4d8fff, var(--blue));
  color: white;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 750;
  box-shadow: 0 10px 20px rgba(47, 125, 255, 0.26);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn.yellow {
  background: linear-gradient(180deg, #fff3a0, var(--yellow));
  color: #3a2d00;
  box-shadow: 0 10px 20px rgba(255, 225, 77, 0.28);
}
.btn.coral { background: var(--coral); }
.btn.full { width: 100%; }
.btn.light {
  background: rgba(255,255,255,0.16);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.28);
}
.btn.tiny {
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: 0 6px 14px rgba(47, 125, 255, 0.18);
}
.ghost {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--glass);
  color: #fff;
  backdrop-filter: blur(10px);
  font-weight: 650;
}
.panel .ghost, .modal .ghost, .calendar-sheet .ghost {
  border-color: var(--line);
  background: #f7f9ff;
  color: var(--ink);
}

.error {
  background: #fff1f1;
  color: #c24141;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 12px;
  font-size: 13px;
  border: 1px solid #ffd4d4;
}
.success {
  background: #ecfdf5;
  color: #047857;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 12px;
  font-size: 13px;
  border: 1px solid #a7f3d0;
}

.lists {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}
.panel {
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
}
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.section-title .label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.section-title .hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.badge-count {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f7dff, #7c5cff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 16px rgba(80, 110, 255, 0.22);
}
.list-scroll {
  overflow: auto;
  max-height: 42vh;
  padding-right: 4px;
}
.list-all { overflow: visible; }

.item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  margin: 0 0 10px;
  border-radius: 18px;
  background: #f6f9ff;
  border: 1px solid #edf2ff;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: #b8c9ef;
}
.item:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.item.p4 { background: linear-gradient(90deg, #fff1f4, #fff); }
.item.p4::before { background: var(--coral); }
.item.p3 { background: linear-gradient(90deg, #fff8e8, #fff); }
.item.p3::before { background: #f59e0b; }
.item.p2 { background: linear-gradient(90deg, #f4eeff, #fff); }
.item.p2::before { background: var(--purple); }
.item.done { opacity: 0.7; }
.item.done .title { text-decoration: line-through; color: var(--muted); }
.title { font-weight: 760; font-size: 15px; letter-spacing: -0.01em; }
.meta { font-size: 12px; color: var(--muted); margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 28px 8px;
  text-align: center;
  background: linear-gradient(180deg, #f8faff, #fff);
  border: 1px dashed #dbe6fb;
  border-radius: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
}
.tag.urgent { background: #ffe1e4; color: #c24141; }
.tag.important { background: #ece4ff; color: #6d28d9; }
.tag.type { background: #e4f1ff; color: #1a5cff; }

.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #eaf2ff;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff, #2f7dff);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.who b { font-weight: 700; }

.modal.wide { width: min(920px, 100%); }
.user-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.user-list { max-height: 52vh; overflow: auto; }
.modal h3 { margin: 0 0 12px; font-size: 16px; }

.recent { min-height: 140px; }

.calendar-layer {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 42, 0.58);
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 18px;
  backdrop-filter: blur(12px);
}
.calendar-sheet {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.cal-head h2 { margin: 0; letter-spacing: -0.03em; }
.weekdays, .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.days { flex: 1; }
.weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 0;
  font-weight: 750;
}
.day {
  min-height: 0;
  height: 100%;
  border: 1px solid transparent;
  background: #f6f9ff;
  border-radius: 16px;
  padding: 8px;
  text-align: left;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.day:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.day.out { opacity: 0.28; }
.day.off { background: #fff6df; }
.day.work { background: #e5f5ff; }
.day.holiday .n, .day.holiday .lunar { color: var(--coral); }
.day.today { border-color: #9bbcff; background: linear-gradient(180deg, #e8f4ff, #f7fbff); }
.day.selected { outline: 2px solid #7c5cff; outline-offset: 0; box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16); }
.day .n { font-size: 16px; font-weight: 800; }
.lunar { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.2; }
.dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #f5c518; }
.dot.done { background: var(--mint); }
.dot.p4 { background: var(--coral); }
.dot.p3 { background: #f59e0b; }
.dot.p2 { background: var(--purple); }

.legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; margin: 8px 0 12px; }
.selected-day { margin-top: 12px; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 42, 0.52);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 40;
  backdrop-filter: blur(10px);
}
.modal {
  width: min(560px, 100%);
  max-height: min(92vh, 920px);
  max-height: min(92dvh, 920px);
  background: var(--paper-solid);
  border-radius: 28px 28px 16px 16px;
  padding: 18px 18px 12px;
  box-shadow: var(--shadow);
  animation: pop 0.32s cubic-bezier(.2,1.2,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal h2 { margin: 0 0 10px; flex: 0 0 auto; letter-spacing: -0.03em; }
.modal-body {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}
.modal-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  background: var(--paper-solid);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-row .field { margin-bottom: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f3f6ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}
.check.hot { background: #ffe8e8; color: #c24141; }
.check.star { background: #ece4ff; color: #6d28d9; }

.remind-back {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 42, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
  backdrop-filter: blur(12px);
}
.remind-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  animation: pop 0.32s cubic-bezier(.2,1.2,.2,1);
  text-align: center;
}
.remind-kicker {
  display: inline-block;
  background: linear-gradient(135deg, #2f7dff, #ff5ad9);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.remind-card h2 { margin: 8px 0 10px; font-size: 26px; letter-spacing: -0.03em; }
.remind-card p { margin: 0 0 18px; color: var(--muted); }

@keyframes pop {
  from { transform: translateY(12px) scale(.985); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 768px) {
  .modal-back { align-items: center; }
  .modal { border-radius: 24px; }
}

@media (max-width: 767px) {
  .shell {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto auto auto auto;
    padding: 12px 12px 22px;
    gap: 12px;
  }
  .lists { grid-template-columns: 1fr; }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 22px 18px;
    border-radius: 24px;
  }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: 28px; }
  .day { min-height: 72px; }
  .recent { max-height: none; }
  .calendar-layer { padding: 8px; }
  .user-grid { grid-template-columns: 1fr; }
  .userbox { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .modal { max-height: 92dvh; }
  .item { flex-direction: column; }

  .player-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    height: auto;
    border-radius: 18px;
    bottom: 10px;
    left: 10px;
    right: 10px;
  }
  .player-track {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .player-cover { width: 44px; height: 44px; border-radius: 12px; }
  .player-cover .cover-glyph { font-size: 18px; }
  .player-meta { min-width: 0; }
  .player-title { font-size: 13px; }
  .player-sub { font-size: 11px; }
  .player-track .ghost.mini { padding: 4px 8px; font-size: 12px; flex: 0 0 auto; }

  .player-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 0;
  }
  .player-controls > .ctrl,
  .player-controls > .ctrl.ghost-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .player-controls > .ctrl.primary {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .player-progress {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .player-progress input[type=range] { width: 100%; min-width: 0; }
  .player-progress .time { font-size: 10px; min-width: 36px; }

  .player-side {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
  }
  .player-side .vol-icon { font-size: 12px; }
  .player-side input[type=range] { flex: 1 1 auto; min-width: 0; width: auto; }
}

@media (max-width: 380px) {
  .player-cover { width: 38px; height: 38px; }
  .player-title { font-size: 12px; }
}

/* ----- Music Player ----- */
.player-bar {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  height: 84px;
  border-radius: 24px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 18px 40px rgba(8, 22, 47, 0.22);
  color: var(--ink);
}
.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-cover {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6ee7ff, #7c5cff 50%, #ff7ad9);
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(124, 92, 255, 0.32);
  position: relative;
  overflow: hidden;
}
.player-cover::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.45);
}
.cover-glyph { font-size: 22px; font-weight: 800; }
.player-meta { min-width: 0; }
.player-title { font-weight: 780; font-size: 14px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-controls { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ctrl {
  border: 0;
  background: transparent;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.15s ease, transform 0.15s ease;
}
.ctrl:hover { background: #eef4ff; }
.ctrl.primary {
  background: var(--blue);
  color: #fff;
  width: 42px;
  height: 42px;
  box-shadow: 0 10px 22px rgba(47, 125, 255, 0.3);
  font-size: 17px;
}
.ctrl.primary:hover { filter: brightness(1.06); }
.ctrl.ghost-btn.on { color: var(--blue-deep); background: #e8f1ff; }
.player-progress { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.player-progress input[type=range] { flex: 1 1 auto; }
.player-progress .time { font-size: 11px; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.player-side { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.player-side input[type=range] { width: 120px; }
.vol-icon { color: var(--muted); }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 24px;
  padding: 0;
  border-radius: 0;
  border: 0;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f7dff 0%, #2f7dff var(--val,0%), #dbe7ff var(--val,0%), #dbe7ff 100%);
}
input[type=range]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #dbe7ff;
}
input[type=range]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #2f7dff;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2f7dff;
  margin-top: -5px;
  box-shadow: 0 2px 6px rgba(47, 125, 255, 0.4);
}
input[type=range]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2f7dff;
  box-shadow: 0 2px 6px rgba(47, 125, 255, 0.4);
}

.ghost.mini {
  padding: 5px 10px;
  font-size: 12px;
  background: #f1f5ff;
  border-color: #dbe7ff;
  color: var(--ink);
}
.ghost.mini.danger {
  background: #fff1f3;
  border-color: #ffd9df;
  color: #c81d4a;
}
.ghost.mini.danger:hover {
  background: #ffe1e6;
}
.btn.mini {
  padding: 5px 12px;
  font-size: 12px;
}

.modal-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.modal-head-row h2 { margin: 0; }

.track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: #f6f9ff;
  border: 1px solid #edf2ff;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.track:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.track.active {
  background: linear-gradient(90deg, #e7efff, #f7faff);
  border-color: #c6d4ff;
}
.track-no {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  flex: 0 0 auto;
}
.track.active .track-no {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.track-meta { min-width: 0; flex: 1 1 auto; }
.track-title { font-weight: 750; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-actions { display: flex; gap: 6px; flex: 0 0 auto; }

/* Reserve space for fixed player */
.shell { padding-bottom: 130px; }
@media (max-width: 767px) {
  .shell { padding-bottom: 200px; }
}

.field-row-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.field-row-inline input { flex: 1 1 auto; min-width: 0; }
.field-row-inline button { flex: 0 0 auto; padding: 9px 14px; font-size: 13px; }
.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.field-hint code {
  background: #eef2ff;
  color: var(--blue-deep);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.parse-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f7 0%, #f3eaff 60%, #e8f4ff 100%);
  border: 1px solid #e9dfff;
  margin: 6px 0 10px;
  align-items: center;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.08);
}
.parse-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 6px 14px rgba(8, 22, 47, 0.18);
  background: linear-gradient(135deg, #ff7ad9, #7c5cff);
}
.parse-cover.placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.parse-meta { min-width: 0; flex: 1 1 auto; }
.parse-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #6e3aff;
  background: rgba(124, 92, 255, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.parse-title {
  font-weight: 780;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.parse-artist {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.parse-meta button { margin-top: 6px; }
.parse-hint {
  font-size: 11px;
  color: #6e3aff;
  margin-top: 4px;
  font-weight: 600;
}
.parse-card.added {
  background: linear-gradient(135deg, #ecfff5 0%, #e6f6ff 60%, #eef3ff 100%);
  border-color: #c7eedb;
  box-shadow: 0 6px 18px rgba(46, 184, 131, 0.16);
  animation: parse-pop 0.32s ease;
}
.parse-card.added .parse-tag {
  background: rgba(46, 184, 131, 0.15);
  color: #1c8a55;
}
@keyframes parse-pop {
  0% { transform: scale(0.96); opacity: 0.4; }
  60% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.batch-section {
  margin-top: 12px;
  padding: 14px;
  border: 1.5px dashed #d8d2eb;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(247, 245, 255, 0.7), rgba(255, 245, 248, 0.7));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.batch-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.batch-title {
  font-weight: 700;
  color: #4338ca;
  font-size: 14px;
}
.batch-hint {
  color: #6b7280;
  font-size: 12px;
}
.batch-section .field-row-inline { width: 100%; }
.batch-section .field-row-inline input { flex: 1 1 auto; min-width: 0; }
.batch-section .field-row-inline button { flex: 0 0 auto; }
.parse-list-preview {
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(67, 56, 202, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 6px;
  font-size: 13px;
}
.parse-list-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(67, 56, 202, 0.1);
}
.parse-list-row:last-child { border-bottom: none; }
.parse-list-num {
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.parse-list-title {
  color: #1f2937;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parse-list-artist {
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.parse-list-more {
  padding: 6px 0 4px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}
@media (max-width: 480px) {
  .parse-list-artist { display: none; }
  .parse-list-row { grid-template-columns: 24px 1fr; }
}

.backup-section {
  margin-top: 18px;
  padding: 14px;
  border: 1.5px dashed #d8d2eb;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(247, 245, 255, 0.7), rgba(255, 245, 248, 0.7));
}
.backup-title {
  font-weight: 700;
  color: #4338ca;
  font-size: 14px;
  margin-bottom: 4px;
}
.backup-hint {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 8px;
}
.backup-mode {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(67, 56, 202, 0.18);
}
.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
}
.field-inline input[type=radio] {
  margin: 0;
}
