:root {
  --ink: #2a211c;
  --muted: #8a7368;
  --line: #eadfd6;
  --paper: #fffdfb;
  --wash: #f6efe8;
  --accent: #c45c46;
  --accent-dark: #a34734;
  --err: #9f1239;
}
* { box-sizing: border-box; }
body.public {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  font-family: "맑은 고딕", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(520px 240px at 50% -10%, #f8e3d4, transparent 60%),
    var(--wash);
}
.sheet {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(70, 40, 24, 0.12);
  padding: 22px 18px 18px;
}
.brand {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}
h1 { margin: 0 0 8px; font-size: 20px; }
.lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  color: var(--err);
  font-size: 13px;
}
.choices { border: 0; margin: 0 0 12px; padding: 0; }
.choices legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}
.choice { display: block; margin-bottom: 8px; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  font-size: 15px;
}
.choice input:checked + span {
  border-color: var(--accent);
  background: #fff4ef;
  font-weight: 700;
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); }
.field { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.field input, .field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
}
.field textarea { resize: vertical; }
.opt { color: var(--muted); font-weight: 400; }
.notice {
  margin: 4px 0 12px;
  padding: 12px 12px 4px;
  border-radius: 12px;
  background: #faf6f2;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.notice-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.notice ul { margin: 0; padding-left: 1.15em; }
.notice li { margin-bottom: 4px; }
.notice[hidden] { display: none; }
.agree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
}
.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.agree input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.view-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  flex: none;
}
.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.text-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
@media (max-width: 520px) {
  body.public { padding: 0; align-items: stretch; background: #fff; }
  .sheet {
    max-width: none;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
  }
}

body.admin {
  margin: 0;
  min-height: 100vh;
  font-family: "맑은 고딕", "Malgun Gothic", sans-serif;
  color: #e2e8f0;
  background: linear-gradient(160deg, #0b1220, #1e293b 50%, #071018);
}
.admin-wrap { max-width: 880px; margin: 0 auto; padding: 28px 16px 48px; }
.admin-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-top h1 { margin: 8px 0 6px; font-size: 26px; }
.admin-top p { margin: 0; color: #94a3b8; font-size: 14px; }
.home-link { color: #38bdf8; text-decoration: none; font-size: 13px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters a {
  text-decoration: none;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.filters a.on { background: rgba(56, 189, 248, 0.16); border-color: #38bdf8; }
.purge-row { margin: 0 0 14px; }
.purge-row button {
  border: 0;
  border-radius: 8px;
  background: #b45309;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}
.purge-note { margin: 0 0 10px; color: #fbbf24; font-size: 13px; }
.card {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.card h2 { margin: 0 0 6px; font-size: 16px; }
.meta { margin: 0 0 8px; color: #94a3b8; font-size: 13px; }
.memo { margin: 0 0 10px; white-space: pre-wrap; line-height: 1.45; }
.status-form { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.status-form select {
  flex: 1;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
}
.status-form button {
  border: 0;
  border-radius: 8px;
  background: #0284c7;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}
.btn-delete {
  border: 0;
  border-radius: 8px;
  background: #b91c1c;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}
.empty { color: #94a3b8; }
.public-link { color: #38bdf8; }
