:root {
  --blue: #4d83db;
  --blue-dark: #3a66a8;
  --ink: #1a2332;
  --muted: #5b677a;
  --card: rgba(255, 255, 255, 0.92);
  --line: rgba(26, 35, 50, 0.1);
  --ok: #0f9c32;
  --err: #cd3849;
  --shadow: 0 18px 50px rgba(30, 60, 120, 0.18);
  --radius: 18px;
  font-family: "SUIT", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); }
body { position: relative; }

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(77, 131, 219, 0.35), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(123, 163, 232, 0.28), transparent 55%),
    linear-gradient(180deg, #f4f7fc 0%, #e8eef8 100%);
}

.top {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 800;
  color: var(--blue-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
nav a.active, nav a:hover {
  background: rgba(77, 131, 219, 0.12);
  color: var(--blue-dark);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 28px 20px 64px; }
.wrap.narrow { max-width: 640px; }

.hero {
  padding: 36px 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #4d83db, #6b9ae3 55%, #9ebfec);
  color: white;
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 8px;
  opacity: 0.85;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.03em; }
.lead { margin: 0 0 22px; max-width: 40ch; line-height: 1.5; opacity: 0.95; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.btn.primary { background: white; color: var(--blue-dark); }
.btn.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.55);
}
.btn.ghost:not(.hero .btn) {
  color: var(--blue-dark);
  border-color: rgba(77, 131, 219, 0.35);
  background: rgba(255,255,255,0.55);
}
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.cards {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(40, 70, 120, 0.06);
}
.card h2, .panel h2, .panel h3 { margin: 0 0 8px; }
.card p { color: var(--muted); line-height: 1.5; }
.card a { color: var(--blue); font-weight: 700; text-decoration: none; }

h1 { margin: 0 0 6px; letter-spacing: -0.03em; }
.sub { margin: 0 0 18px; color: var(--muted); }
.head-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.head-row.compact { margin-bottom: 12px; align-items: center; }

label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 14px;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
.msg { margin: 12px 0 0; font-weight: 600; }
.msg.ok { color: var(--ok); }
.msg.error { color: var(--err); }
.muted { color: var(--muted); }

.list { display: grid; gap: 10px; }
.item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.item .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.item h3 { margin: 0 0 6px; font-size: 16px; }
.item p { margin: 0; white-space: pre-wrap; line-height: 1.5; color: #334; }

.badge-answered, .badge-pending {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
}
.badge-answered { background: #cd3849; }
.badge-pending { background: #8a95a8; }

.answer-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.answer-box strong {
  display: block;
  margin-bottom: 6px;
  color: #cd3849;
  font-size: 13px;
}
.reply-form {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.write-panel { margin-bottom: 16px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.dialog { border: 0; border-radius: 20px; padding: 0; max-width: 420px; width: calc(100% - 32px); }
.dialog::backdrop { background: rgba(20, 30, 50, 0.45); }
.dialog-panel { margin: 0; box-shadow: none; }

.foot {
  text-align: center;
  color: var(--muted);
  padding: 0 20px 36px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .head-row { flex-direction: column; }
}

/* Share detail (/코드) */
.share-panel { text-align: center; }
.share-detail { display: grid; gap: 14px; }
.share-eyebrow {
  margin: 0;
  color: var(--blue-dark);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.share-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.share-card h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 6vw, 34px);
  letter-spacing: -0.03em;
}
.share-cat {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 14px;
}
.share-addr {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
}
.share-summary {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(77, 131, 219, 0.08);
  line-height: 1.55;
  white-space: pre-wrap;
}
.share-phone { margin: 0 0 12px; }
.share-phone a { color: var(--blue); font-weight: 700; text-decoration: none; }
.share-actions { margin-top: 4px; }
.share-install h2 { margin: 0 0 6px; font-size: 18px; }
.share-hint { margin: 12px 0 0; font-size: 13px; }
.share-code-label {
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.share-code {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--blue-dark);
}
.btn.solid {
  background: var(--blue);
  color: #fff;
}
.btn.solid:hover { background: var(--blue-dark); }

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.45);
}
.install-modal[hidden] { display: none !important; }
.install-modal-card {
  width: min(100%, 360px);
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: var(--shadow);
}
.install-modal-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.install-modal-actions {
  margin-top: 18px;
  justify-content: flex-end;
}
.install-modal-actions .btn {
  text-decoration: none;
  text-align: center;
}
