:root {
  --bg: #171717;
  --panel: #202020;
  --line: #333;
  --text: #F4F2EB;
  --sub: #9a9a93;
  --accent: #4D8DFF;
  --danger: #ff6b6b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', system-ui, sans-serif;
  line-height: 1.5;
  word-break: keep-all;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
}

header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: calc(16px + env(safe-area-inset-top)) 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.brand { font-weight: 800; letter-spacing: .04em; }
.tag { color: var(--sub); font-size: 13px; }

button {
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  white-space: nowrap;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: .45; cursor: default; }

form { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 13px; color: var(--sub); }
input {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
}
.card img { width: 72px; height: 90px; object-fit: cover; border-radius: 10px; background: #000; }
.card .t { font-weight: 700; }
.card .s { font-size: 13px; color: var(--sub); }

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.pill.approved { border-color: var(--accent); color: var(--accent); }
.pill.published { background: var(--accent); border-color: var(--accent); color: #fff; }

.back { background: none; border: none; padding: 0 0 16px; color: var(--sub); }
h1 { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
.meta { font-size: 13px; color: var(--sub); margin-bottom: 16px; }

.slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 18px; padding: 0 16px; }
.slides img { width: 76vw; max-width: 320px; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; scroll-snap-align: center; flex: none; background: #000; }

.caption {
  font: inherit;
  font-size: 14px;
  color: var(--sub);
  white-space: pre-wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.actions { display: flex; gap: 10px; }
.actions button { flex: 1; }

.err { color: var(--danger); font-size: 14px; margin-top: 12px; }
.ok { color: var(--accent); font-size: 14px; margin-top: 12px; word-break: break-all; }
.empty { color: var(--sub); font-size: 14px; }
code { background: var(--panel); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
