:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e2e5ea;
  --accent: #3b5bdb; --accent-soft: #e8edff; --warn: #d6336c; --slide: #10131a; --slide-text: #fff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161b; --card: #1d2027; --text: #e6e8ec; --muted: #9aa1ad; --line: #30343d;
          --accent: #7b93ff; --accent-soft: #263055; --warn: #ff6b9a; --slide: #000; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Pretendard", "Malgun Gothic", system-ui, sans-serif; }
header { max-width: 1100px; margin: 0 auto; padding: 24px 16px 8px; }
h1 { margin: 0; font-size: 24px; }
.sub { margin: 4px 0 0; color: var(--muted); }
main { max-width: 1100px; margin: 0 auto; padding: 8px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
.hint { color: var(--muted); font-size: 13px; font-weight: normal; }
code { background: var(--accent-soft); padding: 0 4px; border-radius: 4px; }
textarea, input, select { font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
textarea { width: 100%; resize: vertical; margin-top: 6px; }
input[type=number] { width: 64px; padding: 4px 6px; }
.options { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
button { font: inherit; cursor: pointer; border-radius: 8px; padding: 7px 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: default; }

.songHead { display: flex; gap: 10px; align-items: center; }
.num { background: var(--accent); color: #fff; border-radius: 50%; width: 28px; height: 28px; flex: none;
  display: grid; place-items: center; font-weight: 700; }
.songTitle { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; }
.moves { display: flex; gap: 4px; }
.moves button { padding: 4px 9px; }

.candidates { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; }
.cand { flex: none; display: flex; gap: 8px; align-items: center; text-align: left; width: 250px;
  padding: 6px; border-radius: 10px; }
.cand img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--line); }
.cand .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand .a { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand > div { min-width: 0; }
.cand.sel { border: 2px solid var(--accent); background: var(--accent-soft); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.colHead { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.colHead .tools { margin-left: auto; display: flex; gap: 4px; }
.colHead .tools button { padding: 2px 8px; font-size: 12px; font-weight: normal; }
[hidden] { display: none !important; }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
  margin-top: 6px; max-height: 360px; overflow-y: auto; }
.slide { background: var(--slide); color: var(--slide-text); border-radius: 6px; aspect-ratio: 16/9;
  display: grid; place-items: center; text-align: center; padding: 6px; font-size: 12px; line-height: 1.35;
  position: relative; white-space: pre-line; }
.slide i { position: absolute; left: 5px; top: 2px; font-size: 10px; color: #8892a6; font-style: normal; }
.slide .long { color: #ff8fb1; }
.slide.title { background: var(--accent); }
.slide.blank { color: #5c6475; font-size: 11px; outline: 1px dashed #5c6475; outline-offset: -4px; }
.empty { color: var(--muted); padding: 20px; }
.bugsLink { margin-left: auto; }
.help { margin-top: 12px; }
.help ol { margin: 8px 0 0; padding-left: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff;
  padding: 10px 18px; border-radius: 20px; font-size: 14px; z-index: 9; }
