@import url('https://fonts.googleapis.com/css2?family=Jua&family=Gaegu:wght@700&family=Nunito:wght@600;800&display=swap');

:root {
  --orange: #FF6B1B;
  --yellow: #FFEC83;
  --blue: #4D76C6;
  --green: #3BA55C;
  --cream: #FFF8E6;
  --ink: #2B2B3A;
  --ink-soft: #5c5c6e;
  --shadow: 0 10px 30px rgba(43, 43, 58, .12);
  --round: 'Jua', 'Nunito', sans-serif;
  --hand: 'Gaegu', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', 'Jua', sans-serif; color: var(--ink); background: var(--yellow); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; cursor: pointer; background: none; color: inherit; }

/* 상단 바 */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 22px 40px; }
.logo { font-family: var(--round); font-size: 26px; color: #fff; }
.logo small { font-family: 'Nunito'; font-size: 13px; opacity: .85; margin-left: 6px; }
.nav-link { font-family: var(--round); color: #fff; background: rgba(255,255,255,.2); padding: 10px 20px; border-radius: 999px; }

/* 별 장식 */
.star { position: absolute; width: var(--s, 28px); height: var(--s, 28px); background: var(--c, #FFD43B); transform: rotate(var(--r, 0deg));
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); z-index: 1; pointer-events: none; }

/* 구름 물결 경계 */
.section { position: relative; padding: 110px 24px 100px; }
.cloud-top::before { content: ''; position: absolute; left: 0; right: 0; top: -34px; height: 70px;
  background: radial-gradient(circle 36px at 50% 36px, var(--bg) 98%, transparent 100%) 0 0 / 72px 70px repeat-x; }
.inner { max-width: 1080px; margin: 0 auto; position: relative; z-index: 2; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--round); font-size: 22px; padding: 16px 34px; border-radius: 999px;
  background: var(--orange); color: #fff; box-shadow: 0 8px 0 #d24f0b, var(--shadow); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #d24f0b; }
.btn.white { background: #fff; color: var(--orange); box-shadow: 0 8px 0 #f1d9c6, var(--shadow); }

.title { font-family: var(--round); font-size: clamp(30px, 4vw, 44px); color: var(--orange); text-align: center; }
.sub { text-align: center; color: var(--ink-soft); margin-top: 10px; font-size: 17px; line-height: 1.6; }
.hand { font-family: var(--hand); }

/* 말풍선 */
.bubble { position: relative; background: #fff; border-radius: 24px; padding: 18px 24px; box-shadow: var(--shadow); font-size: 17px; line-height: 1.6; }

/* ===== 메인 ===== */
.hero { background: var(--orange); --bg: var(--orange); min-height: min(92vh, 860px); padding: 120px 24px 60px; display: flex; align-items: center; overflow: hidden; }
.hero .inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; width: 100%; }
.hero h1 { font-family: var(--round); color: #fff; font-size: clamp(52px, 7vw, 92px); line-height: 1.05; }
.hero h1 span { display: block; font-size: .42em; margin-top: 10px; opacity: .9; }
.hero .tagline { font-family: var(--hand); color: var(--yellow); font-size: 30px; margin: 18px 0 8px; }
.hero p { color: #fff; font-size: 19px; line-height: 1.6; max-width: 460px; margin-bottom: 34px; opacity: .95; }
.hero-img { position: relative; }
.hero-img::before { content: ''; position: absolute; inset: 12% 4% 2%; background: rgba(255,255,255,.18); border-radius: 50%; }
.hero-img img { position: relative; width: 100%; filter: drop-shadow(0 20px 30px rgba(0,0,0,.18)); }
.letter-float { position: absolute; font-family: var(--round); color: #fff; opacity: .9; z-index: 2; }

.features { background: var(--yellow); --bg: var(--yellow); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.card { background: #fff; border-radius: 36px; padding: 36px 28px 32px; text-align: center; box-shadow: var(--shadow); }
.card .num { font-family: var(--hand); color: var(--blue); font-size: 22px; }
.card .glyph { width: 120px; height: 120px; margin: 14px auto 18px; border-radius: 50%; display: grid; place-items: center; font-family: var(--round); font-size: 56px; }
.card h3 { font-family: var(--round); font-size: 26px; color: var(--orange); }
.card p { color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }

.start { background: var(--blue); --bg: var(--blue); text-align: center; color: #fff; }
.start .title { color: #fff; }
.start .sub { color: rgba(255,255,255,.85); }
.start-row { display: flex; align-items: flex-end; justify-content: center; gap: 30px; margin-top: 30px; }
.start-row img { width: 220px; filter: drop-shadow(0 14px 20px rgba(0,0,0,.2)); }
.start-row .bubble { max-width: 340px; color: var(--ink); margin-bottom: 120px; font-family: var(--hand); font-size: 24px; }

.foot { position: relative; background: var(--green); --bg: var(--green); color: #fff; text-align: center; padding: 60px 24px 40px; font-family: var(--round); font-size: 22px; }

/* ===== 글자판 ===== */
.board-hero { background: var(--blue); --bg: var(--blue); padding: 110px 24px 70px; color: #fff; overflow: hidden; }
.board-hero .inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.board-hero h1 { font-family: var(--round); font-size: clamp(38px, 5vw, 60px); }
.board-hero p { font-size: 18px; opacity: .9; margin-top: 10px; }
.board-hero img { width: 170px; filter: drop-shadow(0 14px 20px rgba(0,0,0,.2)); }

.board { background: var(--yellow); --bg: var(--yellow); padding-top: 70px; }
.tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tab { font-family: var(--round); font-size: 20px; padding: 12px 26px; border-radius: 999px; background: rgba(255,255,255,.6); color: var(--ink-soft); transition: .15s; }
.tab.on { background: var(--orange); color: #fff; box-shadow: 0 6px 0 #d24f0b; }
.tabs.sets { margin-top: 18px; }
.tabs.sets .tab { font-size: 17px; padding: 9px 20px; }
.tabs.sets .tab.on { background: #fff; color: var(--blue); box-shadow: var(--shadow); }

.panel { display: grid; grid-template-columns: 1fr 380px; gap: 28px; margin-top: 34px; align-items: start; }
.grid-wrap { background: #fff; border-radius: 32px; padding: 24px; box-shadow: var(--shadow); overflow-x: auto; }
.grid { display: grid; gap: 8px; }
.cell { aspect-ratio: 1; border-radius: 16px; background: var(--cream); font-family: var(--round); font-size: clamp(20px, 2.4vw, 30px); display: grid; place-items: center; transition: .12s; min-width: 44px; }
.cell:hover { background: #ffe2cf; color: var(--orange); transform: scale(1.06); }
.cell.sel { background: var(--orange); color: #fff; }
.cell.head { background: #e7eefb; color: var(--blue); cursor: default; font-size: clamp(18px, 2vw, 24px); }
.cell.head:hover { transform: none; }
.cell.corner { background: none; }

.side { background: #fff; border-radius: 32px; padding: 28px; box-shadow: var(--shadow); text-align: center; position: sticky; top: 20px; }
.big { font-family: var(--round); font-size: 120px; line-height: 1.1; color: var(--ink); }
.roman { font-family: var(--hand); font-size: 32px; color: var(--blue); }
.combo { margin-top: 8px; color: var(--ink-soft); font-size: 18px; }
.combo b { font-family: var(--round); font-weight: 400; color: var(--orange); font-size: 24px; }
.side .btn { font-size: 18px; padding: 12px 26px; margin-top: 18px; }
.hint { color: var(--ink-soft); font-size: 15px; margin-top: 14px; line-height: 1.5; }

.canvas-box { position: relative; width: 300px; height: 300px; margin: 6px auto 0; border-radius: 24px; background: var(--cream); overflow: hidden; }
.canvas-box .guide { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--round); font-size: 230px; color: rgba(77,118,198,.16); pointer-events: none; }
.canvas-box .cross { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(rgba(77,118,198,.12), rgba(77,118,198,.12)) center / 100% 2px no-repeat,
  linear-gradient(rgba(77,118,198,.12), rgba(77,118,198,.12)) center / 2px 100% no-repeat; }
.canvas-box canvas { position: absolute; inset: 0; touch-action: none; }
.row-btns { display: flex; gap: 10px; justify-content: center; }

.quiz-play { width: 120px; height: 120px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 46px; box-shadow: 0 8px 0 #d24f0b; margin: 10px auto 0; display: grid; place-items: center; }
.quiz-play:active { transform: translateY(6px); box-shadow: 0 2px 0 #d24f0b; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.choice { font-family: var(--round); font-size: 44px; padding: 14px 0; border-radius: 20px; background: var(--cream); transition: .12s; }
.choice:hover { background: #ffe2cf; }
.choice.ok { background: #e3f5e8; color: #1f7a3c; }
.choice.no { background: #fbeaee; color: #a9243f; }
.score { display: inline-block; margin-top: 4px; font-family: var(--round); background: #e7eefb; color: var(--blue); padding: 6px 16px; border-radius: 999px; }
.react { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 16px; min-height: 90px; }
.react img { width: 70px; }
.react span { font-family: var(--hand); font-size: 24px; }

.concept { background: var(--green); --bg: var(--green); color: #fff; }
.concept .title { color: #fff; }
.concept-row { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center; margin-top: 40px; }
.concept-row img { width: 100%; filter: drop-shadow(0 14px 20px rgba(0,0,0,.2)); }
.concept-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.concept-cards .bubble { color: var(--ink); text-align: center; }
.concept-cards h4 { font-family: var(--round); font-weight: 400; font-size: 24px; color: var(--green); margin-bottom: 6px; }
.concept-cards .ex { font-family: var(--round); font-size: 34px; color: var(--orange); margin: 6px 0; }

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .nav { padding: 18px 20px; }
  .hero .inner, .panel, .concept-row { grid-template-columns: 1fr; }
  .hero { text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .cards, .concept-cards { grid-template-columns: 1fr; }
  .side { position: static; }
  .start-row img { width: 140px; }
  .start-row .bubble { margin-bottom: 80px; font-size: 20px; }
  .board-hero img { width: 110px; }
  .concept-row img { width: 160px; margin: 0 auto; }
}
