/* 뽀리상 일본어 — 스타일 */
:root {
  --ink: #2A2D3E; --ink-2: #4B5066; --muted: #8B91A5; --faint: #B8BDCC;
  --line: #E7E9F0; --line-2: #D9DCE6; --soft: #F5F6FA; --bg: #FFFFFF;
  --brand: #FF6F91; --brand-d: #E3527A; --brand-l: #FFEAF0;
  --good: #1FB57E; --good-d: #149465; --good-bg: #E2F7EE; --good-ink: #0E7A52;
  --bad: #F2545B; --bad-d: #D23B43; --bad-bg: #FFE8EA; --bad-ink: #C02F37;
  --gold: #FFB938; --gold-d: #E89A00; --blue: #3D7BFF; --blue-d: #2A5FD6;
  --c: var(--brand); --cd: var(--brand-d); --cl: var(--brand-l);
  --r: 16px;
  --jp: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --ko: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .9, .3, 1.2);
}
.theme-coral { --c: #FF6F91; --cd: #E3527A; --cl: #FFEAF0; --cg: linear-gradient(135deg, #FF90AB, #FF6289); }
.theme-violet { --c: #8B6CFF; --cd: #6C4CE6; --cl: #EEE9FF; --cg: linear-gradient(135deg, #A38BFF, #7C5CFF); }
.theme-teal { --c: #16B8A6; --cd: #0F978A; --cl: #DDF6F2; --cg: linear-gradient(135deg, #2DD4BF, #14A899); }
.theme-amber { --c: #F5A524; --cd: #D4860B; --cl: #FFF3D6; --cg: linear-gradient(135deg, #FFC24B, #F29A12); }
.theme-green { --c: #22B07D; --cd: #148F63; --cl: #DDF6EC; --cg: linear-gradient(135deg, #3CCB94, #1A9E6F); }
.theme-indigo { --c: #6366F1; --cd: #4B4ED6; --cl: #E7E8FF; --cg: linear-gradient(135deg, #8183F7, #5558E8); }
.theme-red { --c: #EF4444; --cd: #C92A2A; --cl: #FFE4E4; --cg: linear-gradient(135deg, #F87171, #E03131); }
.theme-sakura { --c: #FF6F91; --cd: #E3527A; --cl: #FFEAF0; --cg: linear-gradient(135deg, #FF9DB8 0%, #FF6F91 55%, #FF8A65 100%); }
.theme-blue { --c: #3D7BFF; --cd: #2A5FD6; --cl: #E3ECFF; --cg: linear-gradient(135deg, #5B93FF, #3468F0); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ko); color: var(--ink); background: var(--soft);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; letter-spacing: -0.01em;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
.ic { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: middle; flex: none; }
ruby rt { font-size: .5em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
[lang="ja"], .o-kana, .o-ja, .b-ja, .kana-card, .teach-big, .teach-word, .teach-sent, .kc b, .fd-ja, .tok { font-family: var(--jp); }
#app { height: 100%; max-width: 560px; margin: 0 auto; background: var(--bg); position: relative; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 560px) { #app { box-shadow: none; } }

/* ── 버튼 ───────────────────────────────── */
.btn {
  --b: var(--brand); --bd: var(--brand-d); --bt: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r);
  background: var(--b); color: var(--bt); font-weight: 800; font-size: 16px; letter-spacing: .01em;
  box-shadow: 0 4px 0 var(--bd); transform: translateY(0);
  transition: transform .08s, box-shadow .08s, background .2s, filter .2s;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--bd); }
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:disabled { --b: #E5E7EE; --bd: #D2D5DF; --bt: #A9AEBE; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; }
.btn--good { --b: var(--good); --bd: var(--good-d); }
.btn--bad { --b: var(--bad); --bd: var(--bad-d); }
.btn--danger { --b: var(--bad); --bd: var(--bad-d); }
.btn--white { --b: #fff; --bd: rgba(0,0,0,.14); --bt: var(--c); }
.btn--ghost { --b: #fff; --bd: var(--line-2); --bt: var(--ink-2); border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); }
.btn--ghost:active:not(:disabled) { transform: translateY(3px); }
.btn--danger-text { --b: transparent; --bd: transparent; --bt: var(--bad); box-shadow: none; min-height: 44px; }
.btn--danger-text:active:not(:disabled) { transform: none; opacity: .6; }
.btn .ic { width: 1.3em; height: 1.3em; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--faint); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--soft); color: var(--muted); }
.icon-btn .ic { width: 26px; height: 26px; }

/* ── 껍데기 ─────────────────────────────── */
.shell { height: 100%; display: flex; flex-direction: column; }
.topbar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 8px) 14px 8px; border-bottom: 2px solid var(--line); background: #fff; z-index: 5;
}
.tb { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; font-weight: 800; font-size: 16px; transition: background .15s, transform .1s; }
.tb:hover { background: var(--soft); }
.tb:active { transform: scale(.94); }
.tb .ic { width: 26px; height: 26px; }
.tb .ic--flag { width: 34px; height: 26px; }
.tb-streak b { color: #FF8A1F; } .tb-streak.off b { color: var(--faint); }
.tb-gems b { color: #6B7086; }
.tb-hearts b { color: #FF4D6A; } .tb-hearts.empty b { color: var(--faint); }
.view { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; scroll-behavior: auto; }
.view > * { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 2px solid var(--line); background: #fff; padding: 6px 8px calc(var(--safe-b) + 6px);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; margin: 0 2px;
  border-radius: 14px; border: 2px solid transparent; color: var(--faint); font-size: 11px; font-weight: 700; transition: color .15s, background .15s;
}
.tabbar button .ic { width: 26px; height: 26px; transition: transform .25s var(--ease); }
.tabbar button.on { color: var(--brand); background: var(--brand-l); border-color: #FFC9D7; }
.tabbar button.on .ic { transform: translateY(-1px) scale(1.06); }

/* ── 학습 경로 ──────────────────────────── */
.learn { padding: 6px 16px 120px; }
.sec-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; color: var(--muted); font-weight: 800; font-size: 13px; }
.sec-divider:first-child { margin-top: 12px; }
.sec-divider::before, .sec-divider::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.unit { margin-bottom: 14px; }
.unit-banner {
  position: sticky; top: 8px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 16px 20px; border-radius: 18px; background: var(--cg); color: #fff;
  box-shadow: 0 4px 0 var(--cd), 0 10px 22px -10px var(--cd); overflow: hidden;
}
.unit-banner::after { content: ''; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.1); pointer-events: none; }
.unit-banner small { font-weight: 700; font-size: 12.5px; opacity: .85; }
.unit-banner h2 { font-size: 20px; font-weight: 900; margin: 2px 0 1px; font-family: var(--jp), var(--ko); letter-spacing: -.01em; }
.unit-banner p { font-size: 13px; opacity: .9; font-weight: 600; }
.unit-prog { position: absolute; left: 16px; right: 16px; bottom: 9px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.28); }
.unit-prog i { display: block; height: 100%; border-radius: 4px; background: #fff; transition: width .6s; }
.guide-btn {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 1;
  padding: 8px 10px; border-radius: 14px; border: 2px solid rgba(255,255,255,.35); color: #fff; font-size: 11px; font-weight: 800;
  background: rgba(255,255,255,.12); transition: background .15s, transform .1s;
}
.guide-btn:active { transform: scale(.94); }
.guide-btn .ic { width: 24px; height: 24px; }
.path { position: relative; display: flex; flex-direction: column; align-items: center; padding: 70px 0 14px; }
.node-wrap { position: relative; margin: 14px 0; transform: translateX(calc(var(--x) * 78px)); z-index: 1; }
.node-wrap:has(.start-tip) { z-index: 2; }
.node-wrap:has(.node-pop) { z-index: 4; }
.node {
  position: relative; width: 74px; height: 66px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: var(--c); box-shadow: 0 7px 0 var(--cd); transform: translateY(0); transition: transform .08s, box-shadow .08s;
}
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--cd); }
.node .ic { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.12)); }
.node-face { display: grid; place-items: center; }
.node::before { content: ''; position: absolute; left: 18%; top: 12%; width: 30%; height: 18%; border-radius: 50%; background: rgba(255,255,255,.28); transform: rotate(-20deg); }
.node--locked { background: #E4E6ED; box-shadow: 0 7px 0 #C9CDD8; color: #B4B9C7; }
.node--locked::before { background: rgba(255,255,255,.5); }
.node--locked:active { box-shadow: 0 2px 0 #C9CDD8; }
.node--trophy.node--done { background: linear-gradient(#FFD25E, #FFB938); box-shadow: 0 7px 0 #E09400; }
.node--chest { background: transparent !important; box-shadow: none !important; width: 84px; height: 74px; }
.node--chest::before { display: none; }
.node--chest .chest-ic .ic { width: 74px; height: 74px; filter: drop-shadow(0 5px 0 rgba(0,0,0,.08)); }
.node--chest.node--locked .chest-ic { filter: grayscale(1) opacity(.5); }
.node--chest.node--cur .chest-ic { animation: wiggle 2.2s ease-in-out infinite; }
.node--cur { animation: nodeIn .5s var(--ease); }
.node-ring { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); overflow: visible; pointer-events: none; }
.node-ring circle { fill: none; stroke: var(--line-2); stroke-width: 7; }
.node-ring { animation: ringPulse 2s ease-in-out infinite; }
@keyframes ringPulse { 50% { transform: scale(1.05); opacity: .7; } }
.start-tip {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  padding: 7px 14px; border-radius: 12px; background: #fff; border: 2px solid var(--line-2);
  color: var(--c); font-weight: 900; font-size: 15px; white-space: nowrap; animation: bob 1.6s ease-in-out infinite; z-index: 2;
}
.start-tip::after { content: ''; position: absolute; top: 100%; left: 50%; width: 12px; height: 12px; background: #fff; border: 2px solid var(--line-2); border-top: 0; border-left: 0; transform: translate(-50%, -6px) rotate(45deg); }
@keyframes bob { 50% { transform: translate(-50%, -6px); } }
.unlock .node { animation: unlockPop .7s var(--ease) .35s both; }
@keyframes unlockPop { 0% { filter: grayscale(1); transform: scale(.8); } 60% { transform: scale(1.15); } 100% { filter: none; transform: scale(1); } }
@keyframes nodeIn { from { transform: scale(.85); } }
.node-pop {
  position: absolute; top: calc(100% + 16px); left: 50%; width: 270px; transform: translateX(calc(-50% - var(--x) * 50px));
  padding: 16px; border-radius: 18px; background: var(--c); color: #fff; z-index: 5; text-align: left;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.35); animation: popIn .22s var(--ease);
}
.node-pop::before { content: ''; position: absolute; top: -7px; left: calc(50% + var(--x) * 50px); width: 16px; height: 16px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.node-pop h3 { font-size: 17px; font-weight: 900; font-family: var(--jp), var(--ko); }
.node-pop p { font-size: 14px; opacity: .9; margin: 4px 0 12px; font-weight: 600; }
.node-pop.is-locked { background: #fff; color: var(--ink); border: 2px solid var(--line-2); }
.node-pop.is-locked::before { border-left: 2px solid var(--line-2); border-top: 2px solid var(--line-2); }
.node-pop.is-locked p { color: var(--muted); }
.pop-lock { display: flex; align-items: center; gap: 6px; margin: 0 !important; font-size: 13.5px !important; }
.xp-chip { font-size: 13px; padding: 2px 8px; border-radius: 8px; background: var(--cl); color: var(--cd); }
@keyframes popIn { from { opacity: 0; transform: translateX(calc(-50% - var(--x) * 50px)) translateY(-6px) scale(.96); } }
.path-deco { position: absolute; top: 45%; pointer-events: none; opacity: .95; }
.path-deco--right { right: 4px; } .path-deco--left { left: 4px; }
.path-deco .mascot { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }
.review-card { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 0; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, #EEF4FF, #F3EEFF); border: 2px solid #D6E2FF; box-shadow: 0 4px 0 #D6E2FF; text-align: left; transition: transform .1s; }
.review-card:active { transform: translateY(3px); box-shadow: 0 1px 0 #D6E2FF; }
.review-card .rc-ic { font-size: 30px; }
.review-card div { flex: 1; }
.review-card b { display: block; font-weight: 900; color: var(--blue-d); font-size: 16px; }
.review-card small { color: var(--muted); font-weight: 600; font-size: 13px; }
.review-card i { font-style: normal; font-size: 24px; color: var(--blue); }
.story-card { background: linear-gradient(135deg, #FFF0F5, #FFF6E8); border-color: #FFD6E2; box-shadow: 0 4px 0 #FFD6E2; }
.story-card b { color: var(--brand-d); }
.story-card i { color: var(--brand); }
.story-list { display: grid; gap: 8px; margin: 12px 0; }
.story-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); text-align: left; }
.story-item:active { transform: translateY(3px); box-shadow: none; }
.si-emoji { font-size: 30px; }
.story-item div { flex: 1; }
.story-item b { display: block; font-weight: 900; }
.story-item small { color: var(--muted); font-weight: 600; font-size: 13px; }
.si-done { color: var(--good); } .si-done .ic { width: 24px; height: 24px; }
.si-new { font-size: 11px; font-weight: 900; color: #fff; background: var(--brand); padding: 3px 7px; border-radius: 8px; }
.story-body { gap: 0; }
.story-head { text-align: center; margin-bottom: 14px; }
.story-head span { font-size: 46px; }
.story-head h2 { font-size: 22px; font-weight: 900; }
.story-head small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.story-lines { display: flex; flex-direction: column; gap: 12px; transition: opacity .3s; }
.story-lines.dim { opacity: .55; }
.sl { display: flex; align-items: flex-end; gap: 8px; animation: exIn .35s cubic-bezier(.2,.9,.3,1) both; }
.sl--pori { flex-direction: row-reverse; }
.sl-face { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 28px; }
.sl-bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; border: 2px solid var(--line-2); background: #fff; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.sl--pori .sl-bubble { background: var(--brand-l); border-color: #FFC9D7; }
.sl--narr { justify-content: center; }
.sl--narr .sl-bubble { max-width: 100%; border-style: dashed; background: var(--soft); text-align: center; align-items: center; }
.sl-name { font-size: 12px; font-weight: 900; color: var(--muted); }
.sl-ja { font-family: var(--jp); font-size: 19px; font-weight: 800; line-height: 1.45; }
.sl-hg { font-size: 12.5px; color: #8B6CFF; }
.sl-ko { font-size: 13.5px; color: var(--ink-2); font-weight: 600; max-height: 0; overflow: hidden; opacity: 0; transition: all .25s; }
.sl-bubble.show-ko .sl-ko { max-height: 60px; opacity: 1; margin-top: 2px; }
.story-quiz { margin-top: 20px; }
.story-quiz:empty { display: none; }
.trip-chip { display: flex; align-items: center; gap: 8px; width: 100%; margin: 12px 0 2px; padding: 12px 14px; border-radius: 16px; background: var(--cl); color: var(--cd); font-weight: 900; font-size: 14.5px; border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); transition: transform .1s; }
.trip-chip:active { transform: scale(.98); }
.trip-chip span { flex: 1; text-align: left; }
.trip-chip b { background: var(--c); color: #fff; padding: 3px 9px; border-radius: 9px; font-size: 13px; }
.trip-chip i { font-style: normal; font-size: 20px; line-height: 1; }
.trip-card { position: relative; margin: 6px 0 22px; padding: 18px; border-radius: 22px; background: var(--cg); color: #fff; box-shadow: 0 5px 0 var(--cd), 0 14px 30px -14px var(--cd); overflow: hidden; }
.trip-card::before { content: '🌸'; position: absolute; right: -6px; top: -14px; font-size: 90px; opacity: .18; transform: rotate(18deg); }
.trip-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; position: relative; }
.trip-top small { font-weight: 800; opacity: .9; font-size: 13px; }
.trip-top h2 { font-size: 22px; font-weight: 900; margin-top: 2px; }
.trip-dday { text-align: center; background: #fff; color: var(--cd); border-radius: 16px; padding: 8px 12px; min-width: 84px; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.trip-dday b { display: block; font-size: 22px; font-weight: 900; line-height: 1.1; }
.trip-dday small { font-size: 11px; font-weight: 800; color: var(--muted); }
.trip-plane { position: relative; height: 10px; margin: 26px 6px 10px; border-radius: 6px; background: rgba(255,255,255,.3); }
.trip-plane span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: #fff; }
.trip-plane i { position: absolute; top: 50%; transform: translate(-50%, -58%) rotate(45deg); font-style: normal; font-size: 22px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.trip-plane::after { content: '🗾'; position: absolute; right: -8px; top: 50%; transform: translateY(-55%); font-size: 20px; }
.trip-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 800; opacity: .95; margin-bottom: 14px; }
.trip-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trip-plan-btn { --b: rgba(255,255,255,.18); --bd: rgba(0,0,0,.12); border: 2px solid rgba(255,255,255,.6); }
.spot-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 6px; background: var(--soft); padding: 4px; border-radius: 14px; }
.spot-tabs button { padding: 10px 4px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--muted); }
.spot-tabs button.on { background: #fff; color: var(--cd); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.spot { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 2px solid var(--soft); color: inherit; text-decoration: none; }
.spot:active { background: var(--soft); }
.spot-rank { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 900; font-size: 13px; color: var(--muted); }
.spot-rank.top { background: var(--c); color: #fff; }
.spot-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.spot-main b { font-weight: 800; font-size: 15px; }
.spot-main small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.spot-hours { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.pl-day { margin: 14px 0 6px; }
.pl-dh { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pl-dh b { background: var(--c); color: #fff; border-radius: 10px; padding: 3px 10px; font-weight: 900; }
.pl-dh span { font-weight: 900; font-size: 16px; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 2px solid var(--soft); }
.pl-row em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); width: 32px; flex: none; }
.pl-row div { flex: 1; min-width: 0; }
.pl-row b { display: block; font-weight: 800; font-size: 15px; }
.pl-row small { color: var(--muted); font-weight: 600; font-size: 13px; }
.pl-star { flex: none; color: #E8A100; font-weight: 900; font-size: 14px; text-align: right; }
.pl-star small { display: block; color: var(--faint); font-size: 11px; font-weight: 700; }
.pl-note { margin-top: 14px; background: #FFF8E6; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.pl-src { margin: 10px 2px 0; color: var(--faint); font-size: 12px; font-weight: 600; }
.plan .btn { margin-top: 14px; }
.path-end { text-align: center; padding: 30px 0; color: var(--muted); font-weight: 700; }
.path-end p { margin-top: 8px; }
.jump-btn {
  position: fixed; right: max(18px, calc(50% - 262px)); bottom: calc(var(--safe-b) + 92px); z-index: 6;
  width: 54px; height: 54px; border-radius: 50%; background: #fff; color: var(--brand); border: 2px solid var(--line-2);
  box-shadow: 0 4px 0 var(--line-2); display: grid; place-items: center;
  opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity .2s, transform .25s var(--ease);
}
.jump-btn.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.jump-btn .ic { width: 28px; height: 28px; }

/* ── 바텀시트·드롭다운 ──────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 35, 0); transition: background .25s; }
.sheet-wrap.show { background: rgba(20, 22, 35, .35); }
.sheet {
  position: absolute; left: 50%; bottom: 0; width: min(560px, 100%); max-height: 85vh; overflow: auto;
  transform: translate(-50%, 100%); background: #fff; border-radius: 24px 24px 0 0; padding: 22px 20px calc(var(--safe-b) + 20px);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1);
}
.sheet-wrap.show .sheet { transform: translate(-50%, 0); }
.sheet--drop { bottom: auto; border-radius: 20px; width: min(520px, calc(100% - 24px)); transform: translate(-50%, -10px); opacity: 0; transition: transform .25s var(--ease), opacity .2s; padding: 20px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); overflow: visible; }
.sheet-wrap.show .sheet--drop { transform: translate(-50%, 0); opacity: 1; }
.sheet--drop::before { content: ''; position: absolute; top: -8px; left: calc(var(--arrow-x) - (50vw - min(260px, 50vw - 12px))); width: 16px; height: 16px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.ps-head { display: flex; align-items: center; gap: 14px; }
.ps-head .ic { width: 52px; height: 52px; }
.ps-head b { font-size: 20px; font-weight: 900; display: block; }
.ps-head small { color: var(--muted); font-weight: 600; font-size: 14px; }
.ps-goal { margin-top: 16px; padding: 14px; background: var(--soft); border-radius: 14px; }
.ps-goal-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.ps-goal-top b { color: var(--gold-d); }
.pop-hearts, .pop-gems { text-align: center; }
.pop-hearts h3 { font-size: 20px; font-weight: 900; }
.pop-hearts p, .pop-gems p { color: var(--ink-2); font-weight: 600; margin: 10px 0 16px; }
.pop-hearts .btn + .btn { margin-top: 10px; }
.hearts-row { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.hearts-row .ic { width: 40px; height: 40px; }
.pg-big { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 32px; font-weight: 900; }
.pg-big .ic { width: 56px; height: 56px; }
.pop-gems ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.pop-gems li { display: flex; justify-content: space-between; padding: 11px 4px; border-top: 2px solid var(--soft); font-weight: 700; color: var(--ink-2); }
.pop-gems li b { color: var(--ink); }
.pop-course h3 { font-size: 18px; font-weight: 900; margin-bottom: 10px; }
.pc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 2px solid var(--soft); }
.pc-row b { display: block; font-weight: 800; } .pc-row small { color: var(--muted); font-weight: 600; font-size: 13px; }
.pc-prog { display: flex; align-items: center; gap: 8px; width: 46%; }
.pc-prog .pbar { flex: 1; height: 10px; } .pc-prog .pbar i { background: var(--c); }
.pc-prog span { font-weight: 800; font-size: 13px; color: var(--c); width: 36px; text-align: right; }

/* 가이드북 */
.guide-head { padding: 18px; border-radius: 18px; background: var(--cg); color: #fff; margin-bottom: 8px; }
.guide-head small { font-weight: 700; opacity: .85; }
.guide-head h2 { font-size: 22px; font-weight: 900; font-family: var(--jp), var(--ko); }
.guide-item { padding: 14px 4px; border-bottom: 2px solid var(--soft); }
.guide-item h3 { font-size: 16px; font-weight: 900; color: var(--cd); margin-bottom: 4px; }
.guide-item p { color: var(--ink-2); line-height: 1.6; font-weight: 500; font-size: 15px; }
.guide-kana { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.guide-kana button { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); font-family: var(--jp); font-size: 26px; font-weight: 800; }
.guide-kana button:active { transform: translateY(3px); box-shadow: none; }
.guide .btn { margin-top: 14px; }
.guide-words { margin: 14px 0 4px; display: grid; gap: 8px; }
.guide-words h4 { margin: 4px 2px 2px; font-size: 14px; font-weight: 900; color: var(--muted); }
.gw { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); text-align: left; width: 100%; transition: background .15s, transform .08s; }
.gw:active { transform: scale(.98); background: var(--soft); }
.hg { color: #7C8297; font-weight: 700; font-family: var(--ko); font-size: .82em; letter-spacing: 0; }
.gw-hg { display: block; font-size: 13px; margin-top: 1px; color: #8B6CFF; }
.gw--sent .gw-hg { font-size: 12.5px; }
.hg--b { display: block; margin-top: 4px; font-size: 14px; color: #8B6CFF; }
.hg--teach { display: block; margin-top: 6px; font-size: 15px; color: #8B6CFF; }
.fb .hg { font-size: 14px; }
.gw-e { font-size: 26px; width: 34px; text-align: center; flex: none; }
.gw-ja { font-family: var(--jp); font-size: 19px; font-weight: 800; flex: 1; min-width: 0; }
.gw-ko { color: var(--ink-2); font-weight: 700; font-size: 14px; text-align: right; }
.gw .ic { width: 18px; height: 18px; color: var(--blue); flex: none; }
.gw--sent { flex-direction: column; align-items: flex-start; gap: 2px; }
.gw--sent .gw-ja { font-size: 17px; }
.gw--sent .gw-ko { text-align: left; }

/* ── 진행 막대 ──────────────────────────── */
.pbar { height: 16px; border-radius: 10px; background: #E9EBF1; overflow: hidden; position: relative; }
.pbar i {
  display: block; height: 100%; border-radius: 10px; background: var(--good); position: relative;
  transition: width .5s cubic-bezier(.3, 1.3, .5, 1);
}
.pbar i::after { content: ''; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.35); }
.pbar--gold i { background: var(--gold); }

/* ── 레슨 ───────────────────────────────── */
.in-lesson { overflow: hidden; }
.lesson {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #fff;
  max-width: 560px; margin: 0 auto; opacity: 0; transform: translateY(24px); transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1);
}
.lesson.show { opacity: 1; transform: none; }
.l-top { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 14px) 16px 8px; }
.l-progress { flex: 1; position: relative; }
.l-combo {
  position: absolute; left: 0; right: 0; top: -2px; text-align: center; font-size: 12.5px; font-weight: 900; color: #FF8A1F;
  opacity: 0; transform: translateY(0); pointer-events: none; white-space: nowrap;
}
.l-combo.pop { animation: comboPop 2.2s ease both; }
@keyframes comboPop { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 12% { opacity: 1; transform: translateY(-16px) scale(1.08); } 20% { transform: translateY(-16px) scale(1); } 80% { opacity: 1; transform: translateY(-16px); } 100% { opacity: 0; transform: translateY(-22px); } }
.l-hearts { display: flex; align-items: center; gap: 4px; font-weight: 900; color: #FF4D6A; font-size: 17px; min-width: 50px; justify-content: flex-end; }
.l-hearts .ic { width: 28px; height: 28px; }
.l-hearts.hit .ic { animation: heartHit .6s ease; }
@keyframes heartHit { 20% { transform: scale(1.35) rotate(-8deg); } 40% { transform: scale(.8) rotate(6deg); } 60% { transform: scale(1.1); } }
.l-mode { font-size: 13px; color: var(--blue); background: #E6EEFF; padding: 4px 10px; border-radius: 10px; }
.l-scroll { flex: 1; overflow-y: auto; }
.l-body { padding: 18px 20px 24px; min-height: 100%; display: flex; flex-direction: column; }
.l-body.enter > * { animation: exIn .38s cubic-bezier(.2, .9, .3, 1) both; }
.l-body.enter > *:nth-child(2) { animation-delay: .05s; } .l-body.enter > *:nth-child(3) { animation-delay: .1s; }
@keyframes exIn { from { opacity: 0; transform: translateX(26px); } }
.l-body.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.ex-title { font-size: 22px; font-weight: 900; line-height: 1.35; margin-bottom: 18px; letter-spacing: -.02em; }
.ex-title .hl { color: var(--brand); }
.ex-prompt { margin-bottom: 20px; }

.l-foot { flex: none; border-top: 2px solid var(--line); background: #fff; padding: 14px 16px calc(var(--safe-b) + 16px); transition: background .2s, border-color .2s; }
.l-foot-row { display: flex; gap: 12px; }
.l-foot-row .l-check { flex: 1; }
.l-foot-row .l-skip { flex: none; padding: 0 14px; font-size: 14px; }
.l-foot.good { background: var(--good-bg); border-color: transparent; }
.l-foot.bad { background: var(--bad-bg); border-color: transparent; }
.fb:empty { display: none; }
.fb-inner { padding: 4px 4px 14px; animation: fbIn .3s var(--ease); }
@keyframes fbIn { from { opacity: 0; transform: translateY(14px); } }
.fb-head { display: flex; align-items: center; gap: 10px; }
.fb-head h3 { font-size: 22px; font-weight: 900; flex: 1; }
.good .fb-head h3 { color: var(--good-ink); } .bad .fb-head h3 { color: var(--bad-ink); }
.fb-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.good .fb-icon { color: var(--good); } .bad .fb-icon { color: var(--bad); }
.fb-icon .ic { width: 22px; height: 22px; }
.fb-label { margin-top: 10px; font-weight: 900; color: var(--bad-ink); font-size: 15px; }
.fb-answer { font-weight: 700; color: var(--bad-ink); font-size: 17px; font-family: var(--jp), var(--ko); margin-top: 2px; }
.fb-detail { margin-top: 8px; font-weight: 700; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.good .fb-detail { color: var(--good-ink); }
.fd-ja { font-size: 18px; font-weight: 800; margin-right: 4px; }
.fb-note { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: rgba(255,255,255,.7); padding: 8px 12px; border-radius: 12px; line-height: 1.5; }
.fb .spk--fb { box-shadow: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.7); }
.good .fb .spk--fb { color: var(--good); } .bad .fb .spk--fb { color: var(--bad); }

/* 문제 프롬프트 */
.spk { color: #fff; background: var(--blue); width: 48px; height: 48px; border-radius: 14px; display: inline-grid; place-items: center; box-shadow: 0 4px 0 var(--blue-d); transition: transform .08s, box-shadow .08s; flex: none; }
.spk:active { transform: translateY(4px); box-shadow: 0 0 0 var(--blue-d); }
.spk .ic { width: 26px; height: 26px; }
.spk--sm { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 3px 0 var(--blue-d); }
.spk--sm .ic { width: 20px; height: 20px; }
.spk.ping, [data-say].ping { animation: ping .45s ease; }
@keyframes ping { 40% { transform: scale(1.12); } }
.p-kana { display: flex; justify-content: center; }
.kana-card {
  width: 168px; height: 168px; border-radius: 28px; border: 2px solid var(--line-2); box-shadow: 0 5px 0 var(--line-2);
  display: grid; place-items: center; font-size: 104px; font-weight: 800; line-height: 1; background: #fff; transition: transform .1s;
}
.kana-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line-2); }
.kana-card span { transform: translateY(-4px); }
.p-romaji { display: flex; justify-content: center; }
.kanji-card { font-family: 'Hiragino Mincho ProN', 'Yu Mincho', var(--jp); }
.kanji-ko b { font-size: 34px; }
.kanji-word { display: flex; flex-direction: column; align-items: center; padding: 20px 34px; border-radius: 24px; border: 2px solid var(--line-2); box-shadow: 0 5px 0 var(--line-2); font-family: var(--jp); font-size: 52px; font-weight: 800; line-height: 1.2; }
.kanji-word small { font-family: var(--ko); font-size: 15px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.teach-card--kanji .teach-big { background: #EEF0FF; color: #4B4ED6; font-family: 'Hiragino Mincho ProN', 'Yu Mincho', var(--jp); }
.kanji-reads { display: flex; gap: 10px; margin-top: 12px; }
.kanji-reads div { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--soft); min-width: 90px; }
.kanji-reads small { font-size: 12px; color: var(--muted); font-weight: 800; }
.kanji-reads span { font-family: var(--jp); font-size: 18px; font-weight: 800; }
.o-kanji { font-family: 'Hiragino Mincho ProN', 'Yu Mincho', var(--jp); }
.fd-ex { font-size: 14px; opacity: .85; }
.romaji-card { display: flex; flex-direction: column; align-items: center; padding: 22px 38px; border-radius: 24px; background: var(--brand-l); color: var(--brand-d); }
button.romaji-card { border: 0; font: inherit; cursor: pointer; } button.romaji-card:active { transform: scale(.96); }
.romaji-card b { font-size: 56px; font-weight: 900; letter-spacing: .02em; line-height: 1.1; }
.romaji-card small { font-size: 18px; font-weight: 800; opacity: .75; }
.p-ko { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--soft); }
.p-ko b { font-size: 22px; font-weight: 900; }
.p-emoji { font-size: 46px; line-height: 1; }
.p-audio { display: flex; justify-content: center; align-items: flex-end; gap: 14px; padding: 18px 0; }
.spk--big { width: 120px; height: 120px; border-radius: 30px; box-shadow: 0 6px 0 var(--blue-d); }
.spk--big .ic { width: 60px; height: 60px; }
.spk--big:active { transform: translateY(6px); }
.spk--slow { width: 72px; height: 72px; border-radius: 22px; }
.spk--slow .ic { width: 38px; height: 38px; }
.p-spell { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 20px; background: var(--soft); }
.p-spell b { font-size: 22px; font-weight: 900; display: block; }
.p-spell-sub { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--muted); font-weight: 700; }

/* 말풍선 + 뽀리 */
.speech { display: flex; align-items: flex-end; gap: 6px; }
.speech-m { flex: none; margin-bottom: -6px; }
.bubble {
  position: relative; flex: 1; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--line-2); background: #fff; margin-bottom: 30px;
  font-weight: 700; line-height: 1.5;
}
.bubble::before { content: ''; position: absolute; left: -9px; bottom: 18px; width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); transform: rotate(45deg); }
.b-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.b-ja { font-size: 26px; font-weight: 800; }
.b-sent { font-size: 22px; display: flex; flex-wrap: wrap; }
.tok { border-bottom: 2px dashed var(--line-2); margin-right: 2px; cursor: pointer; padding: 0 1px; }
.tok:hover { border-color: var(--blue); }
.b-ko { font-size: 19px; }

/* 보기 */
.opts { display: grid; gap: 12px; margin-top: auto; }
.opts--grid { grid-template-columns: 1fr 1fr; }
.opts--row { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.opts--list { grid-template-columns: 1fr; }
.opt {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; padding: 14px 12px; border-radius: 16px; border: 2px solid var(--line-2); background: #fff;
  box-shadow: 0 4px 0 var(--line-2); font-weight: 700; font-size: 17px; text-align: center;
  transition: transform .08s, box-shadow .08s, border-color .15s, background .15s, color .15s;
}
.opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--line-2); }
.opt kbd { position: absolute; left: 9px; top: 7px; font: 700 11px var(--ko); color: var(--faint); border: 1.5px solid var(--line); border-radius: 6px; padding: 0 5px; }
@media (hover: none) { .opt kbd { display: none; } }
.opts--list .opt { flex-direction: row; justify-content: flex-start; padding-left: 44px; text-align: left; min-height: 58px; }
.opts--list .opt kbd { top: 50%; transform: translateY(-50%); display: block; left: 12px; }
@media (hover: none) { .opts--list .opt { padding-left: 18px; } .opts--list .opt kbd { display: none; } }
.opt.sel { border-color: #8FB3FF; background: #EEF4FF; color: var(--blue-d); box-shadow: 0 4px 0 #8FB3FF; }
.opt.right { border-color: #7FDCB6; background: var(--good-bg); color: var(--good-ink); box-shadow: 0 4px 0 #7FDCB6; animation: rightPop .4s var(--ease); }
.opt.wrong { border-color: #FFAFB3; background: var(--bad-bg); color: var(--bad-ink); box-shadow: 0 4px 0 #FFAFB3; }
.opt:disabled:not(.right):not(.wrong):not(.done) { opacity: .55; }
@keyframes rightPop { 40% { transform: scale(1.05); } }
.o-main { font-size: 18px; font-weight: 800; }
.o-sub { font-size: 13px; font-weight: 700; color: var(--muted); }
.opt.sel .o-sub { color: var(--blue); }
.o-kana { font-size: 46px; font-weight: 800; line-height: 1.15; }
.o-kana--sm { font-size: 30px; }
.o-ja { font-size: 22px; font-weight: 800; }
.o-emoji { font-size: 52px; line-height: 1.1; margin-bottom: 4px; transition: transform .2s var(--ease); }
.opt--ko-card { min-height: 140px; }
.opt--ko-card.sel .o-emoji { transform: scale(1.12) rotate(-4deg); }
.opt--kana { min-height: 104px; }

/* 짝 맞추기 */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: auto; }
.match-col { display: flex; flex-direction: column; gap: 12px; }
.mt { height: 64px; min-height: 64px; }
.mt .o-main { font-size: 20px; }
.mt.ok { border-color: #7FDCB6; background: var(--good-bg); color: var(--good-ink); box-shadow: 0 4px 0 #7FDCB6; animation: rightPop .35s var(--ease); }
.mt.bad { border-color: #FFAFB3; background: var(--bad-bg); color: var(--bad-ink); box-shadow: 0 4px 0 #FFAFB3; animation: shake .4s; }
.mt.done { opacity: .35; box-shadow: 0 0 0 transparent; transform: translateY(4px); border-color: var(--line); color: var(--faint); transition: all .35s; }

/* 타일 조립 */
.build { margin-top: 4px; }
.build-answer { position: relative; min-height: 132px; margin-bottom: 26px; }
.build-lines { position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 62px, var(--line) 62px 64px); pointer-events: none; }
.build-slot { position: relative; display: flex; flex-wrap: wrap; gap: 8px 8px; padding: 10px 0 0; min-height: 132px; align-content: flex-start; }
.build--kana .build-answer, .build--kana .build-slot { min-height: 70px; }
.build--kana .build-lines { background: linear-gradient(transparent 0 66px, var(--line) 66px 68px); }
.build-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px; }
.tile-ph { border-radius: 14px; background: #ECEEF3; display: inline-flex; }
.tile {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 16px; border-radius: 14px;
  border: 2px solid var(--line-2); background: #fff; box-shadow: 0 4px 0 var(--line-2);
  font-size: 19px; font-weight: 700; white-space: nowrap; transition: transform .08s, box-shadow .08s, opacity .12s;
}
.tile[lang="ja"] { font-size: 21px; font-weight: 800; }
.build--kana .tile { min-width: 56px; min-height: 56px; justify-content: center; font-size: 28px; }
.tile:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line-2); }
.tile-ph.used .tile { opacity: 0; pointer-events: none; }
.tile-ghost { position: fixed; z-index: 60; margin: 0; pointer-events: none; transition: transform .26s cubic-bezier(.3, .8, .3, 1.05); }
.build.is-right .build-slot .tile { border-color: #7FDCB6; color: var(--good-ink); box-shadow: 0 4px 0 #7FDCB6; }
.build.is-wrong .build-slot .tile { border-color: #FFAFB3; color: var(--bad-ink); box-shadow: 0 4px 0 #FFAFB3; }

/* 말하기 */
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; padding: 10px 0 20px; }
.mic { width: 110px; height: 110px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 0 var(--blue-d); transition: transform .1s, background .2s; position: relative; }
.mic .ic { width: 50px; height: 50px; }
.mic:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--blue-d); }
.mic.on { background: var(--bad); box-shadow: 0 6px 0 var(--bad-d); }
.mic.on::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 4px solid var(--bad); opacity: .5; animation: ringPulse 1s ease-in-out infinite; }
.mic.good { background: var(--good); box-shadow: 0 6px 0 var(--good-d); }
.mic-say { font-weight: 800; color: var(--ink-2); }
.mic-heard { font-family: var(--jp); font-size: 20px; font-weight: 800; color: var(--blue-d); min-height: 28px; }

/* 새 항목 소개 */
.teach-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 30px 20px 24px; border-radius: 26px; border: 2px solid var(--line-2); box-shadow: 0 5px 0 var(--line-2);
  margin: 6px 0 auto;
}
.badge-new { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-weight: 900; font-size: 13px; padding: 4px 12px; border-radius: 10px; box-shadow: 0 3px 0 var(--brand-d); letter-spacing: .04em; }
.teach-big { font-size: 128px; font-weight: 800; line-height: 1.05; width: 180px; height: 180px; border-radius: 30px; background: var(--brand-l); color: var(--brand-d); display: grid; place-items: center; transition: transform .15s var(--ease); }
.teach-big:active { transform: scale(.95); }
.teach-read { margin-top: 18px; display: flex; align-items: baseline; gap: 12px; }
.teach-read b { font-size: 40px; font-weight: 900; }
.teach-read span { font-size: 26px; font-weight: 800; color: var(--muted); }
.teach-meta { margin-top: 4px; color: var(--muted); font-weight: 700; font-size: 14px; }
.teach-example { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: var(--soft); font-family: var(--jp); font-weight: 800; font-size: 20px; }
.teach-example small { font-family: var(--ko); color: var(--muted); font-size: 14px; font-weight: 700; }
.teach-emoji { font-size: 84px; line-height: 1; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
.teach-word, .teach-sent { display: inline-flex; align-items: center; gap: 10px; font-size: 36px; font-weight: 800; color: var(--ink); padding: 6px 12px; border-radius: 14px; transition: background .15s; }
.teach-sent { font-size: 26px; flex-wrap: wrap; justify-content: center; }
.teach-sent span { padding: 0 2px; }
.teach-word .ic, .teach-sent .ic { color: var(--blue); width: 28px; height: 28px; }
.teach-word:hover, .teach-sent:hover { background: var(--soft); }
.teach-ro { color: var(--muted); font-weight: 700; font-size: 16px; }
.teach-ko { margin-top: 10px; font-size: 22px; font-weight: 900; }
.teach-note { margin-top: 16px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); background: #FFF8E6; border-radius: 14px; padding: 10px 14px; line-height: 1.55; }

/* ── 모달 · 토스트 ──────────────────────── */
.modal-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(20, 22, 35, 0); transition: background .25s; }
.modal-wrap.show { background: rgba(20, 22, 35, .5); }
.modal { width: min(380px, 100%); background: #fff; border-radius: 26px; padding: 26px 22px 18px; text-align: center; transform: scale(.88); opacity: 0; transition: transform .3s var(--ease), opacity .2s; }
.modal-wrap.show .modal { transform: none; opacity: 1; }
.modal-face { margin: -6px 0 6px; }
.modal-title { font-size: 21px; font-weight: 900; }
.modal-body { color: var(--ink-2); font-weight: 600; margin-top: 8px; line-height: 1.55; }
.modal-body p { margin-top: 10px; }
.modal-actions { display: grid; gap: 10px; margin-top: 22px; }
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 16px); z-index: 90; transform: translate(-50%, -30px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); transition: transform .3s var(--ease), opacity .25s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 80; pointer-events: none; }

/* ── 축하 화면 ──────────────────────────── */
.celebrate { position: fixed; inset: 0; z-index: 40; background: #fff; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; opacity: 0; transition: opacity .25s; }
.celebrate.show { opacity: 1; }
.cel-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 22px; text-align: center; overflow-y: auto; }
.cel-foot { padding: 16px 20px calc(var(--safe-b) + 18px); border-top: 2px solid var(--line); }
.res-hero { margin-bottom: 8px; }
.res-title { font-size: 30px; font-weight: 900; color: var(--gold-d); letter-spacing: -.02em; animation: titleIn .5s var(--ease) both .1s; }
.res-sub { margin-top: 8px; color: var(--ink-2); font-weight: 700; font-size: 16px; line-height: 1.5; animation: titleIn .5s var(--ease) both .2s; }
@keyframes titleIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 28px; }
.stat-card { --sc: var(--gold); border-radius: 18px; border: 2.5px solid var(--sc); background: var(--sc); overflow: hidden; animation: cardIn .5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.9); } }
.sc-h { color: #fff; font-weight: 900; font-size: 12.5px; padding: 6px 4px 5px; letter-spacing: .02em; }
.sc-v { background: #fff; border-radius: 14px; padding: 14px 4px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 22px; font-weight: 900; color: var(--sc); }
.sc-v .ic { width: 24px; height: 24px; }
.sc-xp { --sc: #FFB01F; } .sc-acc { --sc: #1FB57E; } .sc-time { --sc: #3D7BFF; }
.res-gems { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 14px; background: var(--soft); font-weight: 800; animation: titleIn .5s var(--ease) both .8s; }
.res-gems .ic { width: 26px; height: 26px; }
.res-hearts { margin-top: 8px; color: #FF4D6A; }
.streak-hero { position: relative; display: grid; place-items: center; }
.flame-big .ic { width: 170px; height: 170px; animation: flame 1.4s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 10px 24px rgba(255, 138, 31, .35)); }
@keyframes flame { 50% { transform: scale(1.04, .97) rotate(-1.5deg); } }
.streak-num { position: absolute; bottom: -6px; font-size: 64px; font-weight: 900; color: #FF8A1F; -webkit-text-stroke: 8px #fff; paint-order: stroke fill; }
.streak-num.bump { animation: bump .6s var(--ease) .4s; }
@keyframes bump { 40% { transform: scale(1.35); } }
.streak-title { color: #FF8A1F; margin-top: 10px; }
.week { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.week--sm { margin-top: 16px; justify-content: space-between; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--muted); }
.wk i { width: 34px; height: 34px; border-radius: 50%; background: #EEF0F4; display: grid; place-items: center; color: #fff; }
.wk i .ic { width: 18px; height: 18px; }
.wk.on i { background: linear-gradient(#FFB347, #FF8A1F); animation: rightPop .4s var(--ease); }
.wk.today span { color: #FF8A1F; }
.wk.today i { box-shadow: 0 0 0 3px #FFE3C6; }
.reward-chip { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 16px; background: #FFF4DC; color: #B87400; font-weight: 900; font-size: 22px; animation: titleIn .5s var(--ease) both .3s; }
.reward-chip .ic { width: 32px; height: 32px; }
.reward-chip.big { font-size: 30px; }
.ach-medal { --c: var(--gold); position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), var(--c); box-shadow: 0 8px 0 rgba(0,0,0,.12), inset 0 -8px 0 rgba(0,0,0,.12); animation: medal .8s var(--ease); margin-bottom: 18px; }
.ach-medal span { font-size: 70px; color: #fff; font-weight: 900; font-family: var(--jp), var(--ko); }
.ach-medal i { position: absolute; bottom: -8px; right: 6px; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--c); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 22px; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.ach-medal.sm { width: 60px; height: 60px; margin: 0; animation: none; box-shadow: 0 4px 0 rgba(0,0,0,.12), inset 0 -4px 0 rgba(0,0,0,.12); flex: none; }
.ach-medal.sm span { font-size: 28px; }
.ach-medal.sm i { width: 24px; height: 24px; font-size: 12px; bottom: -4px; right: -4px; }
@keyframes medal { 0% { transform: scale(.3) rotate(-30deg); } 60% { transform: scale(1.1) rotate(8deg); } }
.chest-anim { position: relative; width: 190px; height: 170px; margin-bottom: 14px; }
.chest-c { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .2s, transform .35s var(--ease); }
.chest-c .ic { width: 170px; height: 170px; }
.chest-anim:not(.opened) .closed { animation: wiggle .5s ease-in-out infinite; }
.chest-c.open { opacity: 0; transform: scale(.8); }
.chest-anim.opened .closed { opacity: 0; }
.chest-anim.opened .open { opacity: 1; transform: scale(1.08); }
.chest-burst { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, #FFE58A 0, transparent 65%); opacity: 0; transform: scale(.4); z-index: -1; }
.chest-anim.opened .chest-burst { animation: burst 1.2s ease-out forwards; }
@keyframes burst { 30% { opacity: 1; } 100% { opacity: .35; transform: scale(1.3) rotate(40deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

/* ── 마스코트 애니메이션 ─────────────────── */
.mascot { overflow: visible; display: inline-block; }
.mascot .m-eyes { transform-origin: 60px 57px; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.mascot .m-tail { transform-origin: 86px 104px; animation: tail 2.4s ease-in-out infinite; }
.mascot .m-tail-tip { transform-origin: 86px 106px; animation: tail 2.4s ease-in-out infinite; }
@keyframes tail { 50% { transform: rotate(8deg); } }
.mascot--happy .m-head, .mascot--cheer .m-head { transform-origin: 60px 90px; animation: nod 1.2s ease-in-out infinite; }
@keyframes nod { 50% { transform: rotate(-4deg); } }
.mascot.jump { animation: jump 1s cubic-bezier(.3, .6, .4, 1) infinite; }
.mascot.jump .m-shadow { animation: shadow 1s cubic-bezier(.3, .6, .4, 1) infinite; transform-origin: 60px 129px; }
@keyframes jump { 0%, 100% { transform: translateY(0) scale(1.03, .97); } 45% { transform: translateY(-22px) scale(.98, 1.03); } }
@keyframes shadow { 45% { transform: translateY(22px) scale(.7); opacity: .5; } }
.mascot.wave .m-head { transform-origin: 60px 90px; animation: tilt 2.6s ease-in-out infinite; }
@keyframes tilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 60% { transform: rotate(4deg); } }
.mascot--sad .m-head { transform: translateY(3px); }
.speech-m .m-head { animation: tilt 4s ease-in-out infinite; transform-origin: 60px 90px; }

/* ── 문자표 ─────────────────────────────── */
.kana-page, .profile, .league { padding: 20px 16px 40px; }
.page-head h1 { font-size: 26px; font-weight: 900; }
.page-head p { color: var(--muted); font-weight: 600; margin-top: 4px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 14px; padding: 4px; margin: 18px 0 14px; }
.seg button { position: relative; z-index: 1; padding: 11px; font-weight: 800; color: var(--muted); border-radius: 11px; transition: color .2s; }
.seg button.on { color: var(--ink); }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg--3 i { width: calc(33.333% - 2.7px) !important; }
.kanji-grid { grid-template-columns: repeat(5, 1fr); }
.kc--kanji b { font-family: 'Hiragino Mincho ProN', 'Yu Mincho', var(--jp); font-size: 30px; }
.kc--kanji small { font-size: 10.5px; }
.seg i { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); background: #fff; border-radius: 11px; box-shadow: 0 2px 6px rgba(0,0,0,.08); transition: transform .3s var(--ease); }
.kana-progress { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 14px; font-size: 14px; }
.kana-progress b { color: var(--brand); font-size: 18px; }
.kp-bar { flex: 1; height: 10px; border-radius: 6px; background: #EEF0F4; overflow: hidden; }
.kp-bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width .6s; }
.kana-sub { font-size: 15px; font-weight: 900; color: var(--muted); margin: 24px 0 12px; }
.kana-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kana-grid--n { margin-top: 8px; }
.kc {
  display: flex; flex-direction: column; align-items: center; padding: 10px 2px 9px; border-radius: 14px;
  border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); background: #fff; transition: transform .08s;
}
.kc:active { transform: translateY(3px); box-shadow: none; }
.kc b { font-size: 28px; font-weight: 800; line-height: 1.15; }
.kc small { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.kc-bar { width: 70%; height: 5px; background: #EEF0F4; border-radius: 3px; margin-top: 7px; overflow: hidden; }
.kc-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.kc--new b { color: #C3C7D3; }
.kc--gold { border-color: #FFD58A; box-shadow: 0 3px 0 #FFD58A; background: #FFFBEF; }
.kc--gold .kc-bar i { background: var(--gold); }
.kc--empty { visibility: hidden; }
.kc.boing { animation: boing .4s var(--ease); }
@keyframes boing { 40% { transform: scale(1.12) rotate(-3deg); } }
.kana-practice { margin-top: 2px; }
.kana-foot { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding: 14px; background: var(--soft); border-radius: 18px; color: var(--ink-2); font-weight: 600; font-size: 14px; line-height: 1.55; }

/* ── 리그 ───────────────────────────────── */
.league-hero { text-align: center; padding: 6px 0 20px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.league-badge { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, #FFB3C7, #FF7BA0); color: #fff; box-shadow: 0 6px 0 #E8608A; transform: rotate(-6deg); animation: medal .8s var(--ease); }
.league-badge .ic { width: 60px; height: 60px; }
.league-badge .ic path:last-child { fill: #FF7BA0; opacity: 1; }
.league-hero h1 { font-size: 26px; font-weight: 900; }
.league-hero p { color: var(--muted); font-weight: 600; margin-top: 4px; }
.league-hero p b { color: #E8608A; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 16px; animation: viewIn .4s ease both; }
.lrow.me { background: #FFF0F4; box-shadow: inset 0 0 0 2px #FFCEDB; }
.rank { width: 30px; text-align: center; font-weight: 900; color: var(--muted); font-size: 16px; }
.rank.top { font-size: 26px; }
.avatar { flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-weight: 900; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.lname { flex: 1; font-weight: 800; display: flex; flex-direction: column; min-width: 0; }
.lname em { font-style: normal; font-size: 11px; background: var(--brand); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.lname small { display: flex; align-items: center; gap: 2px; color: #FF8A1F; font-size: 12px; font-weight: 800; }
.lname small .ic { width: 14px; height: 14px; }
.lxp { color: var(--ink-2); font-weight: 800; }
.zone { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--good); font-size: 12px; font-weight: 900; }
.zone::before, .zone::after { content: ''; flex: 1; height: 2px; background: currentColor; opacity: .35; }
.sk { height: 64px; border-radius: 16px; background: linear-gradient(90deg, #F2F3F7 25%, #E8EAF0 50%, #F2F3F7 75%); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); font-weight: 700; padding: 30px 10px; line-height: 1.6; }
.empty.small { padding: 18px 10px; }

/* ── 프로필 ─────────────────────────────── */
.prof-head { text-align: center; padding: 8px 0 22px; border-bottom: 2px solid var(--line); }
.prof-avatar { position: relative; display: inline-block; transition: transform .15s var(--ease); }
.prof-avatar:active { transform: scale(.94); }
.pa-edit { position: absolute; right: -2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 14px; color: var(--muted); }
.prof-head h1 { font-size: 26px; font-weight: 900; margin-top: 10px; }
.prof-head p { color: var(--muted); font-weight: 600; margin-top: 2px; font-size: 14px; }
.p-sec { font-size: 19px; font-weight: 900; margin: 26px 0 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; border: 2px solid var(--line-2); }
.st .ic, .st-ic { width: 30px; height: 30px; flex: none; font-size: 24px; display: grid; place-items: center; font-weight: 900; color: var(--brand); font-family: var(--jp), var(--ko); }
.st b { font-size: 19px; font-weight: 900; display: block; line-height: 1.2; }
.st small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.card { border: 2px solid var(--line-2); border-radius: 18px; padding: 16px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: #E6E8EF; transform-box: fill-box; transform-origin: bottom; animation: grow .6s var(--ease) both; }
.chart .bar.hit { fill: var(--gold); }
.chart .bar.today { fill: var(--brand); }
.chart .bar.today.hit { fill: var(--brand); }
@keyframes grow { from { transform: scaleY(0); } }
.chart .bar-v { font: 800 11px var(--ko); fill: var(--ink-2); }
.chart .bar-d { font: 700 11px var(--ko); fill: var(--muted); }
.chart .bar-d.today { fill: var(--brand); font-weight: 900; }
.chart .goal-line { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 5; }
.chart .goal-txt { font: 800 10.5px var(--ko); fill: var(--gold-d); }
.ach-list { padding: 4px 16px; }
.ach { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 2px solid var(--soft); }
.ach:last-child { border-bottom: 0; }
.ach--locked .ach-medal { filter: grayscale(1); opacity: .45; }
.ach-info { flex: 1; min-width: 0; }
.ach-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ach-top b { font-weight: 900; }
.ach-top span { color: var(--muted); font-weight: 800; font-size: 13px; white-space: nowrap; }
.ach-bar { height: 10px; border-radius: 6px; background: #EEF0F4; margin: 7px 0 5px; overflow: hidden; }
.ach-bar i { display: block; height: 100%; border-radius: 6px; transition: width .6s; }
.ach-info small { color: var(--muted); font-weight: 600; font-size: 13px; }
.goal-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.goal-pick button { padding: 12px 4px; border-radius: 14px; border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); display: flex; flex-direction: column; gap: 2px; transition: all .15s; }
.goal-pick b { font-weight: 900; } .goal-pick small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.goal-pick button.on { border-color: #FFAFC4; background: var(--brand-l); box-shadow: 0 3px 0 #FFAFC4; color: var(--brand-d); }
.settings { padding: 4px 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 2px solid var(--soft); cursor: pointer; }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-weight: 800; }
.set-row small { color: var(--muted); font-weight: 600; font-size: 13px; }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 20px; background: #DADDE6; position: relative; transition: background .2s; cursor: pointer; flex: none; margin: 0; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: transform .25s var(--ease); }
.switch:checked { background: var(--good); }
.switch:checked::after { transform: translateX(20px); }
.rate { display: flex; align-items: center; gap: 10px; }
.rate input { width: 110px; accent-color: var(--blue); }
.logout { margin-top: 28px; }
.ver { text-align: center; color: var(--faint); font-size: 12.5px; font-weight: 600; margin-top: 16px; }

/* ── 시작 화면 ──────────────────────────── */
.welcome { height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, #FFF0F5 0%, #FFFFFF 55%); overflow: hidden; }
.wel-stage { flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 20px) 24px calc(var(--safe-b) + 24px); }
.wel-stage.in > * { animation: exIn .4s cubic-bezier(.2, .9, .3, 1) both; }
.wel-intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; padding-top: 12vh; }
.wel-sky { position: absolute; inset: 0; pointer-events: none; }
.wel-sky span { position: absolute; font-family: var(--jp); font-weight: 800; color: #FFD3C2; font-size: 34px; animation: float 5s ease-in-out infinite; }
.wel-sky span:nth-child(1) { left: 6%; top: 8%; }
.wel-sky span:nth-child(2) { right: 10%; top: 12%; animation-delay: -1s; font-size: 44px; color: #D9CCFF; }
.wel-sky span:nth-child(3) { left: 14%; top: 34%; animation-delay: -2s; color: #BDEDE6; }
.wel-sky span:nth-child(4) { right: 6%; top: 38%; animation-delay: -3s; font-size: 28px; }
.wel-sky span:nth-child(5) { left: 4%; top: 56%; animation-delay: -1.5s; color: #C8D9FF; font-size: 26px; }
.wel-sky span:nth-child(6) { right: 14%; top: 60%; animation-delay: -2.5s; color: #FFD3C2; }
.wel-hero { position: relative; }
.wel-hero::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 140px; height: 20px; transform: translateX(-50%); border-radius: 50%; background: rgba(255,111,145,.14); z-index: -1; }
.wel-logo { font-size: 40px; font-weight: 900; margin-top: 12px; letter-spacing: -.03em; }
.wel-logo em { font-style: normal; color: var(--brand); }
.wel-tag { color: var(--ink-2); font-weight: 600; font-size: 17px; line-height: 1.55; margin-top: 10px; }
.wel-actions { width: 100%; display: grid; gap: 12px; margin-top: auto; padding-top: 30px; position: relative; }
.wel-form { flex: 1; display: flex; flex-direction: column; }
.wel-form .back { align-self: flex-start; font-size: 36px; line-height: 1; color: var(--faint); padding: 0 8px 8px 0; font-weight: 300; }
.wel-chat { display: flex; align-items: flex-end; gap: 8px; margin: 10px 0 26px; }
.wel-chat .bubble { margin-bottom: 36px; font-size: 17px; }
.field { width: 100%; font: 700 19px var(--ko); padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--soft); outline: none; transition: border-color .15s, background .15s; color: var(--ink); }
.field:focus { border-color: #8FB3FF; background: #fff; }
.hint { color: var(--muted); font-weight: 600; font-size: 14px; margin: 10px 4px 0; }
.wel-form > .btn { margin-top: auto; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 4px 0 14px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line-2); transition: all .15s var(--ease); }
.pin-dots i.on { background: var(--brand); border-color: var(--brand); transform: scale(1.12); }
.pin-dots.shake { animation: shake .4s; }
.pin-dots.shake i { border-color: var(--bad); background: var(--bad); }
.pin-msg { text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; min-height: 20px; }
.pin-msg.err { color: var(--bad); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: auto; padding-top: 20px; }
.keypad button { height: 62px; border-radius: 18px; border: 2px solid var(--line-2); box-shadow: 0 4px 0 var(--line-2); font-size: 25px; font-weight: 800; background: #fff; transition: transform .06s, box-shadow .06s; }
.keypad button:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line-2); }
.keypad .blank { visibility: hidden; }
.goal-list { display: grid; gap: 10px; }
.goal-list button { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); text-align: left; transition: all .15s; }
.goal-list b { font-size: 17px; font-weight: 900; width: 86px; }
.goal-list span { flex: 1; color: var(--muted); font-weight: 700; }
.goal-list em { font-style: normal; font-weight: 900; color: var(--muted); }
.goal-list button.on { border-color: #FFAFC4; background: var(--brand-l); box-shadow: 0 3px 0 #FFAFC4; }
.goal-list button.on b, .goal-list button.on em { color: var(--brand-d); }
.goal-list + .btn { margin-top: auto; }

/* 스플래시 */
.splash { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.splash-dots { display: flex; gap: 8px; }
.splash-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: dot 1s ease-in-out infinite; }
.splash-dots i:nth-child(2) { animation-delay: .15s; } .splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-8px); opacity: .5; } }

@media (min-width: 561px) {
  body { background: radial-gradient(circle at 20% 10%, #FFE9DE, transparent 40%), radial-gradient(circle at 85% 80%, #E7E0FF, transparent 40%), var(--soft); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
