:root {
  --bg: #0f1424;
  --bg-soft: #161c31;
  --card: #1b2240;
  --line: #2a3358;
  --text: #e8eaf4;
  --muted: #9aa3c4;
  --moon: #f3e3b0;
  --accent: #9fb4ff;
  --radius: 18px;
  --max: 920px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4ee;
    --bg-soft: #efece3;
    --card: #ffffff;
    --line: #e2ddcf;
    --text: #1d2236;
    --muted: #5e6580;
    --moon: #c9a24a;
    --accent: #3f56b8;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .18em; }
.brand-moon { width: 22px; height: 22px; border-radius: 50%; background: var(--moon); box-shadow: inset -6px -2px 0 0 var(--bg); }
.nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
.nav a:hover { color: var(--text); }

/* hero */
.hero { padding: 88px 0 64px; text-align: center; }
.hero-moon { width: 96px; height: 96px; margin: 0 auto 28px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8dc, var(--moon) 60%); box-shadow: 0 0 60px rgba(243, 227, 176, .35); }
.hero h1 { font-size: 40px; letter-spacing: .28em; margin: 0 0 12px; font-weight: 800; }
.hero p { color: var(--muted); font-size: 18px; margin: 0; }

/* apps */
.section-title { font-size: 14px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin: 0 0 18px; }
.apps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding-bottom: 72px; }
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.app-card h2 { font-size: 22px; margin: 0 0 4px; }
.app-card .tag { color: var(--moon); font-size: 14px; margin: 0 0 12px; }
.app-card p { color: var(--muted); margin: 0 0 18px; flex: 1; }
.app-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }

/* document pages */
.doc { padding-top: 48px; padding-bottom: 72px; }
.doc h1 { font-size: 30px; margin: 0 0 6px; }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 20px 0 6px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 4px 0; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.lang-switch { margin: 0 0 24px; font-size: 14px; }
.lang-switch a { margin-right: 12px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 32px 0 40px; color: var(--muted); font-size: 13px; }
.site-footer p { margin: 2px 0; }
.site-footer .biz span::after { content: " | "; opacity: .5; }
.site-footer .biz span:last-child::after { content: ""; }

@media (max-width: 560px) {
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 30px; }
  .nav a { margin-left: 12px; }
  .site-footer .biz span { display: block; }
  .site-footer .biz span::after { content: ""; }
}

/* board */
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button, .pager button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.tabs button.on, .pager button.on { border-color: var(--accent); color: var(--text); }
.doc .post-list, .post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "badge title" "badge meta"; column-gap: 12px; padding: 14px 4px; color: var(--text); text-decoration: none; }
.post-list a:hover .title { color: var(--accent); }
.post-list .title { grid-area: title; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-list .post-meta { grid-area: meta; color: var(--muted); font-size: 13px; }
.post-list .empty { padding: 28px 4px; color: var(--muted); text-align: center; }
.badge { grid-area: badge; align-self: center; font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.done { border-color: var(--moon); color: var(--moon); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.post-title { border: 0 !important; margin: 8px 0 4px !important; padding: 0 !important; font-size: 24px !important; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.reply { margin-top: 22px; }
.reply-head { color: var(--moon); font-weight: 700; margin: 0 0 8px; }
.admin-box { margin-top: 22px; display: grid; gap: 8px; }
.post-actions { margin-top: 22px; text-align: right; }
.btn.subtle { color: var(--muted); background: none; cursor: pointer; font: inherit; font-size: 14px; }
.write-form { display: grid; gap: 14px; }
.write-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.write-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.write-form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.check input { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 0; }
.consent { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.consent p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.form-error { color: #ff8a8a; min-height: 1em; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.unlock { display: grid; gap: 10px; max-width: 360px; }
button.btn { cursor: pointer; font: inherit; font-size: 14px; }
@media (max-width: 560px) { .write-form .row { grid-template-columns: 1fr; } }

/* app intro pages */
.app-page { padding-top: 48px; padding-bottom: 72px; }
.app-hero { display: flex; gap: 24px; align-items: center; margin-bottom: 32px; }
.app-icon { width: 112px; height: 112px; border-radius: 26px; flex: none; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.app-hero h1 { font-size: 32px; margin: 0 0 2px; }
.app-hero .tag { color: var(--moon); margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chips span { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.lead { font-size: 17px; margin: 0 0 24px; }
.feature { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.feature:nth-of-type(even) { grid-template-columns: 1fr 240px; }
.feature:nth-of-type(even) .shot { order: 2; }
.feature.text-only { grid-template-columns: 1fr; padding: 24px 0; }
.feature h2 { font-size: 22px; margin: 0 0 10px; }
.feature p { color: var(--muted); margin: 0 0 10px; }
.feature ul { color: var(--muted); padding-left: 20px; margin: 0 0 10px; }
.feature strong { color: var(--text); }
.shot { width: 100%; height: auto; border-radius: 28px; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.recommend, .app-cta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-top: 20px; }
.recommend h2 { font-size: 18px; margin: 0 0 8px; }
.recommend ul { margin: 0; padding-left: 20px; color: var(--muted); }
.app-cta { text-align: center; }
.app-cta p { margin: 0 0 14px; }
.app-cta .app-links { justify-content: center; }
.app-cta .sub-links { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.app-card h2 a { color: inherit; text-decoration: none; }
.app-card h2 a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .app-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .app-icon { width: 88px; height: 88px; border-radius: 20px; }
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .feature:nth-of-type(even) .shot { order: 0; }
  .shot { max-width: 260px; margin: 0 auto; display: block; }
}
