/* ===== Fonts (self-hosted, no CDN) ===== */
@font-face {
  font-family: 'Gamja Flower';
  src: url('../fonts/gamja-flower-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/Pretendard-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; }

/* ===== Design Tokens ===== */
:root {
  --paper: #fff7ec;
  --paper-2: #fffdf8;
  --coral: #ff6f61;
  --sky: #4aa3ff;
  --sunny: #ffc93c;
  --mint: #37c99e;
  --ink: #2b2b2b;
  --ink-soft: #5a5651;
  --line: #e9dcc4;
  --font-heading: 'Gamja Flower', 'Nanum Pen Script', cursive;
  --font-body: 'Pretendard', system-ui, -apple-system, 'Malgun Gothic', sans-serif;
  --space: 1rem;
  --maxw: 1160px;
  --radius: 18px;
  --shadow: 6px 6px 0 rgba(43,43,43,0.10);
  --shadow-lg: 10px 10px 0 rgba(43,43,43,0.12);
}

/* ===== Base ===== */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(74,163,255,0.055) 1px, transparent 1px);
  background-size: 100% 2.1rem;
  line-height: 1.7;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.08; font-weight: 400; letter-spacing: 0; }
h2 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
p { color: var(--ink-soft); }
:focus-visible { outline: 3px dashed var(--sky); outline-offset: 3px; border-radius: 4px; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.center { text-align: center; }

.kicker {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--coral); background: #fff; padding: 0.35rem 0.9rem;
  border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 rgba(43,43,43,0.12);
  transform: rotate(-2deg); margin-bottom: 1.1rem;
}
.lead { font-size: 1.12rem; max-width: 46ch; }
.center .lead { margin-inline: auto; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 2.5px solid var(--ink);
  background: #fff; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 rgba(43,43,43,0.15); }
.btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 rgba(43,43,43,0.15); }
.btn--coral { background: var(--coral); color: #fff; }
.btn--sky { background: var(--sky); color: #fff; }
.btn--sunny { background: var(--sunny); color: var(--ink); }
.btn--ghost { background: #fff; }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.08rem; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,247,236,0.92); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 150px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
  font-weight: 500; font-size: 0.98rem; padding: 0.5rem 0.85rem; border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--sunny); color: var(--ink); }
.nav-links .btn { padding: 0.55rem 1.1rem; box-shadow: 3px 3px 0 rgba(43,43,43,0.15); }
.nav-toggle { display: none; background: #fff; border: 2px solid var(--ink); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0.2rem; background: var(--paper-2); border-bottom: 2px solid var(--ink);
    padding: 0.8rem var(--space) 1.2rem; box-shadow: var(--shadow);
  }
  .nav-links[hidden] { display: none; }
  .nav-links a { padding: 0.7rem 0.9rem; }
  .nav-links .btn { text-align: center; justify-content: center; margin-top: 0.3rem; }
}

/* ===== Hero ===== */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero h1 { font-size: clamp(3rem, 8vw, 5.4rem); margin-bottom: 1rem; }
.hero h1 .scribble { color: var(--coral); position: relative; white-space: nowrap; }
.hero .lead { font-size: 1.18rem; margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 1.6rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats .num { font-family: var(--font-heading); font-size: 2rem; color: var(--sky); line-height: 1; }
.hero-stats .lbl { font-size: 0.85rem; color: var(--ink-soft); }
@media (max-width: 800px) { .hero-grid { grid-template-columns: 1fr; } }

/* ===== Game screen mockup ===== */
.gamescreen {
  background: #fff; border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: var(--shadow-lg); overflow: hidden; max-width: 460px; margin-inline: auto;
}
.gs-top { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; background: var(--ink); color: #fff; }
.gs-top .gs-word { font-family: var(--font-heading); font-size: 1.5rem; letter-spacing: 0.08em; }
.gs-top .gs-word small { font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--sunny); display: block; }
.gs-timer { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--coral); color: #fff; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.9rem; }
.gs-timer .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.gs-canvas { position: relative; background:
  linear-gradient(#eef4fb 1px, transparent 1px),
  linear-gradient(90deg, #eef4fb 1px, transparent 1px);
  background-size: 22px 22px; background-color: #fbfdff; height: 210px; }
.gs-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gs-tools { display: flex; gap: 0.4rem; padding: 0.5rem 1rem; border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); align-items: center; }
.gs-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); }
.gs-tools .gs-spacer { flex: 1; }
.gs-tools .gs-pen { font-size: 0.78rem; color: var(--ink-soft); font-weight: 500; }
.gs-chat { padding: 0.7rem 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; }
.gs-msg { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.9rem; }
.gs-msg .who { font-weight: 700; color: var(--sky); flex-shrink: 0; }
.gs-msg .txt { color: var(--ink); }
.gs-msg.correct { background: #eafaf3; border: 2px solid var(--mint); border-radius: 12px; padding: 0.35rem 0.6rem; font-weight: 700; }
.gs-msg.correct .who { color: var(--mint); }
.gs-msg.correct .pts { margin-left: auto; color: var(--mint); font-weight: 700; }
.gs-input { display: flex; gap: 0.5rem; padding: 0 1rem 1rem; }
.gs-input .fake { flex: 1; border: 2px solid var(--line); border-radius: 999px; padding: 0.5rem 0.9rem; color: #b7ad9c; font-size: 0.85rem; }
.gs-input .send { background: var(--sky); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 0.5rem 0.9rem; font-weight: 700; font-size: 0.85rem; }

/* floating doodle decorations */
.doodle { position: absolute; pointer-events: none; opacity: 0.9; }

/* ===== Cards / grids ===== */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.96rem; }
.badge-num {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--sunny); border: 2.5px solid var(--ink); font-family: var(--font-heading);
  font-size: 1.7rem; margin-bottom: 0.9rem; transform: rotate(-4deg);
}
.card--sky .badge-num { background: var(--sky); color: #fff; }
.card--mint .badge-num { background: var(--mint); color: #fff; }
.card--coral .badge-num { background: var(--coral); color: #fff; }

/* section heading block */
.sec-head { margin-bottom: 2.4rem; }
.sec-head .lead { margin-top: 0.6rem; }

/* ===== Steps (round flow) ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; position: relative; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step-icon { width: 64px; height: 64px; margin-bottom: 0.8rem; }

/* ===== Mode chips ===== */
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.7rem; border-radius: 999px; border: 2px solid var(--ink); }
.tag--coral { background: var(--coral); color: #fff; }
.tag--sky { background: var(--sky); color: #fff; }
.tag--sunny { background: var(--sunny); }
.tag--mint { background: var(--mint); color: #fff; }

/* ===== Gallery ===== */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .gal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gal-grid { grid-template-columns: 1fr; } }
.gal-card { background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .14s ease; }
.gal-card:hover { transform: rotate(-1deg) translateY(-3px); }
.gal-art { background:
  linear-gradient(#eef4fb 1px, transparent 1px),
  linear-gradient(90deg, #eef4fb 1px, transparent 1px);
  background-size: 20px 20px; background-color: #fbfdff; aspect-ratio: 4/3; position: relative; }
.gal-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gal-meta { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-top: 2px dashed var(--line); }
.gal-meta .word { font-family: var(--font-heading); font-size: 1.35rem; }
.gal-meta .by { font-size: 0.8rem; color: var(--ink-soft); }
.gal-like { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; font-size: 0.9rem; color: var(--coral); }
.gal-like svg { width: 18px; height: 18px; }
.gal-rank { position: absolute; top: 0.6rem; left: 0.6rem; background: var(--sunny); border: 2px solid var(--ink); border-radius: 10px; font-family: var(--font-heading); font-size: 1.2rem; width: 34px; height: 34px; display: grid; place-items: center; transform: rotate(-6deg); z-index: 2; }

/* ===== Testimonials ===== */
.review-card { background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.review-card .stars { color: var(--sunny); letter-spacing: 2px; margin-bottom: 0.6rem; }
.review-card p { color: var(--ink); font-size: 1rem; }
.review-user { display: flex; align-items: center; gap: 0.7rem; margin-top: 1rem; }
.review-user img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.review-user .nm { font-weight: 700; font-size: 0.92rem; }
.review-user .role { font-size: 0.8rem; color: var(--ink-soft); }

/* ===== Photo frames ===== */
.photo-frame { border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.tape { position: relative; }
.tape::before { content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-3deg); width: 90px; height: 26px; background: rgba(255,201,60,0.75); border: 1px dashed rgba(43,43,43,0.3); z-index: 3; }

/* ===== CTA band ===== */
.cta-band { background: var(--ink); color: #fff; border-radius: 28px; padding: clamp(2.5rem,6vw,4rem); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e7e3da; max-width: 44ch; margin: 0.8rem auto 1.6rem; }
.cta-band .btn { box-shadow: 5px 5px 0 rgba(255,255,255,0.18); }

/* ===== Feature split ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem); align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 820px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.checklist li { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.7rem; font-weight: 500; }
.checklist li svg { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; }

/* ===== Scoreboard mock ===== */
.scoreboard { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; max-width: 420px; }
.sb-head { background: var(--mint); color: #fff; padding: 0.8rem 1.2rem; font-family: var(--font-heading); font-size: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.sb-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.2rem; border-bottom: 2px dashed var(--line); }
.sb-row:last-child { border-bottom: 0; }
.sb-rank { font-family: var(--font-heading); font-size: 1.4rem; width: 30px; }
.sb-row:nth-child(2) .sb-rank { color: var(--sunny); }
.sb-ava { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.sb-nm { font-weight: 700; flex: 1; }
.sb-pts { font-weight: 700; color: var(--sky); }

/* ===== Room list mock ===== */
.roomlist { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.rl-head { background: var(--sky); color: #fff; padding: 0.9rem 1.2rem; font-family: var(--font-heading); font-size: 1.5rem; }
.rl-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1.2rem; border-bottom: 2px dashed var(--line); }
.rl-item:last-child { border-bottom: 0; }
.rl-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 2px solid var(--ink); font-size: 1.3rem; flex-shrink: 0; }
.rl-info { flex: 1; }
.rl-info .rl-nm { font-weight: 700; }
.rl-info .rl-sub { font-size: 0.82rem; color: var(--ink-soft); }
.rl-join { font-size: 0.8rem; font-weight: 700; padding: 0.35rem 0.85rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--sunny); }
.rl-full { background: #eee; color: #999; }

/* ===== Forms ===== */
.form-card { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-lg); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 0.75rem 0.9rem; border: 2px solid var(--ink);
  border-radius: 12px; background: var(--paper-2); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(74,163,255,0.2); }
.field .hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.3rem; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); }

/* store badges */
.stores { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.store-badge { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--ink); color: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 0.6rem 1.1rem; box-shadow: var(--shadow); transition: transform .12s ease; }
.store-badge:hover { transform: translate(-2px,-2px); }
.store-badge svg { width: 26px; height: 26px; }
.store-badge .s1 { font-size: 0.68rem; opacity: 0.8; line-height: 1; }
.store-badge .s2 { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }

/* faq */
.faq details { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 0.4rem 1.2rem; margin-bottom: 0.9rem; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; padding: 0.7rem 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-heading); font-size: 1.6rem; color: var(--coral); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 0.9rem; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #e7e3da; padding-block: 3rem 2rem; margin-top: 2rem; }
.site-footer a { color: #e7e3da; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } }
.footer-grid h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.8rem; color: #fff; }
.footer-grid li { margin-bottom: 0.45rem; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--sunny); }
.footer-brand p { color: #b8b3a9; font-size: 0.88rem; max-width: 34ch; margin-top: 0.7rem; }
.footer-brand img { width: 150px; filter: none; }
.footer-bottom { border-top: 1px solid #453f38; padding-top: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: #b8b3a9; }
.legal-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.legal-open { background: none; border: 0; padding: 0; cursor: pointer; color: #e7e3da; font: inherit; text-decoration: underline; }
.legal-open:hover { color: var(--sunny); }

/* ===== Modal ===== */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--space); }
.modal__backdrop { position: absolute; inset: 0; background: rgba(43,43,43,0.6); }
.modal__panel { position: relative; z-index: 1; width: min(720px, 100%); max-height: 85vh; overflow-y: auto; background: var(--paper-2); color: var(--ink); padding: 2.2rem; border-radius: var(--radius); border: 3px solid var(--ink); box-shadow: var(--shadow-lg); }
.modal__panel h2 { font-family: var(--font-heading); margin-bottom: 1rem; }
.modal__panel h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; margin: 1.3rem 0 0.4rem; }
.modal__panel p, .modal__panel li { font-size: 0.9rem; color: var(--ink-soft); }
.modal__panel ul { list-style: disc; padding-left: 1.2rem; margin: 0.4rem 0; }
.modal__panel table { width: 100%; border-collapse: collapse; margin: 0.6rem 0; font-size: 0.85rem; }
.modal__panel th, .modal__panel td { border: 1.5px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; }
.modal__panel th { background: #fff2d6; }
.modal__close { position: absolute; top: 0.9rem; right: 1rem; background: none; border: 0; font-size: 1.9rem; line-height: 1; cursor: pointer; color: var(--ink); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Utilities ===== */
.wave-sep { display: block; width: 100%; height: 28px; }
.mt-2 { margin-top: 2rem; } .mt-1 { margin-top: 1rem; }
.rotate-1 { transform: rotate(-1.5deg); } .rotate-2 { transform: rotate(1.5deg); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 10px 0; z-index: 2000; }
.skip-link:focus { left: 0; }

@media (max-width: 768px) { :root { --space: 0.9rem; } .hero-stats { gap: 1.1rem; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
