/* decko.party
   바탕은 앱(어두운 테마)과 README 영상의 어두운 산호빛 바탕에 맞췄다. 영상 그림이 자기 바탕을 품고 있어 밝은 쪽에 두면 액자처럼 떠 보인다.
   산호색은 덱코와 내려받기 단추에만 쓴다. 눈이 가야 할 곳이 그 둘이다. */
:root {
	--bg: #14110f;
	--bg-2: #1c1815;
	--line: #2d2824;
	--ink: #efebe5;
	--muted: #a39c92;
	--coral: #f9543b;
	--coral-ink: #2a0d06;
	--radius: 22px;
	--wide: 1160px;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background:
		radial-gradient(1200px 700px at 50% -180px, rgba(249, 84, 59, .20), transparent 70%),
		var(--bg);
	color: var(--ink);
	font-family: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
	font-size: 17px;
	line-height: 1.6;
	word-break: keep-all;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ── 맨 위 줄 ─────────────────────────────── */
.top {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 28px;
	/* 2026.12.03 : 바탕을 양옆 100vw 로 뻗던 것이 가로 스크롤을 만들었다. 줄은 화면 폭 그대로 두고 안쪽 여백으로 가운데 폭에 맞춘다 */
	padding: 14px max(24px, calc((100% - var(--wide)) / 2 + 24px));
}
.top::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: rgba(20, 17, 15, .72);
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* ── 단추 ─────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	background: var(--coral); color: var(--coral-ink);
	font-weight: 700; text-decoration: none; border-radius: 999px;
	transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, background .2s;
}
.btn:hover { background: #ff6a50; transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(249, 84, 59, .6); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn-big { padding: 16px 30px; font-size: 18px; }
.btn .os { flex: none; width: 17px; height: 17px; fill: currentColor; }
.btn-small .os { width: 13px; height: 13px; }
.btn-small { gap: 7px; }

/* ── 첫 화면 ──────────────────────────────── */
.hero { max-width: var(--wide); margin: 0 auto; padding: clamp(96px, 12vh, 140px) 24px 40px; text-align: center; }
.hero-title {
	margin: 0; font-size: clamp(56px, 9vw, 112px); font-weight: 850; line-height: 1; letter-spacing: -.045em;
}
.hero-lead { margin: 22px 0 0; font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; }
.hero-sub { text-wrap: balance; margin: 10px auto 0; max-width: 34em; color: var(--muted); font-size: clamp(16px, 1.8vw, 19px); }
.cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta-meta { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 덱코가 앱 창 위 가장자리에 매달려 있다. 창 윗변은 그림 높이의 9.8% 지점이다(app.webp) */
.stage { position: relative; margin: clamp(90px, 13vw, 150px) auto 0; }
.perch { position: absolute; left: 63%; top: 9.8%; width: clamp(76px, 9vw, 120px); transform: translateY(-86%); z-index: 2; }
.shot { width: 100%; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 80px -30px rgba(0, 0, 0, .8); }
/* 그림 두 장을 나란히 둔 것은 바탕이 투명해 그림자를 달면 빈 자리까지 상자가 진다 */
.shot-bare { border-radius: 0; box-shadow: none; }

/* ── 기능 ─────────────────────────────────── */
.features { max-width: var(--wide); margin: 0 auto; padding: 80px 24px 40px; display: grid; gap: clamp(72px, 10vw, 130px); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
.feature:nth-child(even) .feature-text { order: 2; }
.feature h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.feature p { text-wrap: pretty; margin: 14px 0 0; color: var(--muted); font-size: 18px; }

/* ── 자주 묻는 질문 ───────────────────────── */
/* 2026.12.03 : 끝의 시작하기 카드(내려받기 단추를 한 번 더)를 자주 묻는 질문으로 바꿨다(사용자). 내려받기는 맨 위 두 곳에만 둔다 */
.faq { max-width: var(--wide); margin: 0 auto; padding: 150px 24px 60px; }
.faq-box { position: relative; max-width: 760px; margin: 0 auto; }
.faq h2 { margin: 0 0 28px; text-align: center; font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-item summary {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 22px 4px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 700; letter-spacing: -.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
	content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
	border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
	transform: translateY(-3px) rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-item summary:hover { color: #fff; }
.faq-item p { text-wrap: pretty; margin: -6px 4px 24px; color: var(--muted); font-size: 16.5px; }
.faq-item a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(239, 235, 229, .35); }
kbd {
	display: inline-block; padding: 1px 8px; margin: 0 2px; border: 1px solid var(--line); border-bottom-width: 2px;
	border-radius: 7px; background: var(--bg); font-family: inherit; font-size: .85em; font-weight: 600; line-height: 1.5;
}

/* 카드 윗변 너머로 덱코가 고개를 내민다. 화면에 들어오면 올라온다 */
.peek { position: absolute; left: 50%; bottom: 100%; width: 110px; height: 68px; margin-left: -55px; overflow: hidden; pointer-events: none; }
.gecko-peek { position: absolute; left: 0; right: 0; top: 0; transform: translateY(100%); transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); pointer-events: auto; }
.peek.is-up .gecko-peek { transform: translateY(14%); }
.peek.is-up .gecko-peek.is-hover { transform: translateY(4%); }

/* ── 바닥 ─────────────────────────────────── */
.foot { max-width: var(--wide); margin: 0 auto; padding: 40px 24px 56px; text-align: center; color: var(--muted); font-size: 14px; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-fine { margin: 14px 0 0; font-size: 13px; opacity: .7; }

/* ── 사용 설명서 · 업데이트 내역 (doc.js) ───── */
.nav a[aria-current="page"] { color: var(--ink); }
.doc { max-width: var(--wide); margin: 0 auto; padding: clamp(88px, 11vh, 120px) 24px 40px; }
.doc-head { max-width: 760px; margin: 0 0 40px calc(220px + 56px); }
.doc-head h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); font-weight: 850; letter-spacing: -.04em; line-height: 1.15; }
.doc-lead { margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.doc-wrap { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 56px; align-items: start; }
.doc-toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 120px); overflow: auto; scrollbar-width: none; font-size: 14.5px; }
/* 버전 목록이 길어도 스크롤 막대는 보이지 않게 (2026.12.03 · 사용자). 휠로는 그대로 내려간다 */
.doc-toc::-webkit-scrollbar { display: none; }
.toc-k { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.doc-toc a { padding: 5px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.doc-toc a:hover { color: var(--ink); }
.doc-toc a.on { color: var(--ink); border-left-color: var(--coral); }
.doc-loading { color: var(--muted); }
.doc-loading a { color: var(--ink); }

.doc-body { font-size: 16.5px; line-height: 1.75; }
/* 두어 둔 글 없이 처음 읽을 때만 살짝 나타난다 (doc.js · 2026.12.04) */
.doc-body.doc-in { animation: doc-in .28s ease-out; }
@keyframes doc-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .doc-body.doc-in { animation: none; } }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 { margin: 64px 0 14px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; scroll-margin-top: 90px; }
.doc-body h3 { margin: 32px 0 10px; font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.doc-body p { margin: 12px 0; }
.doc-body ul, .doc-body ol { margin: 12px 0; padding-left: 1.4em; }
.doc-body li { margin: 4px 0; }
.doc-body a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(239, 235, 229, .35); }
.doc-body a:hover { text-decoration-color: var(--coral); }
.doc-body strong { color: #fff; }
.doc-body code { padding: 1px 6px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font-size: .88em; }
.doc-body img { border-radius: 14px; margin: 18px 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.doc-body th, .doc-body td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc-body tr:last-child td { border-bottom: 0; }
.doc-body th { background: var(--bg-2); font-weight: 700; color: var(--ink); white-space: nowrap; }
.doc-body td { color: #d6d0c8; }
.doc-body details { margin: 10px 0; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.doc-body summary { cursor: pointer; font-weight: 700; }
.callout { margin: 18px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); border-left: 3px solid var(--muted); background: var(--bg-2); }
.callout p { margin: 4px 0; }
.callout-k { font-size: 13.5px; font-weight: 800; letter-spacing: .02em; }
.callout-tip { border-left-color: #5fbf8a; } .callout-tip .callout-k { color: #7fd3a3; }
.callout-note { border-left-color: #6aa2ff; } .callout-note .callout-k { color: #8fb8ff; }
.callout-important { border-left-color: #b48cff; } .callout-important .callout-k { color: #c6a6ff; }
.callout-warning, .callout-caution { border-left-color: var(--coral); } .callout-warning .callout-k, .callout-caution .callout-k { color: #ff8a73; }

/* 업데이트 내역: 버전마다 카드 */
.release { margin: 0 0 20px; padding: 28px 32px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); scroll-margin-top: 90px; }
.release h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 26px; }
.release h2 + p, .release p:has(> strong:only-child) { margin-top: 18px; }
.release p > strong:only-child { font-size: 16px; color: var(--coral-2, #ff8a73); }
.badge { padding: 3px 10px; border-radius: 999px; background: rgba(249, 84, 59, .14); border: 1px solid rgba(249, 84, 59, .35); color: #ff8a73; font-size: 12.5px; font-weight: 700; letter-spacing: 0; }

@media (max-width: 900px) {
	.doc-head { margin-left: 0; }
	.doc-wrap { grid-template-columns: 1fr; gap: 0; }
	.doc-toc { display: none; }
	.release { padding: 22px 20px 16px; }
}

/* ── 버그 · 제안 보내기 (feedback.js) ────────── */
.fb-head { margin-left: auto; margin-right: auto; max-width: 680px; }
.fb-form, .fb-done { max-width: 680px; margin: 0 auto; }
.fb-kind { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; padding: 0; border: 0; }
.fb-kind legend { margin-bottom: 10px; font-weight: 700; }
.fb-kind label { cursor: pointer; }
.fb-kind input { position: absolute; opacity: 0; pointer-events: none; }
.fb-kind span { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--muted); font-size: 14px; transition: border-color .15s, background .15s; }
.fb-kind b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 16px; }
.fb-kind input:checked + span { border-color: var(--coral); background: rgba(249, 84, 59, .08); }
.fb-kind input:focus-visible + span { outline: 2px solid var(--coral); outline-offset: 3px; }
.fb-field { display: block; margin: 0 0 20px; }
.fb-field > span { display: block; margin-bottom: 8px; font-weight: 700; }
.fb-field em { margin-left: 6px; font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); }
.fb-field input, .fb-field textarea {
	width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
	color: var(--ink); font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; transition: border-color .15s;
}
.fb-field input::placeholder, .fb-field textarea::placeholder { color: #6f685f; }
.fb-field input:focus, .fb-field textarea:focus { outline: none; border-color: var(--coral); }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-note { margin: 4px 0 24px; color: var(--muted); font-size: 14px; }
.fb-note a, .fb-done a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }
.fb-act { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fb-act .btn { border: 0; cursor: pointer; font-family: inherit; }
.fb-act .btn:disabled { opacity: .6; cursor: default; transform: none; }
.fb-msg { margin: 0; color: var(--muted); font-size: 15px; }
.fb-msg.bad { color: #ff8a73; }
.fb-done { padding: 48px 40px; border: 1px solid var(--line); border-radius: 24px; background: var(--bg-2); text-align: center; }
.fb-done h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.fb-done p { color: var(--muted); }
.fb-again { border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fb-again:hover { color: var(--ink); }
@media (max-width: 760px) { .fb-kind { grid-template-columns: 1fr; } .fb-done { padding: 36px 22px; } }

/* 12월의 눈 (snow.js). 화면에 붙어 있고 마우스는 받지 않는다. 맨 위 줄보다 위에 내려 메뉴 위로도 지나간다 */
.snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ── 덱코 ─────────────────────────────────── */
.gecko { position: relative; display: block; color: var(--coral); cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.gecko-mini { width: 32px; }
.g-svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-lean, .g-squash { transform-box: fill-box; transform-origin: 50% 100%; }
.g-lean { transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.g-look { transition: transform .14s ease-out; }
.g-eye rect, .g-eye { transform-box: fill-box; transform-origin: 50% 50%; }
.g-eye rect { transition: transform .06s; }
.g-shine { transition: r .2s; }
.g-tail { transform-box: view-box; transform-origin: 84px 74px; animation: g-sway 2.6s ease-in-out infinite alternate; }
.g-body { transform-box: fill-box; transform-origin: 50% 100%; }
.gecko-hero .g-squash { animation: g-breathe 3.4s ease-in-out infinite; }
.g-blush { opacity: 0; transition: opacity .3s; }
.g-happy, .g-sleep, .g-dizzy { display: none; }
.g-tongue { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform .14s cubic-bezier(.3, 1.6, .5, 1); }

.gecko.is-blink .g-eye rect { transform: scaleY(.12); }
.gecko.is-hover .g-tail { animation: g-wag .3s ease-in-out infinite alternate; }
.gecko.is-hover .g-svg { animation: g-hop .42s ease-out; }
.gecko.is-blep .g-tongue { transform: scaleY(1); }
.gecko.is-excited .g-eye { transform: scale(1.16); }
.gecko.is-excited .g-shine { r: 2.4px; }
.gecko.is-excited .g-tail { animation: g-wag .22s ease-in-out infinite alternate; }
.gecko.is-happy .g-eyes, .gecko.is-sleep .g-eyes, .gecko.is-dizzy .g-eyes { display: none; }
.gecko.is-happy .g-happy { display: inline; }
.gecko.is-happy .g-blush, .gecko.is-blush .g-blush { opacity: .9; }
.gecko.is-dizzy .g-dizzy { display: inline; }
.gecko.is-dizzy .g-happy { display: none; }
.gecko.is-sleep .g-sleep { display: inline; }
.gecko.is-sleep .g-happy, .gecko.is-sleep .g-dizzy { display: none; }
.gecko.is-sleep .g-tail { animation: none; transform: rotate(-6deg); }
.gecko.is-sleep .g-squash { animation: g-breathe 4.8s ease-in-out infinite; }
.gecko.is-sleep .g-tongue { transform: scaleY(0); }

/* 말풍선 · Zzz · 하트 */
.g-bubble {
	position: absolute; left: 50%; bottom: 100%; margin-bottom: 6px;
	padding: 8px 14px; border-radius: 16px; white-space: nowrap;
	background: var(--ink); color: #1b1714; font-size: 14px; font-weight: 700;
	opacity: 0; transform: translate(-50%, 8px) scale(.9); transform-origin: 50% 100%;
	transition: opacity .2s, transform .3s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none;
}
.g-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
/* 2026.12.03 : 말풍선은 띄우지 않는다(사용자). 덱코는 몸짓으로만 반응한다 */
.g-bubble { display: none; }
.g-zzz { position: absolute; right: -4%; top: 2%; display: none; font-weight: 800; color: var(--muted); pointer-events: none; }
.g-zzz i { position: absolute; font-style: normal; opacity: 0; animation: g-zzz 2.7s ease-out infinite; }
.g-zzz i:nth-child(1) { font-size: 15px; }
.g-zzz i:nth-child(2) { font-size: 19px; animation-delay: .9s; }
.g-zzz i:nth-child(3) { font-size: 24px; animation-delay: 1.8s; }
.gecko.is-sleep .g-zzz { display: block; }
.g-heart { position: absolute; color: #ff7d8e; pointer-events: none; }
.g-heart svg { display: block; width: 100%; }

@keyframes g-sway { from { transform: rotate(-5deg); } to { transform: rotate(7deg); } }
@keyframes g-wag { from { transform: rotate(-16deg); } to { transform: rotate(18deg); } }
@keyframes g-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-9%); } 70% { transform: translateY(1%); } }
@keyframes g-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .975); } }
@keyframes g-zzz {
	0% { opacity: 0; transform: translate(0, 0); }
	20% { opacity: 1; }
	100% { opacity: 0; transform: translate(26px, -46px); }
}

/* ── 좁은 화면 ────────────────────────────── */
@media (max-width: 760px) {
	body { font-size: 16px; }
	.nav { display: none; }
	.top .btn-small { margin-left: auto; }
	.hero { padding-top: 72px; }
	.perch { left: 58%; }
	.feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 20px; }
	.feature:nth-child(even) .feature-text { order: 0; }
	.feature p { font-size: 16.5px; }
	.shot { border-radius: 14px; }
	.faq-item summary { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* 페이지 사이 이동을 부드럽게 (2026.12.04 · 사용자: 사용 설명서 · 업데이트 내역을 누르면 끊긴다).
   같은 사이트 안 이동은 흰 화면 없이 짧게 겹쳐 바뀌고, 상단 바는 그대로 있다. 지원하지 않는 브라우저는 지금과 같다 */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
