/* ==========================================================
   Talk Together — English Conversation (matches the mockup)
   All selectors use the .tt- prefix, so nothing else on the
   site is affected. Loads AFTER css/style.css.
   To use a real photo in the banner, add to a scene:
     .tt-hero[data-scene="school"] { --hero-img: url(../images/school.jpg); }
   ========================================================== */
.tt-body {
  --tt-bg: #0a1029;
  --tt-panel: rgba(16, 24, 62, .78);
  --tt-line: rgba(99, 102, 241, .28);
  --tt-text: #e8ecff;
  --tt-muted: #94a3c8;
  --tt-violet: #8b5cf6;
  --tt-indigo: #4f46e5;
  --tt-boy: #3b82f6;
  --tt-girl: #c026d3;
  font-family: 'Poppins', 'Noto Sans Myanmar', 'Padauk', 'Myanmar Text', sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1b1f5e 0%, #0d1438 45%, #070b20 100%) fixed;
  color: var(--tt-text);
}
.tt-app { min-height: 100vh; }
.tt-app [hidden] { display: none !important; }
.tt-app button, .tt-app select { font: inherit; color: inherit; }
.tt-app button:focus-visible, .tt-app select:focus-visible, .tt-app a:focus-visible, .tt-check:focus-visible + .tt-switch {
  outline: 2px solid #a5b4fc; outline-offset: 2px;
}

/* ---------- Header ---------- */
.tt-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem clamp(14px, 2.5vw, 32px); background: rgba(10, 16, 41, .92); border-bottom: 1px solid var(--tt-line); backdrop-filter: blur(14px); }
.tt-brand { display: inline-flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.tt-brand-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.15rem; background: linear-gradient(135deg, #a855f7, #4f46e5); box-shadow: 0 8px 22px rgba(124, 58, 237, .45); }
.tt-brand-text strong { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.15; }
.tt-brand-text b { color: #c084fc; font-weight: 800; }
.tt-brand-text small { display: block; margin-top: .1rem; color: var(--tt-muted); font-size: .78rem; }
.tt-nav { display: flex; gap: .6rem; }
.tt-nav-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.1rem; border: 1px solid var(--tt-line); border-radius: 999px; background: rgba(23, 32, 80, .7); color: #e2e8ff; font-size: .85rem; font-weight: 600; text-decoration: none; transition: .2s; }
.tt-nav-btn:hover { border-color: #818cf8; }
.tt-nav-btn.is-active { background: linear-gradient(135deg, #6d5df6, #4f46e5); border-color: transparent; box-shadow: 0 8px 20px rgba(79, 70, 229, .4); }

/* ---------- Layout ---------- */
.tt-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 20px; width: min(1520px, 100%); margin: 0 auto; padding: 24px clamp(14px, 2.5vw, 32px) 48px; align-items: start; }
.tt-panel { background: var(--tt-panel); border: 1px solid var(--tt-line); border-radius: 20px; box-shadow: 0 18px 40px -18px rgba(2, 6, 23, .8); backdrop-filter: blur(12px); }
.tt-center { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tt-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tt-grow { flex: 1; min-width: 0; }

/* ---------- Left panel ---------- */
.tt-left { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.tt-back { display: inline-flex; align-items: center; gap: .65rem; align-self: flex-start; padding: .2rem 0; border: 0; background: none; font-size: .92rem; font-weight: 500; cursor: pointer; }
.tt-back:hover { color: #c4b5fd; }
.tt-scenario-card { display: flex; gap: .85rem; align-items: center; padding: .9rem; border: 1px solid var(--tt-line); border-radius: 16px; background: rgba(8, 13, 40, .55); }
.tt-scenario-icon { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; font-size: 1.6rem; background: linear-gradient(135deg, #a855f7, #6366f1); }
.tt-scenario-card strong { font-size: 1rem; font-weight: 700; }
.tt-scenario-card p { margin: .2rem 0 0; color: var(--tt-muted); font-size: .76rem; line-height: 1.7; }
.tt-field { display: flex; flex-direction: column; gap: .6rem; min-width: 0; margin: 0; }
.tt-field-label { display: flex; align-items: center; gap: .55rem; font-size: .95rem; font-weight: 600; }
.tt-field-label i { color: #c4b5fd; width: 1.1rem; text-align: center; }
.tt-field-label small { color: var(--tt-muted); font-size: .72rem; font-weight: 400; }
.tt-select { width: 100%; min-height: 46px; padding: .6rem .8rem; border: 1px solid #334155; border-radius: 12px; background: rgba(8, 13, 40, .8); font-size: .84rem; }
.tt-select option, .tt-voice-select option, .tt-mini-select option { background: #0f172a; color: #f8fafc; }

.tt-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.tt-seg button { min-height: 42px; padding: .4rem .3rem; border: 1px solid #3b4a8a; border-radius: 12px; background: rgba(23, 32, 80, .6); font-size: .76rem; font-weight: 600; cursor: pointer; transition: .18s; }
.tt-seg button:hover { border-color: #818cf8; }
.tt-seg button.is-on { border-color: #a78bfa; background: linear-gradient(135deg, rgba(139, 92, 246, .45), rgba(79, 70, 229, .35)); box-shadow: 0 0 0 2px rgba(167, 139, 250, .35); }
.tt-seg-sm button { font-size: .7rem; min-height: 38px; }

.tt-chars { display: flex; flex-direction: column; gap: .6rem; }
.tt-char { display: flex; align-items: center; gap: .75rem; padding: .7rem; border-radius: 16px; border: 1.5px solid; }
.tt-char.is-boy { border-color: rgba(59, 130, 246, .55); background: rgba(30, 58, 138, .25); }
.tt-char.is-girl { border-color: rgba(192, 38, 211, .6); background: rgba(112, 26, 117, .28); }
.tt-char-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.tt-char-info strong { font-size: .88rem; font-weight: 700; }
.tt-char-info em { font-style: normal; font-weight: 400; color: var(--tt-muted); }
.tt-voice-select { width: 100%; padding: .32rem .5rem; border-radius: 999px; border: 0; font-size: .68rem; font-weight: 500; text-overflow: ellipsis; }
.is-boy .tt-voice-select { background: rgba(37, 99, 235, .45); }
.is-girl .tt-voice-select { background: rgba(147, 51, 234, .5); }
.tt-icon-btn { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #4f46e5); cursor: pointer; font-size: .8rem; transition: transform .15s; }
.tt-icon-btn:hover { transform: scale(1.08); }
.tt-voice-note { margin: 0; padding: .6rem .7rem; border-radius: 12px; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35); color: #fde68a; font-size: .7rem; line-height: 1.7; }

.tt-start { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 54px; border: 0; border-radius: 999px; background: linear-gradient(110deg, #c026d3, #6d5df6); box-shadow: 0 12px 26px rgba(124, 58, 237, .45); font-size: .95rem; font-weight: 700; color: #fff; cursor: pointer; transition: transform .18s, filter .18s; }
.tt-start:hover { transform: translateY(-2px); filter: brightness(1.1); }
.tt-tagline { margin: 0; text-align: center; color: var(--tt-muted); font-size: .76rem; }

/* ---------- Avatars (inline SVG) ---------- */
.tt-ava { flex: 0 0 auto; display: block; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 2px solid transparent; }
.tt-ava svg { display: block; width: 100%; height: 100%; }
.is-boy > .tt-ava { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.is-girl > .tt-ava { border-color: #e879f9; box-shadow: 0 0 0 3px rgba(192, 38, 211, .22); }

/* ---------- Hero ---------- */
.tt-hero { --a: #2a2f7a; --b: #d98b5f; position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.1rem; min-height: 168px; padding: 1.4rem 1.5rem; border: 1px solid var(--tt-line); border-radius: 20px; background: linear-gradient(110deg, rgba(10, 16, 41, .96) 30%, rgba(10, 16, 41, .25) 75%), linear-gradient(120deg, var(--a), var(--b)); }
.tt-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-img, none) center / cover; opacity: .55; }
.tt-hero[data-scene="friends"] { --a: #3b1d5e; --b: #e08a6a; }
.tt-hero[data-scene="work"] { --a: #12335e; --b: #3aa0c9; }
.tt-hero[data-scene="shopping"] { --a: #4a1d5e; --b: #e36aa8; }
.tt-hero[data-scene="restaurant"] { --a: #5a2318; --b: #e8a24b; }
.tt-hero[data-scene="travel"] { --a: #0f4a5e; --b: #4bc2a5; }
.tt-hero[data-scene="academic"] { --a: #2a1f6e; --b: #6a8cf0; }
.tt-hero-emoji { position: absolute; right: 8%; bottom: -14px; font-size: 7.5rem; line-height: 1; opacity: .85; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .4)); pointer-events: none; }
.tt-hero-text { position: relative; max-width: 560px; }
.tt-hero-count { color: #a78bfa; font-size: .85rem; font-weight: 600; }
.tt-hero h1 { margin: .25rem 0 .5rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.2; }
.tt-hero p { margin: 0; color: #d6dcff; font-size: .84rem; line-height: 1.6; }
.tt-level-pill { position: absolute; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; background: linear-gradient(135deg, #6d5df6, #4f46e5); font-size: .8rem; font-weight: 600; box-shadow: 0 6px 16px rgba(79, 70, 229, .45); }

/* ---------- Dialogue ---------- */
.tt-dialogue { padding: 16px 18px 18px; min-width: 0; }
.tt-statusbar { display: flex; align-items: center; gap: .9rem; padding-bottom: .7rem; }
.tt-wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.tt-wave i { display: block; width: 3px; height: var(--h, 8px); border-radius: 3px; background: linear-gradient(#a78bfa, #22d3ee); opacity: .55; transform-origin: center; }
.tt-wave.is-speaking i { opacity: 1; animation: tt-wave .9s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes tt-wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1.5); } }
.tt-status-text { flex: 1; min-width: 0; color: #cfd6ff; font-size: .82rem; font-weight: 500; }
.tt-linecount { color: var(--tt-muted); font-size: .76rem; white-space: nowrap; }
.tt-progress { height: 4px; border-radius: 4px; background: rgba(148, 163, 200, .18); overflow: hidden; }
.tt-progress div { height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #8b5cf6, #22d3ee); transition: width .3s; }

.tt-list { position: relative; display: flex; flex-direction: column; gap: 14px; max-height: min(62vh, 640px); min-height: 300px; overflow-y: auto; padding: 18px 4px 6px 0; scrollbar-width: thin; scrollbar-color: #4f46e5 transparent; }
.tt-row { display: flex; align-items: flex-start; gap: .8rem; opacity: .86; transition: opacity .2s; }
.tt-row.is-active { opacity: 1; }
.tt-bubble-wrap { flex: 1; min-width: 0; }
.tt-name { margin: 0 0 .3rem .15rem; font-size: .76rem; font-weight: 700; letter-spacing: .03em; }
.tt-name span { font-weight: 400; color: var(--tt-muted); letter-spacing: 0; }
.is-boy .tt-name { color: #60a5fa; }
.is-girl .tt-name { color: #f0abfc; }

.tt-bubble { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem 1.1rem; border: 1.5px solid; border-radius: 16px; text-align: left; cursor: pointer; transition: .2s; }
.is-boy .tt-bubble { border-color: rgba(59, 130, 246, .55); background: linear-gradient(135deg, rgba(30, 64, 175, .55), rgba(17, 40, 120, .55)); }
.is-girl .tt-bubble { border-color: rgba(168, 85, 247, .5); background: linear-gradient(135deg, rgba(107, 33, 168, .55), rgba(76, 29, 120, .55)); }
.tt-bubble:hover { filter: brightness(1.12); }
.is-boy.is-active .tt-bubble { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .28), 0 10px 26px rgba(30, 64, 175, .45); }
.is-girl.is-active .tt-bubble { border-color: #e879f9; box-shadow: 0 0 0 3px rgba(232, 121, 249, .26), 0 10px 26px rgba(126, 34, 206, .45); }
.tt-bubble-play { flex: 0 0 28px; width: 28px; height: 28px; display: none; place-items: center; border-radius: 50%; background: #6d5df6; font-size: .62rem; }
.is-active .tt-bubble-play { display: grid; }
.tt-bubble-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tt-main { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.tt-main.is-my { line-height: 1.9; font-weight: 500; }
.tt-sub { color: #cbd5ff; font-size: .82rem; line-height: 1.9; }

.tt-row-actions { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding-top: 1.55rem; }
.tt-round { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(79, 70, 229, .55); font-size: .85rem; cursor: pointer; transition: .18s; }
.tt-round:hover { background: #6d5df6; transform: scale(1.06); }
.tt-round-sm { width: 30px; height: 30px; font-size: .6rem; background: rgba(148, 163, 200, .18); }

.tt-finish { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin-top: .9rem; padding: .8rem 1rem; border: 1px solid rgba(16, 185, 129, .45); border-radius: 14px; background: rgba(16, 185, 129, .1); font-size: .84rem; font-weight: 600; }
.tt-finish i { color: #34d399; }
.tt-finish-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tt-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border: 1px solid #3b4a8a; border-radius: 999px; background: rgba(23, 32, 80, .8); font-size: .76rem; font-weight: 600; cursor: pointer; }
.tt-chip:hover { border-color: #818cf8; }
.tt-chip.is-primary { border-color: transparent; background: linear-gradient(135deg, #6d5df6, #4f46e5); }

.tt-dock { display: none; align-items: center; justify-content: center; gap: .6rem; position: sticky; bottom: 10px; z-index: 5; margin-top: .9rem; padding: .6rem; border: 1px solid var(--tt-line); border-radius: 18px; background: rgba(10, 16, 41, .94); backdrop-filter: blur(10px); }
.tt-dock-btn { width: 44px; height: 44px; border: 1px solid #3b4a8a; border-radius: 14px; background: rgba(23, 32, 80, .85); cursor: pointer; }
.tt-dock-btn.is-main { width: 54px; height: 54px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #4f46e5); }

/* ---------- Right column ---------- */
.tt-card { padding: 16px; }
.tt-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--tt-line); border-radius: 14px; background: rgba(8, 13, 40, .6); }
.tt-tabs button { min-height: 42px; border: 0; border-radius: 11px; background: none; font-size: .86rem; font-weight: 600; color: #cbd5ff; cursor: pointer; }
.tt-tabs button.is-on { background: linear-gradient(135deg, #6d5df6, #4f46e5); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .4); }
.tt-row-line { display: flex; align-items: center; gap: .8rem; margin-top: 14px; padding: .4rem .2rem; font-size: .9rem; font-weight: 500; cursor: pointer; }
.tt-mini-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(148, 163, 200, .18); font-size: .8rem; }

.tt-check { position: absolute; opacity: 0; pointer-events: none; }
.tt-switch { position: relative; flex: 0 0 46px; width: 46px; height: 26px; border-radius: 999px; background: #334155; transition: background .2s; }
.tt-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tt-check:checked + .tt-switch { background: #6d5df6; }
.tt-check:checked + .tt-switch::after { transform: translateX(20px); }

.tt-card-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; font-size: .95rem; font-weight: 600; }
.tt-card-title i { color: #c4b5fd; }
.tt-card-title.is-amber, .tt-card-title.is-amber i { color: #fbbf24; }

.tt-ctrl { display: flex; align-items: center; gap: .85rem; width: 100%; padding: .55rem .6rem; margin: 0 0 .25rem; border: 1px solid transparent; border-radius: 14px; background: none; text-align: left; cursor: pointer; transition: .18s; }
.tt-ctrl:hover { background: rgba(99, 102, 241, .12); }
.tt-ctrl-icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(79, 70, 229, .3); font-size: .9rem; }
.tt-ctrl.is-main .tt-ctrl-icon { width: 50px; height: 50px; flex-basis: 50px; background: linear-gradient(135deg, #7c3aed, #4f46e5); box-shadow: 0 8px 18px rgba(79, 70, 229, .5); }
.tt-ctrl strong { display: block; font-size: .86rem; font-weight: 600; }
.tt-ctrl small { display: block; margin-top: .1rem; color: var(--tt-muted); font-size: .72rem; line-height: 1.5; }
.tt-ctrl-select { cursor: default; border-color: var(--tt-line); background: rgba(8, 13, 40, .45); }
.tt-ctrl-select:hover { background: rgba(8, 13, 40, .45); }
.tt-ctrl-select .tt-switch { margin-left: auto; }
.tt-ctrl-select:has(.tt-check) { cursor: pointer; }
.tt-mini-select { margin-top: .2rem; width: 100%; padding: .25rem .4rem; border: 1px solid #334155; border-radius: 8px; background: rgba(8, 13, 40, .8); font-size: .76rem; }

.tt-tips ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.tt-tips li { position: relative; padding-left: 1.7rem; color: #cbd5ff; font-size: .8rem; }
.tt-tips li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: #60a5fa; font-weight: 700; }
.tt-keys { margin: .9rem 0 0; color: var(--tt-muted); font-size: .68rem; line-height: 1.9; }
.tt-keys kbd { padding: .05rem .35rem; border: 1px solid #475569; border-radius: 5px; background: rgba(8, 13, 40, .7); font: inherit; font-size: .64rem; }

.tt-keep { display: flex; align-items: center; gap: .9rem; }
.tt-keep > i { color: #a78bfa; font-size: 1.4rem; }
.tt-keep strong { font-size: .88rem; }
.tt-keep p { margin: .15rem 0 0; color: var(--tt-muted); font-size: .74rem; }
.tt-star { margin-left: auto; font-size: 2.2rem; filter: drop-shadow(0 6px 12px rgba(168, 85, 247, .5)); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .tt-layout { grid-template-columns: 290px minmax(0, 1fr); }
  .tt-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 820px) {
  .tt-layout { grid-template-columns: 1fr; padding-top: 16px; }
  .tt-right { grid-template-columns: 1fr; }
  .tt-dock { display: flex; }
  .tt-list { max-height: none; min-height: 0; overflow: visible; }
  .tt-nav-btn span { display: none; }
  .tt-brand-text small { display: none; }
  .tt-hero-emoji { font-size: 5rem; right: 4%; }
  .tt-ava { width: 46px; height: 46px; }
  .tt-round { width: 38px; height: 38px; }
  .tt-main { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tt-wave.is-speaking i { animation: none; }
  .tt-app * { transition: none !important; }
}

/* ---------- Conversation picker (in the banner) ---------- */
.tt-convo-nav { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.tt-convo-nav button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 34px; height: 34px; padding: 0 .75rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(10, 16, 41, .6); font-size: .74rem; font-weight: 600; cursor: pointer; }
.tt-convo-nav button:first-child, .tt-convo-nav button:nth-child(2) { padding: 0; width: 34px; }
.tt-convo-nav button:hover:not(:disabled) { border-color: #a5b4fc; background: rgba(79, 70, 229, .5); }
.tt-convo-nav button:disabled { opacity: .4; cursor: default; }