@font-face {
  font-family: "Pretendard";
  src: url("/fonts/PretendardVariable.woff2") format("woff2-variations"), url("/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --blue: #0a6bff;
  --blue-d: #0056dc;
  --blue-l: #e8f1ff;
  --blue-50: #f3f8ff;
  --sky: #4fb3ff;
  --mint: #4fd8b4;
  --navy: #0d1b3d;
  --navy-2: #1f3c78;
  --ink: #111a2e;
  --ink-2: #4b5567;
  --ink-3: #8b95a7;
  --line: #e6ebf2;
  --bg: #f6f9fd;
  --card: #fff;
  --orange: #f08300;
  --orange-l: #fff3e5;
  --red: #ef3b3b;
  --red-l: #ffecec;
  --green: #12b76a;
  --shadow: 0 6px 24px rgba(15, 35, 80, .08);
  --shadow-2: 0 12px 40px rgba(15, 35, 80, .16);
  --tab-h: 70px;
  --top: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--ink);
  background: #dfe8f5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }

#shell {
  position: relative;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(13, 27, 61, .12);
}
body.framed { background: var(--bg); }
body.framed #shell { max-width: none; box-shadow: none; }
body.framed { --top: 50px; }

/* fake iOS status bar, only when the app runs inside the landing page's phone frame */
#statusbar {
  position: absolute; z-index: 40; top: 0; left: 0; right: 0; height: var(--top);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 30px 0 34px; font-weight: 650; font-size: 15px; pointer-events: none;
  color: var(--ink); transition: color .3s;
}
#statusbar.light { color: #fff; }
#statusbar .icons { display: flex; gap: 6px; align-items: center; }
#statusbar svg { height: 12px; width: auto; fill: currentColor; }

#view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#view.has-tab { padding-bottom: calc(var(--tab-h) + 28px + var(--safe-b)); }
.screen { min-height: 100%; position: relative; }
.pad { padding: calc(var(--top) + 12px) 18px 24px; }

/* ---- tab bar ---- */
#tabbar {
  position: absolute; z-index: 30; left: 14px; right: 14px; bottom: calc(12px + var(--safe-b));
  height: var(--tab-h); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  border-radius: 24px; background: rgba(30, 41, 61, .78);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(10, 20, 40, .25);
}
#tabbar.on-map { background: rgba(28, 74, 112, .72); }
#tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 18px; color: rgba(255, 255, 255, .62); font-size: 11.5px; font-weight: 600; transition: .2s;
}
#tabbar a svg { width: 24px; height: 24px; }
#tabbar a.active { color: #fff; background: linear-gradient(140deg, #0f1d3f 0%, #23477f 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 6px 16px rgba(5, 12, 30, .35); }

/* ---- common pieces ---- */
.topbar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: calc(var(--top) + 6px) 8px 8px; background: rgba(246, 249, 253, .92); backdrop-filter: blur(10px); }
.topbar h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 700; }
.topbar .back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.topbar .back svg { width: 24px; height: 24px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: var(--shadow); }

.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 20px;
  border-radius: 14px; font-weight: 700; font-size: 16px; background: var(--blue); color: #fff; transition: transform .1s, background .2s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px #b9d3ff; }
.btn.gray { background: #eef1f5; color: var(--ink-2); }
.btn.dark { background: var(--navy); }
.btn.small { height: 38px; font-size: 14px; border-radius: 11px; padding: 0 14px; }
.btn[disabled] { background: #e8ecf1; color: #a3acb9; pointer-events: none; box-shadow: none; }
.bottom-cta { position: sticky; bottom: 0; padding: 14px 18px calc(16px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 99px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pill.blue { background: var(--blue); color: #fff; box-shadow: none; }
.chip { height: 36px; padding: 0 16px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1.2px #dfe5ee;
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: .15s; }
.chip.on { background: var(--blue); color: #fff; box-shadow: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #eef2f7; border-radius: 12px; padding: 4px; }
.seg button { height: 36px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15, 35, 80, .1); }
.seg.blue { background: transparent; gap: 8px; padding: 0; }
.seg.blue button { background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-radius: 99px; }
.seg.blue button.on { background: var(--blue); color: #fff; box-shadow: none; }

.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.section-title { font-size: 18px; font-weight: 700; margin: 26px 2px 12px; display: flex; justify-content: space-between; align-items: center; }
.section-title small { font-size: 13px; font-weight: 500; color: var(--ink-3); }

.bubble { position: relative; display: inline-block; padding: 9px 14px; border-radius: 16px; background: #fff;
  color: var(--blue-d); font-weight: 700; font-size: 14px; line-height: 1.35; box-shadow: inset 0 0 0 1.6px #2c7bff, 0 6px 16px rgba(10, 60, 160, .15); }
.bubble::after { content: ""; position: absolute; left: 22px; bottom: -8px; width: 14px; height: 14px; background: #fff;
  border-right: 1.6px solid #2c7bff; border-bottom: 1.6px solid #2c7bff; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.bubble.left-tail::after { left: -7px; top: 50%; bottom: auto; margin-top: -7px; transform: rotate(135deg); }

.hl-d { color: var(--red); font-weight: 700; }
.hl-c { color: var(--orange); font-weight: 700; }
.hl-ok { color: var(--blue); font-weight: 700; }

.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.empty img { width: 92px; margin: 0 auto 12px; border-radius: 22px; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.spinner.blue { border-color: #d6e5ff; border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }
.shimmer { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- overlay: sheets, modals, toast ---- */
#overlay { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(8, 16, 34, .45); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.scrim.show { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + var(--safe-b)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; }
.sheet.show { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #dde3ea; margin: 2px auto 14px; }
.sheet h2 { font-size: 19px; margin: 4px 0 14px; }
.modal { position: absolute; left: 18px; right: 18px; top: 50%; transform: translateY(-46%) scale(.96); opacity: 0;
  background: #f8fbfe; border-radius: 28px; padding: 22px 20px; transition: .25s; pointer-events: auto; box-shadow: var(--shadow-2); max-height: 86%; overflow-y: auto; }
.modal.show { transform: translateY(-50%); opacity: 1; }
#toast { position: absolute; z-index: 80; left: 50%; bottom: calc(var(--tab-h) + 40px); transform: translate(-50%, 20px); opacity: 0;
  background: rgba(17, 26, 46, .92); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  transition: .25s; pointer-events: none; max-width: 86%; text-align: center; line-height: 1.4; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 7px; }
.input, .textarea, .select { width: 100%; border: 0; border-radius: 13px; background: #f2f5f9; padding: 13px 14px; font-size: 15px; outline: none; transition: box-shadow .15s; }
.input:focus, .textarea:focus, .select:focus { box-shadow: inset 0 0 0 1.6px var(--blue); background: #fff; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.switch { position: relative; width: 50px; height: 30px; flex: none; border-radius: 99px; background: #d9dfe7; transition: .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s; }
.switch.on { background: var(--blue); }
.switch.on::after { left: 23px; }

/* ---- splash ---- */
.splash { position: absolute; inset: 0; z-index: 90; background: linear-gradient(180deg, #fbfcfe 0%, #f1f6fd 60%, #e6f0fc 100%); display: flex; flex-direction: column; align-items: center; transition: opacity .45s; }
.splash .logo { margin-top: 32vh; width: 168px; aspect-ratio: 900/281; background: linear-gradient(180deg, #1f86ff, #0a5ff0);
  -webkit-mask: url("/assets/logo-white.png") center/contain no-repeat; mask: url("/assets/logo-white.png") center/contain no-repeat; }
.splash p { margin: 12px 0 0; color: #1a5fd6; font-weight: 600; font-size: 15px; }
.splash .scene { position: absolute; left: 0; right: 0; bottom: 0; }
.splash.hide { opacity: 0; pointer-events: none; }

/* ---- home ---- */
.home { min-height: 100%; padding-bottom: calc(var(--tab-h) + 30px + var(--safe-b)); background: #79c0e4 url("/assets/map.jpg") 62% 30% / cover no-repeat; }
.home::before { content: ""; position: absolute; inset: 0 0 auto; height: 150px; background: linear-gradient(rgba(214, 238, 252, .85), rgba(214, 238, 252, 0)); }
.home .wrap { position: relative; padding: calc(var(--top) + 10px) 16px 0; }
.profile-card { position: relative; display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 14px;
  border-radius: 26px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(20, 60, 100, .18); }
.avatar { position: relative; width: 92px; height: 108px; border-radius: 16px; overflow: hidden; background: linear-gradient(#b8d4ff, #6ea4ff);
  box-shadow: inset 0 0 0 3px #3f7ff0; }
.avatar img { position: absolute; width: 150%; max-width: none; left: -14%; top: -6%; }
.avatar .xp { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; display: flex; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(90deg, #0f1d3f, #1d3366); color: #fff; font-weight: 800; font-size: 14px; }
.profile-card .tier { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 650; box-shadow: inset 0 0 0 1.2px #dfe5ee; background: #fff; }
.profile-card .name { margin: 8px 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.profile-card .name small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.profile-card .edit { height: 34px; padding: 0 12px; border-radius: 10px; background: #eef2f6; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.profile-card .edit .ic { width: 15px; height: 15px; color: #8b95a7; }
.profile-card .side { display: flex; flex-direction: column; gap: 12px; align-self: stretch; justify-content: space-between; }
.bell { position: relative; }
.bell .badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.toggle-graph { background: #e9edf2; }
.toggle-graph svg { transition: transform .25s; }
.toggle-graph.open svg { transform: rotate(180deg); }
.xpbar { position: relative; display: flex; align-items: center; margin: 12px 0 0 2px; }
.xpbar .gauge { width: 44px; height: 44px; flex: none; border-radius: 12px; background: #1b2d52; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; z-index: 1; box-shadow: 0 6px 14px rgba(10, 30, 60, .3); }
.xpbar .track { flex: 1; max-width: 300px; height: 20px; margin-left: -6px; border-radius: 0 12px 12px 0; background: #e9fbff; box-shadow: inset 0 0 0 3px #7fe4ff, 0 4px 12px rgba(0, 120, 200, .2); overflow: hidden; }
.xpbar .fill { height: 100%; background: linear-gradient(90deg, #e3342f, #ff9f1a 35%, #f8e71c 55%, #5ad82d 80%, #1fbf3a); border-radius: 0 10px 10px 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.xpbar .track { position: relative; }
.xpbar .label { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 800; color: #0e3a66; white-space: nowrap; }
.graph-panel { margin-top: 12px; padding: 18px 16px 14px; border-radius: 24px; background: rgba(255, 255, 255, .96); box-shadow: 0 12px 34px rgba(20, 60, 100, .2); animation: fadeIn .3s ease both; }
.graph-panel h3 { margin: 0 0 12px; text-align: center; font-size: 16px; }
.graph-meta { display: flex; justify-content: space-between; align-items: center; margin: 14px 2px 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .callout { position: absolute; transform: translate(-50%, -100%); max-width: 64%; text-align: center; font-size: 12px; padding: 6px 10px; }
.home-hint { position: absolute; right: 16px; top: calc(var(--top) + 214px); animation: bob 2.8s ease-in-out infinite; }
.bubble.up::after { top: -8px; bottom: auto; left: auto; right: 24px; transform: rotate(225deg); }
.home-cta { position: relative; margin: 0 16px; padding: 16px; border-radius: 22px; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px rgba(20, 60, 100, .2); display: flex; gap: 12px; align-items: center; }
.home-cta img { width: 54px; height: 54px; border-radius: 14px; }
.home-cta b { display: block; font-size: 15.5px; }
.home-cta span { font-size: 13px; color: var(--ink-3); }
.home-spacer { height: 52vh; }
.mascot-walk { position: absolute; right: 8%; top: 58%; width: 34%; filter: drop-shadow(0 10px 14px rgba(0, 40, 80, .3)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.star-float { position: absolute; width: 48px; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(120, 90, 0, .25)); }

/* ---- coach ---- */
.room { position: absolute; inset: 0; background-size: cover; background-position: center; }
.room.blur { filter: blur(16px) brightness(.85) saturate(1.1); transform: scale(1.1); }
.room-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,0) 30%, rgba(0,0,0,.05) 60%, rgba(0,0,0,.45)); }
.coach-home { position: relative; min-height: 100%; display: flex; flex-direction: column; }
.coach-home .center { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: calc(var(--top) + 40px) 20px 20px; }
.new-project { height: 48px; padding: 0 20px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 700; font-size: 16px; display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; box-shadow: 0 10px 30px rgba(10, 107, 255, .45); }
.new-project .ic { width: 26px; height: 26px; }
.model-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: rgba(10, 20, 40, .55); color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(10px); }
.model-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
.model-chip .dot.wait { background: #ffc53d; box-shadow: 0 0 0 3px rgba(255, 197, 61, .25); }
.recent { position: relative; padding: 0 16px 18px; }
.recent h3 { color: #fff; font-size: 15px; margin: 0 4px 10px; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); }
.recent-item .score { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--blue); }
.recent-item .score.fail { background: #8d99ab; }
.recent-item .t { font-weight: 700; font-size: 14.5px; }
.recent-item .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 6px 26px; position: relative; }
.stepper::before { content: ""; position: absolute; top: 8px; left: 12.5%; right: 12.5%; height: 2px; background: #dfe5ee; }
.stepper .s { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #a2acba; }
.stepper .s i { width: 16px; height: 16px; border-radius: 50%; background: #dfe5ee; box-shadow: 0 0 0 4px var(--bg); }
.stepper .s.done i { background: #9cc2ff; }
.stepper .s.on { color: var(--blue); }
.stepper .s.on i { background: var(--blue); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px #d7e7ff; }
.setup h2 { text-align: center; font-size: 19px; margin: 0 0 18px; }
.mode-card { width: 100%; display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; padding: 10px; border-radius: 22px; background: #fff;
  box-shadow: var(--shadow); text-align: left; margin-bottom: 14px; transition: .2s; }
.mode-card img { width: 112px; height: 112px; border-radius: 16px; object-fit: cover; }
.mode-card b { font-size: 18px; display: block; margin-bottom: 6px; }
.mode-card span { color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.mode-card.on { box-shadow: inset 0 0 0 2px var(--blue), 0 8px 24px rgba(10, 107, 255, .15); background: #f2f7ff; }
.mode-card.dim { opacity: .35; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.checks { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 6px 16px; }
.check { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 2px; font-size: 15.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid #f0f3f7; text-align: left; }
.check:last-child { border-bottom: 0; }
.check i { width: 22px; height: 22px; border-radius: 6px; background: #e3e8ef; display: grid; place-items: center; flex: none; }
.check i svg { width: 15px; height: 15px; opacity: 0; }
.check.on { color: var(--blue); }
.check.on i { background: var(--blue); }
.check.on i svg { opacity: 1; }
.persona { width: 100%; text-align: left; padding: 16px 18px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); margin-bottom: 12px; transition: .2s; }
.persona b { display: block; font-size: 16.5px; margin-bottom: 6px; }
.persona span { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.persona.on { box-shadow: inset 0 0 0 2px var(--blue), 0 8px 24px rgba(10, 107, 255, .15); }

.prepare { padding: calc(var(--top) + 6px) 18px 18px; min-height: 100%; display: flex; flex-direction: column; }
.prep-card { position: relative; flex: 1; min-height: 420px; margin-top: 10px; border-radius: 24px; overflow: hidden; background: linear-gradient(#b3cbe4, #6f8fb6 55%, #22385c); }
.prep-card .img { position: absolute; inset: 0; background-size: cover; background-position: center top; transition: filter 1.2s, opacity 1.2s, transform 1.2s; }
.prep-card .img.silhouette { filter: brightness(0) blur(9px); opacity: .5; transform: scale(1.04); }
.prep-card .veil { position: absolute; inset: 0; background: linear-gradient(rgba(150, 185, 220, .35), rgba(30, 50, 80, .1) 45%, rgba(10, 20, 40, .88)); transition: opacity 1s; }
.prep-card .msg { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; color: #fff; padding: 0 20px; }
.prep-card .msg b { font-size: 18px; display: block; margin-bottom: 14px; }
.prep-card .msg small { color: rgba(255, 255, 255, .7); }
.progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; margin: 0 28px 12px; }
.progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #4fb3ff, #0a6bff); transition: width .3s; }

.session { position: relative; height: 100%; overflow: hidden; color: #fff; }
.session .date-pill { position: absolute; z-index: 3; top: calc(var(--top) + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 9px 18px; border-radius: 99px;
  background: rgba(30, 24, 18, .45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); backdrop-filter: blur(8px); font-weight: 650; font-size: 14.5px; }
.session .close { position: absolute; z-index: 4; top: calc(var(--top) + 4px); left: 10px; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; }
.session .question { position: absolute; z-index: 3; left: 18px; right: 18px; top: calc(var(--top) + 60px); padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .94); color: var(--ink);
  font-weight: 650; font-size: 15px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.session .question small { display: block; color: var(--blue); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.session .question { padding-right: 58px; transition: box-shadow .3s; }
.session .question .speak { position: absolute; right: 10px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: var(--blue-l); color: var(--blue); display: grid; place-items: center; }
.session .question.speaking { box-shadow: 0 0 0 3px rgba(10, 107, 255, .45), 0 10px 30px rgba(0, 0, 0, .2); }
.session .question.speaking .speak { background: var(--blue); color: #fff; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.say { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border-radius: 50%; background: var(--blue-l); color: var(--blue); vertical-align: middle; }
.say .ic { width: 15px; height: 15px; }
.note .say { flex: none; margin-left: auto; }
.session .live { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 200px; max-height: 46%; overflow-y: auto; padding: 16px 18px; border-radius: 22px;
  background: rgba(22, 108, 255, .88); backdrop-filter: blur(6px); box-shadow: 0 16px 40px rgba(0, 40, 120, .35); font-size: 15px; line-height: 1.65; text-align: center; }
.session .live::-webkit-scrollbar { display: none; }
.session .live p { margin: 0 0 6px; }
.session .live .wait { opacity: .6; }
.session .live .pending-dots { display: inline-block; letter-spacing: 2px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.session .live .hl-d { color: #ffe08a; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.session .live-meta { font-size: 12px; opacity: .8; margin-top: 8px; }
.mic-area { position: absolute; z-index: 4; left: 0; right: 0; bottom: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mic { position: relative; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fff, #e9f1ff); color: var(--blue);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .25), 0 12px 30px rgba(0, 0, 0, .3); transition: .25s; }
.mic svg { width: 40px; height: 40px; }
.mic.rec { background: radial-gradient(circle at 50% 35%, #3d8bff, #0a54e0); color: #fff; box-shadow: 0 0 0 8px rgba(10, 107, 255, .3), 0 0 40px rgba(10, 107, 255, .7); }
.mic.busy { background: radial-gradient(circle at 50% 35%, #3d8bff, #0a54e0); }
.mic.done { background: radial-gradient(circle at 50% 35%, #3d8bff, #0a54e0); color: #fff; }
.mic .bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.mic .bars i { width: 5px; border-radius: 3px; background: #fff; height: 8px; transition: height .08s; }
.mic-caption { font-weight: 650; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.4); min-height: 22px; }
.mic-hint { position: absolute; left: calc(50% + 46px); top: -26px; white-space: nowrap; font-size: 12.5px; }
.upload-link { font-size: 12.5px; color: rgba(255,255,255,.8); text-decoration: underline; text-underline-offset: 3px; }
.script-toggle { position: absolute; z-index: 4; top: calc(var(--top) + 4px); right: 10px; height: 36px; padding: 0 12px; border-radius: 99px; background: rgba(0,0,0,.35); color: #fff; font-size: 13px; font-weight: 600; margin-top: 4px; }

.chat { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--top) + 56px); bottom: 190px; overflow-y: auto; padding: 8px 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; box-shadow: 0 6px 18px rgba(0,0,0,.18); animation: fadeIn .3s both; }
.msg.ai { align-self: flex-start; background: rgba(255,255,255,.95); color: var(--ink); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: rgba(10, 107, 255, .92); color: #fff; border-bottom-right-radius: 6px; }
.msg.me .hl-d { color: #ffe08a; }
.msg .std { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.3); font-size: 13px; opacity: .9; }
.msg.typing { color: var(--ink-3); }
.end-chat { position: absolute; z-index: 4; right: 12px; top: calc(var(--top) + 8px); height: 34px; padding: 0 12px; border-radius: 99px; background: rgba(255,255,255,.9); color: var(--ink); font-size: 13px; font-weight: 700; }

.fb-head { position: sticky; top: 0; z-index: 5; padding: calc(var(--top) + 8px) 16px 10px; background: rgba(246, 249, 253, .94); backdrop-filter: blur(10px); }
.fb-select { width: 100%; height: 44px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; }
.fb-select select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: #fff; font-weight: 700; font-size: 14px; text-align: center; outline: none; max-width: 100%; }
.fb-select select option { color: var(--ink); }
.fb-list { padding: 4px 16px 20px; }
.fb-summary { padding: 18px; margin-bottom: 14px; }
.fb-summary h3 { margin: 0 0 12px; font-size: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--blue-50); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--blue); }
.stat span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); margin-top: 10px; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.fb-item { padding: 16px 16px 14px; margin-bottom: 12px; }
.fb-item h4 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.fb-item .sent { font-size: 15px; font-weight: 600; line-height: 1.6; }
.fb-item .std { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--blue-50); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.fb-item .std b { color: var(--blue); }
.tip { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.tip svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.tip.c svg { color: var(--orange); }
.tip.d svg { color: var(--red); }
.tip.z svg { color: var(--blue); }
.writing { padding: 16px; margin-bottom: 12px; }
.writing .row { font-weight: 700; font-size: 14px; color: var(--blue); }
.writing pre { white-space: pre-wrap; font: inherit; font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; max-height: 120px; overflow: hidden; }

.calc { position: absolute; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; text-align: center; font-size: 19px; font-weight: 700; line-height: 1.5; }
.calc .ring { position: relative; width: 190px; height: 190px; }
.calc .ring img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.calc .ring::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 6px solid transparent; border-top-color: var(--blue); animation: spin 1s linear infinite; }

.result { text-align: center; }
.result .head { display: flex; justify-content: center; align-items: center; position: relative; margin-bottom: 12px; }
.result .head h3 { margin: 0; font-size: 20px; }
.result .head button { position: absolute; right: -4px; top: -6px; width: 40px; height: 40px; border-radius: 50%; background: #e9edf1; display: grid; place-items: center; }
.stamp { display: inline-block; margin: 8px auto 4px; padding: 6px 18px; border: 4px double var(--blue); border-radius: 10px; color: var(--blue); font-size: 38px; font-weight: 900; letter-spacing: .04em; transform: rotate(-3deg); background: #fff; animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.stamp.fail { color: #6b778a; border-color: #8d99ab; }
@keyframes stamp { from { transform: scale(2) rotate(-12deg); opacity: 0; } }
.result-art { position: relative; margin: 0 auto; width: 100%; max-width: 330px; aspect-ratio: 705 / 740; background: url("/assets/result-pass.jpg") center/cover; }
.result-art .scorecard { position: absolute; left: 20.6%; top: 4%; width: 56.3%; height: 30.4%; border-radius: 12px; background: linear-gradient(#fff, #edf4ff); box-shadow: inset 0 0 0 3px #3b86ff, 0 8px 20px rgba(10, 60, 160, .2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; }
.result-art .scorecard b { font-size: 18px; }
.result-art .scorecard b em { font-style: normal; color: var(--blue); }
.result-art .scorecard span { font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }
.result .breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.result .xpgain { font-weight: 800; color: var(--blue); margin: 8px 0 14px; }
.result .actions { display: grid; grid-template-columns: 1fr 1fr 52px; gap: 8px; }

/* ---- journal ---- */
.tabs-top { position: sticky; top: 0; z-index: 6; padding: calc(var(--top) + 6px) 16px 10px; background: rgba(246, 249, 253, .95); backdrop-filter: blur(10px); }
.tabs-top h1 { text-align: center; font-size: 18px; margin: 4px 0 12px; }
.peek { display: flex; align-items: flex-end; gap: 4px; margin: 6px 0 -6px 6px; position: relative; z-index: 1; }
.peek img { width: 52px; height: 52px; border-radius: 14px; }
.peek .bubble { margin-bottom: 12px; font-size: 12.5px; padding: 7px 12px; }
.peek .bubble::after { left: -6px; bottom: 9px; transform: rotate(135deg); width: 10px; height: 10px; }
.region-box { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.region-box .bar { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; }
.region-box .bar label { position: relative; cursor: pointer; }
.region-box .bar select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.region-box .bar select option { color: var(--ink); }
.region-box .body { padding: 14px; background: linear-gradient(135deg, #6fae6a, #93c26b 40%, #c9b974 75%, #e0c48a); position: relative; }
.region-box .body::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.12); backdrop-filter: blur(3px); }
.search { position: relative; display: flex; align-items: center; background: #fff; border-radius: 13px; padding: 0 12px; height: 46px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15px; height: 100%; }
.search svg { width: 22px; height: 22px; color: var(--blue); }
.search.outline { box-shadow: inset 0 0 0 1.6px #3e86ff; }
.tags { position: relative; display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin-top: 12px; scrollbar-width: none; }
.tags::-webkit-scrollbar { display: none; }
.tags button { flex: none; height: 30px; padding: 0 12px; border-radius: 99px; background: rgba(30, 38, 50, .55); color: #fff; font-size: 13px; font-weight: 600; }
.words { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.word { position: relative; padding: 13px 13px 12px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); min-height: 104px; }
.word .w { font-size: 15.5px; font-weight: 800; padding-right: 22px; line-height: 1.35; }
.word .w em { font-style: normal; color: var(--blue); font-weight: 700; }
.word .meta { font-size: 11.5px; color: var(--ink-3); margin: 6px 0 4px; }
.word .ex { font-size: 12px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.word .star { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center; color: #c9d2de; }
.word .star.on { color: var(--blue); }
.word .star svg { width: 20px; height: 20px; }
.review-card { padding: 16px; margin-bottom: 12px; }
.review-card .t { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.review-card .s { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); margin-bottom: 12px; }
.review-card .btns { display: flex; gap: 8px; }
.review-card .btns .btn { flex: 1; }
.acc { padding: 0; margin-bottom: 10px; overflow: hidden; }
.acc summary { list-style: none; padding: 15px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 750; font-size: 14.5px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc .acc-body { padding: 0 16px 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.practice-target { padding: 16px; border-radius: 16px; background: var(--blue-50); font-size: 17px; font-weight: 700; line-height: 1.6; text-align: center; margin: 6px 0 16px; }
.practice-mic { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 10px 0 6px; }
.practice-mic .mic { width: 84px; height: 84px; box-shadow: 0 0 0 6px #e8f1ff, 0 10px 24px rgba(10, 107, 255, .25); }
.practice-mic .mic svg { width: 34px; height: 34px; }
.verdict { padding: 14px; border-radius: 14px; font-size: 14px; line-height: 1.6; margin-top: 12px; }
.verdict.ok { background: #e7f8ef; color: #0d7a48; }
.verdict.no { background: var(--red-l); color: #a32323; }

/* ---- community ---- */
.hot { padding: 4px 0; }
.hot-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 9px 12px 9px 6px; margin-bottom: 6px; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(15, 35, 80, .05); font-size: 14px; font-weight: 650; }
.medal { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; margin: 0 auto; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.medal.m1 { background: radial-gradient(circle at 35% 30%, #fff3a6, #f5b800 60%, #c98a00); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c4ccd6 60%, #8e98a6); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #ffd9b0, #d8843a 60%, #9a5520); }
.medal.mn { background: #eef1f5; color: var(--ink-3); box-shadow: none; }
.counts { display: flex; gap: 10px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.counts span { display: inline-flex; align-items: center; gap: 3px; }
.counts svg { width: 13px; height: 13px; }
.post { display: block; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.post .t { font-weight: 750; font-size: 15.5px; display: flex; align-items: center; gap: 6px; }
.post .b { font-size: 13.5px; color: var(--ink-3); margin: 5px 0 8px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post .m { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.sample { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: #eef1f5; padding: 2px 6px; border-radius: 6px; }
.fab { position: absolute; z-index: 25; right: 20px; bottom: calc(var(--tab-h) + 30px + var(--safe-b)); width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(10, 107, 255, .4); }
.fab svg { width: 26px; height: 26px; }
.post-view { padding: 6px 18px 120px; }
.author { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; }
.author img { width: 44px; height: 44px; border-radius: 12px; background: #dbe8ff; }
.author b { display: block; font-size: 15px; }
.author span { font-size: 12.5px; color: var(--ink-3); }
.post-view h2 { font-size: 21px; margin: 0 0 10px; }
.post-view .body { font-size: 15px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.like-btn { margin: 22px auto 0; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 99px; background: #eef2f7; font-weight: 750; color: var(--ink-2); }
.like-btn.on { background: var(--blue-l); color: var(--blue); }
.like-btn svg { width: 18px; height: 18px; }
.post-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px -18px 0; }
.post-actions button { height: 50px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.post-actions button.on { color: var(--blue); }
.post-actions button + button { border-left: 1px solid var(--line); }
.post-actions svg { width: 18px; height: 18px; }
.comment { display: flex; gap: 10px; padding: 14px 0; border-bottom: 1px solid #f0f3f7; }
.comment.reply { margin-left: 34px; padding: 12px; border: 0; border-radius: 14px; background: #f3f6fa; margin-top: -4px; margin-bottom: 6px; }
.comment img { width: 34px; height: 34px; border-radius: 10px; background: #dbe8ff; flex: none; }
.comment b { font-size: 13.5px; }
.comment span.tier { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }
.comment p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.comment-bar { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(12px + var(--safe-b)); background: #fff; box-shadow: 0 -6px 20px rgba(15, 35, 80, .08); display: flex; gap: 8px; }
.comment-bar input { flex: 1; height: 44px; border: 0; border-radius: 12px; background: #f2f5f9; padding: 0 14px; outline: none; }
.comment-bar button { width: 64px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 700; }

/* ---- notifications / profile sheets ---- */
.noti { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0f3f7; }
.noti .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-l); color: var(--blue); flex: none; }
.noti .ic svg { width: 20px; height: 20px; }
.noti b { font-size: 14px; display: block; }
.noti span { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.model-box { padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #0d1b3d, #1f3c78); color: #fff; margin-bottom: 14px; }
.model-box .k { font-size: 12px; opacity: .7; }
.model-box .v { font-weight: 750; font-size: 15px; margin-bottom: 8px; }
.model-box .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; margin: 6px 0 4px; }
.model-box .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fb3ff, #7cf0d0); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid #f0f3f7; font-size: 14px; line-height: 1.5; }
.toggle-row b { display: block; font-size: 15px; }
.toggle-row span { color: var(--ink-3); font-size: 12.5px; }

@media (min-width: 481px) {
  body:not(.framed) #shell { margin-top: 0; }
}
