/* ==========================================================================
   AILO Public P09 — 코딩놀이터 (어린이 코딩학원)
   원형: C 분할 대형 사진형 — 흰 고정 헤더·메가메뉴, 글 40% + 아이 실사 60%(얼굴 작게) + 사진 위 코딩 블록 카드(보조),
         수업 단계 · 미니 코딩 게임 · 숫자 띠 · 시간표 · 체험 신청
   타이포: Pretendard + Nunito(영문·숫자, 둥근 산세리프 — 한글 제목은 Pretendard)
   컬러: 아동 니치 2색 — 블루 #2e5fb8 + 옐로 #f2b630(글자 #111), 1px 선, 둥근 모서리
   ========================================================================== */

:root {
  --ailo-bg: #ffffff;
  --ailo-fg: #171b26;
  --ailo-muted: #4c5466;
  --ailo-line: #dfe4ee;
  --ailo-accent: #2e5fb8;
  --ailo-accent-ink: #ffffff;
  --ailo-header-h: 80px;

  --p09-y: #f2b630;
  --p09-y-soft: #fdf3dc;
  --p09-b-soft: #eaf0fa;
  --p09-soft: #f6f8fc;
  --p09-dark: #142347;
  --p09-num: "Nunito", "Pretendard Variable", Pretendard, sans-serif;
  --p09-sec: clamp(80px, 9vw, 128px);
  --p09-r: 16px;
  --ailo-mega-col: 6.75em;
  --ailo-mega-col-md: 5.5em;
}

body { font-size: 17px; line-height: 1.7; }
.sec { padding-block: var(--p09-sec); }
.ailo-eyebrow { font-family: var(--p09-num); font-weight: 900; letter-spacing: .1em; }
.head-note { max-width: 28em; font-size: 16.5px; color: var(--ailo-muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px; font-size: 16px; font-weight: 800; transition: background-color .2s, transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--b { background: var(--ailo-accent); color: #fff; }
.btn--b:hover { color: #fff; background: color-mix(in srgb, var(--ailo-accent) 85%, #000); }
.btn--y { background: var(--p09-y); color: #111; }
.btn--y:hover { color: #111; background: color-mix(in srgb, var(--p09-y) 88%, #000); }
.btn--line { border-color: rgba(255, 255, 255, .5); background: transparent; color: #fff; }
.btn--line:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.btn:disabled { opacity: .5; transform: none; }

/* ===== 헤더 ===== */
.hd { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--ailo-line); transition: box-shadow .3s; }
.hd.is-scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }
.hd__in { height: var(--ailo-header-h); display: flex; align-items: center; gap: 16px; }
.hd__logo, .ft__logo { display: inline-flex; gap: 3px; flex: none; }
.lb { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: 18px; font-weight: 900; }
.lb--b { background: var(--ailo-accent); color: #fff; }
.lb--y { background: var(--p09-y); color: #111; }
.hd__nav { flex: 1; display: flex; justify-content: center; }
@media (max-width: 991.98px) { .hd__nav.ailo-mega { display: none; } }
.hd__nav .ailo-mega__link { font-weight: 700; }
.hd__cta { flex: none; display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--p09-y); color: #111; font-size: 15px; font-weight: 800; }
.hd__cta:hover { color: #111; background: color-mix(in srgb, var(--p09-y) 88%, #000); }
.mnav { background: #fff; }
.mnav__in { display: flex; flex-direction: column; padding: calc(var(--ailo-header-h) + 16px) var(--ailo-gutter) 40px; }
.mnav__in > a { padding: 16px 0; border-bottom: 1px solid var(--ailo-line); font-size: 21px; font-weight: 800; }
.mnav__in > a.mnav__cta { margin-top: 24px; padding: 16px; border: 0; border-radius: 999px; background: var(--ailo-accent); color: #fff; text-align: center; font-size: 17px; }

/* ===== 히어로 ===== */
.hero { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); min-height: clamp(580px, calc(100svh - var(--ailo-header-h)), 840px); background: var(--p09-b-soft); }
.hero__copy { display: flex; align-items: center; justify-content: flex-end; }
.hero__copy-in { width: 100%; max-width: 560px; padding: 64px clamp(28px, 4vw, 64px) 64px var(--ailo-gutter); }
.hero__chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--ailo-accent); border-radius: 999px; background: #fff; font-size: 15px; font-weight: 700; color: var(--ailo-accent); }
.hero__title { margin-top: 20px; font-size: clamp(36px, 3.2vw + 14px, 68px); font-weight: 900; line-height: 1.2; letter-spacing: -.04em; }
.hero__lead { margin-top: 22px; font-size: 17.5px; color: #3a4252; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero__photo { position: relative; margin: 0; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.code-stack { position: absolute; left: clamp(20px, 3vw, 48px); bottom: clamp(20px, 3vw, 48px); display: grid; justify-items: start; gap: 2px; padding: 18px; border-radius: var(--p09-r); background: rgba(255, 255, 255, .95); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .3); }
.cb { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-size: 14.5px; font-weight: 700; }
.cb--event { background: var(--p09-y); color: #111; border-radius: 14px 14px 8px 8px; }
.cb--ctrl { background: var(--ailo-accent); color: #fff; }
.cb--in { margin-left: 18px; background: var(--p09-b-soft); color: var(--ailo-accent); }
.cb--end { background: var(--p09-y-soft); color: #5a4307; }

/* ===== 소개 ===== */
.puzzle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pz { padding: 34px 30px; border-radius: var(--p09-r); background: var(--p09-b-soft); }
.pz--y { background: var(--p09-y-soft); }
.pz__ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--ailo-accent); color: #fff; font-size: 22px; }
.pz--y .pz__ic { background: var(--p09-y); color: #111; }
.pz h3 { margin: 18px 0 8px; font-size: 22px; font-weight: 900; }
.pz p { font-size: 16.5px; color: var(--ailo-muted); }

/* ===== 수업 과정 ===== */
.course { background: var(--p09-soft); }
.course__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.course__img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-top: 28px; border-radius: var(--p09-r); }
.course__plus { margin-top: 18px; padding: 14px 18px; border-radius: 12px; background: var(--p09-y-soft); font-size: 15.5px; color: #4a3a12; }
.course__plus i { color: #b5830f; margin-right: 6px; }
.levels { display: grid; gap: 12px; }
.lvl { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; padding: 22px 24px; border: 1px solid var(--ailo-line); border-radius: var(--p09-r); background: #fff; }
.lvl:nth-child(1) { margin-right: 80px; } .lvl:nth-child(2) { margin-right: 60px; } .lvl:nth-child(3) { margin-right: 40px; } .lvl:nth-child(4) { margin-right: 20px; }
.lvl__age { display: grid; place-items: center; height: 56px; border-radius: 12px; background: var(--ailo-accent); color: #fff; font-size: 17px; font-weight: 900; }
.lvl:nth-child(even) .lvl__age { background: var(--p09-y); color: #111; }
.lvl h3 { font-size: 19px; font-weight: 900; }
.lvl p { font-size: 15.5px; color: var(--ailo-muted); }

/* ===== 미니 코딩 게임 ===== */
.play { background: var(--p09-dark); color: #fff; }
.play__eyebrow { --ailo-eyebrow-color: var(--p09-y); }
.play__lead { color: rgba(255, 255, 255, .8) !important; }
.game { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; max-width: 1040px; margin-inline: auto; }
.board { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--p09-r); background: #fff; overflow: hidden; }
.board__grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); }
.board__grid span { border: 1px solid #e8ecf4; }
.board__grid span:nth-child(even) { background: var(--p09-soft); }
.rock, .goal, .robot { position: absolute; width: 20%; height: 20%; left: calc(var(--x) * 20%); top: calc(var(--y) * 20%); display: grid; place-items: center; }
.rock::before { content: ""; width: 60%; height: 50%; background: #9aa3b5; border-radius: 50% 46% 40% 44% / 60% 58% 42% 40%; }
.goal i { font-size: clamp(26px, 4vw, 38px); color: var(--p09-y); }
.robot { z-index: 2; transition: left .4s var(--ailo-ease), top .4s var(--ailo-ease); }
.robot i { font-size: clamp(26px, 4vw, 38px); color: var(--ailo-accent); rotate: var(--r, 0deg); transition: rotate .3s; }
.robot.is-bump i { color: #b4472f; animation: p09-shake .4s; }
.robot.is-win i { color: #2b8a57; }
@keyframes p09-shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
.console { display: grid; gap: 16px; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.pb { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--ailo-accent); color: #fff; font-size: 15.5px; font-weight: 800; }
.pb[data-cmd="L"], .pb--L { background: var(--p09-y); color: #111; }
.pb[data-cmd="R"], .pb--R { background: #e8eefb; color: var(--ailo-accent); }
.palette .pb:hover { transform: translateY(-2px); }
.program { min-height: 200px; padding: 16px; border: 1px dashed rgba(255, 255, 255, .35); border-radius: var(--p09-r); }
.program__title { display: inline-flex; gap: 10px; align-items: center; padding: 8px 14px; border-radius: 14px 14px 6px 6px; background: var(--p09-y); color: #111; font-size: 15px; font-weight: 800; }
.program__title span { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .6); font-family: var(--p09-num); font-size: 14px; }
.program__list { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
.program__list .pb { min-height: 38px; font-size: 14.5px; }
.program__list .is-now { outline: 2px solid #fff; outline-offset: 2px; }
.program__empty { margin: 14px 4px 0; font-size: 15px; color: rgba(255, 255, 255, .6); }
.console__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.console__msg { padding: 12px 16px; border-radius: 14px 14px 14px 4px; background: #fff; color: var(--ailo-fg); font-size: 15.5px; font-weight: 700; }

/* ===== 숫자 띠 ===== */
.nums { background: var(--ailo-accent); color: #fff; padding-block: clamp(52px, 5vw, 80px); }
.nums__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.nb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; padding: 0 28px; border-left: 1px solid rgba(255, 255, 255, .22); }
.nb:first-child { border-left: 0; padding-left: 0; }
.nb b { font-family: var(--p09-num); font-size: clamp(38px, 2.6vw + 16px, 60px); font-weight: 900; line-height: 1.1; }
.nb small { font-size: 17px; font-weight: 800; color: var(--p09-y); }
.nb span { flex-basis: 100%; font-size: 16px; color: rgba(255, 255, 255, .82); }

/* ===== 선생님 ===== */
.tc-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tc { padding: 18px 18px 24px; border: 1px solid var(--ailo-line); border-radius: var(--p09-r); }
.tc__ph { overflow: hidden; border-radius: 12px; }
.tc__ph img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tc__nick { display: inline-block; margin-top: 16px; padding: 3px 10px; border-radius: 999px; background: var(--p09-y-soft); font-size: 14px; font-weight: 800; color: #5a4307; }
.tc:nth-child(even) .tc__nick { background: var(--p09-b-soft); color: var(--ailo-accent); }
.tc h3 { margin: 8px 0 6px; font-size: 20px; font-weight: 900; }
.tc p:last-child { font-size: 15.5px; color: var(--ailo-muted); }

/* ===== 시간표 ===== */
.timetable { background: var(--p09-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; max-width: 520px; font-size: 15px; color: var(--ailo-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 4px; }
.lv1 { --lv-bg: var(--p09-y-soft); --lv-fg: #5a4307; }
.lv2 { --lv-bg: #fbe6a8; --lv-fg: #4a3706; }
.lv3 { --lv-bg: var(--p09-b-soft); --lv-fg: #22468a; }
.lv4 { --lv-bg: #c9d8f3; --lv-fg: #1d3c78; }
.lv5 { --lv-bg: var(--ailo-accent); --lv-fg: #fff; }
.dot { background: var(--lv-bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.tbl-wrap { overflow-x: auto; border-radius: var(--p09-r); background: #fff; border: 1px solid var(--ailo-line); }
.tbl { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 15.5px; }
.tbl th, .tbl td { padding: 10px; border-bottom: 1px solid var(--ailo-line); text-align: center; }
.tbl thead th { padding: 14px 10px; background: var(--p09-dark); color: #fff; font-weight: 800; }
.tbl tbody th { font-family: var(--p09-num); font-weight: 900; color: var(--ailo-accent); white-space: nowrap; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.slot { position: relative; display: block; padding: 10px 8px; border-radius: 10px; background: var(--lv-bg); color: var(--lv-fg); font-weight: 700; font-size: 15px; }
.slot em { display: block; font-style: normal; font-size: 13px; opacity: .85; }
.tbl-note { margin-top: 16px; font-size: 14.5px; color: var(--ailo-muted); }
.tbl-note i { color: var(--ailo-accent); margin-right: 6px; }

/* ===== 소식 ===== */
.news__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.news__box { padding: 28px; border: 1px solid var(--ailo-line); border-radius: var(--p09-r); }
.news__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.news__top h2 { font-size: 24px; font-weight: 900; }
.news__top a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--p09-b-soft); font-size: 14.5px; font-weight: 800; color: var(--ailo-accent); }
.news__box:nth-child(2) .news__top a { background: var(--p09-y-soft); color: #5a4307; }
.ailo-postlist__date { font-family: var(--p09-num); font-weight: 700; }

/* ===== 연혁 ===== */
.history { background: var(--p09-soft); padding-bottom: 0; }
.hist__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: end; }
.tower { display: grid; gap: 8px; }
.tower li { padding: 16px 22px; border-radius: 12px; background: #fff; border: 1px solid var(--ailo-line); font-size: 16.5px; }
.tower li:nth-child(odd) { margin-left: 32px; }
.tower li:first-child { background: var(--ailo-accent); border-color: var(--ailo-accent); color: #fff; }
.tower b { margin-right: 12px; font-family: var(--p09-num); font-size: 20px; font-weight: 900; color: var(--ailo-accent); }
.tower li:first-child b { color: var(--p09-y); }
.partners { margin-top: 64px; padding: 28px 0; border-top: 1px solid var(--ailo-line); background: #fff; }

/* ===== 오시는 길 ===== */
.map__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.tmap { position: relative; aspect-ratio: 16 / 11; border-radius: var(--p09-r); background: var(--p09-soft); overflow: hidden; border: 1px solid var(--ailo-line); }
.tmap__road { position: absolute; background: #fff; }
.tmap__road--h { left: 0; right: 0; top: 46%; height: 30px; }
.tmap__road--v { top: 0; bottom: 0; left: 46%; width: 30px; }
.tmap__b { position: absolute; display: grid; place-items: center; width: 34%; height: 30%; border-radius: 12px; background: #e3e8f2; font-size: 15px; font-weight: 800; color: var(--ailo-muted); }
.tmap__b--me { background: var(--ailo-accent); color: #fff; }
.tmap__car { position: absolute; left: 47%; top: 47%; color: var(--p09-y); font-size: 22px; }
.map__title { font-size: clamp(26px, 1.2vw + 18px, 40px); }
.map__info ul { margin-top: 24px; border-top: 1px solid var(--ailo-fg); }
.map__info li { display: flex; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--ailo-line); font-size: 16.5px; }
.map__info li i { width: 18px; color: var(--ailo-accent); }

/* ===== 체험 신청 ===== */
.consult { padding-top: 0; }
.cf { display: grid; grid-template-columns: 1fr 1.4fr; overflow: hidden; border-radius: 20px; background: var(--p09-y-soft); }
.cf__head { padding: clamp(28px, 4vw, 56px); background: var(--p09-y); color: #111; }
.cf__head .ailo-eyebrow { --ailo-eyebrow-color: #111; }
.cf__lead { margin-top: 16px; font-size: 17px; }
.cf__body { padding: clamp(24px, 3.5vw, 48px); background: #fff; }
.cf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf__f { display: grid; gap: 6px; }
.cf__f span { font-size: 15px; font-weight: 800; }
.cf__f input, .cf__f select { min-height: 48px; padding: 0 14px; border: 1px solid #c3cbdb; border-radius: 10px; font-size: 16px; background: #fff; }
.cf__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; padding: 0; border: 0; }
.cf__chips legend { float: left; width: 100%; margin-bottom: 8px; font-size: 15px; font-weight: 800; }
.cf__chips label { position: relative; cursor: pointer; }
.cf__chips input { position: absolute; inset: 0; opacity: 0; }
.cf__chips span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid #c3cbdb; border-radius: 999px; font-size: 15px; font-weight: 700; }
.cf__chips input:checked + span { background: var(--ailo-accent); border-color: var(--ailo-accent); color: #fff; }
.cf__chips input:focus-visible + span { outline: 2px solid var(--ailo-accent); outline-offset: 2px; }
.cf__agree { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; font-size: 14.5px; color: var(--ailo-muted); }
.cf__agree input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ailo-accent); flex: none; }

/* ===== 푸터 ===== */
.ft { background: var(--p09-dark); color: rgba(255, 255, 255, .72); padding: 52px 0 36px; font-size: 15px; }
.ft__in { display: grid; grid-template-columns: auto 1fr; gap: 24px 56px; align-items: start; }
.ft__info p { line-height: 1.85; }
.ft__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 !important; }
.ft__links a { color: rgba(255, 255, 255, .8); }
.ft__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ft__links b { color: #fff; }
.ft__copy { font-size: 13px; color: rgba(255, 255, 255, .55); }

/* ===== 반응형 ===== */
@media (max-width: 1279.98px) { .hd__cta { display: none; } }
@media (max-width: 1199.98px) { .tc-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 991.98px) {
  :root { --ailo-header-h: 64px; }
  .ailo-sitemap-btn { display: none; }
  .hd__in .ailo-burger { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__copy-in { max-width: none; padding: 48px var(--ailo-gutter); }
  .hero__photo { aspect-ratio: 4 / 3.4; }
  .puzzle { grid-template-columns: 1fr; gap: 12px; }
  .course__grid, .game, .map__grid, .hist__grid, .cf { grid-template-columns: minmax(0, 1fr); }
  .board { max-width: 440px; margin-inline: auto; }
  .lvl { margin-right: 0 !important; }
  .nums__row { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .nb:nth-child(3) { border-left: 0; padding-left: 0; }
  .news__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .lb { width: 30px; height: 30px; font-size: 16px; }
  .code-stack { left: 14px; bottom: 14px; padding: 12px; }
  .cb { font-size: 13px; padding: 6px 10px; }
  .lvl { grid-template-columns: 72px 1fr; padding: 18px; }
  .nb { padding: 0 14px; }
  .nb:nth-child(odd) { border-left: 0; padding-left: 0; }
  .tc-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tc { padding: 12px 12px 18px; }
  .tc p:last-child { font-size: 14.5px; }
  .news__box { padding: 20px 16px; }
  .tower li:nth-child(odd) { margin-left: 16px; }
  .cf__grid { grid-template-columns: 1fr; }
  .ft__in { grid-template-columns: 1fr; }
  .ailo-postlist a { flex-wrap: wrap; gap: 2px 12px; }
  .ailo-postlist__subject { flex-basis: 100%; order: 2; white-space: normal; }
  .ailo-postlist__date { margin-left: auto; }
}
