/* ==========================================================================
   🟥 BLOCK 2000: MOBILE CONVERSATION STYLE
   ========================================================================== */

/* ==========================================================================
   🟦 BLOCK 2110: GLOBAL MOBILE RESET
   ========================================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #f5f7fb;
  color: #172033;
  font-family:
    "Pretendard Variable",
    Pretendard,
    sans-serif;
  font-weight: 400;
}


/* ==========================================================================
   🟩 BLOCK 2200: APPLICATION SHELL
   ========================================================================== */

/* ==========================================================================
   🟦 BLOCK 2210: CONVERSATION APP FRAME
   ========================================================================== */

.conversation-app {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px;
}


/* ==========================================================================
   🟦 BLOCK 2222: TOP HOME, PLAY, STOP, AND SETTINGS BUTTONS
   ========================================================================== */

.conversation-header {
  display: grid;
  grid-template-columns:
    42px
    minmax(0, 1fr)
    62px
    42px;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 0 0 10px;
}

.conversation-header button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.conversation-system-split {
  min-width: 0;
}

.conversation-system-split #homeButton {
  display: grid;
  place-items: center;
  padding: 0;
  color: #075ea8;
}

.conversation-system-split #homeButton svg {
  width: 21px;
  height: 21px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.conversation-play-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  min-width: 0;
}

.conversation-play-split #playButton {
  min-width: 0;
  border-radius: 10px 0 0 10px;
}

.conversation-play-split #playMenuButton {
  min-width: 0;
  margin-left: -1px;
  padding: 0;
  border-radius: 0 10px 10px 0;
  font-size: 16px;
}

.conversation-header #stopButton {
  border-color: #efb7b7;
  background: #fff7f7;
  color: #b42318;
}

.conversation-header #stopButton:active {
  background: #fee2e2;
}

.conversation-header #settingsButton {
  padding: 0;
  font-size: 20px;
}

.conversation-header button[aria-expanded="true"] {
  position: relative;
  z-index: 1;
  border-color: #075ea8;
  background: #eaf5ff;
  color: #075ea8;
}


/* ==========================================================================
   🟦 BLOCK 2223: SYSTEM MENU FIXED INDEX
   Purpose: Keep header controls fixed and show the system menu full width.
   ========================================================================== */

#systemMenuPanel {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 60;

  display: grid;
  grid-template-columns: 1fr;
  gap: 0;

  width: min(
    calc(100vw - 24px),
    696px
  );

  max-height: calc(100dvh - 96px);
  margin: 0;
  padding: 0;
  overflow-y: auto;

  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;

  transform: translateX(-50%);

  box-shadow:
    0 10px 24px
    rgb(23 32 51 / 18%);
}

#systemMenuPanel button {
  min-height: 0;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #dbe3ee;
  border-radius: 0;
  background: transparent;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

#systemMenuPanel button:last-child {
  border-bottom: 0;
}

#systemMenuPanel button:first-child {
  background: #eaf5ff;
  color: #075ea8;
  font-weight: 900;
}

/* ==========================================================================
   END: SYSTEM MENU FIXED INDEX
   ========================================================================== */



/* ==========================================================================
   END: TOP SYSTEM, PLAY, STOP, AND SETTINGS BUTTONS
   ========================================================================== */

/* ==========================================================================
   🟦 BLOCK 2224: DROPDOWN AND PLAY MENUS
   ========================================================================== */

.conversation-menu {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #ffffff;
}

.conversation-menu[hidden],
.play-more-panel[hidden] {
  display: none !important;
}

.conversation-menu button,
.play-more-panel button {
  min-height: 40px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.conversation-menu button:disabled {
  opacity: 0.55;
  cursor: default;
}

.conversation-system-split {
  position: relative;
}

#playMenuPanel {
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
}

#playMenuPanel .play-mode-toggle,
#playMenuPanel .practice-start-stop-toggle,
#playMenuPanel .practice-reset-button {
  grid-column: span 2;
  min-height: 36px;
  line-height: 1;
  white-space: nowrap;
}

#playMenuPanel .play-practice-toggle,
#playMenuPanel .continue-next-toggle,
#playMenuPanel .continue-next-split {
  grid-column: span 3;
  min-height: 36px;
  line-height: 1;
}

#playMenuPanel .play-practice-toggle,
#playMenuPanel .continue-next-toggle {
  white-space: nowrap;
}

.continue-next-split {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    34px;
  gap: 0;
}

#playMenuPanel .continue-next-menu-button {
  min-height: 36px;
  padding: 0;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
}

.play-more-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  padding-top: 3px;
}

/* ==========================================================================
   END: DROPDOWN AND PLAY MENUS
   ========================================================================== */



/* ==========================================================================
   🟦 BLOCK 2225: FIXED DROPDOWN LAYERS
   Purpose: Keep menus fixed and prevent them from covering lesson content.
   ========================================================================== */

.conversation-app {
  position: relative;
}

#playMenuPanel,
#settingsPanel {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 60;

  width: min(
    calc(100vw - 24px),
    696px
  );

  max-height: calc(100dvh - 96px);
  margin: 0;
  overflow-y: auto;

  transform: translateX(-50%);

  box-shadow:
    0 10px 24px
    rgb(23 32 51 / 18%);
}

#playMenuPanel {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
}

#settingsPanel {
  padding: 10px;
}

.conversation-app:has(
  #playMenuPanel:not([hidden])
) #conversationLesson {
  padding-top: 98px;
}

.conversation-app:has(
  #settingsPanel:not([hidden])
) #conversationLesson {
  padding-top: 278px;
}

#playMenuPanel[hidden],
#settingsPanel[hidden] {
  display: none !important;
}

/* ==========================================================================
   END: FIXED DROPDOWN LAYERS
   ========================================================================== */



/* ==========================================================================
   🟦 BLOCK 2226: SETTINGS, STATUS, AND BOTTOM NAVIGATION
   ========================================================================== */

#settingsPanel {
  grid-template-columns: 1fr;
  gap: 7px;
}

.conversation-settings-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.conversation-settings-actions button {
  min-height: 40px;
}

.conversation-setting-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.conversation-setting-row select {
  grid-column: 2 / -1;
}

.conversation-setting-row input {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.conversation-setting-row input[type="range"] {
  min-height: auto;
  padding: 0;
}

.conversation-setting-row output {
  min-width: 40px;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.conversation-speed-loop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
}

.conversation-speed-loop-row .conversation-setting-row {
  grid-template-columns: 58px minmax(0, 1fr);
  min-width: 0;
}

#playLoopToggle {
  min-height: 34px;
  padding: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#playLoopToggle[aria-pressed="true"] {
  border-color: #075ea8;
  background: #eaf5ff;
  color: #075ea8;
}

.conversation-language-row {
  display: grid;
  grid-template-columns:
    42px
    minmax(0, 1fr)
    minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.conversation-language-label {
  font-size: 13px;
}

.conversation-language-choice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.conversation-language-choice span {
  color: #64748b;
  font-size: 10px;
  text-align: center;
}

.conversation-language-choice select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.conversation-status {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
}

.conversation-bottom-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.conversation-bottom-navigation button {
  min-height: 44px;
  border: 1px solid #075ea8;
  border-radius: 10px;
  background: #ffffff;
  color: #075ea8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.conversation-bottom-navigation button:last-child {
  background: #075ea8;
  color: #ffffff;
}

.conversation-footer {
  padding: 12px 0 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
}

/* ==========================================================================
   END: SETTINGS, STATUS, AND BOTTOM NAVIGATION
   ========================================================================== */


/* ==========================================================================
   🟦 BLOCK 2227: PHONE SAFE TOP AND COMPACT TEXT
   ========================================================================== */

.conversation-app {
  padding: 28px 12px 12px;
}

.conversation-header button {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

#playMenuPanel {
  top: 80px;
}

.conversation-turn-speaker,
.conversation-secondary-speaker {
  font-size: 14px;
}

.conversation-turn-text,
.conversation-secondary-text {
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

/* ==========================================================================
   END: PHONE SAFE TOP AND COMPACT TEXT
   ========================================================================== */

/* ==========================================================================
   🟦 BLOCK 2228: STICKY TOP CONTROLS
   Purpose: Keep the top controls available while lesson rows scroll.
   ========================================================================== */

.conversation-app {
  padding: 0 12px 12px;
}

.conversation-header {
  position: sticky;
  top: 0;
  z-index: 50;

  padding: 28px 0 10px;
  background: #f5f7fb;

  box-shadow:
    0 5px 10px
    rgb(245 247 251 / 92%);
}

#playMenuPanel {
  position: fixed;
  top: 80px;
  left: 50%;
  right: auto;

  width: min(
    calc(100vw - 24px),
    696px
  );

  transform: translateX(-50%);
  z-index: 60;
}

/* ==========================================================================
   END: STICKY TOP CONTROLS
   ========================================================================== */


/* ==========================================================================
   🟦 BLOCK 2229: CURRENT SPEAKING BOX
   ========================================================================== */

.conversation-turn-card.is-speaking {
  outline: 3px solid #facc15;
  outline-offset: -3px;
  background: #ffffff;
}

/* ==========================================================================
   END: CURRENT SPEAKING BOX
   ========================================================================== */



/* ==========================================================================
   🟦 BLOCK 2230: MIC PASS / RETRY RESULT
   ========================================================================== */

.conversation-turn-card.is-mic-pass {
  outline: 3px solid #16a34a;
  outline-offset: -3px;
  background: #ffffff;
}

.conversation-turn-card.is-mic-retry {
  outline: 3px solid #ef4444;
  outline-offset: -3px;
  background: #ffffff;
}

.conversation-mic-word-match {
  display: inline;
  padding: 1px 2px;
  border-radius: 3px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
}

.conversation-mic-result {
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.is-mic-pass .conversation-mic-result {
  color: #15803d;
}

.is-mic-retry .conversation-mic-result {
  color: #dc2626;
}

/* ==========================================================================
   END: MIC PASS / RETRY RESULT
   ========================================================================== */



/* ==========================================================================
   🟦 BLOCK 2231: ROLE PLAY TARGET SENTENCE
   Purpose: Yellow outline only marks the sentence selected as the start.
   ========================================================================== */

.conversation-turn-card {
  cursor: pointer;
}

.conversation-turn-card.is-role-target:not(
  .is-mic-pass
):not(
  .is-mic-retry
) {
  outline: 3px solid #facc15;
  outline-offset: -3px;
  background: #ffffff;
}

/* ==========================================================================
   END: ROLE PLAY TARGET SENTENCE
   ========================================================================== */



   /* ==========================================================================
   🟦 BLOCK 2232: NO PLAY MENU PAGE FLOW
   Purpose: The PLAY menu must never push, move, or scroll with lesson text.
   ========================================================================== */

/* PLAY menu positioning is fully owned by BLOCK 2225. */

/* ==========================================================================
   END: NO PLAY MENU PAGE FLOW
   ========================================================================== */


/* ==========================================================================
   🟦 BLOCK 2233: BIBLE PERSON SPEAKER LINK
   Purpose: Show only mapped speaker names as Bible detail links.
   ========================================================================== */

.conversation-turn-speaker.is-bible-person-link,
.conversation-secondary-speaker.is-bible-person-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.conversation-turn-speaker.is-bible-person-link:active,
.conversation-secondary-speaker.is-bible-person-link:active {
  color: #064b87;
}

.conversation-turn-speaker.is-bible-loading,
.conversation-secondary-speaker.is-bible-loading {
  cursor: wait;
  opacity: 0.7;
  pointer-events: none;
}

.conversation-turn-speaker.is-bible-loading::after,
.conversation-secondary-speaker.is-bible-loading::after {
  content: ' Loading…';
  font-size: 0.78em;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================================
   END: BIBLE PERSON SPEAKER LINK
   ========================================================================== */



/* ==========================================================================
   🟦 BLOCK 2234: CURRENT TTS WORD HIGHLIGHT
   Purpose: Keep the first spoken word visible, including one-character words.
   ========================================================================== */

.conversation-tts-word {
  padding: 0;
  border-radius: 2px;
  font: inherit;
  transition: background-color 0.08s ease;
}

.conversation-tts-word.is-tts-current-word {
  display: inline-block;
  min-width: 2ch;
  padding: 0 0.08em;
  border-radius: 2px;
  background: #fde68a;
  color: inherit;
  font-weight: inherit;
  text-align: center;
  vertical-align: baseline;
}

/* ==========================================================================
   END: CURRENT TTS WORD HIGHLIGHT
   ========================================================================== */

/* ==========================================================================
   🟦 BLOCK 2290: CONVERSATION DIRECTORY
   ========================================================================== */

.conversation-directory {
  display: block;
  min-height: 100%;
  padding: 14px 16px;
  background: #ffffff;
}

.conversation-directory[hidden] {
  display: none !important;
}

.conversation-directory-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.conversation-directory-breadcrumb button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #075ea8;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.conversation-directory-breadcrumb span {
  color: #94a3b8;
}

.conversation-directory-list {
  display: block;
  border: 0;
}

.conversation-directory-branch {
  display: block;
  margin: 0;
  padding: 0;
}

.conversation-directory-category-branch {
  margin-left: 14px !important;
}

.conversation-directory-subcategory-branch {
  margin-left: 14px !important;
}

.conversation-directory-title-branch {
  margin-left: 14px !important;
}

.conversation-directory-item {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #172033;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.conversation-directory-level-branch
  > .conversation-directory-item {
  color: #172033;
}

.conversation-directory-category-branch
  > .conversation-directory-item {
  color: #075ea8;
}

.conversation-directory-subcategory-branch
  > .conversation-directory-item {
  color: #172033;
}

.conversation-directory-item:hover {
  color: #075ea8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.conversation-directory-item:active {
  background: transparent;
  color: #075ea8;
}

.conversation-directory-item.is-directory-title {
  color: #075ea8;
  font-size: 15px;
  font-weight: 500;
}

.conversation-directory-item.is-directory-title::before {
  content: "• ";
  color: #94a3b8;
}

.conversation-directory-item.is-directory-resume {
  background: transparent;
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.conversation-directory-item.is-directory-resume:hover {
  background: transparent;
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.conversation-directory-item.is-directory-resume:active {
  background: transparent;
  color: #1d4ed8;
}

.conversation-directory-item.is-directory-resume:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.conversation-directory-empty {
  margin: 4px 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
}

.conversation-app.conversation-directory-open
  .conversation-bottom-navigation,
.conversation-app.conversation-directory-open
  .conversation-lesson {
  display: none;
}

/* ==========================================================================
   END: CONVERSATION DIRECTORY
   ========================================================================== */


/* ==========================================================================
   🟦 BLOCK 2291: DIRECTORY LOADING TEXT
   Purpose: Show one loading line before the LEVEL index is ready.
   ========================================================================== */

.conversation-directory-loading {
  margin: 18px 0 0;
  padding: 10px 2px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   END: DIRECTORY LOADING TEXT
   ========================================================================== */



/* ==========================================================================
   🟩 BLOCK 2300: LESSON DISPLAY
   ========================================================================== */

/* ==========================================================================
   🟦 BLOCK 2310: TURN CONTAINER
   ========================================================================== */

#conversationTurns {
  display: grid;
  gap: 0;
}

.conversation-turn-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  line-height: 1.45;
}

.conversation-turn-speaker {
  flex: 0 0 auto;
  color: #075ea8;
  font-size: 15px;
  font-weight: 900;
}

.conversation-turn-text {
  min-width: 0;
  flex: 1 1 0;
  color: #172033;
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.conversation-secondary-line {
  display: flex;
  flex: 0 0 100%;
  align-items: flex-start;
  gap: 7px;
  padding-top: 3px;
}

.conversation-secondary-speaker {
  flex: 0 0 auto;
  color: #075ea8;
  font-size: 15px;
  font-weight: 900;
}

.conversation-secondary-text {
  min-width: 0;
  flex: 1 1 0;
  color: #172033;
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   🟦 BLOCK 2320: COMPACT LESSON TITLE
   ========================================================================== */

#conversationStatus,
.conversation-group {
  display: none;
}

.conversation-title {
  margin: 0 0 10px;
  overflow: hidden;
  color: #172033;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   END: COMPACT LESSON TITLE
   ========================================================================== */


/* ==========================================================================
   🟦 BLOCK 2330: SELECTED TURN CHUNK DISPLAY
   ========================================================================== */

.conversation-selected-chunks {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #f8fbff;
}

.conversation-selected-chunk-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.conversation-selected-chunk-line strong {
  color: #075ea8;
  font-weight: 900;
}

#chunkButton[aria-pressed="true"] {
  border-color: #075ea8;
  background: #eaf5ff;
  color: #075ea8;
}

/* ==========================================================================
   END: SELECTED TURN CHUNK DISPLAY
   ========================================================================== */  


.conversation-play-split #playButton:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  border-color: #d7dee8;
  background: #eef2f7;
  color: #8a94a6;
}   

#playMenuPanel .practice-reset-button {
  min-height: 36px;
  border-color: #efb7b7;
  background: #fff7f7;
  color: #b42318;
}

#settingsPanel .conversation-settings-actions {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

#settingsPanel .conversation-settings-actions button {
  min-height: 34px;
}

#settingsPanel .conversation-settings-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ==========================================================================
   🟦 BLOCK 2340: BUTTON HOVER FEEDBACK
   Purpose: Show clear hover feedback on every active application button.
   ========================================================================== */

button:not(:disabled) {
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

button:not(:disabled):hover {
  filter: brightness(0.88);
  box-shadow:
    0 2px 8px
    rgb(23 32 51 / 35%);
}

button:not(:disabled):active {
  filter: brightness(0.80);
  box-shadow: none;
}

/* ==========================================================================
   END: BUTTON HOVER FEEDBACK
   ========================================================================== */

 /* ==========================================================================
   🟦 BLOCK 2350: KAKAO EXTERNAL BROWSER GUIDE
   ========================================================================== */

.kakao-external-browser-guide {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(15 23 42 / 72%);
}

.kakao-external-browser-guide[hidden] {
  display: none;
}

.kakao-external-browser-card {
  width: min(100%, 420px);
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 18px 50px rgb(0 0 0 / 35%);
  text-align: center;
}

.kakao-external-browser-card strong {
  display: block;
  font-size: 20px;
}

.kakao-external-browser-card p {
  margin: 14px 0 20px;
  line-height: 1.55;
}

#kakaoExternalBrowserButton {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #075ea8;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

/* ==========================================================================
   END: KAKAO EXTERNAL BROWSER GUIDE
   ========================================================================== */  









/* ==========================================================================
   BLOCK 8810 : CONVERSATION WORD DICTIONARY UI
   ========================================================================== */

.conversation-dictionary-popup {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10001;
  max-width: 620px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgb(15 23 42 / 28%);
  color: #172033;
}

.conversation-dictionary-popup[hidden] {
  display: none;
}

.conversation-dictionary-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 18px;
}

.conversation-dictionary-word-title {
  margin: 0 42px 10px 0;
  color: #075ea8;
  font-size: 22px;
  font-weight: 900;
}

.conversation-dictionary-base,
.conversation-dictionary-translation,
.conversation-dictionary-definition,
.conversation-dictionary-status {
  margin-top: 8px;
  line-height: 1.5;
}

.conversation-dictionary-translation {
  color: #b45309;
  font-weight: 800;
}

.conversation-dictionary-definition {
  color: #334155;
  white-space: pre-line;
}


.conversation-tts-word {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}


/* ==========================================================================
   🟦 BLOCK 2990: MOBILE FONT WEIGHT CORRECTION
   Purpose: Make Pretendard easier to read on narrow mobile screens.
   ========================================================================== */

@media (max-width: 767px) {
  body {
    font-weight: 450;
  }

  .conversation-directory-item {
    font-weight: 450;
  }

  .conversation-directory-item.is-directory-title {
    font-weight: 500;
  }

  .conversation-turn-text,
  .conversation-secondary-text {
    font-weight: 550;
  }
}

/* ==========================================================================
   END: MOBILE FONT WEIGHT CORRECTION
   ========================================================================== */



   /* ==========================================================================
   BLOCK 2292: DIRECTORY LEVEL COUNT ALIGNMENT
   ========================================================================== */

.conversation-directory-item.is-directory-level {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
}

.conversation-directory-level-leading {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 178px;
}

.conversation-directory-level-name {
  color: #172033;
}

.conversation-directory-level-description {
  color: #64748b;
  font-size: 0.84em;
  font-weight: 500;
}

.conversation-directory-level-count {
  width: 56px;
  color: #64748b;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}



/* ==========================================================================
   BLOCK 2293: DIRECTORY FREE ACCESS LABEL
   ========================================================================== */

.conversation-directory-free-badge {
  display: inline-block;
  margin-left: 6px;
  color: #16a34a;
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}