/* Dark theme with a cool blue accent. Mobile-first; motion is short and eased,
   and switched off for users who ask for reduced motion. */
:root {
  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1b2129;
  --surface-3: #232b35;
  --input: #10141a;
  --border: #222a34;
  --border-strong: #2f3946;
  --text: #e6eaf0;
  --text-strong: #f5f7fa;
  --muted: #8691a1;
  --faint: #5d6877;
  --accent: #6aa6ff;          /* text, outlines, indicators on dark */
  --accent-fill: #2f78f0;     /* filled buttons, white text on top */
  --accent-fill-hover: #3b84f7;
  --accent-soft: rgba(106, 166, 255, .12);
  --accent-ring: rgba(106, 166, 255, .28);
  --danger: #f2707a;
  --danger-soft: rgba(242, 112, 122, .1);
  --warn: #d9b45a;
  --r-card: 14px;
  --r-input: 10px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --t-fast: .16s;
  --t: .28s;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--accent-ring); }

.ico {
  width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block;
}

.app { max-width: 720px; margin: 0 auto; padding: 18px 14px 0; }
.page-title { margin: 2px 2px 16px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; color: var(--text-strong); }

/* Tabs: segmented control with a sliding indicator */
.tabbar {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; margin-bottom: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
}
.tab-ind {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3);
  background: var(--surface-3); border-radius: 9px;
  transition: transform var(--t) var(--ease);
}
.tab-btn {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; min-width: 0; padding: 9px 6px; background: none; border: 0; border-radius: 9px;
  color: var(--muted); cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: color var(--t-fast) var(--ease);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text-strong); }
.tab-done { width: 14px; height: 14px; color: var(--accent); stroke-width: 2.4; display: none; }
.tab-btn.done .tab-done { display: block; animation: pop-in var(--t) var(--ease); }

.content { min-width: 0; }
.content.enter > * { animation: rise .32s var(--ease) both; }
.content.enter > *:nth-child(2) { animation-delay: .03s; }
.content.enter > *:nth-child(3) { animation-delay: .06s; }
.content.enter > *:nth-child(n+4) { animation-delay: .09s; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px; margin-bottom: 10px; scroll-margin-top: 14px;
}
.card.card-plain { background: none; border: 0; padding: 0; }
.card-title { margin: 0 0 14px; font-size: 17px; font-weight: 650; color: var(--text-strong); }
.card-body:empty { display: none; }
.placeholder { color: var(--muted); font-size: 14px; padding: 18px 4px; text-align: center; }

/* Fields */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.help { display: none; }
.input, .select {
  width: 100%; padding: 11px 13px; background: var(--input);
  border: 1px solid var(--border-strong); border-radius: var(--r-input); outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover { border-color: #3a4655; }
.input:focus, .select:focus, .input.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.select option { background: var(--surface); color: var(--text); }
.input:disabled, .input.disabled { opacity: .45; cursor: not-allowed; }

/* Checkbox / radio */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio, .checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; position: relative; user-select: none; }
.native { position: absolute; opacity: 0; width: 0; height: 0; }
.mark {
  width: 18px; height: 18px; flex: 0 0 18px; background: var(--input);
  border: 1.5px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.radio-mark { border-radius: 50%; }
.box { border-radius: 5px; }
.native:checked + .radio-mark { border-color: var(--accent); }
.native:checked + .radio-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.native:checked + .box { background: var(--accent-fill); border-color: var(--accent-fill); }
.native:checked + .box::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px; border: solid #fff; border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}
.native:focus-visible + .mark { box-shadow: 0 0 0 3px var(--accent-ring); }
.checkbox.disabled { opacity: .4; cursor: not-allowed; }

/* Pills (roles, release type, track versions) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 7px 13px; background: transparent; border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--muted); font-size: 14px; line-height: 1.2; cursor: pointer; user-select: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), transform .12s var(--ease);
}
.pill:hover { color: var(--text); border-color: #3a4655; }
.pill:active { transform: scale(.96); }
.pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pill:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.pills-seg .pill { min-width: 72px; text-align: center; }

/* Links and small buttons */
.link {
  background: none; border: 0; padding: 4px 0; color: var(--accent); cursor: pointer;
  text-decoration: none; font-size: 14px; transition: opacity var(--t-fast);
}
.link:hover { opacity: .8; }
.danger-link { color: var(--danger); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: none; border: 0; cursor: pointer; padding: 0; color: var(--muted); border-radius: 8px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn .ico { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.icon-btn:disabled { opacity: .25; cursor: default; background: none; }
.add-btn {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 8px 12px 8px 9px;
  background: none; border: 1px dashed var(--border-strong); border-radius: var(--r-input);
  color: var(--accent); cursor: pointer; font-size: 14px;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.add-btn .ico { width: 16px; height: 16px; }
.add-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Chips (read-only labels) */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  background: var(--surface-3); border-radius: 999px; font-size: 13px; color: var(--muted);
}
.chip-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 15px; line-height: 1; }

/* Persons */
.person-list { display: flex; flex-direction: column; gap: 8px; }
.person-row {
  padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.person-row.new { animation: rise .24s var(--ease) both; }
.person-head { display: flex; align-items: center; gap: 6px; }
.person-name { flex: 1; min-width: 0; }
.row-btns { display: inline-flex; gap: 0; }
.person-roles { margin-top: 9px; }

/* Collapsible (track cards): animated height via grid rows */
.collapsible {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  margin-bottom: 8px; transition: border-color var(--t-fast) var(--ease);
}
.collapsible:not(.closed) { border-color: var(--border-strong); }
.coll-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; cursor: pointer; user-select: none; }
.coll-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.coll-right { display: flex; align-items: center; gap: 0; color: var(--muted); font-size: 13px; }
.arrow { color: var(--muted); display: inline-flex; transition: transform var(--t) var(--ease); }
.collapsible.closed .arrow { transform: rotate(-90deg); }
.coll-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--t) var(--ease); }
.collapsible.closed .coll-body { grid-template-rows: 0fr; }
.coll-inner { min-height: 0; overflow: hidden; transition: opacity var(--t) var(--ease); }
.collapsible.closed .coll-inner { opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease), visibility 0s var(--t); }
.coll-pad { padding: 2px 14px 16px; }
.badge {
  padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--surface-3);
}

/* DropZone: the file input covers the whole zone (see components.js) */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 112px; padding: 20px 14px; text-align: center; cursor: pointer;
  background: var(--input); border: 1.5px dashed var(--border-strong); border-radius: 12px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dz-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; z-index: 2; }
.dz-ico { color: var(--accent); margin-bottom: 4px; }
.dz-ico .ico { width: 22px; height: 22px; }
.dz-text { color: var(--text-strong); font-weight: 500; }
.dz-hint { font-size: 13px; color: var(--muted); max-width: 420px; }
.dz-hint:empty { display: none; }
.dropzone.busy { pointer-events: none; opacity: .7; }
.progress { width: 100%; height: 3px; margin-top: 12px; background: var(--surface-3); border-radius: 2px; overflow: hidden; display: none; }
.progress.active { display: block; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .2s linear; }

/* Toast + validation highlight */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); opacity: 0; max-width: calc(100vw - 32px);
  padding: 11px 16px; background: var(--surface-3); color: var(--text-strong); border-radius: 12px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); z-index: 100; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.highlight { box-shadow: 0 0 0 2px var(--danger) !important; border-radius: var(--r-input); animation: nudge .36s var(--ease); }

/* Hints */
.hint { margin-top: 7px; font-size: 13px; color: var(--muted); }
.hint:empty { display: none; }
.warn { color: var(--warn); }
.type-box { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.type-box .hint { margin-top: 0; }

/* Cover */
.cover-block > .hint { margin-top: 0; }
.cover-row { display: flex; gap: 12px; margin-top: 12px; align-items: stretch; }
.cover-zone { flex: 1; min-width: 0; }
.cover-preview { flex: 0 0 112px; display: flex; flex-direction: column; gap: 6px; animation: pop-in var(--t) var(--ease); }
.cover-thumb {
  width: 112px; height: 112px; border-radius: 10px; overflow: hidden; background: var(--input);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-thumb.missing { border: 1.5px solid var(--danger); background: var(--danger-soft); cursor: pointer; }
.cover-ok { width: 28px; height: 28px; color: var(--accent); stroke-width: 2.2; }
.cover-links { display: flex; gap: 12px; font-size: 13px; }
.cover-links .link { font-size: 13px; }

/* Calendar */
.date-input { cursor: pointer; max-width: 220px; }
.cal-pop { display: none; }
.cal-pop.open { display: block; margin-top: 10px; animation: rise .24s var(--ease) both; }
.calendar { max-width: 340px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 600; color: var(--text-strong); }
.cal-nav {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: none; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.cal-nav:hover { background: var(--surface-3); color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--faint); padding: 4px 0 6px; }
.cal-day {
  position: relative; background: none; border: 0; border-radius: 8px; cursor: pointer;
  padding: 8px 0 10px; font-size: 14px; text-align: center; color: var(--text);
  font-variant-numeric: tabular-nums; transition: background var(--t-fast) var(--ease), color var(--t-fast);
}
.cal-day:hover { background: var(--surface-3); }
.cal-day.today { color: var(--accent); font-weight: 600; }
.cal-day.rec::after, .cal-dot {
  content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.cal-day.rec::after { position: absolute; left: 50%; bottom: 4px; margin-left: -2px; }
.cal-day.selected { background: var(--accent-fill); color: #fff; font-weight: 600; }
.cal-day.selected::after { background: #fff; }
.cal-legend { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-dot { display: inline-block; }

/* Tracks tab */
.up-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.up-rows:empty { display: none; }
.up-row { padding: 9px 10px 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.up-row.err { border-color: rgba(242, 112, 122, .5); }
.up-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-status { color: var(--muted); flex: 0 1 auto; }
.up-row.err .up-status { color: var(--danger); }
.up-row .progress { margin-top: 8px; }
.trk-num { color: var(--faint); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.trk-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-weight: 500; }
.trk-dur { flex: 0 0 auto; margin-right: 4px; font-variant-numeric: tabular-nums; }
.sub-title { margin: 20px 0 9px; font-size: 13px; font-weight: 500; color: var(--muted); }
.coll-pad > .sub-title:first-child { margin-top: 4px; }
.coll-pad > .pills { margin-bottom: 16px; }
.check-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.short-input { max-width: 160px; }
.counter { text-align: right; margin-top: -10px; font-variant-numeric: tabular-nums; }
.coll-pad > .hint { margin-bottom: 16px; }

/* Player */
.player { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.player-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px;
  border-radius: 50%; border: 0; background: var(--accent-fill); color: #fff; cursor: pointer; padding: 0;
  transition: background var(--t-fast), transform .12s var(--ease);
}
.player-btn:hover { background: var(--accent-fill-hover); }
.player-btn:active { transform: scale(.94); }
.player-btn .ico { width: 15px; height: 15px; fill: currentColor; stroke-width: 1.4; }
.player-line { flex: 1; min-width: 0; accent-color: var(--accent); height: 4px; cursor: pointer; }
.player-time { flex: 0 0 auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.player-note { font-size: 13px; color: var(--muted); }

/* Buttons + modal */
.btn {
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); cursor: pointer; font-weight: 600;
  transition: background var(--t-fast) var(--ease), transform .12s var(--ease), opacity var(--t-fast);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-ghost { background: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { display: block; width: 100%; }
.modal-back {
  position: fixed; inset: 0; background: rgba(5, 8, 12, .62); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .2s var(--ease) both;
}
.modal {
  width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 20px; animation: pop-in .24s var(--ease) both;
}
.modal-text { margin-bottom: 18px; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; }

/* Check tab */
.check-notice:empty { display: none; }
.check-notice { margin-bottom: 10px; }
.notice-red { color: var(--danger); font-size: 14px; }
.error-block {
  padding: 12px 14px; margin-bottom: 10px; border: 1px solid rgba(242, 112, 122, .4); border-radius: 12px;
  color: var(--danger); background: var(--danger-soft); white-space: pre-wrap;
}
/* Status block on the Check tab: to-do list / server error / ready */
.status-block {
  padding: 14px 14px 10px; margin-bottom: 10px; border-radius: var(--r-card);
  border: 1px solid var(--border); background: var(--surface); animation: rise .24s var(--ease) both;
}
.status-todo { border-color: rgba(217, 180, 90, .35); }
.status-todo.attempted { border-color: rgba(242, 112, 122, .55); }
.status-error { border-color: rgba(242, 112, 122, .55); background: var(--danger-soft); padding-bottom: 14px; }
.status-ok { border-color: rgba(106, 166, 255, .4); background: var(--accent-soft); padding-bottom: 14px; }
.status-head { display: flex; align-items: center; gap: 8px; }
.status-ico { width: 18px; height: 18px; color: var(--accent); stroke-width: 2.4; }
.status-title { font-weight: 600; color: var(--text-strong); }
.status-error .status-title { color: var(--danger); }
.status-text { margin-top: 4px; font-size: 14px; color: var(--muted); white-space: pre-wrap; }
.status-error .status-text { color: var(--text); }
.status-group {
  margin: 12px 0 2px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.problem-list { display: flex; flex-direction: column; }
.problem-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 2px;
  color: var(--text); cursor: pointer; font-size: 14px; transition: color var(--t-fast) var(--ease);
}
.problem-item:first-child { border-top: 0; }
.problem-item:hover { color: var(--accent); }
.problem-text { flex: 1; min-width: 0; }
.problem-go { width: 16px; height: 16px; color: var(--faint); flex: 0 0 auto; }
.edit-link { font-size: 14px; display: inline-block; margin-top: 10px; }
.sum-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.sum-head .cover-thumb { flex: 0 0 96px; width: 96px; height: 96px; }
.sum-rows { flex: 1; min-width: 0; }
.sum-row { display: flex; gap: 12px; padding: 5px 0; font-size: 14px; }
.sum-row-top { align-items: flex-start; }
.sum-label { flex: 0 0 38%; max-width: 170px; color: var(--muted); font-size: 13px; padding-top: 1px; }
.sum-value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sum-value.empty { color: var(--danger); font-size: 13px; }
.sum-value.muted { color: var(--faint); }
.sum-persons { display: flex; flex-direction: column; gap: 3px; }
.sum-person { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sum-person-roles { color: var(--muted); font-size: 13px; }
.sum-bar { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 8px; }
.sum-count { color: var(--muted); font-size: 13px; }
.sum-actions { display: flex; gap: 16px; }
.sum-actions .edit-link { margin: 0; }
.lyrics-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin-bottom: 4px; }
.track-card .edit-link { margin-top: 12px; }
.submit-btn { margin-top: 6px; padding: 15px; font-size: 16px; }
.success-screen {
  position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center;
  animation: fade .3s var(--ease) both;
}
.success-mark {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px;
  animation: pop-in .4s var(--ease) both;
}
.success-mark .ico { width: 30px; height: 30px; stroke-width: 2.2; }
.success-title { font-size: 19px; font-weight: 650; color: var(--text-strong); }
.success-id { color: var(--muted); font-size: 14px; margin-bottom: 8px; max-width: 320px; }
.success-screen > * { position: relative; z-index: 1; }
.success-btn { min-width: 180px; margin-top: 6px; }

/* Success stars: emoji rise from the bottom with drift and spin, then fade out */
.success-screen > .star-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.star {
  position: absolute; bottom: -40px; font-size: var(--size, 22px); line-height: 1; opacity: 0;
  animation-name: star-rise; animation-timing-function: cubic-bezier(.2, .6, .3, 1); animation-fill-mode: both;
}
@keyframes star-rise {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.6); }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), -78vh) rotate(var(--rot, 90deg)) scale(1); }
}

.bottom-space { height: 40px; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

@media (max-width: 420px) {
  .app { padding: 14px 12px 0; }
  .card { padding: 14px; }
  .cover-preview { flex-basis: 96px; }
  .cover-thumb { width: 96px; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
