:root { color-scheme: light; font-family: system-ui, "Apple SD Gothic Neo", sans-serif; color: #442c20; background: #fffaf0; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1180px; margin: auto; padding: 0 12px 24px; }
[hidden] { display: none !important; }
.home-link { display: inline-flex; align-items: center; min-height: 44px; color: #56381f; font-weight: 750; }
#menu { background: #fff; border-radius: 18px; overflow: hidden; }
.banner { width: 100%; height: auto; display: block; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 1%; gap: 2px; }
.cards a { display: grid; place-items: center; border-radius: 16px; touch-action: manipulation; }
.cards img, .cards svg.cardart { display: block; width: 100%; height: auto; }
.art-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.art-footer img { width: 25%; height: auto; }
#lesson { max-width: 720px; margin: auto; padding: clamp(12px, 4vw, 28px); border-radius: 22px; border: 2px solid #e6d6bd; background: #fffdf8; }
h2 { margin: 8px 0 12px; }
#lesson h2 { font-size: clamp(1.15rem, 4.6vw, 1.5rem); word-break: keep-all; }
p { line-height: 1.5; }
button, select { font: inherit; }
button { min-height: 48px; padding: 8px 13px; border: 2px solid #d9bb83; border-radius: 13px; background: #fff0c6; color: inherit; font-weight: 750; cursor: pointer; touch-action: manipulation; }
button[aria-pressed="true"] { background: #ffe098; border-color: #9b5906; }
button:disabled { opacity: .64; cursor: default; }
:focus-visible { outline: 3px solid #196080; outline-offset: 2px; }
.toolbar, .choices, .pieces { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.letters { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 7px; }
.letters button { padding: 6px 2px; font-size: 1.16rem; }
.example { background: #edf7ff; border-radius: 16px; padding: 12px; margin: 12px 0; }
.example strong, .pieces button { font-size: 1.6rem; }
.choices > div { display: grid; gap: 6px; flex: 1 1 80px; }
.choices button:first-child { font-size: 1.3rem; }
/* 🍎 How Many? : 사과를 하나씩 눌러 세기 */
.ap-levels { margin: 8px 0 4px; }
.ap-levels button { min-height: 44px; padding: 6px 12px; }
.ap-ask { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.ap-ask p { margin: 0; font-size: clamp(1.15rem, 5vw, 1.5rem); font-weight: 900; color: #b3402a; }
.ap-say { min-height: 40px; padding: 4px 10px; }
.ap-tally { margin: 0 0 8px; font-weight: 800; color: #6b5a45; }
.ap-bowl { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(2px, 1.2vw, 8px); padding: clamp(8px, 3vw, 16px); border: 2px solid #f0dfae; border-radius: 20px; background: linear-gradient(#fff8e3, #fdf1d4); }
.ap-apple { position: relative; width: clamp(44px, 14vw, 68px); aspect-ratio: 1; min-height: 0; padding: 3px; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #fff, #fffdf4); box-shadow: 0 1px 4px #00000012; }
.ap-apple img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .16s; }
.ap-apple:active img { transform: scale(.9); }
.ap-apple.picked img { animation: ap-bite .4s ease-out; }
.ap-badge { position: absolute; right: -2px; top: -2px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid #fff; border-radius: 11px; background: #b3402a; color: #fff; font-size: .72rem; font-weight: 900; }
.ap-bowl.party .ap-apple.picked img { animation: ap-cheer 1.2s ease-in-out infinite; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.confetti { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.confetti span { position: absolute; left: calc(6% + var(--i) * 7.2%); bottom: 6%; font-size: clamp(14px, 4.4vw, 22px); opacity: 0; animation: confetti-fly 1.6s ease-out forwards; animation-delay: calc(var(--i) * .07s); }
@keyframes ap-bite { 40% { transform: scale(.84) rotate(-7deg); } }
@keyframes ap-cheer { 50% { transform: translateY(-6px) scale(1.05); } }
@keyframes confetti-fly { 0% { opacity: 0; transform: translateY(14px) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-96px) scale(1.2) rotate(20deg); } }
@keyframes ap-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); } }
/* 🔎 소리 찾기 · 🔗 소리 합치기 */
.choices .choice { flex: 1 1 84px; min-height: 64px; font-size: clamp(1.25rem, 5.4vw, 1.6rem); padding: 10px 8px; }
.choices .choice.wrong { animation: ap-shake .45s; background: #ffe1d8; }
.choices .choice.right { background: #d9f2cf; border-color: #3f9a5f; }
.blend-row { display: flex; flex-wrap: wrap; gap: clamp(6px, 2.4vw, 12px); justify-content: center; margin: 14px 0; }
.blend-letter { width: clamp(58px, 20vw, 84px); min-height: clamp(64px, 22vw, 92px); padding: 0; font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 900; border-radius: 20px; background: #fff4d6; border: 3px solid #e6c98a; }
.blend-letter.read { background: #ffe9a8; border-color: #e8833a; color: #b3402a; }
.blend-result { display: grid; justify-items: center; gap: 4px; margin: 12px 0; padding: 12px; border-radius: 18px; background: #eef7ff; animation: ap-arrive .35s ease-out; }
.blend-result span { font-size: clamp(3rem, 13vw, 4.4rem); line-height: 1; }
.blend-result strong { font-size: clamp(1.6rem, 7vw, 2.2rem); color: #196080; }
@keyframes ap-arrive { from { opacity: 0; transform: translateY(8px) scale(.94); } }
/* 🐸 What Can You Do? */
.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.todo-card { display: grid; gap: 3px; justify-items: center; min-height: 108px; padding: 10px 4px; border-radius: 18px; background: #eef7ff; border: 2px solid #cfe3f2; }
.todo-card span { font-size: 2.6rem; line-height: 1; }
.todo-card small { color: #6b7f90; font-size: .78rem; }
.todo-card.acted { animation: act .5s; }
@keyframes act { 30% { transform: translateY(-8px) rotate(-4deg); } 60% { transform: translateY(0) rotate(3deg); } }
.todo-quiz { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.todo-quiz .todo-card span { font-size: 3rem; }
/* 📖 파닉스 읽기 */
.rd-note { margin: 2px 0 4px; color: #6b5a45; font-weight: 700; word-break: keep-all; }
.rd-stages button, .rd-units button, .rd-tabs button { min-height: 44px; padding: 6px 11px; }
.rd-units, .rd-tabs { margin-top: -4px; }
.rd-rule { background: #fff7e0; border: 2px dashed #e6c98a; border-radius: 16px; padding: 10px 14px; }
.rd-rule p { margin: 6px 0; font-weight: 700; word-break: keep-all; }
.rd-compare { display: flex; flex-wrap: wrap; gap: 9px; margin: 8px 0; }
.rd-pair { min-height: 52px; padding: 8px 16px; border-radius: 26px; background: #fff; border-color: #e6c98a; }
.rd-pair s { color: #9a8a76; }
.rd-pair b { color: #b3402a; }
.rd-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 9px; margin: 10px 0; }
.rd-word { position: relative; display: grid; place-items: center; min-height: 74px; padding: 10px 6px; font-size: clamp(1.25rem, 5.2vw, 1.6rem); border-radius: 16px; background: #eef7ff; border-color: #cfe3f2; }
.rd-word .ck, .rd-phrase .ck, .rd-sentence .ck { position: absolute; right: 7px; top: 5px; font-style: normal; font-weight: 900; color: #3f9a5f; opacity: 0; }
.rd-word.read, .rd-phrase.read, .rd-sentence.read { background: #e6f6dc; border-color: #3f9a5f; }
.rd-word.read .ck, .rd-phrase.read .ck, .rd-sentence.read .ck { opacity: 1; }
.rd-phrases { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.rd-phrase { position: relative; min-height: 50px; padding: 8px 34px 8px 14px; border-radius: 25px; background: #fff4d6; border-color: #e6c98a; }
.rd-sentences { display: grid; gap: 9px; margin: 10px 0; }
.rd-sentence { position: relative; min-height: 54px; padding: 10px 40px 10px 14px; text-align: left; border-radius: 16px; background: #fdf3d3; border-color: #f0dfae; font-weight: 800; }
.rd-word span, .rd-phrase span, .rd-sentence span { overflow-wrap: anywhere; }
#feedback { min-height: 1.5em; font-weight: 800; color: #3e6125; word-break: keep-all; overflow-wrap: anywhere; }
#audio-error { color: #a12622; }
#audio-error:empty { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 650px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .todo-grid, .todo-quiz { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
