/* 문제툭 메인 페이지(한·일·영) — 앱 라이트 색 그대로 */
:root {
    --navy: #1E3A8A;
    --yellow: #FFD43B;
    --orange: #F59E0B;
    --ac: #2F6FED;
    --bg: #FFFFFF;
    --sf: #F4F6F9;
    --line: #E5E8EB;
    --tx: #191F28;
    --tx2: #4E5968;
    --tx3: #8B95A1;
    --ok: #0E8A5F;
    --ok-bg: rgba(18, 162, 107, 0.10);
    --ng: #E5484D;
    --ng-bg: rgba(229, 72, 77, 0.08);
    --wm-ink: var(--navy);
    --wm-accent: var(--orange);
    --f: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Hiragino Sans", "Noto Sans JP", "Noto Sans KR", system-ui, sans-serif;
    --hand: "Nanum Pen Script", cursive;
}

:lang(ja) { --hand: "Yomogi", cursive; }
:lang(en), :lang(es) { --hand: "Caveat", cursive; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--f); color: var(--tx); background: var(--bg); line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
body:lang(ja) { word-break: normal; line-break: strict; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--tx); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 로고 */
.mark { width: 36px; height: 36px; flex: none; }
.wm { height: 22px; width: auto; flex: none; }

/* 머리 */
.hd { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.hd.is-scrolled { border-bottom-color: var(--line); }
.hd .wrap { height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; }
.nav { display: flex; gap: 24px; font-size: 15px; font-weight: 600; color: var(--tx2); }
.nav a:hover { color: var(--tx); }
.hd-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.flag { width: 20px; height: 20px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); }

/* 언어 고르기: 네 언어 모두 같은 글꼴·크기·폭으로 */
.lang-menu { position: relative; }
.lang-btn { all: unset; box-sizing: border-box; cursor: pointer; height: 38px; min-width: 128px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 8px; font: 600 14px/1 var(--f); color: var(--tx); background: var(--bg); }
.lang-btn:hover { border-color: #C9D2DE; }
.lang-btn:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.lang-btn .chev { margin-left: auto; width: 8px; height: 8px; border-right: 1.8px solid var(--tx3); border-bottom: 1.8px solid var(--tx3); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
.lang-btn[aria-expanded="true"] .chev { transform: translateY(2px) rotate(225deg); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px; list-style: none; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.25); z-index: 30; }
.lang-list[hidden] { display: none; }
.lang-list a { height: 44px; padding: 0 10px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--f); color: var(--tx); }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--sf); outline: none; }
.lang-list a[aria-current="page"] { color: var(--ac); }
.lang-list a[aria-current="page"]::after { content: ""; margin-left: auto; width: 5px; height: 10px; border-right: 2px solid var(--ac); border-bottom: 2px solid var(--ac); transform: translateY(-2px) rotate(45deg); }
.get { height: 38px; padding: 0 16px; border-radius: 10px; background: var(--ac); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; }

/* 스토어 버튼 */
.stores { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.store-badge { display: inline-flex; border-radius: 10px; transition: transform 160ms ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 52px; width: auto; }
/* 공식 Google Play 배지는 둘레에 투명 여백이 있다 */
.store-badge img[src*="play.google.com/intl/en_us/badges/"] { height: 75px; margin: -11.5px -8.5px; }
.store-badge img[src*="play.google.com/intl/ja/badges/"], .store-badge img[src*="play.google.com/intl/es/badges/"] { height: 68px; margin: -8px 0; }

/* 첫 화면 */
.hero { padding: 56px 0 40px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.18; letter-spacing: -0.035em; font-weight: 800; }
.hero h1 .t { color: var(--orange); }
.hero-tx > p { margin: 22px 0 32px; font-size: 19px; color: var(--tx2); line-height: 1.65; }
:lang(ja) .hero h1 { font-size: clamp(36px, 4.8vw, 60px); letter-spacing: -0.02em; }
:lang(en) .hero h1, :lang(es) .hero h1 { font-size: clamp(38px, 4.4vw, 52px); letter-spacing: -0.03em; }

/* 필기 → 문제 */
.demo { position: relative; background: var(--sf); border-radius: 32px; padding: 36px 32px 32px; }
.note { position: relative; width: 84%; border-radius: 6px 6px 14px 14px; padding: 18px 22px 22px 46px; transform: rotate(-2deg);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 14px 30px -18px rgba(15, 23, 42, 0.35);
    background-color: #fff;
    background-image: linear-gradient(90deg, transparent 33px, #F2B8B8 33px, #F2B8B8 34.5px, transparent 34.5px), repeating-linear-gradient(#fff 0 35px, #DCE6F2 35px 36px);
    background-position: 0 0, 0 40px; }
.note figcaption { font-size: 12px; font-weight: 700; color: var(--tx3); height: 22px; }
.note ol { list-style: none; font-family: var(--hand); font-size: 25px; line-height: 36px; color: #2B3445; }
:lang(ja) .note ol { font-size: 18px; }
:lang(en) .note ol, :lang(es) .note ol { font-size: 23px; }
.note li span { padding: 0 2px; background: linear-gradient(transparent 58%, transparent 58%); transition: background 0.35s; }
.note li.hl span { background: linear-gradient(transparent 58%, rgba(255, 212, 59, 0.75) 58%); }
.card { position: relative; margin: -4px 0 0 auto; width: 84%; background: #fff; border-radius: 22px; padding: 18px 18px 16px; box-shadow: 0 24px 50px -24px rgba(15, 23, 42, 0.35), 0 0 0 1px var(--line); }
.card.drop { animation: drop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes drop { 0% { transform: translateY(-26px) scale(0.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
.pop { position: absolute; top: -20px; right: -14px; width: 50px; height: 50px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 900; font-size: 19px; display: flex; align-items: center; justify-content: center; transform: rotate(-12deg); box-shadow: 0 6px 14px -6px rgba(30, 58, 138, 0.5); }
:lang(ja) .pop { font-size: 15px; }
:lang(en) .pop, :lang(es) .pop { font-size: 14px; }
.card.drop .pop { animation: pop 0.55s 0.1s both cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { 0% { transform: rotate(-12deg) scale(0); } 100% { transform: rotate(-12deg) scale(1); } }
.kinds { display: flex; gap: 6px; padding-right: 30px; overflow-x: auto; scrollbar-width: none; }
.kinds::-webkit-scrollbar { display: none; }
.kinds button { all: unset; flex: none; white-space: nowrap; cursor: pointer; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--tx3); background: var(--sf); }
.kinds button:focus-visible, .qbox button:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.kinds button.on { background: var(--navy); color: #fff; }
.qbox h3 { font-size: 19px; font-weight: 800; margin: 16px 0 12px; letter-spacing: -0.01em; line-height: 1.45; }
.qbox .blank { display: inline-block; min-width: 72px; border-bottom: 2.5px solid var(--navy); text-align: center; color: var(--ok); }
.ops { display: grid; gap: 8px; }
.ops button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; font-weight: 600; }
.ops button:hover, .chips button:hover, .ox button:hover { border-color: #C9D2DE; }
.ops i { font-style: normal; width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--sf); font-size: 13px; font-weight: 800; color: var(--tx2); display: flex; align-items: center; justify-content: center; }
.ox { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ox button { all: unset; box-sizing: border-box; cursor: pointer; height: 84px; border: 1.5px solid var(--line); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 800; color: var(--tx2); }
:lang(en) .ox button, :lang(es) .ox button { font-size: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { all: unset; box-sizing: border-box; cursor: pointer; height: 44px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; }
.ops button.ok, .chips button.ok, .ox button.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.ops button.ok i { background: var(--ok); color: #fff; }
.ops button.ng, .chips button.ng, .ox button.ng { border-color: var(--ng); background: var(--ng-bg); color: var(--ng); }
.ops button.ng i { background: var(--ng); color: #fff; }
.sa { display: flex; gap: 8px; }
.sa input { flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--sf); padding: 0 14px; font: 600 16px var(--f); color: var(--tx); }
.sa input:focus { outline: none; border-color: var(--ac); }
.sa input.ok { border-color: var(--ok); background: var(--ok-bg); }
.sa input.ng { border-color: var(--ng); }
.sa button { all: unset; cursor: pointer; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--ac); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; }

/* 섹션 공통 */
.sec { padding: 112px 0; }
.sec + .sec { padding-top: 0; }
.sec-h { max-width: 640px; }
.sec-h small { display: block; font-size: 14px; font-weight: 700; color: var(--ac); margin-bottom: 10px; }
.sec-h h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 800; }
.sec-h p { margin-top: 14px; font-size: 17px; color: var(--tx2); }

/* 3단계 */
.steps { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.step { background: var(--sf); border-radius: 20px; padding: 28px 26px 30px; }
.step .no { width: 30px; height: 30px; border-radius: 9px; background: var(--bg); color: var(--ac); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.step:first-child .no { background: var(--navy); color: #fff; }
.step h3 { margin-top: 18px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.step p { margin-top: 6px; font-size: 15.5px; color: var(--tx2); }

/* 홈 칸 */
.groups { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.group h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; }
.tile { background: var(--sf); border-radius: 16px; padding: 18px 16px; }
.tile img { width: 44px; height: 44px; }
.tile b { display: block; margin-top: 12px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.tile span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--tx3); line-height: 1.45; }

/* 자주 묻는 질문 */
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--tx3); border-bottom: 2px solid var(--tx3); transform: rotate(45deg); margin-top: 6px; flex: none; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: 10px; }
.faq p { padding: 0 0 22px; color: var(--tx2); font-size: 15.5px; max-width: 720px; }

/* 마지막 받기 */
.cta { padding: 0 0 112px; }
.cta-box { border-radius: 28px; padding: 56px 48px; display: flex; align-items: center; gap: 32px; background: var(--sf); }
.cta-box .mark { width: 72px; height: 72px; }
.cta-box h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.35; letter-spacing: -0.02em; font-weight: 800; }
.cta-box p { color: var(--tx2); margin-top: 6px; }
.cta-box .stores { margin-left: auto; }

/* 바닥 */
.ft { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--tx3); }
.ft .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.ft nav a { display: inline-flex; align-items: center; gap: 6px; }
.ft nav .flag { width: 16px; height: 16px; }
.ft nav { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--tx2); font-weight: 600; }
.ft .cr { margin-left: auto; }

@media (max-width: 860px) {
    .wrap { width: calc(100% - 32px); }
    .nav, .get { display: none; }
    .hero { padding: 28px 0 8px; }
    .hero-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hero-tx > p { font-size: 17px; margin: 16px 0 24px; }
    .pc { display: none; }
    .demo { padding: 24px 16px 20px; border-radius: 24px; }
    .note { width: 94%; padding: 14px 14px 16px 40px; }
    .note ol { font-size: 21px; }
    :lang(ja) .note ol { font-size: 15px; }
    :lang(en) .note ol, :lang(es) .note ol { font-size: 20px; }
    .card { width: 96%; margin-top: -2px; }
    .pop { right: -6px; width: 44px; height: 44px; font-size: 16px; }
    :lang(ja) .pop, :lang(en) .pop, :lang(es) .pop { font-size: 12.5px; }
    .lang-btn { min-width: 0; width: 116px; height: 36px; gap: 6px; padding: 0 10px 0 8px; font-size: 13.5px; }
    .lang-btn .chev { margin-left: auto; }
    .kinds { gap: 4px; }
    .kinds button { padding: 0 10px; font-size: 13px; }
    .qbox h3 { font-size: 17px; }
    .sec { padding: 72px 0; }
    .steps { grid-template-columns: 1fr; gap: 10px; margin-top: 32px; }
    .step { padding: 22px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
    .step .no { grid-row: 1 / 3; }
    .step h3 { margin-top: 0; font-size: 18px; }
    .step p { margin-top: 2px; font-size: 15px; }
    .groups { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
    .tile { padding: 14px 12px; }
    .tile img { width: 36px; height: 36px; }
    .tile b { font-size: 14.5px; margin-top: 8px; }
    .tile span { display: none; }
    .cta { padding: 0 0 72px; }
    .cta-box { flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 18px; }
    .cta-box .stores { margin-left: 0; }
    .ft .cr { margin-left: 0; width: 100%; }
    .store-badge img { height: 46px; }
    .store-badge img[src*="play.google.com/intl/en_us/badges/"] { height: 66px; margin: -10px -7.5px; }
    .store-badge img[src*="play.google.com/intl/ja/badges/"], .store-badge img[src*="play.google.com/intl/es/badges/"] { height: 60px; margin: -7px 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card.drop, .card.drop .pop { animation: none; }
}
