/* ============================================================
   KOREANPATH — Modern Redesign
   Clean, premium, dark-accented web app feel
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #5B6EF5;
  --primary-dk: #3D52E0;
  --primary-lt: #7C8FF7;
  --accent:     #F0544F;
  --green:      #22C55E;
  --amber:      #F59E0B;
  --purple:     #9B6EFF;
  --pink:       #F472B6;

  --bg:         #F7F8FF;
  --bg2:        #EEF0FD;
  --surface:    #FFFFFF;
  --surface2:   #FAFBFF;
  --border:     rgba(91,110,245,.12);
  --border-md:  rgba(91,110,245,.2);

  --text:       #11142D;
  --text-muted: #6B7280;
  --text-light: #A0A8BC;

  --radius:     18px;
  --radius-sm:  10px;
  --radius-xs:  6px;
  --radius-xl:  24px;

  --shadow-xs:  0 1px 4px rgba(17,20,45,.06);
  --shadow:     0 4px 20px rgba(17,20,45,.08), 0 1px 4px rgba(17,20,45,.04);
  --shadow-md:  0 8px 32px rgba(17,20,45,.12), 0 2px 8px rgba(17,20,45,.06);
  --shadow-lg:  0 16px 48px rgba(17,20,45,.16), 0 4px 16px rgba(17,20,45,.08);
  --shadow-clr: 0 8px 24px rgba(91,110,245,.3);

  --nav-h:      66px;
  --bot-nav-h:  72px;
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* ── TOP NAV ─────────────────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex: 1;
  letter-spacing: -.3px;
}

.nav-logo .flag { font-size: 1.5rem; }
.nav-logo .brand-kr {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2px;
  background: var(--bg2);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.nav-links button {
  background: none;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s;
}
.nav-links button:hover { color: var(--text); background: var(--surface); }
.nav-links button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* ── Guest nav (landing page section links) ─────────────────── */
.nav-links-guest {
  background: none;
  padding: 0;
  gap: 4px;
}
.nav-lp-link {
  background: none;
  border: none;
  padding: 7px 13px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-lp-link:hover { color: var(--text); background: var(--bg2); }

/* ── Guest auth buttons in top nav ──────────────────────────── */
.nav-guest-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-ghost-btn {
  background: none;
  border: 1.5px solid var(--border-md);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.nav-ghost-btn:hover { border-color: var(--primary); background: var(--bg2); color: var(--primary); }
.nav-primary-btn {
  background: var(--primary);
  border: none;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.nav-primary-btn:hover { background: var(--primary-dk); transform: translateY(-1px); }

/* ── MAIN CONTENT ─────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 28px 32px calc(var(--bot-nav-h) + 24px);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
/* Landing page gets full width, no inherited padding */
.main-content.main-landing {
  padding: 0;
  max-width: 100%;
}

/* ── BOTTOM NAV ─────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(17,20,45,.08);
  height: var(--bot-nav-h);
  padding: 8px 0 env(safe-area-inset-bottom, 0);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
}

.bnav-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 0.68rem;
  font-weight: 600;
  transition: all .2s;
  min-width: 60px;
}

.bnav-btn .bnav-icon { font-size: 1.45rem; transition: transform .2s; }
.bnav-btn.active { color: var(--primary); }
.bnav-btn.active .bnav-icon { transform: scale(1.15); }

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounceIn { 0% { transform: scale(0.5); opacity:0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity:1; } }
@keyframes shimmer { 0%,100% { opacity:.5; } 50% { opacity:1; } }

.fade-in { animation: fadeIn .35s cubic-bezier(.22,.61,.36,1) forwards; }
.lesson-item { animation: slideUp .4s cubic-bezier(.22,.61,.36,1) both; }

/* ── DASHBOARD ───────────────────────────────────────────────── */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto;
  gap: 22px;
  align-items: start;
}
.dash-main    { display: flex; flex-direction: column; gap: 22px; }
.dash-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: calc(var(--nav-h) + 20px); }

/* Hero */
.hero-card {
  background: linear-gradient(135deg, #4F5FE8 0%, #7C3AED 60%, #9B6EFF 100%);
  border-radius: var(--radius-xl);
  padding: 28px 28px 26px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 40px rgba(79,95,232,.4);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 40%;
  width: 100px; height: 100px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}

.hero-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.4px;
  line-height: 1.2;
}
.hero-card p  { font-size: 0.9rem; opacity: .85; line-height: 1.55; }
.hero-card p strong { color: #fff; font-weight: 700; }
.hero-flag {
  font-size: 3.8rem;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
  animation: shimmer 3s ease-in-out infinite;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  opacity: 0;
  transition: opacity .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card:hover::after { opacity: 1; }
.stat-card.stat-alert {
  background: linear-gradient(135deg, #FFF1F2, #FFF5F5);
  box-shadow: 0 4px 20px rgba(240,84,79,.12);
}
.stat-card.stat-alert::after { background: var(--accent); opacity: 1; }

.stat-icon  { font-size: 1.5rem; margin-bottom: 6px; }
.stat-value { font-size: 1.4rem; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.stat-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* Progress */
.progress-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  align-items: center;
}
.progress-header strong { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.progress-header span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(91,110,245,.1);
  padding: 2px 10px;
  border-radius: 99px;
}

.progress-bar-outer {
  height: 8px;
  background: var(--bg2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 99px;
  transition: width .6s cubic-bezier(.22,.61,.36,1);
}

.week-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.week-dot {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: all .2s;
  box-shadow: var(--shadow-xs);
}
.week-dot.started { background: #FEF3C7; box-shadow: 0 2px 8px rgba(245,158,11,.2); }
.week-dot.done    { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); box-shadow: 0 2px 8px rgba(34,197,94,.2); }
.week-dot:hover   { transform: scale(1.12) rotate(5deg); box-shadow: var(--shadow-md); }

/* Continue card */
.continue-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .25s cubic-bezier(.22,.61,.36,1);
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--primary);
}
.continue-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(91,110,245,.03), transparent);
  pointer-events: none;
}
.continue-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(91,110,245,.15);
}
.continue-card.completed-card { border-left-color: var(--green); }
.continue-card.completed-card::before { background: linear-gradient(135deg, rgba(34,197,94,.04), transparent); }

.continue-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--primary);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 5px;
}
.continue-week  { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 3px; }
.continue-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 5px; letter-spacing: -.2px; }
.continue-meta  { font-size: 0.78rem; color: var(--text-muted); }
.continue-arrow {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--primary);
  background: rgba(91,110,245,.1);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Quick actions */
.quick-actions {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.quick-actions h3 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.action-btn {
  background: var(--bg2);
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 0.73rem; font-weight: 700; color: var(--text-muted);
  transition: all .2s;
  position: relative;
}
.action-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-clr);
}
.action-icon { font-size: 1.6rem; }
.badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem; font-weight: 800;
  border-radius: 99px;
  padding: 2px 6px;
  box-shadow: 0 2px 6px rgba(240,84,79,.4);
}

/* Vocab summary */
.vocab-summary { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.vocab-summary h3 {
  font-size: 0.78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted); margin-bottom: 16px;
}
.vocab-bars { display: flex; flex-direction: column; gap: 12px; }
.vocab-bar-row { display: flex; align-items: center; gap: 10px; }
.vb-icon { font-size: 1rem; width: 20px; }
.vb-label { font-size: 0.8rem; font-weight: 600; width: 70px; color: var(--text-muted); }
.vb-bar-outer { flex: 1; height: 7px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.vb-bar-inner { height: 100%; border-radius: 99px; transition: width .6s cubic-bezier(.22,.61,.36,1); }
.vb-count { font-size: 0.82rem; font-weight: 700; width: 30px; text-align: right; color: var(--text); }

/* ── ROADMAP ─────────────────────────────────────────────────── */
.roadmap-page { display: flex; flex-direction: column; gap: 18px; }
.page-title { font-size: 1.6rem; font-weight: 900; letter-spacing: -.5px; margin-bottom: 2px; }
.page-sub { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

.weeks-list { display: flex; flex-direction: column; gap: 10px; }

.week-block {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.week-block:hover { box-shadow: var(--shadow-md); }
.week-block.week-done { box-shadow: 0 4px 20px rgba(34,197,94,.1); }

.week-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; cursor: pointer; user-select: none;
  transition: background .15s;
}
.week-header:hover { background: var(--bg); }
.week-header-left { display: flex; align-items: center; gap: 14px; }
.week-emoji { font-size: 1.9rem; }
.week-num  { font-size: 0.68rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.week-title { font-size: 1rem; font-weight: 800; letter-spacing: -.2px; }
.week-header-right { display: flex; align-items: center; gap: 10px; }

.week-progress-pill {
  font-size: 0.72rem; font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: .2px;
}
.week-chevron { font-size: 1.1rem; transition: transform .25s; color: var(--text-light); }
.week-chevron.open { transform: rotate(180deg); }

.week-overview { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; }
.week-overview.open { max-height: 200px; padding: 0 20px 14px; }
.week-overview p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

.days-list { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.days-list.open { max-height: 1000px; }

.day-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid rgba(17,20,45,.05);
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.day-card:hover:not(.day-locked) { background: var(--bg); }
.day-card.day-current { background: rgba(91,110,245,.04); }
.day-card.day-done    { background: rgba(34,197,94,.04); }
.day-card.day-locked  { cursor: default; opacity: .5; }

.day-num {
  min-width: 58px; height: 36px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  letter-spacing: .2px;
}
.day-info { flex: 1; }
.day-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.day-meta  { display: flex; gap: 8px; font-size: 0.73rem; color: var(--text-muted); }
.day-type  { background: var(--bg2); padding: 1px 7px; border-radius: 4px; font-weight: 600; }
.day-arrow { color: var(--primary); font-size: 1rem; }
.day-lock  { font-size: 1rem; }

/* ── LESSON ──────────────────────────────────────────────────── */
.lesson-page { display: flex; flex-direction: column; gap: 20px; }

.lesson-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: -6px;
}
.lesson-breadcrumb { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.lesson-header {
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}
.lesson-type-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 99px;
  font-size: 0.72rem; font-weight: 800; color: #fff;
  margin-bottom: 12px; letter-spacing: .4px; text-transform: uppercase;
}
.lesson-header h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 6px; letter-spacing: -.4px; }
.lesson-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.lesson-intro {
  background: linear-gradient(135deg, rgba(91,110,245,.06), rgba(155,110,255,.06));
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  border-left: 4px solid var(--primary);
  color: var(--text-muted);
}

.lesson-items { display: flex; flex-direction: column; gap: 10px; }

.lesson-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
}
.lesson-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(91,110,245,.15);
}

.hangul-item { border-left: 4px solid; }
.hangul-char { font-size: 2.9rem; font-weight: 900; margin-bottom: 4px; }
.hangul-label { font-size: 1rem; font-weight: 800; }
.hangul-pron  { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0; }
.hangul-example { font-size: 0.85rem; background: var(--bg2); padding: 4px 10px; border-radius: 6px; display: inline-block; }
.hangul-tip { font-size: 0.8rem; color: var(--purple); margin-top: 6px; font-style: italic; }

.vocab-korean { font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.vocab-rom    { font-size: 0.85rem; color: var(--text-muted); margin: 3px 0; }
.vocab-eng    { font-size: 0.95rem; font-weight: 700; }
.vocab-tip    { font-size: 0.8rem; color: var(--purple); margin-top: 6px; font-style: italic; }

.gram-main  { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.gram-label { font-size: 0.9rem; font-weight: 700; }
.gram-rom   { font-size: 0.82rem; color: var(--text-muted); margin: 3px 0; }
.gram-tip   { font-size: 0.8rem; color: var(--purple); margin-top: 6px; font-style: italic; }

.conversation-item { border-left: 4px solid var(--amber); }
.conv-korean { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.conv-label  { font-size: 0.92rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.conv-rom    { font-size: 0.82rem; color: var(--text-muted); }
.conv-tip    { font-size: 0.8rem; color: var(--purple); margin-top: 6px; font-style: italic; }

.speak-icon { font-size: 1rem; opacity: .4; }

.key-rules {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-radius: var(--radius);
  padding: 18px 20px;
  border-left: 4px solid var(--amber);
}
.key-rules h3 { font-size: 0.9rem; margin-bottom: 10px; font-weight: 800; }
.key-rules ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.key-rules li { font-size: 0.85rem; line-height: 1.65; }
.key-rules li::before { content: "→ "; color: var(--amber); font-weight: 800; }

.vocab-preview { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-xs); }
.vocab-preview h3 { font-size: 0.85rem; font-weight: 700; margin-bottom: 12px; }
.vocab-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.vocab-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg2);
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all .2s;
  font-size: 0.85rem;
}
.vocab-chip:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-clr);
}
.chip-kr { font-weight: 800; }
.chip-en { color: var(--text-muted); font-size: 0.78rem; }
.chip-speak { font-size: 0.8rem; }
.vocab-chip:hover .chip-en, .vocab-chip:hover .chip-speak { color: rgba(255,255,255,.8); }

.lesson-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

.completed-banner {
  width: 100%;
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #065F46;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem; font-weight: 700;
  text-align: center;
}

/* ── QUIZ ────────────────────────────────────────────────────── */
.quiz-page { display: flex; flex-direction: column; gap: 22px; min-height: 60vh; }

.quiz-nav {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}
.quiz-progress { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  transition: width .4s cubic-bezier(.22,.61,.36,1);
  border-radius: 99px;
}

.quiz-body { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.quiz-week-badge {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: 99px;
  font-size: 0.72rem; font-weight: 800; color: #fff;
  align-self: flex-start; text-transform: uppercase; letter-spacing: .4px;
}
.quiz-question { font-size: 1.2rem; font-weight: 800; line-height: 1.5; letter-spacing: -.3px; }

.quiz-options { display: flex; flex-direction: column; gap: 10px; }

.quiz-option {
  background: var(--surface);
  border: 2px solid rgba(17,20,45,.08);
  border-radius: var(--radius);
  padding: 15px 18px;
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem; font-weight: 500;
  display: flex; align-items: center; gap: 12px;
  transition: all .18s;
  box-shadow: var(--shadow-xs);
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(91,110,245,.04);
  transform: translateX(4px);
}
.quiz-option.correct { border-color: var(--green); background: rgba(34,197,94,.06); color: #065F46; font-weight: 700; }
.quiz-option.wrong   { border-color: var(--accent); background: rgba(240,84,79,.06); color: #991B1B; }
.quiz-option:disabled { cursor: default; }

.opt-letter {
  min-width: 30px; height: 30px;
  background: var(--bg2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800;
  color: var(--text-muted); flex-shrink: 0;
}
.quiz-option.correct .opt-letter { background: var(--green); color: #fff; }
.quiz-option.wrong   .opt-letter { background: var(--accent); color: #fff; }

.quiz-result {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 36px 20px; text-align: center;
}
.result-medal { font-size: 4.5rem; animation: bounceIn .6s cubic-bezier(.22,.61,.36,1); }
.result-score { font-size: 2.8rem; font-weight: 900; letter-spacing: -1px; }
.result-pct   { font-size: 1.1rem; color: var(--text-muted); margin-top: -10px; }
.result-msg   {
  font-size: 1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.result-badge { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); color: #065F46; padding: 8px 18px; border-radius: 99px; font-size: 0.85rem; font-weight: 700; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; margin-top: 8px; }

/* ── FLASHCARDS ─────────────────────────────────────────────── */
.flashcard-page { display: flex; flex-direction: column; gap: 18px; align-items: center; }

.fc-nav {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--text-muted); font-weight: 600;
}

.fc-progress-bar-outer { width: 100%; height: 5px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.fc-progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--purple)); transition: width .4s ease; border-radius: 99px; }
.fc-stats-row { display: flex; gap: 18px; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

/* Flip card */
.fc-card {
  width: 100%; max-width: 400px;
  height: 250px;
  perspective: 1400px;
  cursor: pointer;
  position: relative;
}

.fc-front, .fc-back {
  position: absolute; inset: 0;
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px;
  backface-visibility: hidden;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  text-align: center;
}

.fc-front {
  background: linear-gradient(135deg, #4F5FE8 0%, #7C3AED 100%);
  color: #fff;
  box-shadow: 0 16px 48px rgba(79,95,232,.35);
}
.fc-back  {
  background: var(--surface);
  transform: rotateY(180deg);
  box-shadow: var(--shadow-lg);
}

.fc-card.flipped .fc-front { transform: rotateY(-180deg); }
.fc-card.flipped .fc-back  { transform: rotateY(0); }

.fc-emoji     { font-size: 2.5rem; margin-bottom: 8px; }
.fc-emoji-lg  { font-size: 1.8rem; margin-top: 8px; }
.fc-korean    { font-size: 2.2rem; font-weight: 900; margin-bottom: 6px; letter-spacing: -1px; }
.fc-korean-sm { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.fc-rom       { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 4px; }
.fc-english   { font-size: 1.25rem; font-weight: 700; }
.fc-hint      { font-size: 0.8rem; opacity: .6; margin-top: 6px; }

.fc-speak-btn {
  margin-top: 12px;
  background: rgba(255,255,255,.2);
  border: none; border-radius: 99px;
  padding: 6px 16px; color: #fff;
  cursor: pointer; font-size: 0.8rem; font-weight: 600;
  transition: background .15s;
}
.fc-back .fc-speak-btn { background: var(--bg2); color: var(--text); }
.fc-speak-btn:hover { background: rgba(255,255,255,.35); }
.fc-back .fc-speak-btn:hover { background: var(--bg); }

/* Rating */
.fc-rating {
  width: 100%; opacity: 0; pointer-events: none;
  transition: opacity .3s;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.fc-rating.visible { opacity: 1; pointer-events: all; }
.fc-rating-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

.rating-btns { display: flex; gap: 10px; width: 100%; justify-content: center; }

.rating-btn {
  flex: 1; max-width: 88px;
  border: 2px solid rgba(17,20,45,.08);
  border-radius: var(--radius);
  padding: 11px 4px;
  cursor: pointer;
  font-size: 0.78rem; font-weight: 700;
  text-align: center;
  background: var(--surface);
  transition: all .18s;
  line-height: 1.4;
  box-shadow: var(--shadow-xs);
}
.rating-btn small { font-weight: 400; color: var(--text-muted); }
.r-again:hover { background: linear-gradient(135deg, #FEE2E2, #FECACA); border-color: var(--accent); color: var(--accent); box-shadow: 0 4px 12px rgba(240,84,79,.2); }
.r-hard:hover  { background: linear-gradient(135deg, #FEF3C7, #FDE68A); border-color: var(--amber);  color: #92400E; box-shadow: 0 4px 12px rgba(245,158,11,.2); }
.r-good:hover  { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); border-color: var(--primary); color: var(--primary-dk); box-shadow: 0 4px 12px rgba(91,110,245,.2); }
.r-easy:hover  { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); border-color: var(--green);  color: #065F46; box-shadow: 0 4px 12px rgba(34,197,94,.2); }

.fc-card-info { font-size: 0.75rem; color: var(--text-light); display: flex; gap: 12px; font-weight: 500; }

/* FC done */
.fc-done {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 44px 20px; text-align: center;
}
.fc-done-icon { font-size: 4.5rem; }
.fc-done h2   { font-size: 1.6rem; font-weight: 900; letter-spacing: -.5px; }
.fc-done p    { color: var(--text-muted); font-size: 0.95rem; }
.fc-done-stats { display: flex; gap: 14px; margin: 8px 0; }
.fds-card {
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 16px 20px;
  font-size: 1.4rem; font-weight: 900; text-align: center; letter-spacing: -.5px;
}
.fds-card small { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }

/* ── HANGUL REF ─────────────────────────────────────────────── */
.hangul-ref { display: flex; flex-direction: column; gap: 18px; }

.hr-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.hr-tab {
  background: var(--bg2);
  border: none;
  border-radius: 99px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.85rem; font-weight: 700;
  color: var(--text-muted);
  transition: all .18s;
}
.hr-tab:hover { background: var(--border-md); color: var(--text); }
.hr-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  box-shadow: var(--shadow-clr);
}

.hr-content.hidden { display: none; }
.hr-intro {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(91,110,245,.06), rgba(155,110,255,.06));
  padding: 12px 16px; border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}

.hangul-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.hg-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.hg-card:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-clr);
}

.hg-char    { font-size: 2.4rem; font-weight: 900; color: var(--primary); margin-bottom: 4px; }
.hg-rom     { font-size: 0.92rem; font-weight: 800; }
.hg-sound   { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0; }
.hg-example { font-size: 0.72rem; color: var(--text-light); }
.hg-card:hover .hg-char, .hg-card:hover .hg-sound, .hg-card:hover .hg-example { color: rgba(255,255,255,.8); }
.hg-card:hover .hg-rom { color: #fff; }

.blocks-demo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.block-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px; text-align: center; box-shadow: var(--shadow-xs);
}
.block-title { font-weight: 800; font-size: 0.9rem; margin-bottom: 4px; }
.block-desc  { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }

.bd {
  font-size: 2rem; font-weight: 800; color: var(--primary);
  display: inline-flex; align-items: center; border: 2px solid rgba(91,110,245,.3);
  border-radius: 10px; padding: 6px 10px; gap: 2px; margin: 8px 0;
  background: rgba(91,110,245,.04);
}
.bd span { color: var(--accent); }
.bd.col  { flex-direction: column; gap: 0; }
.bd.stacked { flex-direction: column; }
.bd sub   { font-size: 1.5rem; color: var(--green); }
.block-example { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.practice-words h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.pw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pw-card {
  background: var(--surface); box-shadow: var(--shadow-xs);
  border-radius: var(--radius-sm); padding: 12px;
  cursor: pointer; transition: all .18s;
  display: flex; flex-direction: column; gap: 2px;
}
.pw-card:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff; transform: translateY(-2px);
  box-shadow: var(--shadow-clr);
}
.pw-kr   { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.pw-rom  { font-size: 0.75rem; color: var(--text-muted); }
.pw-en   { font-size: 0.8rem; font-weight: 700; }
.pw-speak { font-size: 0.8rem; opacity: .35; }
.pw-card:hover .pw-kr, .pw-card:hover .pw-rom, .pw-card:hover .pw-speak { color: rgba(255,255,255,.8); }
.pw-card:hover .pw-en { color: #fff; }

.hangul-tip-box {
  background: linear-gradient(135deg, rgba(91,110,245,.06), rgba(155,110,255,.06));
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.85rem; line-height: 1.65;
  border-left: 4px solid var(--primary);
}

/* ── MODAL / PHRASE BOOK ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,14,45,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 620px;
  max-height: 82vh;
  display: flex; flex-direction: column;
  animation: slideUp .28s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -12px 48px rgba(17,20,45,.2);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.3px; }
.modal-header button {
  background: var(--bg2); border: none; cursor: pointer;
  font-size: 1rem; width: 32px; height: 32px;
  border-radius: 50%; transition: background .15s; font-weight: 700;
}
.modal-header button:hover { background: var(--border-md); }

.modal-tabs {
  display: flex; gap: 6px; padding: 12px 16px;
  overflow-x: auto; border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.modal-tabs::-webkit-scrollbar { display: none; }

.mtab {
  white-space: nowrap;
  background: var(--bg2); border: none;
  border-radius: 99px; padding: 6px 14px;
  cursor: pointer; font-size: 0.8rem; font-weight: 700;
  color: var(--text-muted);
  transition: all .15s; flex-shrink: 0;
}
.mtab:hover  { background: var(--border-md); color: var(--text); }
.mtab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  box-shadow: 0 2px 8px rgba(91,110,245,.3);
}

.phrase-list { overflow-y: auto; flex: 1; padding: 6px 0; }

.phrase-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px;
  border-bottom: 1px solid rgba(17,20,45,.04);
  cursor: pointer; transition: background .1s;
}
.phrase-row:hover { background: var(--bg); }
.pr-left  { flex: 1; }
.pr-kr    { font-size: 1rem; font-weight: 800; margin-bottom: 2px; }
.pr-rom   { font-size: 0.75rem; color: var(--text-muted); }
.pr-right { display: flex; align-items: center; gap: 8px; }
.pr-en    { font-size: 0.85rem; font-weight: 600; text-align: right; }
.pr-speak { font-size: 1rem; opacity: .35; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 26px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  transition: all .22s;
  flex: 1;
  box-shadow: 0 4px 14px rgba(91,110,245,.3);
  letter-spacing: -.1px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,110,245,.4);
  background: linear-gradient(135deg, var(--primary-lt), var(--primary));
}

.btn-secondary {
  background: var(--bg2);
  color: var(--text);
  border: none;
  border-radius: var(--radius);
  padding: 14px 26px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  flex: 1;
}
.btn-secondary:hover { background: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-ghost {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem; font-weight: 700;
  color: var(--primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(91,110,245,.08); }

.mt-2 { margin-top: 8px; }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bot-nav-h) + 18px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 11px 22px;
  border-radius: 99px;
  font-size: 0.85rem; font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: all .3s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  letter-spacing: -.1px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-warning { background: var(--amber); }
.toast.toast-success { background: var(--green); }
.toast.toast-error   { background: var(--accent); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .dashboard { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .bottom-nav { display: block; }

  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .blocks-demo { grid-template-columns: 1fr; }
  .hangul-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  .continue-arrow { display: none; }
  .main-content { padding: 16px 16px calc(var(--bot-nav-h) + 16px); }
  .fc-card { height: 220px; }
  .fc-korean { font-size: 1.8rem; }
  .hero-card h1 { font-size: 1.35rem; }
  .hero-flag { font-size: 3rem; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lesson-actions { flex-direction: column; }
  .result-actions { flex-direction: column; }
}

/* ── UTILITIES ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── NAV RIGHT (user + sync) ─────────────────────────────────── */
.nav-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.sync-ind {
  font-size: .72rem; font-weight: 600; color: var(--primary);
  min-width: 56px; text-align: right; opacity: .8; transition: opacity .3s;
  white-space: nowrap;
}
.sync-ind.sync-syncing { color: var(--amber); }
.sync-ind.sync-error   { color: var(--accent); }
.sync-ind.sync-saved   { color: var(--green); }

.nav-signin-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 7px 16px; border-radius: 20px; font-size: .82rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.nav-signin-btn:hover { background: var(--primary-dk); transform: translateY(-1px); }

.nav-avatar-wrap {
  cursor: pointer; border-radius: 50%; padding: 2px;
  transition: box-shadow .2s;
}
.nav-avatar-wrap:hover { box-shadow: 0 0 0 3px rgba(91,110,245,.25); }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}

/* ── USER DROPDOWN MENU ──────────────────────────────────────── */
.user-menu {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 0; min-width: 200px; overflow: hidden;
}
.um-name {
  padding: 8px 16px 2px; font-weight: 700; font-size: .88rem; color: var(--text);
}
.um-email {
  padding: 0 16px 8px; font-size: .78rem; color: var(--text-2); word-break: break-all;
}
.um-divider { height: 1px; background: var(--border); margin: 4px 0; }
.um-item {
  width: 100%; padding: 10px 16px; background: none; border: none;
  text-align: left; cursor: pointer; font-size: .85rem; color: var(--text);
  transition: background .15s;
}
.um-item:hover { background: var(--bg2); }
.um-signout { color: var(--accent); }
.um-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 12px;
}
.um-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.um-info { min-width: 0; }
.um-info .um-name  { padding: 0; }
.um-info .um-email { padding: 0; }

/* ── SECURITY / PHONE BADGE ──────────────────────────────────── */
.sec-status { margin: 0 0 6px; }
.sec-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; font-size: .82rem; font-weight: 600;
}
.sec-badge-ok {
  background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7;
}
.sec-badge-no {
  background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5;
}
/* ── AUTH MODAL ───────────────────────────────────────────────── */
.auth-overlay {
  position: fixed; inset: 0; background: rgba(10,12,30,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 9000; backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .25s;
}
.auth-overlay.auth-open { opacity: 1; }

.auth-box {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 36px 32px 28px; width: min(420px, calc(100vw - 32px));
  position: relative; box-shadow: 0 24px 64px rgba(10,12,30,.22);
  transform: translateY(16px); transition: transform .28s cubic-bezier(.22,.61,.36,1);
  max-height: 90vh; overflow-y: auto;
}
.auth-overlay.auth-open .auth-box { transform: translateY(0); }

.auth-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.1rem;
  color: var(--text-2); cursor: pointer; padding: 4px 8px;
  border-radius: 8px; transition: background .15s;
}
.auth-close:hover { background: var(--bg2); }

.auth-logo { font-size: 2.4rem; text-align: center; margin-bottom: 8px; }

.auth-h2 {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  text-align: center; margin: 0 0 6px;
}
.auth-sub {
  font-size: .85rem; color: var(--text-2); text-align: center;
  margin: 0 0 20px; line-height: 1.5;
}

.auth-err {
  background: #FFF0F0; border: 1px solid #FECACA;
  color: #DC2626; border-radius: 10px; padding: 10px 14px;
  font-size: .84rem; margin-bottom: 14px; display: none;
}

.auth-lbl {
  display: flex; flex-direction: column; gap: 6px;
  font-size: .83rem; font-weight: 600; color: var(--text);
  margin-bottom: 14px;
}
.auth-lbl small { font-weight: 400; color: var(--text-2); }

/* Row inside label: text left, "Quên mật khẩu?" right */
.auth-lbl-row {
  display: flex; justify-content: space-between; align-items: center;
}
.auth-forgot-link {
  font-size: .78rem; font-weight: 500;
  color: var(--primary); background: none; border: none;
  cursor: pointer; padding: 0; text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-forgot-link:hover { opacity: .75; }

.auth-inp {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: .95rem; font-family: inherit;
  color: var(--text); background: var(--bg);
  transition: border-color .2s, box-shadow .2s; outline: none;
  width: 100%; box-sizing: border-box;
}
.auth-inp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,110,245,.15);
}

.auth-code-inp {
  text-align: center; font-size: 1.8rem; font-weight: 900;
  letter-spacing: 10px; padding: 14px;
}

.auth-btn {
  width: 100%; padding: 13px; background: var(--primary); color: #fff;
  border: none; border-radius: 14px; font-size: .95rem; font-weight: 700;
  cursor: pointer; margin-top: 4px; transition: background .2s, transform .15s;
  box-shadow: var(--shadow-clr);
}
.auth-btn:hover:not(:disabled) { background: var(--primary-dk); transform: translateY(-1px); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-sep {
  text-align: center; color: var(--text-2); font-size: .8rem;
  margin: 14px 0; position: relative;
}
.auth-sep::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.auth-sep { background: var(--surface); display: flex; align-items: center; justify-content: center; }
.auth-sep::before { z-index: 0; }

.auth-btn-ghost {
  width: 100%; padding: 11px; background: transparent; color: var(--primary);
  border: 1.5px solid var(--border); border-radius: 14px;
  font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.auth-btn-ghost:hover { background: var(--bg2); border-color: var(--primary); }
.auth-btn-ghost.auth-btn-danger {
  color: var(--accent); border-color: var(--accent);
}
.auth-btn-ghost.auth-btn-danger:hover { background: #fee2e2; border-color: var(--accent); }

.auth-resend {
  text-align: center; font-size: .82rem; color: var(--text-2); margin: 12px 0 4px;
}
.auth-link {
  background: none; border: none; color: var(--primary);
  font-weight: 600; cursor: pointer; font-size: inherit; padding: 0;
  text-decoration: underline;
}
.auth-link:hover { color: var(--primary-dk); }

.result-next-hint {
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 4px;
}
.result-next-hint span {
  font-weight: 700;
  color: var(--primary);
}

/* ── AUTH ROW2 (side-by-side Họ / Tên) ─────────────────────── */
.auth-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-page {
  width: 100%;
  overflow-x: hidden;
  padding-bottom: 0;
}

/* ── Hero ───────────────────────────────────────────────────── */
.lp-hero {
  background: linear-gradient(145deg, #EEF0FD 0%, #F7F8FF 55%, #E8EAFF 100%);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(91,110,245,.13) 0%, transparent 70%);
  pointer-events: none;
}
.lp-hero-badge {
  display: inline-block;
  background: rgba(91,110,245,.1);
  color: var(--primary);
  border: 1px solid rgba(91,110,245,.2);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 20px;
}
.lp-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.lp-accent {
  color: var(--primary);
  position: relative;
}
.lp-subtitle {
  font-size: clamp(.95rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 500px;
  margin: 0 auto 28px;
}
.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}
.lp-btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-clr);
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.lp-btn-primary:hover {
  background: var(--primary-dk);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(91,110,245,.4);
}
.lp-btn-primary:active { transform: translateY(0); }
.lp-btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border-md);
  border-radius: 14px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  white-space: nowrap;
}
.lp-btn-ghost:hover {
  background: var(--bg2);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.lp-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.lp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  text-align: center;
  min-width: 90px;
  box-shadow: var(--shadow-xs);
}
.lp-stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.lp-stat span {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
}

/* ── Section shared ─────────────────────────────────────────── */
.lp-section-title {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -.015em;
}
.lp-section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 28px;
}

/* ── Features ───────────────────────────────────────────────── */
.lp-features {
  padding: 52px 20px 48px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lp-features .lp-section-title { margin-bottom: 28px; }
.lp-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.lp-features .lp-section-sub { margin-bottom: 28px; }
.lp-feat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.lp-feat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.lp-feat-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}
.lp-feat h3 {
  font-size: .97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.lp-feat p {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Roadmap ────────────────────────────────────────────────── */
.lp-roadmap {
  padding: 52px 20px 48px;
  background: var(--bg);
}
.lp-weeks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 660px;
  margin: 0 auto;
}
.lp-week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow .2s;
}
.lp-week:hover { box-shadow: var(--shadow); }
.lp-week-num {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(91,110,245,.1);
  border-radius: 8px;
  padding: 4px 8px;
  white-space: nowrap;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.lp-week-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.lp-week-info strong, .lp-week-info h4 {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.lp-week-info span, .lp-week-info p {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Bottom CTA ─────────────────────────────────────────────── */
.lp-bottom-cta {
  padding: 56px 24px 64px;
  background: linear-gradient(145deg, #5B6EF5, #7C8FF7);
  text-align: center;
  color: #fff;
}
.lp-bottom-cta .lp-section-title,
.lp-bottom-cta h2 {
  color: #fff;
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.015em;
  margin-bottom: 10px;
}
.lp-bottom-cta p {
  color: rgba(255,255,255,.8);
  font-size: .97rem;
  margin-bottom: 28px;
  line-height: 1.6;
}
.lp-btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
  border-radius: 16px;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.lp-btn-lg:hover {
  background: #F0F1FF;
  transform: translateY(-2px);
}
.lp-login-hint {
  margin-top: 18px;
  font-size: .88rem;
  color: rgba(255,255,255,.75);
}
.lp-link {
  background: none;
  border: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}
.lp-link:hover { color: rgba(255,255,255,.85); }

/* ── Roadmap CTA ─────────────────────────────────────────────── */
.lp-roadmap-cta {
  text-align: center;
  margin-top: 28px;
}

/* ── Mission / About ─────────────────────────────────────────── */
.lp-mission {
  padding: 56px 20px 52px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lp-mission-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: center;
}
.lp-mission-badge {
  display: inline-block;
  background: rgba(91,110,245,.1);
  color: var(--primary);
  border: 1px solid rgba(91,110,245,.2);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.lp-mission-text h2 {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.015em;
  margin-bottom: 14px;
}
.lp-mission-text p {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.lp-mission-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.lp-mission-list li {
  font-size: .9rem;
  color: var(--text);
  font-weight: 500;
}
.lp-mission-visual { display: flex; justify-content: center; }
.lp-mission-card {
  background: linear-gradient(145deg, var(--primary), var(--purple));
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  width: 220px;
}
.lp-mc-flag { font-size: 2.5rem; margin-bottom: 10px; }
.lp-mc-text { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.lp-mc-sub  { font-size: .82rem; opacity: .8; margin: 4px 0 18px; }
.lp-mc-stats {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 16px;
}
.lp-mc-stats > div { text-align: center; }
.lp-mc-stats strong { display: block; font-size: 1.1rem; font-weight: 800; }
.lp-mc-stats span   { display: block; font-size: .72rem; opacity: .75; }

/* ── Contact ─────────────────────────────────────────────────── */
.lp-contact {
  padding: 56px 20px 52px;
  background: var(--bg);
}
.lp-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.lp-contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.lp-contact-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lp-cc-icon   { font-size: 1.8rem; margin-bottom: 10px; }
.lp-contact-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.lp-contact-card p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.lp-contact-link {
  display: inline-block;
  font-size: .83rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.lp-contact-link:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────────────── */
.lp-footer {
  padding: 24px 20px;
  background: var(--text);
}
.lp-footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.lp-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.lp-footer-kr { color: rgba(255,255,255,.5); font-size: .9rem; }
.lp-footer-copy {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  flex: 1;
  text-align: center;
}
.lp-footer-links { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lp-footer-link {
  background: none;
  border: none;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  font-weight: 500;
}
.lp-footer-link:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ── Landing responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
  .lp-hero { padding: 44px 16px 36px; }
  .lp-cta-row { flex-direction: column; align-items: center; }
  .lp-btn-primary, .lp-btn-ghost { width: 100%; max-width: 320px; }
  .lp-stat { min-width: 78px; padding: 12px 14px; }
  .lp-feat-grid { grid-template-columns: 1fr 1fr; }
  .lp-roadmap, .lp-features { padding: 40px 16px 36px; }
  .lp-bottom-cta { padding: 44px 16px 52px; }
  .lp-btn-lg { width: 100%; max-width: 320px; }
  .auth-row2 { grid-template-columns: 1fr; }
  .lp-mission-inner { grid-template-columns: 1fr; }
  .lp-mission-visual { display: none; }
  .lp-mission, .lp-contact { padding: 40px 16px 36px; }
  .lp-contact-grid { grid-template-columns: 1fr; }
  .lp-footer-inner { flex-direction: column; text-align: center; }
  .lp-footer-links { justify-content: center; }
  .lp-footer-copy { text-align: center; }
}
/* Hide guest nav links on small screens — CTAs in hero are enough */
@media (max-width: 680px) {
  .nav-links-guest { display: none !important; }
}
.auth-link:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   CONTEXT MENU
   ============================================================ */
#ctx-menu {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  min-width: 220px;
  overflow: hidden;
  animation: ctxIn .12s ease;
  font-family: system-ui, -apple-system, sans-serif;
  user-select: none;
}
@keyframes ctxIn {
  from { opacity: 0; transform: scale(.94) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.ctx-preview {
  padding: 8px 14px 7px;
  font-size: .73rem;
  color: #9ca3af;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  font-style: italic;
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 9px 14px 9px 10px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .875rem;
  color: #1f2937;
  transition: background .1s;
  white-space: nowrap;
}
.ctx-item:hover  { background: #eff6ff; color: var(--primary, #3B82F6); }
.ctx-item:active { background: #dbeafe; }
.ctx-item:disabled { opacity: .5; cursor: wait; }
.ctx-icon {
  display: inline-block;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.ctx-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 2px 0;
}

/* ── Translation popup ───────────────────────────────────────── */
#ctx-popup {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: #fff;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.22), 0 4px 12px rgba(0,0,0,.08);
  width: min(420px, 94vw);
  overflow: hidden;
  animation: ctxIn .15s ease;
  font-family: system-ui, -apple-system, sans-serif;
}
.ctx-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px 10px;
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  color: #fff;
}
.ctx-pop-langs { font-size: .8rem; font-weight: 600; letter-spacing: .01em; }
.ctx-pop-close {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.ctx-pop-close:hover { background: rgba(255,255,255,.35); }
.ctx-pop-orig {
  padding: 10px 16px 7px;
  font-size: .82rem;
  color: #6b7280;
  font-style: italic;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.5;
}
.ctx-pop-vi {
  padding: 14px 16px 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
}
.ctx-pop-actions {
  display: flex;
  gap: 6px;
  padding: 0 14px 14px;
  flex-wrap: wrap;
}
.ctx-pop-btn {
  flex: 1;
  min-width: 110px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: .78rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.ctx-pop-btn:hover { background: #eff6ff; border-color: #3B82F6; color: #3B82F6; }

/* ── Mini toast (fallback) ───────────────────────────────────── */
.ctx-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: #1f2937;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: .82rem;
  font-family: system-ui, sans-serif;
  pointer-events: none;
  animation: ctxIn .2s ease, ctxOut .3s ease 1.9s forwards;
}
@keyframes ctxOut {
  to { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   LOGO PICKER (Appearance settings)
   ============================================================ */
.logo-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
}
.logo-opt {
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s, transform .1s;
  flex-shrink: 0;
}
.logo-opt:hover { background: #eff6ff; border-color: #93c5fd; transform: scale(1.1); }
.logo-sel {
  border-color: var(--primary, #3B82F6) !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}

/* Danger item in user menu */
.um-danger { color: #ef4444 !important; }
.um-danger:hover { background: #fee2e2 !important; color: #b91c1c !important; }

/* ── Avatar preview circle in modal ─────────────────────────── */
.av-prev-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  box-shadow: 0 4px 16px rgba(99,102,241,.35);
  overflow: hidden;
  flex-shrink: 0;
}

/* ── Color swatch grid ──────────────────────────────────────── */
.av-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
}
.av-color-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  flex-shrink: 0;
}
.av-color-btn:hover { transform: scale(1.12); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.av-color-btn.logo-sel {
  border-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.5), 0 4px 12px rgba(0,0,0,.2) !important;
  transform: scale(1.1);
}

/* ── Emoji avatar buttons ────────────────────────────────────── */
.av-emoji-btn {
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s, transform .1s;
  flex-shrink: 0;
}
.av-emoji-btn:hover { background: #eff6ff; border-color: #93c5fd; transform: scale(1.12); }
.av-emoji-btn.av-emoji-sel {
  border-color: var(--primary, #3B82F6) !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
  transform: scale(1.08);
}
