:root{--bg:#F4F5F7;--p:#7B52FF;--p2:#FF8E9E;--star:#E8B800;--card:#fff;--ink:#1F1F29;--sub:#7A7A88;--pink:#FDE8EB;--line:#E6E6EE;--r:22px}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--ink);font-family:Pretendard,-apple-system,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
body{min-height:100dvh}
#app{max-width:430px;margin:0 auto;min-height:100dvh;padding:16px 16px 96px;position:relative}
button{font:inherit;border:0;cursor:pointer;color:inherit;background:none}
input,textarea{font:inherit;color:inherit}
h1.brand{color:var(--p);font-size:26px;font-weight:800;letter-spacing:-.5px}
.top{display:flex;align-items:center;justify-content:space-between;margin:4px 0 14px;min-height:40px}
.top h2{font-size:22px;font-weight:800;color:var(--p)}
.pill{background:#fff;border-radius:999px;padding:8px 14px;font-weight:800;font-size:16px;display:inline-flex;gap:6px;align-items:center;box-shadow:0 1px 0 var(--line)}
.pill .s{color:var(--star)}
.card{background:var(--card);border-radius:var(--r);padding:16px}
.muted{color:var(--sub)}
.small{font-size:13px}
.btn{display:block;width:100%;background:var(--p);color:#fff;border-radius:18px;padding:17px 14px;font-weight:800;font-size:17px;text-align:center}
.btn:disabled{opacity:.45}
.btn.ghost{background:#fff;color:var(--p);border:1.5px solid var(--p)}
.btn.peach{background:var(--p2)}
.row{display:flex;gap:10px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat{background:#fff;border-radius:18px;padding:12px 14px}
.stat b{display:block;font-size:22px;font-weight:800;margin-top:2px}
.stat span{font-size:13px;color:var(--sub)}

/* 무대(종이인형) */
.stage{position:relative;border-radius:28px;background:var(--pink);overflow:hidden;aspect-ratio:3/4;isolation:isolate}
.stage .bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.stage .doll{position:absolute;left:0;right:0;margin:0 auto;bottom:1%;height:96%;aspect-ratio:896/1200}
.stage.withbubble .doll{height:78%}
.stage.home{aspect-ratio:auto;height:min(50dvh,520px)}
.stage .doll img.body{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 6px 10px rgba(30,20,60,.18))}
.stage .doll img.acc{position:absolute;transform:translate(-50%,-50%);pointer-events:none}
.stage .bubble{position:absolute;left:12px;right:12px;top:12px;z-index:3}
.bubble{background:#fff;border-radius:20px;padding:14px 16px;box-shadow:0 4px 14px rgba(40,20,90,.06)}
.bubble .t{font-size:16px;font-weight:600;line-height:1.4}
.bubble .m{font-size:13px;color:var(--sub);margin-top:4px}
.tag{position:absolute;right:12px;bottom:12px;z-index:3;background:rgba(255,255,255,.9);border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700}

/* 채팅 */
.chathead{display:flex;align-items:center;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:12px}
.ava{width:52px;height:52px;border-radius:50%;background:#fff;overflow:hidden;flex:none}
.ava img{width:100%;transform:scale(2.6) translateY(32%)}
.chathead b{font-size:18px;font-weight:800}
.msgs{display:flex;flex-direction:column;gap:10px;padding-bottom:150px}
.msg{max-width:82%;padding:13px 16px;border-radius:20px;font-size:16px;line-height:1.45;white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere}
.msg.f{background:#fff;align-self:flex-start;border-top-left-radius:6px}
.msg.u{background:var(--p);color:#fff;align-self:flex-end;border-top-right-radius:6px}
.msg.sys{background:#FFF4D6;align-self:stretch;max-width:100%;font-size:14px}
.typing{color:var(--sub);font-size:14px;padding:4px 8px}
.composer{position:fixed;left:0;right:0;bottom:64px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(transparent,var(--bg) 30%)}
.composer .in{max-width:398px;margin:0 auto;display:flex;gap:8px;align-items:center;background:#fff;border-radius:999px;padding:6px 6px 6px 18px;box-shadow:0 2px 12px rgba(40,20,90,.08)}
.composer input{flex:1;border:0;outline:0;font-size:16px;background:none;min-width:0}
.composer .send{background:var(--p);color:#fff;border-radius:999px;padding:11px 16px;font-weight:800}
.counter{max-width:398px;margin:0 auto 8px;display:flex;justify-content:space-between;font-size:13px;color:var(--sub);padding:0 6px}
.counter b{color:var(--p)}
.wrap{background:var(--pink);border-radius:var(--r);padding:16px 18px;line-height:1.55}
.wrap h3{color:var(--p);font-size:17px;font-weight:800;margin-bottom:6px}
.wrap .c{margin:8px 0}
.wrap .c .w{text-decoration:line-through;color:var(--sub)}
.wrap .c .b{color:var(--p);font-weight:800}
.wrap .why{font-size:13px;color:var(--sub)}
.wrap .praise{margin-top:10px;padding-top:10px;border-top:1px dashed #f3b8c2}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.chip{background:#fff;border-radius:999px;padding:5px 10px;font-size:13px}

/* 옷장 */
.tabs{display:flex;gap:6px;margin:14px 0 10px}
.tabs button{flex:1;padding:10px 0;border-radius:999px;background:#fff;font-weight:700;font-size:14px}
.tabs button.on{background:var(--p);color:#fff}
.items{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.item{background:#fff;border-radius:18px;padding:8px 8px 10px;text-align:center;border:2px solid transparent}
.item.sel{border-color:var(--p)}
.item .th{background:var(--pink);border-radius:13px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;overflow:hidden}
.item .th img{max-width:84%;max-height:84%;mix-blend-mode:multiply}
.item .th img.cover{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}
.item .th img.top{object-fit:cover;object-position:top;width:100%;height:150%;max-width:none;max-height:none;align-self:flex-start}
.item .n{font-size:13px;margin-top:6px;font-weight:600;line-height:1.25}
.item .pr{font-size:14px;font-weight:800;color:var(--star)}
.item .pr.own{color:var(--p)}
.buybar{position:fixed;left:0;right:0;bottom:64px;padding:10px 16px}
.buybar .in{max-width:398px;margin:0 auto}

/* 설정/온보딩 */
.ob{padding-top:12px}
.ob h2{font-size:26px;font-weight:800;line-height:1.25;margin:14px 0 6px;letter-spacing:-.4px}
.ob p.lead{color:var(--sub);margin-bottom:18px;line-height:1.5}
.opt{display:block;width:100%;text-align:left;background:#fff;border-radius:18px;padding:15px 16px;margin-bottom:10px;border:2px solid transparent;font-size:16px}
.opt.on{border-color:var(--p);background:#F3EEFF}
.opt small{display:block;color:var(--sub);font-size:13px;margin-top:2px}
.check{display:flex;gap:12px;align-items:flex-start;background:#fff;border-radius:18px;padding:15px 16px;margin-bottom:10px;font-size:15px;line-height:1.45}
.check input{width:22px;height:22px;accent-color:var(--p);flex:none;margin-top:1px}
.friends{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fr{background:#fff;border-radius:22px;padding:8px;border:2.5px solid transparent;text-align:center}
.fr.on{border-color:var(--p)}
.fr .pic{background:var(--pink);border-radius:16px;aspect-ratio:3/4;overflow:hidden}
.fr .pic img{width:100%;height:100%;object-fit:cover;mix-blend-mode:multiply}
.fr b{display:block;margin-top:8px;font-size:17px}
.fr span{font-size:12px;color:var(--sub);display:block;line-height:1.3;padding:2px 4px 6px}
.field{width:100%;border:2px solid var(--line);border-radius:16px;padding:15px 16px;font-size:17px;background:#fff;outline:0}
.field:focus{border-color:var(--p)}
input[type=range]{width:100%;accent-color:var(--p);height:30px}
.dots{display:flex;gap:5px}
.dots i{width:7px;height:7px;border-radius:50%;background:#D9D9E3}
.dots i.on{background:var(--p);width:20px;border-radius:4px}
.stick{position:sticky;bottom:12px;margin-top:22px}
.back{font-size:15px;color:var(--sub);font-weight:600}

/* 요금 */
.plan{background:#fff;border-radius:var(--r);padding:18px;margin-bottom:12px;border:2px solid transparent}
.plan.best{border-color:var(--p)}
.plan h3{font-size:18px;font-weight:800}
.plan .price{font-size:28px;font-weight:800;margin:6px 0}
.plan .price small{font-size:14px;color:var(--sub);font-weight:600}
.plan ul{list-style:none;margin:8px 0 14px;font-size:14px;line-height:1.8}
.plan li::before{content:"✓ ";color:var(--p);font-weight:800}
.badge{display:inline-block;background:var(--p2);color:#fff;font-size:12px;font-weight:800;border-radius:999px;padding:3px 9px;margin-left:6px;vertical-align:middle}
.simnote{background:#FFF4D6;border-radius:14px;padding:10px 12px;font-size:13px;margin-bottom:14px;line-height:1.45}
.limit{text-align:center;padding-top:20px}
.limit .big{font-size:56px}
.limit h2{font-size:24px;font-weight:800;margin:10px 0}

/* 진도 */
.bar{height:10px;background:#ECE7FF;border-radius:6px;overflow:hidden;margin-top:8px}
.bar i{display:block;height:100%;background:var(--p);border-radius:6px}
.goods{display:flex;gap:12px;align-items:center}
.goods .ic{width:48px;height:48px;border-radius:14px;background:var(--pink);display:flex;align-items:center;justify-content:center;font-size:24px;flex:none}

/* 아래 메뉴 */
.nav{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);z-index:20}
.nav .in{max-width:430px;margin:0 auto;display:grid;grid-template-columns:repeat(6,1fr);height:64px}
.nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;color:var(--sub);font-weight:600}
.nav button .i{font-size:20px;line-height:1;filter:grayscale(1);opacity:.6}
.nav button.on{color:var(--p)}
.nav button.on .i{filter:none;opacity:1}
.toast{position:fixed;left:50%;top:18px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:11px 16px;border-radius:14px;font-size:14px;z-index:50;max-width:360px;text-align:center}
.modal{position:fixed;inset:0;background:rgba(20,15,40,.45);display:flex;align-items:flex-end;justify-content:center;z-index:40}
.sheet{background:#fff;border-radius:26px 26px 0 0;padding:22px 18px calc(22px + env(safe-area-inset-bottom));width:100%;max-width:430px}
.sheet h3{font-size:20px;font-weight:800;margin-bottom:6px}
.card-fake{border:2px solid var(--line);border-radius:14px;padding:12px 14px;margin:12px 0;font-size:14px;color:var(--sub)}

a{color:var(--p)}
.tav{border-radius:50%;background:var(--pink);overflow:hidden;flex:none}
.tav img{width:100%;height:100%;object-fit:cover;mix-blend-mode:multiply}
.trow{display:flex;gap:12px;align-items:center;width:100%;background:#fff;border-radius:20px;padding:12px;margin-bottom:10px}
.ell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sec{font-size:16px;font-weight:800;margin:18px 2px 8px}
.chip.slot{border:1.5px solid var(--line);padding:8px 12px;font-size:14px;font-weight:600}
.chip.slot.on{background:var(--p);color:#fff;border-color:var(--p)}
.chip.slot:disabled{opacity:.35;text-decoration:line-through}
.opt small{font-weight:700}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.avopt{background:#fff;border-radius:18px;padding:8px;display:flex;justify-content:center;border:2.5px solid transparent}
.avopt.on{border-color:var(--p)}
.room{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.seat{background:#fff;border-radius:22px;padding:16px 8px;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.roomin{display:flex;gap:8px;background:#fff;border-radius:999px;padding:6px 6px 6px 16px}
.roomin input{flex:1;border:0;outline:0;font-size:16px;min-width:0}
.roomin .send{background:var(--p);color:#fff;border-radius:999px;padding:10px 16px;font-weight:800}
.stars5 button{font-size:30px;color:var(--star);padding:0 2px}
table.pt{width:100%;border-collapse:collapse;font-size:12px}
table.pt th,table.pt td{padding:6px 4px;border-bottom:1px solid var(--line);text-align:left}
details summary{cursor:pointer}
/* 웹툰 */
.eprow{display:flex;gap:12px;align-items:center;background:#fff;border-radius:20px;padding:10px;margin-bottom:10px;width:100%;text-align:left}
.eprow img{width:78px;height:96px;object-fit:cover;border-radius:14px;flex:none}
.eprow .lv{display:inline-block;background:#F3EEFF;color:var(--p);font-size:11px;font-weight:800;padding:2px 8px;border-radius:99px}
.comic{margin:0 -16px}
.panel{position:relative;background:#fff;margin-bottom:6px}
.panel img{display:block;width:100%}
.panel .bubs{position:absolute;left:10px;right:10px;top:10px;display:flex;flex-direction:column;gap:6px}
.bub{max-width:82%;background:#fff;border:2px solid #1F1F29;border-radius:20px;padding:8px 12px;font-size:17px;font-weight:700;line-height:1.35;box-shadow:0 3px 0 rgba(0,0,0,.12);text-align:left;cursor:pointer}
.bub.r{align-self:flex-end}.bub.thought{border-style:dashed;border-radius:24px}
.bub.key{border-color:var(--p);box-shadow:0 3px 0 var(--p)}
.bub .en{display:none;font-size:13px;font-weight:500;color:var(--sub);margin-top:2px}
.bub.open .en{display:block}.bub.playing{background:#FFF8D6}
.narr{background:#1F1F29;color:#fff;font-size:13px;padding:6px 12px;border-radius:10px;align-self:flex-start}
.epbar{position:sticky;top:0;z-index:5;background:var(--bg);display:flex;justify-content:space-between;align-items:center;padding:8px 0}
.keycard{background:#fff;border-radius:22px;padding:18px;margin-top:12px}
.kp{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--line)}
.kp:first-of-type{border-top:0}.kp b{font-size:18px;color:var(--p)}
.say{background:#F3EEFF;color:var(--p);border-radius:12px;padding:8px 10px;font-weight:800;flex:none}
.tieut{width:.8em;height:.8em;vertical-align:-.05em}
.drill-built{min-height:54px;border:2px dashed #d5d0dc;border-radius:12px;padding:12px;font-size:22px;font-weight:800;margin:10px 0;text-align:center}.drill-tiles{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:12px}.tile{padding:10px 16px;border-radius:12px;border:1px solid #cfc8d8;background:#fff;font-size:18px;font-weight:700}.tile:disabled{opacity:.35}.drill .ok{color:#1fa971;font-weight:800}.drill .no{color:#c0392b;font-weight:800}
.cardbadge{width:56px;height:56px;border-radius:14px;background:var(--p);color:#fff;font-size:24px;font-weight:800;display:flex;align-items:center;justify-content:center}.flash .front{font-size:20px;font-weight:700;margin:14px 0}.flash .ans{font-size:26px;font-weight:800;color:var(--p)}
.drill-tiles.polite{flex-direction:column;align-items:stretch}
.kp .mic{align-self:center}.mic.on{background:#c0392b;color:#fff}.shadow-out:not(:empty){margin-top:6px}.syl{font-size:22px;font-weight:800;white-space:pre-wrap}.syl .ok{color:#1fa971}.syl .no{color:#c0392b;text-decoration:underline wavy}.score{font-size:18px;color:var(--p)}
.reader .rs{font-size:20px;line-height:2;margin:0 0 10px}.reader .w{background:none;border:0;padding:0 1px;font:inherit;color:inherit;border-bottom:2px dotted #c9c0d6;cursor:pointer}.reader .w.seen{background:#fff3c4}.reader .tr{width:28px;height:28px;font-size:13px;vertical-align:middle}.reader .en{display:block;font-size:14px;color:#6b6578;line-height:1.5}.gloss{position:sticky;bottom:70px;background:#24232e;color:#fff;border-radius:12px;padding:10px 14px;font-size:15px}.rq .tile{margin:0 6px 6px 0}.tile.on{border-color:var(--p);background:#f1ecff}.tile.right{background:#e3f7ec;border-color:#1fa971}.tile.wrong{background:#fde8e6;border-color:#c0392b}
.reader .en[hidden]{display:none}
.hg-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.hg-card{background:#fff;border:1px solid #e3dfea;border-radius:14px;padding:12px;text-align:center;display:flex;flex-direction:column;gap:3px}.hg-card b{font-size:46px;color:var(--p);font-family:'Nanum Myeongjo',serif;line-height:1.1}.hg-card .roman{font-weight:800}.hg-card small{font-size:12px;color:#6b6578;line-height:1.35}.hg-card em{font-style:normal;font-size:13px}.hg-word{display:flex;gap:8px;align-items:baseline;width:100%;background:none;border:0;border-bottom:1px solid #eee;padding:10px 4px;text-align:left}.hg-word b{font-size:22px}.roman{color:var(--p);font-weight:700}.hg-q{font-size:40px;font-weight:800;text-align:center;margin:6px 0}.hg-choice{font-size:28px;min-width:70px}
