:root {
  --bg: #fffdf7;
  --surface: #ffffff;
  --ink: #2b2a26;
  --muted: #6f6b60;
  --line: #ece6d6;
  --accent: #5fa85a;
  --accent-ink: #ffffff;
  --accent-soft: #e9f5e6;
  --warn-soft: #fff6dd;
  --warn-ink: #7a5a00;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(60, 50, 20, .08);
  --peach: #f0865a; --peach-soft: #fff0e6; --peach-ink: #ffffff;
  --green: #5fa85a; --green-soft: #e9f5e6; --green-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b18; --surface: #26241f; --ink: #f1ede2; --muted: #a8a194; --line: #3a372f;
    --accent: #7cc277; --accent-ink: #14220f; --accent-soft: #28361f;
    --warn-soft: #3a3217; --warn-ink: #f0d58a; --shadow: 0 6px 24px rgba(0, 0, 0, .35);
    --peach: #f59a74; --peach-soft: #3a2a22; --peach-ink: #2a1a12;
    --green: #7cc277; --green-soft: #28361f; --green-ink: #14220f;
  }
}
.theme-peach { --accent: var(--peach); --accent-soft: var(--peach-soft); --accent-ink: var(--peach-ink); }
.theme-green { --accent: var(--green); --accent-soft: var(--green-soft); --accent-ink: var(--green-ink); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.6; word-break: keep-all;
}
a { color: inherit; }
img { max-width: 100%; }
code { font-family: Consolas, "D2Coding", monospace; font-size: .92em; background: var(--accent-soft); padding: .1em .35em; border-radius: 6px; }

/* 머리띠 */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.brand img { border-radius: 10px; }
.top-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top-nav a { text-decoration: none; font-size: .92rem; color: var(--muted); padding: 6px 12px; border-radius: 999px; }
.top-nav a:hover { background: var(--accent-soft); color: var(--ink); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }

/* 첫 화면 */
.hero { display: grid; gap: 28px; padding: 44px 0 28px; align-items: center; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.1fr 1fr; padding: 56px 0 36px; } }
.eyebrow { margin: 0 0 6px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.hero h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.3; }
.lead { margin: 0; color: var(--muted); font-size: 1.08rem; }
.device-hint { margin: 12px 0 0; font-size: .95rem; }
.device-hint a { color: var(--accent); font-weight: 700; }
.hero-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.tile:hover { transform: translateY(-3px); }
.tile img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.tile-body { padding: 12px 14px 14px; }
.tile-name { margin: 0; font-weight: 800; font-size: 1.05rem; }
.tile-slogan { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.tile-cta { display: inline-block; margin-top: 8px; font-size: .85rem; font-weight: 700; color: var(--accent); }

/* 제품 구역 */
.product { margin-top: 36px; padding: 28px 0 8px; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.product-head { display: flex; align-items: center; gap: 14px; }
.product-icon { width: 60px; height: 60px; border-radius: 16px; object-fit: cover; background: var(--accent-soft); }
.product-name { margin: 0; font-size: 1.6rem; }
.product-slogan { margin: 2px 0 0; color: var(--accent); font-weight: 700; }
.product-intro { margin: 14px 0 0; color: var(--muted); max-width: 760px; }
.features { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.features li { font-size: .85rem; font-weight: 600; background: var(--accent-soft); color: var(--ink); padding: 4px 11px; border-radius: 999px; }

.product-body { display: grid; gap: 22px; margin-top: 22px; }
@media (min-width: 880px) {
  .product-body { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); align-items: start; }
  .gallery-wrap { position: sticky; top: 76px; }
}

/* 포스터 갤러리 */
.gallery-wrap { min-width: 0; }
.gallery {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.poster {
  flex: 0 0 auto; scroll-snap-align: start; padding: 0; background: none; cursor: zoom-in;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .15s ease;
}
.poster:hover { transform: translateY(-3px); }
.poster img { display: block; height: 400px; width: auto; }
@media (max-width: 600px) { .poster img { height: 320px; } }
.gallery-hint { margin: 0; font-size: .82rem; color: var(--muted); }

/* 내려받기 카드 */
.downloads { display: grid; gap: 16px; }
.app {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 80px;
}
.app-name { margin: 0; font-size: 1.2rem; }
.app-platform {
  display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px;
}
.app-tagline { margin: 0; color: var(--muted); font-size: .95rem; }
.latest { display: flex; flex-direction: column; gap: 10px; }
.version-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.version { font-size: 1.4rem; font-weight: 800; }
.version-date, .file-size { color: var(--muted); font-size: .9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none;
  padding: 13px 20px; border-radius: 12px; font-size: 1.02rem; border: 0; cursor: pointer;
  transition: transform .08s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; }
.btn-note { font-size: .85rem; color: var(--muted); margin: 0; }
.none { background: var(--warn-soft); color: var(--warn-ink); padding: 12px 14px; border-radius: 12px; font-size: .95rem; }
.notes { margin: 0; padding-left: 1.2em; font-size: .93rem; }
.notes li { margin: 3px 0; }
.notes .tag { font-weight: 700; margin-right: .3em; }
.notes .tag-new { color: #2c7a2c; }
.notes .tag-fix { color: #a1541a; }
.notes .tag-chg { color: #3d5fa8; }
@media (prefers-color-scheme: dark) {
  .notes .tag-new { color: #8fd98a; }
  .notes .tag-fix { color: #f0b081; }
  .notes .tag-chg { color: #9db6f0; }
}
.notes .sub { display: block; color: var(--muted); font-size: .9em; }
.hash { font-size: .76rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hash code { background: transparent; padding: 0; word-break: break-all; }
.hash button { font: inherit; font-size: .76rem; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 6px; padding: 1px 7px; cursor: pointer; }
.app-meta { font-size: .88rem; color: var(--muted); }
.app-meta p { margin: 0; }

details { border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "▸"; color: var(--accent); transition: transform .15s; }
details[open] summary::before { transform: rotate(90deg); }
.guide-steps { margin: 8px 0 0; padding-left: 1.3em; font-size: .93rem; }
.guide-steps li { margin: 4px 0; }
.history-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.history-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.history-list .version-row .version { font-size: 1.05rem; }
.history-list a.small { font-size: .9rem; color: var(--accent); font-weight: 700; }

/* 자주 묻는 것 · 바닥 */
.faq { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 24px; }
.faq h2 { font-size: 1.25rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.faq p { margin: 8px 0 2px; color: var(--muted); font-size: .95rem; }
.loading { color: var(--muted); }
.error { background: var(--warn-soft); color: var(--warn-ink); padding: 12px 16px; border-radius: 12px; }
.foot { border-top: 1px solid var(--line); padding: 20px 16px 32px; text-align: center; color: var(--muted); font-size: .88rem; }
.foot p { margin: 4px 0; }

/* 크게 보기 */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(15, 12, 8, .88); }
.lightbox figure { margin: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 64px; }
.lightbox img { max-height: calc(100vh - 80px); max-width: 100%; width: auto; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #fff; font-size: .95rem; text-align: center; }
.lightbox button {
  position: fixed; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 44px; height: 44px; border-radius: 50%;
  font-size: 26px; line-height: 44px; cursor: pointer; z-index: 1;
}
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 14px; right: 14px; font-size: 20px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox figure { padding: 16px 8px 56px; }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}
