/* AI-Men · Light Redesign · Shared base + theme tokens
   Two visual directions, sharing structure, swapping CSS variables.
*/

@font-face{
  font-family:'Pretendard Variable';
  font-weight:45 920;
  font-style:normal;
  font-display:swap;
  src:url('https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2') format('woff2-variations');
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Korean: break on word boundaries, not mid-syllable */
.phone, .phone * {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.phone {
  width: 390px;
  height: 844px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* -------- THEME A: WARM MORNING (Toss-like cream) -------- 
   Lean, generous whitespace, hairline dividers, near-flat surfaces.
   Color tells the story; layout stays calm. */
.theme-cream {
  --bg: #FBF7EF;
  --bg-2: #F4ECDC;
  --surface: #FFFFFF;
  --surface-2: #F6EFE0;
  --text: #1F1B16;
  --text-2: #6E665B;
  --text-3: #A89C8B;
  --hairline: rgba(31,27,22,0.07);
  --hairline-2: rgba(31,27,22,0.10);

  --accent: #E8632B;
  --accent-2: #FF8857;
  --accent-soft: #FFE6D6;
  --accent-ink: #6B2A0B;

  --gold: #C99A2E;
  --gold-soft: #F5E8C4;

  --radius-card: 16px;
  --radius-card-lg: 22px;
  --radius-pill: 999px;

  --shadow-card: none;
  --shadow-cta: 0 8px 22px rgba(232,99,43,0.28);

  --tab-active: var(--accent);
  --tab-inactive: var(--text-3);
}

/* -------- THEME B: CRISP SKY (Duolingo-energetic) -------- */
.theme-sky {
  --bg: #EEF4FC;
  --bg-2: #DDE7F4;
  --surface: #FFFFFF;
  --surface-2: #F1F6FD;
  --text: #14202F;
  --text-2: #54627A;
  --text-3: #93A0B2;
  --hairline: #E2EAF4;
  --hairline-2: #CDD8E7;

  --accent: #58CC02;          /* Duolingo green */
  --accent-2: #89E219;
  --accent-dark: #46A302;
  --accent-soft: #E8FAD2;
  --accent-ink: #20510A;

  --blue: #2EA8F0;
  --blue-dark: #1F8AD0;
  --blue-soft: #D2EAFB;

  --gold: #FFC529;
  --gold-soft: #FFF0BF;

  --radius-card: 16px;
  --radius-card-lg: 20px;
  --radius-pill: 999px;

  /* Hard offset shadow on key elements — Duolingo's signature 3D button */
  --shadow-card: 0 2px 0 #D1DCEB;
  --shadow-card-hover: 0 4px 0 #D1DCEB;
  --shadow-cta: 0 4px 0 var(--accent-dark);
  --shadow-cta-hover: 0 6px 0 var(--accent-dark);

  --tab-active: var(--accent);
  --tab-inactive: var(--text-3);
}

/* -------- Status bar -------- */
.statusbar {
  height: 44px;
  padding: 0 20px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
}
.statusbar .icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* -------- App nav -------- */
.appbar {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.appbar .iconbtn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
}
.appbar .iconbtn:hover { background: var(--hairline); }
.theme-sky .appbar .iconbtn { background: var(--surface); box-shadow: var(--shadow-card); }
.appbar .iconbtn.saved { color: #E8A813; }
.appbar .iconbtn.saved svg { fill: #F0CF6A; }

.appbar .brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.appbar .brand .cross {
  width: 14px;
  height: 14px;
  position: relative;
}
.appbar .brand .cross::before,
.appbar .brand .cross::after {
  content: '';
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
}
.appbar .brand .cross::before {
  width: 3px; height: 14px; left: 50%; transform: translateX(-50%);
}
.appbar .brand .cross::after {
  height: 3px; width: 10px; top: 5px; left: 50%; transform: translateX(-50%);
}
.theme-sky .appbar .brand .cross::before,
.theme-sky .appbar .brand .cross::after { background: var(--blue); }

/* -------- Content area -------- */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 100px;
}
.content::-webkit-scrollbar { display: none; }

/* -------- Page title -------- */
.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.7px;
  margin: 8px 0 4px;
  line-height: 1.15;
}
.theme-cream .page-title { font-weight: 700; }
.page-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 18px;
  letter-spacing: -0.2px;
}

/* -------- Mentor cards (list screen) -------- */
.mentor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mentor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  border: 1px solid transparent;
}
.theme-sky .mentor-card { border-color: var(--hairline); }
.theme-cream .mentor-card:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(31,27,22,0.05), 0 12px 32px rgba(31,27,22,0.08); }
.theme-sky .mentor-card:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--hairline-2); }
.theme-sky .mentor-card:active { transform: translateY(0); box-shadow: 0 0 0 var(--hairline-2); }

.mentor-card .avatar {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}
.mentor-card .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
}
.mentor-card .name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 0;
  flex-wrap: nowrap;
  min-width: 0;
}
.mentor-card .name strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.mentor-card .name span {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.mentor-card .tagline {
  font-size: 13.5px;
  color: var(--text-2);
  letter-spacing: -0.2px;
  line-height: 1.4;
}

.mentor-card .chev {
  flex: 0 0 auto;
  color: var(--text-3);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

/* Tag pill on mentor card */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  letter-spacing: -0.1px;
  white-space: nowrap;
}
.theme-sky .tag-pill { background: var(--blue-soft); color: #154A78; }

/* -------- Avatar tile (placeholder for the original 3D illustration) ----- */
.avatar-tile {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: rgba(0,0,0,0.55);
  position: relative;
  line-height: 1;
}
.avatar-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.theme-sky .avatar-tile::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }

/* -------- Bottom tab bar -------- */
.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 88px;
  background: #0D1632;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: flex-start;
  padding-top: 10px;
  z-index: 5;
}
.theme-sky .tabbar, .theme-night .tabbar {
  background: #0D1632;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.tabbar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  padding: 4px 0;
  transition: color .12s;
}
.tabbar .tab.active { color: #FFE08A; }
.tabbar .tab .ico {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}
.tabbar .tab .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.1px;
  white-space: nowrap;
}

/* -------- Detail screen -------- */
.detail-hero {
  background: var(--surface);
  border-radius: var(--radius-card-lg);
  padding: 20px 20px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 4px;
}
.theme-sky .detail-hero { border: 1px solid var(--hairline); }

.detail-hero .avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: hidden;
}
.detail-hero .meta { flex: 1; min-width: 0; }
.detail-hero .meta .kr {
  font-size: 24px; font-weight: 800; letter-spacing: -0.6px; white-space: nowrap;
}
.theme-cream .detail-hero .meta .kr { font-weight: 700; }
.detail-hero .meta .en {
  font-size: 13px; color: var(--text-3); font-weight: 500; margin-top: 1px;
}
.detail-hero .meta .pill {
  margin-top: 8px;
}

/* Info cards in detail */
.info-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-card);
}
.theme-sky .info-card { border: 1px solid var(--hairline); }

.info-card .ic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  white-space: nowrap;
}
.info-card .ic-header .ic-dot {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
}
.info-card.tone-accent .ic-header .ic-dot { background: var(--accent-soft); color: var(--accent-ink); }
.info-card.tone-gold .ic-header .ic-dot { background: var(--gold-soft); color: #6A4A0E; }
.info-card.tone-blue .ic-header .ic-dot { background: var(--blue-soft, #DEEEFB); color: #154A78; }
.info-card.tone-leaf .ic-header .ic-dot { background: #E2F3DD; color: #2C5F26; }

.info-card .ic-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  letter-spacing: -0.2px;
  text-wrap: pretty;
}
.info-card .ic-body.quote {
  font-style: normal;
  color: var(--text);
  position: relative;
  padding-left: 12px;
}
.info-card .ic-body.quote::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 2px;
  background: var(--accent);
}
.theme-sky .info-card .ic-body.quote::before { background: var(--blue); }

/* Mentor tags (from source data) */
.mentor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.mentor-tags .mtag {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-2);
  letter-spacing: -0.2px;
}
.theme-sky .mentor-tags .mtag { background: var(--blue-soft, #DEEEFB); color: #1F5A8C; }
.theme-cream .mentor-tags .mtag { background: var(--accent-soft); color: var(--accent-ink); }

.info-card .ic-body .verse-ref {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 500;
}

/* CTA */
.cta {
  position: absolute;
  left: 16px; right: 16px;
  bottom: 24px;
  height: 60px;
  border-radius: 18px;
  background: var(--accent);
  color: white;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  z-index: 4;
  box-shadow: var(--shadow-cta);
  transition: transform .12s, box-shadow .12s;
}
.theme-sky .cta {
  background: var(--accent);
  box-shadow: var(--shadow-cta);
}
.theme-sky .cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-dark);
}
.theme-cream .cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(232,99,43,0.4); }

/* -------- Chat -------- */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 12px;
  border-bottom: 1px solid var(--hairline);
}
.chat-header .av {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
}
.chat-header .who { flex: 1; min-width: 0; }
.chat-header .who .nm { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header .who .exp { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.chat-header .who .exp .bolt {
  width: 12px; height: 12px;
  color: var(--gold);
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-feed::-webkit-scrollbar { display: none; }

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 88%;
}
.msg-row.mentor { align-self: flex-start; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }

.msg-row .av-sm {
  width: 30px; height: 30px;
  border-radius: 50%; overflow: hidden;
  flex: 0 0 auto;
}

.bubble {
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.5;
  letter-spacing: -0.2px;
  white-space: pre-line;
  position: relative;
  max-width: 100%;
}
.theme-cream .msg-row.mentor .bubble {
  background: var(--surface);
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(31,27,22,0.04);
}
.theme-cream .msg-row.me .bubble {
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}

.theme-sky .msg-row.mentor .bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 4px;
}
.theme-sky .msg-row.me .bubble {
  background: var(--blue);
  color: white;
  border-bottom-right-radius: 4px;
}

.bubble .verse-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  background: var(--gold-soft);
  color: #6A4A0E;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
}

.composer {
  border-top: 1px solid var(--hairline);
  padding: 10px 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
}
.theme-cream .composer { background: var(--bg); }
.composer .input {
  flex: 1;
  height: 44px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  border: none;
  padding: 0 18px;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  letter-spacing: -0.2px;
}
.composer .input::placeholder { color: var(--text-3); }
.theme-sky .composer .input { background: var(--surface-2); border: 1px solid var(--hairline); }

.composer .send {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .1s;
}
.theme-sky .composer .send {
  background: var(--accent);
  box-shadow: 0 2px 0 var(--accent-dark);
}
.theme-sky .composer .send:active { transform: translateY(2px); box-shadow: 0 0 0 var(--accent-dark); }
.composer .send:hover { transform: scale(1.04); }
.composer .send.disabled { opacity: 0.4; pointer-events: none; }

/* Subtle quick-reply chips below mentor messages */
.quick-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0 0 38px;
}
.quick-chip {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: background .1s, transform .1s;
  font-family: inherit;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.quick-chip:hover { background: var(--surface-2); }
.theme-sky .quick-chip { box-shadow: 0 2px 0 var(--hairline); }
.theme-sky .quick-chip:active { transform: translateY(2px); box-shadow: 0 0 0 var(--hairline); }

/* Mini sparkle decoration around section header — kept very subtle */
.section-sparkle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 12px;
}
.section-sparkle::before,
.section-sparkle::after {
  content: '·';
  color: var(--text-3);
  font-weight: 700;
}

/* Back chevron */
.back-ico {
  width: 18px; height: 18px;
}

/* =================================================
   THEME-SPECIFIC LAYOUT — differentiate the two paths
   ================================================= */

/* --- A · WARM MORNING (Toss-like): airy list with hairline dividers --- */
.theme-cream .content { padding: 4px 24px 100px; }
.theme-cream .page-title { font-size: 27px; font-weight: 700; margin-bottom: 4px; }
.theme-cream .page-sub { margin-bottom: 24px; }

.theme-cream .mentor-list { gap: 0; }
.theme-cream .mentor-card {
  background: transparent;
  padding: 16px 4px;
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
}
.theme-cream .mentor-card:last-child { border-bottom: none; }
.theme-cream .mentor-card:hover { transform: none; background: var(--surface-2); margin: 0 -8px; padding: 16px 12px; border-radius: 14px; border-bottom-color: transparent; }
.theme-cream .mentor-card .avatar { width: 52px; height: 52px; }
.theme-cream .mentor-card .name strong { font-size: 17px; font-weight: 700; }
.theme-cream .mentor-card .tagline { font-size: 13px; color: var(--text-2); }
.theme-cream .mentor-card .chev { color: var(--text-3); }

/* Detail hero (A): photo + name only, very airy */
.theme-cream .detail-hero {
  background: transparent;
  padding: 16px 0 24px;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
}
.theme-cream .detail-hero .avatar { width: 80px; height: 80px; }
.theme-cream .detail-hero .meta .kr { font-size: 26px; font-weight: 700; }

/* Detail info cards (A): light surfaces, no shadow, hairline border */
.theme-cream .info-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: none;
  padding: 18px 18px;
  border-radius: 18px;
  margin-top: 10px;
}
.theme-cream .info-card .ic-header { font-size: 12.5px; color: var(--text-2); }
.theme-cream .info-card .ic-body { font-size: 14px; line-height: 1.6; color: var(--text); }

/* Tabbar (A): no top border just light surface, smaller labels */
.theme-cream .tabbar { background: var(--bg); border-top: 1px solid var(--hairline); }

/* Chat (A): full-bleed, no header border */
.theme-cream .chat-header { background: var(--bg); border-bottom: 1px solid var(--hairline); }

/* --- B · CRISP SKY (Duolingo-like): bold, gamified --- */
.theme-sky .content { padding: 4px 18px 100px; }
.theme-sky .page-title {
  font-size: 28px; font-weight: 800; letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.theme-sky .page-sub { margin-bottom: 18px; }

.theme-sky .mentor-list { gap: 12px; }
.theme-sky .mentor-card {
  padding: 14px 16px;
  border: 1.5px solid var(--hairline-2);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--hairline-2);
}
.theme-sky .mentor-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--hairline-2);
}
.theme-sky .mentor-card:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--hairline-2);
}
.theme-sky .mentor-card .avatar { width: 64px; height: 64px; }
.theme-sky .mentor-card .name strong { font-size: 18px; font-weight: 800; }

/* Progress dots beneath each mentor in sky list (gamification cue) */
.mentor-progress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.mentor-progress .seg {
  height: 5px;
  width: 14px;
  border-radius: 3px;
  background: var(--hairline-2);
}
.mentor-progress .seg.done { background: var(--accent); }
.mentor-progress .lvl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  margin-left: 4px;
  letter-spacing: -0.1px;
}

/* Detail hero (B): bold card w/ XP bar */
.theme-sky .detail-hero {
  background: var(--surface);
  border: 1.5px solid var(--hairline-2);
  border-radius: 20px;
  padding: 18px 18px 16px;
  box-shadow: 0 3px 0 var(--hairline-2);
  position: relative;
}
.theme-sky .detail-hero .avatar { width: 88px; height: 88px; }
.theme-sky .detail-hero .meta .kr { font-size: 24px; font-weight: 900; letter-spacing: -0.7px; }

/* Detail info cards (B): bold colored side-bar, stronger icons */
.theme-sky .info-card {
  padding: 16px;
  border-radius: 18px;
  border: 1.5px solid var(--hairline-2);
  box-shadow: 0 2px 0 var(--hairline-2);
  margin-top: 12px;
}
.theme-sky .info-card .ic-header { font-size: 13px; font-weight: 800; }
.theme-sky .info-card .ic-header .ic-dot {
  width: 26px; height: 26px; border-radius: 9px;
}
.theme-sky .info-card .ic-body { font-size: 14.5px; }

/* Tab bar (B): dark blue navy across all themes for consistent contrast */
.theme-sky .tabbar { background: #0D1632; border-top: 1px solid rgba(255,255,255,0.08); }
.theme-sky .tabbar .tab.active .ico, .theme-night .tabbar .tab.active .ico {
  background: rgba(240,207,106,0.18);
  border-radius: 999px;
  padding: 4px 12px;
  width: auto;
  color: #FFE08A;
}

/* Chat header (B): with progress chip + streak */
.theme-sky .chat-header {
  background: var(--surface);
  border-bottom: 1.5px solid var(--hairline-2);
}

/* Bigger CTAs and bolder hi-energy buttons on B */
.theme-sky .cta {
  font-weight: 800;
  border-radius: 18px;
  text-transform: none;
  letter-spacing: -0.3px;
  border: 1.5px solid var(--accent-dark);
}

/* Daily streak banner (B only) */
.daily-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FFF4D2 0%, #FFE7AB 100%);
  border: 1.5px solid #F0CF6A;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 4px 0 18px;
  box-shadow: 0 2px 0 #E5B954;
}
.db-emoji { font-size: 28px; line-height: 1; }
.db-text { flex: 1; min-width: 0; }
.db-title { font-size: 14px; font-weight: 800; color: #6B4A0E; letter-spacing: -0.3px; }
.db-sub { font-size: 12px; color: #8A6A24; margin-top: 2px; }
.db-xp {
  font-size: 13px;
  font-weight: 800;
  color: #6B4A0E;
  background: rgba(255,255,255,0.6);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* XP bar in hero (B only) */
.xp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.xp-bar {
  flex: 1;
  height: 8px;
  background: var(--hairline-2);
  border-radius: 999px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 999px;
}
.xp-num {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
}

/* Hero with full-body character illustration (B theme · mentor detail) */
.detail-hero.hero-full {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1.5px solid var(--hairline-2);
  box-shadow: 0 3px 0 var(--hairline-2);
  background: var(--surface);
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: stretch;
  gap: 0;
}
/* Soft warm halo behind character — picks up the mentor's vibe without being a heavy bg */
.detail-hero.hero-full .hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 65%, rgba(255, 220, 170, 0.55) 0%, rgba(255, 220, 170, 0) 70%),
    linear-gradient(180deg, #FFFCF3 0%, #F4F8FE 100%);
  z-index: 0;
}
.detail-hero.hero-full .hero-text {
  flex: 1 1 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  max-width: 54%;
}
.detail-hero.hero-full .hero-text .kr {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.8px;
  white-space: nowrap;
}
.detail-hero.hero-full .hero-text .en {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 0;
}
.detail-hero.hero-full .hero-text .pill { margin-top: 8px; }

.detail-hero.hero-full .hero-figure {
  position: absolute;
  right: -8px;
  bottom: -10px;
  height: 235px;
  width: auto;
  z-index: 1;
  /* very subtle drop so the character feels seated, not floating */
  filter: drop-shadow(0 6px 10px rgba(20, 30, 50, 0.12));
  pointer-events: none;
}
.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.typing .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.2s infinite;
}
.typing .dot:nth-child(2) { animation-delay: .2s; }
.typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Streak / progress chip in chat header (sky theme only — Duolingo vibe) */
.streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-soft);
  color: #6A4A0E;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

/* =================== Empty states =================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 26px 36px;
}
.es-art {
  font-size: 60px; line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(60,80,140,0.18));
  animation: es-bob 3.4s ease-in-out infinite;
}
@keyframes es-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.es-title { font-size: 20px; font-weight: 800; color: #1F2A44; letter-spacing: -0.4px; margin-top: 20px; }
.es-desc { font-size: 14.5px; color: #6B7488; line-height: 1.6; margin-top: 10px; letter-spacing: -0.2px; }
.es-quick { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.es-quick-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid #E1E5EE; background: #fff; font-weight: 700; font-size: 14px; color: #4A5470;
  cursor: pointer; transition: border-color .15s, background .15s; box-shadow: 0 1px 0 var(--c, transparent) inset;
}
.es-quick-chip:hover { border-color: var(--c, #C9D2E0); background: #F8FAFD; }
.es-cta {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 9px; padding: 15px 28px;
  border: none; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 15.5px; letter-spacing: -0.3px;
  background: linear-gradient(135deg, #FFD874, #FBC02D); color: #3A2A05;
  box-shadow: 0 10px 22px rgba(251,192,45,0.3); transition: transform .12s, box-shadow .2s;
}
.es-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(251,192,45,0.42); }
.es-cta:active { transform: translateY(0) scale(0.98); }
.es-cta-xp { font-size: 12.5px; background: rgba(58,42,5,0.16); padding: 3px 9px; border-radius: 999px; font-weight: 800; }

/* dark variant — for night-themed screens (e.g. 알림) */
.empty-state.dark .es-title { color: #EAEFFB; }
.empty-state.dark .es-desc { color: #AEB9D6; }
.empty-state.dark .es-quick-chip {
  background: rgba(255,255,255,0.05); border-color: rgba(180,196,240,0.18); color: #C3CCE2;
}
.empty-state.dark .es-quick-chip:hover { background: rgba(255,197,41,0.12); border-color: rgba(255,197,41,0.3); }

/* =================== Confirm dialog (unsaved-exit guard) =================== */
.confirm-scrim {
  position: absolute; inset: 0; z-index: 80;
  background: rgba(10,14,26,0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 32px;
  animation: cs-fade .2s ease;
}
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
.confirm-sheet {
  width: 100%; max-width: 320px; background: #fff; border-radius: 20px;
  padding: 26px 24px 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  animation: cs-pop .24s cubic-bezier(.2,1.2,.4,1);
}
@keyframes cs-pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-sheet .cs-title { font-size: 18px; font-weight: 800; color: #1F2A44; letter-spacing: -0.4px; }
.confirm-sheet .cs-desc { font-size: 14.5px; color: #6B7488; line-height: 1.55; margin-top: 9px; letter-spacing: -0.2px; }
.confirm-sheet .cs-actions { display: flex; gap: 10px; margin-top: 22px; }
.confirm-sheet .cs-btn { flex: 1; border: none; cursor: pointer; border-radius: 12px; padding: 13px; font-weight: 800; font-size: 14.5px; letter-spacing: -0.2px; }
.confirm-sheet .cs-btn.ghost { background: #F0F2F6; color: #4A5470; }
.confirm-sheet .cs-btn.danger { background: #E5484D; color: #fff; }
.confirm-sheet .cs-btn:active { transform: scale(0.97); }

/* ===== Conversation history (대화 기록) ===== */
/* Resume banner on mentor list */
.conv-resume {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-card, 18px); padding: 12px 14px;
  margin-bottom: 16px; cursor: pointer; text-align: left;
  color: var(--text);
}
.theme-sky .conv-resume { box-shadow: 0 2px 0 #D1DCEB; border: 1.5px solid var(--hairline-2); }
.theme-sky .conv-resume:active { transform: translateY(2px); box-shadow: 0 0 0 #D1DCEB; }
.conv-resume:hover { background: var(--surface-2); }
.conv-resume .cr-avs { display: flex; flex-shrink: 0; }
.conv-resume .cr-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; margin-left: -10px; border: 2px solid var(--surface); background: var(--surface-2); }
.conv-resume .cr-av:first-child { margin-left: 0; }
.conv-resume .cr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-resume .cr-title { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; color: var(--text); }
.conv-resume .cr-sub { font-size: 12.5px; color: var(--text-2); letter-spacing: -0.2px; }
.conv-resume > svg { color: var(--text-3); flex-shrink: 0; }

/* Conversation list */
.conv-list { display: flex; flex-direction: column; gap: 10px; }
.conv-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-card, 18px); padding: 14px 40px 14px 14px;
}
.theme-sky .conv-card { box-shadow: 0 2px 0 #D1DCEB; border: 1.5px solid var(--hairline-2); }
.theme-sky .conv-card:active { transform: translateY(2px); box-shadow: 0 0 0 #D1DCEB; }
.conv-card:hover { background: var(--surface-2); }
.conv-card .avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.conv-card .conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conv-card .conv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.conv-card .conv-name { font-size: 15.5px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-card .conv-time { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; font-weight: 600; }
.conv-card .conv-snippet { font-size: 13.5px; color: var(--text-2); line-height: 1.4; letter-spacing: -0.2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conv-card .conv-meta { font-size: 11.5px; color: var(--accent-ink); font-weight: 700; margin-top: 1px; letter-spacing: -0.2px; }
.theme-sky .conv-card .conv-meta { color: #1F5A8C; }
.conv-card .conv-del {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 50%;
  font-size: 13px; font-weight: 700; color: var(--text-3);
  background: transparent; line-height: 1;
}
.conv-card .conv-del:hover { background: var(--surface-2); color: #E5484D; }

/* Empty state */
.conv-empty { text-align: center; padding: 56px 24px; }
.conv-empty .ce-art { font-size: 52px; margin-bottom: 16px; opacity: 0.9; }
.conv-empty .ce-title { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; }
.conv-empty .ce-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-top: 9px; letter-spacing: -0.2px; }

/* New-conversation reset button in chat header */
.chat-reset {
  flex-shrink: 0; border: 1px solid var(--hairline-2); background: var(--surface);
  color: var(--text-2); font-size: 12px; font-weight: 700; letter-spacing: -0.2px;
  padding: 6px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.chat-reset:hover { background: var(--surface-2); color: var(--text); }
.chat-reset:active { transform: scale(0.96); }
