:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #20242d;
  --line: #2a2f3a;
  --text: #eef0f4;
  --muted: #9aa1ae;
  --accent: #ff4d5e;
  --accent-2: #ff7a59;
  --ok: #3ecf8e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }

.brand { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 18px;
}
.brand h1 { font-size: 18px; margin: 0; font-weight: 700; }
.brand .me { margin-left: auto; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 6px 8px; border-radius: 8px; }
.brand .me:hover { background: var(--panel); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 4px rgba(62, 207, 142, .15); }

.now { display: flex; gap: 12px; align-items: center; }
.now img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: var(--panel-2); flex: none; }
.now .meta { min-width: 0; flex: 1; }
.title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; background: var(--panel-2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .9s linear; }
.time { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

form.add { display: flex; gap: 8px; }
form.add input {
  flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 12px; outline: none;
}
form.add input:focus { border-color: var(--accent); }
.btn {
  border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.msg { font-size: 13px; margin-top: 8px; min-height: 18px; }
.msg.err { color: #ff8a8a; }
.msg.ok { color: var(--ok); }

ol.list { list-style: none; margin: 0; padding: 0; }
ol.list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
ol.list li:first-child { border-top: 0; }
ol.list .n { width: 22px; text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
ol.list img { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: var(--panel-2); flex: none; }
ol.list .meta { min-width: 0; flex: 1; }
ol.list .title { font-size: 14px; -webkit-line-clamp: 1; }
ol.list li.mine { background: linear-gradient(90deg, rgba(255, 77, 94, .10), transparent 70%); border-radius: 8px; }
.tag { font-size: 11px; color: var(--accent); font-weight: 700; margin-left: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  background: #2b303b; color: var(--text); padding: 10px 14px; border-radius: 10px; font-size: 14px;
  opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal.show { display: flex; }
.modal .card { width: 100%; max-width: 360px; margin: 0; }
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; outline: none; margin: 12px 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
