:root{--ink:#30254d;--muted:#7d749c;--purple:#7855ed;--pink:#ff7c9f;--mint:#73dfc0;--yellow:#ffda70;--sky:#8dceff;--border:#e5daf9;--shadow:0 13px 28px rgba(92,72,158,.13)}*{box-sizing:border-box}body{margin:0;min-height:100dvh;font-family:ui-rounded,'Arial Rounded MT Bold','Trebuchet MS','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;color:var(--ink);background:radial-gradient(ellipse at 0 14%,#ffd2e4 0,transparent 36%),radial-gradient(ellipse at 92% 6%,#d4c8ff 0,transparent 33%),radial-gradient(ellipse at 88% 92%,#b7f5e1 0,transparent 35%),#faf5ff}button,select{font:inherit;cursor:pointer}button:focus-visible,select:focus-visible{outline:3px solid #eb9849;outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}.layout{min-height:100dvh;max-width:1150px;margin:auto;display:flex;gap:7vw;align-items:center;justify-content:center;padding:20px}.pitch{width:min(400px,42%);flex-shrink:0}.pitch .smallcaps{font-size:12px;letter-spacing:2.6px;font-weight:1000;color:#7553df}.pitch h1{font-size:clamp(37px,5.3vw,70px);margin:18px 0 15px;line-height:1.04;letter-spacing:-2.6px}.pitch h1 span{color:var(--purple)}.pitch p{font-size:16px;line-height:1.7;color:#766b92}.pitch .tags{display:flex;gap:9px;flex-wrap:wrap;margin:18px 0}.pitch .tags span{font-size:12px;font-weight:800;background:#fff9;padding:9px 12px;border-radius:90px;border:1px solid white}.device{width:396px;height:min(840px,calc(100dvh - 36px));min-height:630px;border:8px solid #2b2543;border-radius:40px;box-shadow:0 28px 72px #534c8350,0 9px 18px #3333552f;background:linear-gradient(155deg,#fffaff 0%,#f7f2ff 50%,#e8fff7 100%);position:relative;display:flex;flex-direction:column;overflow:hidden;flex-shrink:0}.device:before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:110px;height:15px;border-radius:0 0 13px 13px;background:#2b2543;z-index:3}.device:after{content:'';position:absolute;width:240px;height:240px;border-radius:50%;right:-130px;top:160px;background:#fbe0ff74;pointer-events:none}.header{padding:27px 18px 9px;display:flex;align-items:center;gap:7px;justify-content:space-between;z-index:2}.logo{font-size:18px;font-weight:1000;letter-spacing:-.8px;white-space:nowrap}.logo span{color:var(--purple)}.lang{border:1px solid #e7d6ff;background:#fff9;border-radius:12px;color:#5a4793;padding:6px;font-size:12px;font-weight:900;max-width:117px}.round-icon{background:#fff;border:1px solid #e5d7f9;border-radius:50%;font-size:20px;width:34px;height:34px;display:grid;place-items:center}.screen{padding:9px 17px 17px;flex:1;z-index:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d5c5fa transparent}.nav{z-index:2;display:flex;align-items:center;justify-content:space-around;background:#fffdf9e9;border-top:1px solid #eee6f5;padding:10px 5px 14px;backdrop-filter:blur(12px)}.nav button{border:0;background:transparent;min-width:70px;color:#9a8eb0;font-size:11px;font-weight:900;display:flex;align-items:center;flex-direction:column;gap:3px;padding:4px}.nav button span{font-size:23px}.nav button.active{color:var(--purple)}.chip{display:inline-flex;align-items:center;gap:5px;background:#fff1b9;color:#985d1b;border-radius:99px;padding:6px 10px;font-weight:900;font-size:11px}.title{font-weight:1000;font-size:30px;line-height:1.12;margin:10px 0;letter-spacing:-1.2px}.sub{font-size:13px;line-height:1.5;color:var(--muted)}.card{background:#fffdfbea;border:1px solid #fff;border-radius:22px;padding:17px;margin:13px 0;box-shadow:var(--shadow)}.button{border:0;border-radius:17px;background:linear-gradient(125deg,#7a55f3,#a375fc);color:white;font-size:16px;font-weight:1000;min-height:51px;padding:13px 18px;width:100%;box-shadow:0 5px 0 #6141c0,0 10px 22px #8f68ea34;transition:transform .12s}.button:active{transform:translateY(3px);box-shadow:0 2px 0 #6141c0}.button.alt{background:#fff;color:#6449b7;border:2px solid #dfd2ff;box-shadow:0 4px 0 #e3d7fa}.button.pink{background:linear-gradient(120deg,#ff7299,#ffa085);box-shadow:0 5px 0 #e76986}.button:disabled{box-shadow:none}.section{font-size:13px;font-weight:950;margin:18px 0 8px}.hero{position:relative;padding:18px 0 7px}.hero h1{font-size:40px;font-weight:1000;line-height:1.05;letter-spacing:-2px;margin:12px 0 16px;max-width:290px}.hero .accent{display:inline-block;color:var(--purple);background:#fff3a6;border-radius:10px;transform:rotate(-2deg);padding:1px 7px}.bubble{position:absolute;right:4px;top:4px;font-size:62px;filter:drop-shadow(0 6px 8px #bcb0ed8a);transform:rotate(9deg)}.mascot{width:86px;height:82px;display:inline-flex;justify-content:center;align-items:center;border-radius:24px;background:linear-gradient(145deg,#ffd976,#ffa3b9);transform:rotate(-9deg);box-shadow:0 9px 0 #e8a375,0 15px 20px #b47e9b3d;font-size:49px;color:#5f3670;position:relative}.mascot:after{content:'✦';position:absolute;top:-18px;right:-10px;font-size:25px;color:#8b63f9}.homeRow{display:flex;align-items:center;justify-content:space-between;gap:12px}.quick{display:flex;justify-content:space-between;gap:8px;margin:14px 0}.quick span{font-size:11px;background:#efe6ff;color:#674aa9;padding:10px 9px;border-radius:14px;font-weight:800;text-align:center;flex:1}.mode{display:flex;align-items:center;gap:12px;border:2px solid transparent;background:#fff;border-radius:19px;width:100%;padding:15px 12px;text-align:left;margin:11px 0;box-shadow:0 7px 21px #a9a0c326}.mode:hover{border-color:#baa4fc}.mode .emoji{width:52px;height:52px;border-radius:16px;background:#f0e8ff;display:grid;place-items:center;font-size:28px}.mode strong{display:block;font-size:16px}.mode small{display:block;font-size:11px;color:#827b9b;margin-top:3px}.mode .chevron{margin-left:auto;color:#8475a6;font-size:25px}.levels{display:flex;gap:8px;margin:12px 0}.level{border:2px solid #ebe2fa;background:white;border-radius:13px;font-size:12px;font-weight:1000;padding:11px 2px;flex:1;color:#827a9b}.level.active{border-color:#8761f7;background:#efe7ff;color:#6441d1}.statbar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.stat{background:#fff;border:1px solid #f7f0ff;border-radius:16px;padding:11px 8px;box-shadow:0 5px 15px #af9dc91a}.stat .meta{font-size:10px;color:#8c80a6;font-weight:900;display:block;white-space:nowrap}.stat strong{font-size:24px;letter-spacing:-.7px}.stat.time strong{color:#ef6e97}.meter{height:7px;background:#e9defb;border-radius:90px;margin:12px 0;overflow:hidden}.meter>div{height:100%;background:linear-gradient(90deg,#ff80a4,#815afb);width:100%;transition:width .25s;border-radius:90px}.ticker{padding:10px 13px;background:#eae0ff;color:#6346a3;border-radius:13px;font-weight:900;font-size:12px;display:flex;justify-content:space-between;gap:7px;margin:8px 0}.compose{border:1px solid #fff;background:linear-gradient(130deg,#fff,#fff4ff);border-radius:25px;box-shadow:var(--shadow);padding:14px;margin:10px 0;text-align:center}.compose .meta{font-size:11px;letter-spacing:1px;color:#9983bb;font-weight:950}.composed{font-size:46px;font-weight:1000;color:#6548bd;min-height:64px;line-height:1.35;margin:5px 0;overflow-wrap:anywhere}.composed.empty{color:#bfb1d6;font-size:27px;padding:13px 0}.chosen{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;min-height:27px}.chosen button{border:0;border-radius:7px;background:#f3eaff;color:#6c4aad;font-size:13px;font-weight:800;padding:3px 6px;min-width:26px}.miniHint{font-size:11px;color:#9e85b9;min-height:17px;margin-top:4px}.rackLabel{display:flex;align-items:center;justify-content:space-between;margin:12px 0 8px;font-weight:900;font-size:12px}.rackLabel span{color:#9e92b6;font-weight:750}.tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:7px 0 12px;min-height:114px}.tile{position:relative;min-height:53px;border-radius:16px;border:2px solid #ffffffb6;font-size:27px;font-weight:1000;box-shadow:0 5px 0 #ae8ce5,0 9px 14px #8f6bc72b;transition:transform .14s,filter .14s;line-height:1}.tile.v{background:linear-gradient(146deg,#a5f9e0,#6be1c1);color:#1f645c;box-shadow:0 5px 0 #4cb59b,0 9px 14px #77c9b328}.tile.c{background:linear-gradient(146deg,#d3befe,#aa90fa);color:#553494}.tile.special{background:linear-gradient(146deg,#ffe49d,#ffc96f);color:#865b18;box-shadow:0 5px 0 #e5ac43}.tile:active{transform:translateY(4px)}.tile.selected{visibility:hidden}.tile .rare-dot{position:absolute;top:3px;right:5px;font-size:10px}.actions{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:8px;margin:13px 0 9px}.action{border:1px solid #e7ddf5;background:#fff;border-radius:14px;min-height:48px;padding:10px 3px;font-size:12px;color:#77668f;font-weight:900}.action.submit{background:linear-gradient(125deg,#7451e8,#a47aff);color:#fff;border:0;box-shadow:0 4px 0 #6141bf}.below{display:flex;justify-content:space-between;gap:7px;align-items:center;margin-top:8px}.smallButton{border:1px solid #e5d9f7;background:#fff;border-radius:11px;padding:8px 10px;font-size:11px;font-weight:900;color:#69518f}.muted{font-size:11px;color:#a399b8;line-height:1.5}.praise{font-weight:950;color:#25a68a;font-size:12px}.toast{position:absolute;z-index:20;bottom:78px;left:14px;right:14px;transform:translateY(14px);opacity:0;pointer-events:none;background:#30244e;color:#fff;padding:13px;border-radius:15px;box-shadow:0 9px 28px #2821424d;text-align:center;font-weight:850;font-size:13px;transition:opacity .2s,transform .2s}.toast.show{opacity:1;transform:translateY(0)}.overlay{position:absolute;inset:0;z-index:15;background:#33264b9c;display:flex;align-items:center;justify-content:center;padding:20px}.modal{width:100%;border-radius:22px;background:white;padding:23px;text-align:center;box-shadow:0 21px 60px #22152b6b}.modal .emoji{font-size:49px}.resultHero{text-align:center}.resultHero .emoji{font-size:65px;margin:5px}.finalScore{text-align:center;font-size:64px;color:#734ee5;font-weight:1000;line-height:1.15;margin:5px 0}.resultGrid{display:flex;gap:9px}.resultGrid .card{flex:1;text-align:center;padding:13px 5px;margin:8px 0}.resultGrid strong{font-size:26px}.term{display:flex;justify-content:space-between;align-items:center;gap:11px;background:#fff;border:1px solid #f0e8fa;border-radius:15px;padding:13px;margin:8px 0;box-shadow:0 4px 14px #aa9acd17}.term b{font-size:20px}.term small{display:block;color:#877b9e;font-size:11px;margin-top:4px}.term button{border:0;border-radius:12px;background:#eee7ff;padding:10px;font-size:19px;min-width:44px;min-height:44px}.progress{height:12px;border-radius:99px;background:#efe3fb;margin:16px 0}.progress .filled{height:100%;background:linear-gradient(90deg,#73ddc3,#8f6aff);border-radius:99px;transition:width .2s}.tutorialTiles{display:flex;gap:7px;justify-content:center;margin:24px 0}.tutorialTiles button{border:2px solid #fff;font-size:34px;font-weight:950;width:58px;height:64px;border-radius:15px;background:#bba7fc;color:#54378f;box-shadow:0 5px 0 #9b7ad9}.tutorialTiles button.v{background:#82ebd0;color:#245d53;box-shadow:0 5px 0 #55b89b}.tutorialTiles button.used{opacity:.17;pointer-events:none}.introAnswer{font-size:48px;text-align:center;color:#7050d8;font-weight:1000;min-height:68px}.footerNote{font-size:10px;color:#968bab;text-align:center;margin:18px 0 5px}.badge{border-radius:99px;background:#efe5ff;color:#704fc9;font-size:11px;padding:6px 10px;display:inline-flex;font-weight:900}.helper{background:#fff3d7;color:#836321;border-radius:12px;padding:11px 12px;font-size:12px;margin:8px 0;line-height:1.5}.inline{display:flex;gap:8px;align-items:center}.emptyList{text-align:center;padding:35px 14px;color:#8b80a1}.emptyList .emoji{font-size:55px}.spark{position:absolute;font-size:34px;opacity:.55;pointer-events:none;animation:float 5s ease-in-out infinite}@keyframes float{50%{transform:translateY(-12px) rotate(10deg)}}.award{font-size:42px;display:block;margin:15px auto;text-align:center}h2{font-size:18px;margin:15px 0 9px}label{font-size:12px;font-weight:800}p{line-height:1.48} @media(max-width:850px){.layout{padding:0;gap:0}.pitch{display:none}.device{border:0;width:100%;max-width:540px;border-radius:0;height:100dvh;min-height:0;box-shadow:none}.device:before{display:none}.header{padding-top:max(13px,env(safe-area-inset-top))}.nav{padding-bottom:max(12px,env(safe-area-inset-bottom))}}@media(max-height:680px){.screen{padding-top:5px}.tiles{gap:5px}.tile{min-height:43px}.compose{padding:10px;margin:7px 0}.composed{font-size:36px;min-height:48px}.stat{padding:8px 7px}.stat strong{font-size:20px}.header{padding-bottom:4px}.actions{margin:8px 0 5px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}

/* Stage 3.1: full dictionary lookup */
.dictionary-search { width:100%; margin:12px 0; padding:14px; font-size:15px; color:#32294f; background:white; border:2px solid #ded5fd; border-radius:15px; outline:none; box-sizing:border-box; }
.dictionary-search:focus { border-color:#7757f3; box-shadow:0 0 0 3px #7855ed22; }
.dictionary-entry { margin-top:8px; }
.entry-content {min-width:0;flex:1;overflow-wrap:anywhere;}
.entry-content small {display:block;line-height:1.5;}

/* v4: cloud account and accessible error recovery */
.nav button{min-width:0;flex:1}.nav{gap:2px}.nav button span{font-size:21px}.nav button small{font-size:10px}.fatal{margin:22px 0;background:#fff;border:2px solid #ff9ba9;padding:20px;border-radius:20px;color:#3f3158}.fatal button{padding:12px;border:0;border-radius:10px;background:#7855ed;color:white;font-weight:900}.cloud-fine{font-size:12px;color:#897b9c}

/* Optional Hangul Basics — colorful, playful 5-quest learning menu. */
.nav{justify-content:space-between;gap:1px;padding-left:3px;padding-right:3px}
.nav button{min-width:0;flex:1;font-size:10px;padding:4px 2px}
.nav button span{font-size:21px}
.nav button small{font-size:10px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.basicHero{padding:10px 0 2px}
.basicBar{height:10px;background:#e8dcff;border-radius:30px;overflow:hidden;margin-top:13px}
.basicBar>div{height:100%;background:linear-gradient(90deg,#8f73fa,#71dec5);border-radius:30px;transition:width .2s}
.basicLessonRow{border:1px solid #efdef8;background:linear-gradient(110deg,#fff,#fff7fb);border-radius:18px;padding:13px 11px;display:flex;align-items:center;gap:11px;width:100%;margin:9px 0;text-align:left;box-shadow:0 5px 13px #9684c017;min-height:76px}
.basicLessonRow:hover{border-color:#ab8df7}
.basicIcon{font-size:28px;width:43px;height:43px;border-radius:13px;background:#f0e7ff;display:grid;place-items:center;flex-shrink:0}
.basicLessonText{flex:1;min-width:0}.basicLessonText strong{display:block;font-size:14px;color:#382659}.basicLessonText small{color:#867ca4;display:block;font-size:11px;margin-top:4px;line-height:1.4}.basicEnd{color:#7655d5;font-size:23px}
.basicExamples{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:10px 0}
.basicExample{border:1px solid #edddff;background:#fff;border-radius:12px;min-height:68px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#6046a3}
.basicExample strong{font-size:24px}.basicExample small{font-size:10px;color:#9680ad}
.basicChallenge{background:linear-gradient(130deg,#fff7df,#ffedfa);border-radius:22px;padding:17px;text-align:center;margin:15px 0;box-shadow:0 7px 21px #b399c32a}
.basicQuestion{font-weight:950;color:#9259bc}.basicChallenge>p{font-size:13px;line-height:1.5;color:#635578}
.basicAnswer{font-size:47px;font-weight:1000;min-height:73px;color:#6546bf;line-height:1.4;overflow-wrap:anywhere}
.basicTileTray{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:13px 0 18px}
.basicTile{min-width:48px;height:55px;background:linear-gradient(145deg,#bca3ff,#8e6df0);border:2px solid #fff8;color:white;border-radius:14px;box-shadow:0 5px 0 #7654cd;font-size:25px;font-weight:1000}
.basicTile:disabled{opacity:.4;box-shadow:none}.basicSuccess{background:#e3fff3;border-radius:16px;padding:11px;margin:12px 0;color:#177f6f;font-weight:900;font-size:14px;display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(max-width:400px){.basicExamples{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.basicTile{min-width:41px}}
