:root {
  --bg: #FFFFFF;
  --ink: #1B1F2A;
  --sub: #6E7788;
  --weak: #9AA3B2;
  --face: #F2F4F6;
  --line: #D9DDE3;
  --cta: #1B1F2A;
  --cta-ink: #FFFFFF;
  --radius: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181E;
    --ink: #F4F6F8;
    --sub: #A6AEBB;
    --weak: #7C8593;
    --face: #232830;
    --line: #343B46;
    --cta: #F4F6F8;
    --cta-ink: #15181E;
  }
}
:root[data-theme="dark"] {
  --bg: #15181E;
  --ink: #F4F6F8;
  --sub: #A6AEBB;
  --weak: #7C8593;
  --face: #232830;
  --line: #343B46;
  --cta: #F4F6F8;
  --cta-ink: #15181E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.4; margin: 0; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 24px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.top nav a { font-size: 14px; color: var(--sub); text-decoration: none; margin-left: 16px; }
.top nav a:hover { color: var(--ink); }

/* hero */
.hero { padding: 40px 0 24px; text-align: center; }
.hero h1 { font-size: 32px; }
.hero .lead { color: var(--sub); margin-top: 12px; font-size: 16px; }
.jellies { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 28px auto 8px; }
.jelly { width: 30%; max-width: 150px; transform-origin: 50% 100%; }
.jelly img {
  width: 100%; height: auto;
  filter: brightness(1.14) saturate(.95) contrast(.92);
}
.jelly.cat img { filter: hue-rotate(305deg) saturate(1.05) brightness(1.14) saturate(.95) contrast(.92); }

/* pop in, then a squash-and-stretch hop loop */
.jelly { animation: pop .6s cubic-bezier(.2,1.4,.4,1) both, hop 3.2s ease-in-out 1s infinite; }
.jelly:nth-child(2) { animation-delay: .05s, 1.1s; }
.jelly:nth-child(3) { animation-delay: .1s, 1.2s; }
@keyframes pop {
  from { opacity: 0; transform: scale(.6, .6); }
  60% { transform: scale(1.1, .9); }
  to { opacity: 1; transform: scale(1, 1); }
}
@keyframes hop {
  0%, 30%, 100% { transform: translateY(0) scale(1, 1); }
  36% { transform: translateY(0) scale(1.12, .84); }      /* crouch */
  44% { transform: translateY(-18px) scale(.94, 1.08); }  /* stretch up */
  52% { transform: translateY(0) scale(1.1, .9); }        /* land squash */
  60% { transform: translateY(0) scale(.98, 1.02); }
  66% { transform: translateY(0) scale(1, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .jelly { animation: none; }
  .rise { animation: none; opacity: 1; transform: none; }
}

.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px; border-radius: var(--radius);
  background: var(--cta); color: var(--cta-ink); font-weight: 700; text-decoration: none; }
.cta[aria-disabled="true"] { opacity: .5; cursor: default; }
.cta svg { width: 20px; height: 20px; }
.hero .cta { margin-top: 28px; }
.hero .note { color: var(--weak); font-size: 13px; margin-top: 10px; }

/* cards */
.grid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 560px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--face); border-radius: 20px; padding: 20px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--sub); font-size: 14px; }
.card .face { width: 56px; height: 56px; margin-bottom: 12px;
  filter: brightness(1.14) saturate(.95) contrast(.92); }
.card .face.cat { filter: hue-rotate(305deg) saturate(1.05) brightness(1.14) saturate(.95) contrast(.92); }
.card .tag { display: block; font-size: 13px; color: var(--weak); margin-bottom: 2px; }

.section { padding: 32px 0; }
.section h2 { margin-bottom: 4px; }
.section .sub { color: var(--sub); }

.rise { animation: rise .5s ease-out both; }
.rise:nth-child(2) { animation-delay: 70ms; }
.rise:nth-child(3) { animation-delay: 140ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* legal / prose pages */
.prose { padding: 24px 0 48px; }
.prose h1 { margin-bottom: 4px; }
.prose .meta { color: var(--weak); font-size: 13px; margin-bottom: 24px; }
.prose h2 { font-size: 17px; margin: 32px 0 8px; }
.prose p, .prose li { font-size: 15px; color: var(--ink); }
.prose p + p { margin-top: 8px; }
.prose ol, .prose ul { padding-left: 20px; margin: 8px 0; }
.prose li + li { margin-top: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; vertical-align: top; }
.prose th { background: var(--face); font-weight: 700; }
.prose td { border-bottom: 1px solid var(--line); }
.prose .box { background: var(--face); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; font-size: 14px; }
.prose .draft { color: var(--weak); font-size: 12px; margin-top: 40px; }

/* faq */
details { background: var(--face); border-radius: var(--radius); padding: 0 20px; margin-top: 10px; }
summary { padding: 16px 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--weak); font-weight: 400; font-size: 20px; }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 0 16px; color: var(--sub); font-size: 15px; }

/* footer */
footer { padding: 32px 0 48px; font-size: 13px; color: var(--weak); }
footer .links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 16px; }
footer .links a { color: var(--sub); text-decoration: none; }
footer .biz { line-height: 1.8; }
