:root {
  --ink: #161616;
  --paper: #f4f1ea;
  --line: #d9d3c7;
  --black: #171717;
  --muted: #6d675f;
  --accent: #8c3a2f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fff 0, transparent 28rem),
    var(--paper);
  font-family: "Pretendard", "Malgun Gothic", sans-serif;
}

button, input, textarea { font: inherit; }

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

header h1 {
  margin: 8px 0 10px;
  font-family: "GmarketSansBold", "Malgun Gothic", sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.04em;
}

header p { max-width: 42rem; margin: 0; color: var(--muted); line-height: 1.6; }

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}

.panel, .song-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.panel { padding: 18px; }

.panel-head, .song-head, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2, .song-head h2 { margin: 0; font-size: 18px; }

#songs { display: grid; gap: 14px; }

.song-card { padding: 16px; display: grid; gap: 12px; }

label { display: grid; gap: 6px; font-weight: 700; }

label span { font-weight: 500; color: var(--muted); font-size: 13px; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}

textarea { resize: vertical; line-height: 1.55; min-height: 220px; }

.actions { margin-top: 14px; }

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
}

.primary { background: var(--ink); color: white; }
.secondary { background: #efeae1; color: var(--ink); }
.text-btn { background: transparent; color: var(--muted); padding: 6px 0; }
button:hover { transform: translateY(-1px); }

.note, #status { color: var(--muted); font-size: 13px; line-height: 1.5; }
#status.error { color: var(--accent); }
#slideCount { margin: 0; color: var(--muted); font-size: 14px; }

.preview {
  display: grid;
  gap: 16px;
}

.empty-preview {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.slide-frame {
  aspect-ratio: 16 / 9;
  background: var(--black);
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.slide-title, .lyric-block, .slide-kicker {
  margin: 0;
  width: 92%;
  text-align: center;
}

.slide-title {
  font-family: "GmarketSansBold", "Malgun Gothic", sans-serif;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 700;
}

.lyric-block {
  font-family: "GmarketSansMedium", "Malgun Gothic", sans-serif;
  line-height: 1.25;
}

.lyric-block p { margin: 0; }
.lyric-gap { height: 1.15em; }

.slide-kicker {
  color: #3a3a3a;
  letter-spacing: 0.2em;
  font-size: 13px;
}

.slide-label { margin: 8px 2px 0; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .actions { flex-wrap: wrap; }
}
