/*
 * main.css — Chalchitra Vaachana ISL Translator
 * Theme aligned with chalachitravaachana.org home page (saffron · navy · India green)
 * Author      : Gautham K. Dileep
 * Organization: Amrita CREATE, Amrita Vishwa Vidyapeetham
 * Date        : 2026-05-20
 * Copyright   : © 2026 AmritaCREATE. All rights reserved.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Noto+Sans:wght@400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  /* Home page palette */
  --saffron:        #FF6B00;
  --saffron2:       #FF8C2A;
  --saffron-light:  #FFF0E5;
  --india-green:    #138808;
  --india-blue:     #0047AB;
  --navy:           #003580;
  --navy-dark:      #001F4D;
  --white:          #FFFFFF;
  --off-white:      #F7F9FC;
  --light-gray:     #EEF2F8;
  --text-dark:      #0D1B3E;
  --text-mid:       #3B4E7A;
  --text-soft:      #6B7BA4;
  --border:         #D8E1F0;
  --gold:           #F4A900;

  /* ISL app aliases */
  --bg:             var(--off-white);
  --card:           var(--white);
  --card2:          var(--saffron-light);
  --text:           var(--text-dark);
  --muted:          var(--text-soft);
  --stroke:         var(--border);
  --stroke2:        rgba(0,53,128,0.22);
  --accent:         var(--saffron);
  --accent2:        var(--saffron2);
  --accent3:        #FF8C00;
  --ok:             var(--india-green);
  --warn:           #ea580c;
  --btnText:        #ffffff;
  --btnRadius:      10px;
  --btnGrad:        linear-gradient(135deg, #FF6B00 0%, #FF8C2A 100%);
  --btnShadow:      0 6px 20px rgba(255,107,0,0.35);
  --softGrad:       linear-gradient(180deg, rgba(255,107,0,0.06), rgba(247,249,252,0.95));
  --shadow-card:    0 4px 24px rgba(0,53,128,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Gov bar (navy-dark top bar matching homepage) ──────────────────────── */
.gov-bar {
  background: var(--navy-dark);
  padding: 9px 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .88rem; color: rgba(255,255,255,.72);
  font-family: 'Poppins', sans-serif;
}
.gov-bar-left { display: flex; align-items: center; gap: 16px; }
.gov-bar-flag {
  display: flex; flex-direction: column;
  width: 26px; height: 18px; border-radius: 2px; overflow: hidden;
  flex-shrink: 0;
}
.gov-bar-flag span { flex: 1; display: block; }
.gov-bar-links { display: flex; gap: 20px; }
.gov-bar-links a { color: rgba(255,255,255,.55); font-size: .84rem; transition: color .2s; text-decoration: none; font-weight: 500; }
.gov-bar-links a:hover { color: var(--saffron2); }

/* ── Tricolor strip (top of page) ──────────────────────────────────────────── */
.tricolor-strip {
  height: 4px;
  background: linear-gradient(to right, #FF6B00 33.33%, #fff 33.33%, #fff 66.66%, #138808 66.66%);
}

/* ── Body & typography ─────────────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: 'Poppins', 'Noto Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ── Global scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f0f4ff; }
::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 99px; }

/* ── Form elements ──────────────────────────────────────────────────────────── */
select {
  background: var(--white);
  color: var(--text-dark);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,53,128,0.08);
  transition: border-color .2s, box-shadow .2s;
}
select:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.14);
}

input[type=text], textarea {
  flex: 1;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  outline: none;
  background: var(--white);
  color: var(--text-dark);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: border-color .2s, box-shadow .2s;
}
input[type=text]:focus, textarea:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}
input[type=text]::placeholder, textarea::placeholder { color: var(--text-soft); }
textarea { width: 100%; min-height: 160px; resize: vertical; line-height: 1.5; }
input, textarea, select, button { color: var(--text-dark); }
a { color: var(--navy); }

/* ── Speech language selector ───────────────────────────────────────────────── */
#speechLanguage {
  min-width: 170px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23FF6B00' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 42px;
}

/* ── Wave visualiser ────────────────────────────────────────────────────────── */
.waveWrap {
  display: none;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,107,0,0.20);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,107,0,0.06), rgba(255,255,255,0.96));
  box-shadow: 0 8px 24px rgba(0,53,128,0.08);
}
.waveWrap.active { display: block; }
.waveLabel {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--saffron); margin-bottom: 10px; font-weight: 800;
}
.waveBars { height: 86px; display: flex; align-items: flex-end; gap: 5px; }
.waveBar {
  flex: 1; min-width: 6px; height: 16px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,175,80,.98), rgba(255,107,0,.9));
  box-shadow: 0 0 14px rgba(255,107,0,.18);
  transform-origin: center bottom;
  transition: height .09s linear, transform .12s ease, opacity .12s ease;
  opacity: .88;
}
.waveWrap.active .waveBar { animation: wavePulse 1.1s ease-in-out infinite; }
@keyframes wavePulse { 0%,100% { opacity:.74; } 50% { opacity:1; } }

/* ── Top navigation bar ─────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,53,128,0.08);
}
.topbarInner {
  width: 100%;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
/* Left group: CCV logo + divider + partner logos — extreme left, aligned under gov-bar left text */
.nav-left {
  display: flex; align-items: center; gap: 20px; flex-shrink: 0;
}
.nav-partner-img {
  height: 40px; width: auto; object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.14));
  flex-shrink: 0;
}
.nav-partner-group {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-partner-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(0,0,0,.75);
  white-space: nowrap;
}
/* Homepage-matching nav logo */
.nav-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.nav-logo-emblem {
  width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron2) 100%);
  display: grid; place-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800; font-size: 1rem; color: #fff;
  box-shadow: 0 6px 16px rgba(255,107,0,.35);
  letter-spacing: .02em;
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-logo-text strong {
  font-size: 1.2rem; font-weight: 700; color: var(--navy-dark);
  font-family: 'Poppins', sans-serif; letter-spacing: .01em;
}
.nav-logo-text span {
  font-size: .72rem; color: var(--text-soft); font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
}
.nav-logo-divider {
  width: 1px; height: 40px;
  background: rgba(0,53,128,0.18);
  flex-shrink: 0;
}

/* Right group: actions — extreme right, aligned under gov-bar right links */
.topActions {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}

/* ── Marquee bar (saffron scrolling info bar matching homepage) ───────────── */
.marquee-bar { background: var(--saffron); padding: 13px 0; overflow: hidden; }
.marquee-track {
  display: flex; gap: 0; align-items: center;
  animation: marquee 28s linear infinite;
  width: max-content;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0 36px; font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.95); white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}
.marquee-sep { color: rgba(255,255,255,.4); font-size: 1rem; }

/* ── How-to steps band (navy gradient section) ────────────────────────────── */
.stats-band {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--india-blue) 100%);
  padding: 28px 32px;
  position: relative; overflow: hidden;
}
.stats-band::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.how-steps-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
  position: relative; z-index: 1;
}
.how-step {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; flex: 1; min-width: 180px;
}
.how-step-num {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--saffron);
  display: grid; place-items: center;
  font-size: 1rem; font-weight: 800; color: #fff;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 14px rgba(255,107,0,0.40);
}
.how-step-body { min-width: 0; }
.how-step-title {
  font-size: .88rem; font-weight: 700; color: #fff;
  font-family: 'Poppins', sans-serif; margin-bottom: 3px;
}
.how-step-desc {
  font-size: .72rem; color: rgba(255,255,255,.62);
  font-family: 'Poppins', sans-serif; line-height: 1.4;
}
.how-step-arrow {
  font-size: 1.3rem; color: rgba(255,255,255,.28);
  flex-shrink: 0; padding: 0 4px;
}

/* Status pill */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--off-white);
  font-size: 14px; color: var(--text-mid);
  font-weight: 500; font-family: 'Poppins', sans-serif;
}
.dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--warn); box-shadow: 0 0 0 3px rgba(234,88,12,0.18);
}

/* Top action buttons — match home page nav style */
.topActions a, .topActions button {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

/* ── Main content wrapper ───────────────────────────────────────────────────── */
.wrap { flex: 1; max-width: 1200px; margin: 0 auto; padding: 16px; }

/* ── Tab bar ────────────────────────────────────────────────────────────────── */
.tabBar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.tabBtn {
  padding: 9px 18px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,53,128,0.06);
  transition: all .18s ease;
}
.tabBtn:hover {
  transform: translateY(-1px);
  border-color: var(--saffron);
  color: var(--saffron);
  background: var(--saffron-light);
  box-shadow: 0 4px 16px rgba(255,107,0,0.15);
}
.tabBtn.active {
  color: #fff;
  border-color: transparent;
  background: var(--btnGrad);
  box-shadow: var(--btnShadow);
}
.tabPanel { display: none; }
.tabPanel.active { display: block; }

/* Avatar toggle buttons */
.avatarToggleBtn { transition: all .18s ease; }
.avatarToggleBtn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,107,0,0.22); }

/* ── Player card ────────────────────────────────────────────────────────────── */
.playerCard {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.playerHeader {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.playerHeader .h { display: flex; flex-direction: column; gap: 2px; }
.playerHeader .h b { font-size: 13px; font-weight: 700; color: var(--navy-dark); }
.playerHeader .h span { font-size: 12px; color: var(--text-soft); }

.playerStage {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9; background: #020a18;
}
video#mainVideo { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ── Floating ISL window ────────────────────────────────────────────────────── */
#islFloat {
  position: fixed; left: 0; top: 0;
  width: 400px; height: 240px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,107,0,0.30);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 20px 60px rgba(0,31,77,0.22), 0 0 0 1px rgba(255,107,0,0.08);
  overflow: auto; touch-action: none;
  scrollbar-width: none;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  resize: both; min-width: 220px; min-height: 140px;
  z-index: 60; display: none;
}
#islFloat::-webkit-scrollbar { display: none; }
#islHandle {
  height: 30px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 10px;
  border-bottom: 1px solid rgba(255,107,0,0.15);
  background: linear-gradient(135deg, rgba(255,107,0,0.18), rgba(0,53,128,0.06));
  cursor: grab; user-select: none;
}
#islHandle:active { cursor: grabbing; }
#islHandle .t { font-size: 12px; font-weight: 700; color: var(--navy-dark); letter-spacing: 0.2px; }#islCanvas { width: 100%; height: calc(100% - 30px); display: block; background: #fff; }

/* ── Main layout grid ───────────────────────────────────────────────────────── */
.grid {
  margin-top: 14px; display: grid;
  grid-template-columns: 1.6fr 0.9fr; gap: 14px; align-items: start;
}
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; }
  #islFloat { width: 320px; }
  /* Hide Amrita + C-DAC partner group on tablet */
  .nav-partner-group:last-child { display: none; }
  /* Steps: allow wrapping to 2×2 */
  .how-step { min-width: 160px; }
  .how-step-arrow { display: none; }
}
@media (max-width: 640px) {
  .gov-bar-links { display: none; }
  .gov-bar { padding: 6px 14px; }
  /* Hide all partner logo groups on small screens */
  .nav-partner-group,
  .nav-logo-divider { display: none; }
  .topbarInner { padding: 10px 14px; }
  .nav-logo-emblem { width: 40px; height: 40px; font-size: .85rem; border-radius: 9px; }
  .nav-logo-text strong { font-size: 1rem; }
  .nav-logo-text span { font-size: .65rem; }
  .stats-band { padding: 16px 14px; }
  /* Steps: 2 per row */
  .how-steps-inner { gap: 4px; }
  .how-step { flex: 0 0 calc(50% - 4px); min-width: 0; padding: 10px 12px; }
  .how-step-title { font-size: .8rem; }
  .how-step-desc { font-size: .68rem; }
}
@media (max-width: 480px) {
  /* Gov bar: single line, compact */
  .gov-bar { padding: 5px 12px; font-size: .75rem; flex-wrap: wrap; gap: 4px; }
  .gov-bar-left { gap: 8px; }
  .gov-bar-flag { width: 20px; height: 14px; }
  /* Topbar: slim, logo only + action */
  .topbarInner { padding: 8px 12px; gap: 8px; }
  .nav-logo { gap: 8px; }
  .nav-logo-emblem { width: 36px; height: 36px; font-size: .78rem; border-radius: 8px; }
  .nav-logo-text strong { font-size: .9rem; }
  .nav-logo-text span { display: none; }
  /* Login/logout button: compact */
  .topActions a, .topActions button {
    padding: 7px 14px !important;
    font-size: 13px !important;
  }
  /* Steps band: compact 2×2 */
  .stats-band { padding: 12px 10px; }
  .how-step { flex: 0 0 calc(50% - 4px); padding: 8px 10px; gap: 10px; }
  .how-step-num { width: 30px; height: 30px; font-size: .85rem; }
  .how-step-title { font-size: .76rem; }
  .how-step-desc { font-size: .64rem; }
  /* Tab bar: smaller buttons */
  .tabBtn { padding: 7px 12px; font-size: 12px; }
  /* ISL float: full-width-ish on phone */
  #islFloat { width: 240px; height: 160px; }
  /* Wrap padding */
  .wrap { padding: 10px; }
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--saffron2));
  z-index: 1;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255,107,0,.12);
  border-color: rgba(255,107,0,.3);
}
.cardHead {
  padding: 12px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--off-white);
}
.cardHead b { font-size: 13px; font-weight: 700; color: var(--navy-dark); }
.cardBody { padding: 12px 16px; }

/* ── How-to Guide ───────────────────────────────────────────────────────────── */
#howToGuide {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
#howToGuide::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--navy-dark), var(--navy), var(--india-blue));
}

/* ── Layout helpers ─────────────────────────────────────────────────────────── */
.row { display: flex; gap: 10px; }
.textGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .textGrid { grid-template-columns: 1fr; } }

/* ── Status & result boxes ──────────────────────────────────────────────────── */
.statusBox {
  margin-top: 10px; padding: 10px 13px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--off-white); font-size: 12px; color: var(--text-mid);
}
.textResults { display: flex; flex-direction: column; gap: 10px; }
.resultItem {
  padding: 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--white);
}
.resultItem b { display: block; margin-bottom: 6px; color: var(--navy-dark); }
.resultText { font-size: 13px; color: var(--text-dark); line-height: 1.4; white-space: pre-wrap; }
.resultItem video { width: 100%; margin-top: 10px; border-radius: 10px; border: 1px solid var(--border); background: #000; }

/* ── Primary button ─────────────────────────────────────────────────────────── */
.btn {
  padding: 11px 18px;
  border-radius: var(--btnRadius);
  border: none;
  background: var(--btnGrad);
  color: var(--btnText);
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  box-shadow: var(--btnShadow);
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: .92; box-shadow: 0 10px 28px rgba(255,107,0,0.40); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.small { font-size: 12px; color: var(--text-soft); line-height: 1.4; }

/* ── Dialogues / segment list ───────────────────────────────────────────────── */
.dialogues { max-height: 520px; overflow: auto; padding: 6px 10px 14px; }
.segRow {
  padding: 10px; border-radius: 12px;
  border: 1.5px solid var(--border); margin-top: 10px;
  background: var(--white); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.segRow:hover { border-color: rgba(255,107,0,0.40); }
.segRow.active {
  border-color: var(--saffron);
  background: var(--saffron-light);
  box-shadow: 0 6px 20px rgba(255,107,0,0.14);
}
.segTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts { font-size: 12px; color: var(--text-soft); }
.segText { margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--text-dark); }
.mutedSmall { margin-top: 6px; font-size: 12px; color: var(--text-mid); }
.glossLine { margin-top: 8px; font-size: 12px; color: var(--text-soft); }
.glossValue { color: var(--text-dark); font-weight: 700; }
.glossTs { font-family: monospace; color: var(--accent, #e55b00); font-weight: 700; margin-right: 4px; }
.wTok { cursor: pointer; border-radius: 3px; padding: 0 2px; transition: background 0.1s; }
.wTok:hover { background: rgba(229,91,0,0.12); color: #c04a00; }
.wTok.wTokActive { background: rgba(229,91,0,0.2); color: #c04a00; font-weight: 700; }
.segWordTs { font-family: monospace; font-size: 11px; color: var(--accent, #e55b00); font-weight: 700; margin-right: 6px; }
.subWord { display: inline; }
.subWordActive { background: rgba(229,91,0,0.18); color: #b03a00; font-weight: 800; border-radius: 3px; padding: 0 2px; }
.glossChips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: flex-start; }
.glossChip {
  border-radius: 10px; padding: 5px 10px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent; display: inline-flex; flex-direction: column;
  align-items: center; vertical-align: top; line-height: 1.3;
}
.glossChip.good  { background: rgba(19,136,8,0.12);  color: #0a5e05; border-color: rgba(19,136,8,0.35); }
.glossChip.bad   { background: rgba(239,68,68,0.12);  color: #a12626; border-color: rgba(239,68,68,0.35); }
.glossChip.alpha { background: rgba(0,71,171,0.10);   color: #003580; border-color: rgba(0,71,171,0.30); font-style: italic; }
.glossChip.alpha .glossAlphaLetters { font-size: 9px; letter-spacing: 1.5px; color: var(--india-blue); margin-left: 4px; font-style: normal; }
.glossChip[data-preview="1"] { cursor: pointer; }
/* Semantic-replacement subscript: shows original English word below the ISL sign */
.glossSrc {
  font-size: 9px; font-weight: 400; font-style: italic;
  opacity: 0.65; line-height: 1; margin-top: 2px; color: inherit;
}
.glossSrc::before { content: "← "; }
.glossEditRow { display: flex; gap: 8px; margin-top: 10px; }
.glossInput { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--white); color: var(--text-dark); }
.miniBtn { padding: 10px 14px; border-radius: 10px; border: 1.5px solid rgba(255,107,0,0.28); background: var(--saffron-light); color: var(--navy-dark); font-weight: 700; cursor: pointer; transition: background .15s; }
.miniBtn:hover { background: rgba(255,107,0,0.18); }
.segPreview { margin-top: 10px; width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #000; }
.hoverPreview { position: fixed; z-index: 80; width: 180px; display: none; pointer-events: none; border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,53,128,0.18); box-shadow: 0 20px 50px rgba(0,0,0,0.28); background: #000; }
.hoverPreview video { width: 100%; display: block; }

/* ── Processing overlay ─────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(247,249,252,0.96); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 16px;
}
.overlay.show { display: flex; }
.ovBox {
  width: min(540px, 94vw);
  border-radius: 18px; border: 1.5px solid var(--border);
  background: var(--white);
  box-shadow: 0 24px 80px rgba(0,31,77,0.18); overflow: hidden;
}
.ovTop {
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  display: flex; gap: 14px; align-items: center;
}
/* Neural-network animation */
.nnSvg { width: 160px; height: 80px; flex-shrink: 0; display: block; }
@keyframes nnLine {
  0%,55%,100% { stroke: rgba(0,53,128,.10); stroke-width: .7; }
  10%,22%     { stroke: rgba(220,80,0,.95); stroke-width: 1.5; }
}
@keyframes nnNode {
  0%,55%,100% { fill: var(--white); stroke: rgba(0,53,128,.30); }
  10%,22%     { fill: rgba(220,80,0,.92); stroke: rgba(220,80,0,1); }
}
.nnL { animation: nnLine 2.2s ease-in-out infinite; fill: none; }
.nnN { animation: nnNode 2.2s ease-in-out infinite; }
.ovTitleArea { flex: 1; min-width: 0; }
.ovTitle { font-weight: 750; font-size: 15px; color: var(--navy-dark); }
.ovBody { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
/* Phase progress rows */
.ovPhaseRow { display: flex; flex-direction: column; gap: 5px; }
.ovPhaseLabel { display: flex; justify-content: space-between; align-items: center; }
.ovPhaseName { font-size: 12px; font-weight: 600; color: var(--text-soft); letter-spacing: .02em; }
.ovPhasePct  { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-soft); }
.bar { height: 8px; border-radius: 999px; background: var(--light-gray); overflow: hidden; border: 1px solid var(--border); }
.fill { height: 100%; width: 0%; background: var(--btnGrad); transition: width .4s ease; }
/* Pending phase — muted bar */
.ovPhaseRow.ov-pending .ovPhaseName,
.ovPhaseRow.ov-pending .ovPhasePct { color: var(--border); }
/* Active phase — vivid label, pulsing bar */
.ovPhaseRow.ov-active .ovPhaseName { color: var(--navy-dark); font-weight: 700; }
.ovPhaseRow.ov-active .ovPhasePct  { color: var(--navy); }
@keyframes barPulse {
  0%,100% { opacity: 1; } 50% { opacity: .65; }
}
.ovPhaseRow.ov-active .fill { animation: barPulse 1.4s ease-in-out infinite; }
/* Done phase — green bar + label */
.ovPhaseRow.ov-done .fill { background: #22c55e; animation: none; }
.ovPhaseRow.ov-done .ovPhaseName { color: #16a34a; }
.ovPhaseRow.ov-done .ovPhasePct  { color: #16a34a; }
.ovMsg { font-size: 12px; color: var(--text-soft); margin-top: 2px; min-height: 16px; }

/* ── Hidden double-buffer videos ────────────────────────────────────────────── */
#islA, #islB { display: none; }

/* ── Subtitle box ───────────────────────────────────────────────────────────── */
.subBox {
  margin-top: 10px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--white);
  box-shadow: 0 4px 14px rgba(0,53,128,0.06);
}
.subLabel { font-size: 11px; color: var(--text-soft); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.subText { font-size: 18px; line-height: 1.5; font-weight: 800; color: var(--navy-dark); min-height: 28px; user-select: text; }
.subTs { font-family: monospace; font-size: 13px; font-weight: 700; color: var(--accent, #e55b00); margin-right: 6px; }
.downloadBtn { white-space: nowrap; }

/* ── Suggestion chips ───────────────────────────────────────────────────────── */
.suggestionWrap { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.suggestionChip {
  border: 1.5px solid var(--border); background: var(--white); color: var(--text-dark);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,53,128,0.07); transition: all .18s;
  font-family: 'Poppins', sans-serif; font-weight: 500;
}
.suggestionChip:hover { transform: translateY(-1px); border-color: var(--saffron); color: var(--saffron); background: var(--saffron-light); }

/* ── Screen share stage ─────────────────────────────────────────────────────── */
#screenShareStage {
  position: relative; width: 100%; border-radius: 16px; overflow: hidden;
  background: #020a18; border: 1.5px solid var(--border);
  box-shadow: var(--shadow-card); min-height: 200px;
}
#screenShareVideo { width: 100%; display: block; min-height: 200px; object-fit: contain; background: #000; }

/* ── Splash screen ──────────────────────────────────────────────────────────── */
.splashScreen {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, #001843 0%, #003580 45%, #0047AB 75%, #00306B 100%);
  transition: opacity .45s ease, visibility .45s ease;
}
.splashScreen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splashCard {
  width: min(560px, 94vw);
  background: rgba(255,255,255,0.96);
  border: 1.5px solid rgba(255,107,0,0.22);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0,31,77,0.32);
  padding: 30px 28px;
  text-align: center; color: var(--text-dark);
  backdrop-filter: blur(20px);
}
.splashLogo { width: 88px; height: 88px; object-fit: contain; margin: 0 auto 14px; display: block; }
.splashTitle { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--navy-dark); font-family: 'Poppins', sans-serif; }
.splashText { margin: 10px 0 0; font-size: 14px; color: var(--text-mid); }
.splashLoader {
  margin: 20px auto 10px; width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid rgba(255,107,0,0.18); border-top-color: var(--saffron);
  animation: spinAnim 0.9s linear infinite;
}
.splashProgressWrap {
  width: 100%; height: 10px; border-radius: 999px; background: var(--light-gray);
  overflow: hidden; margin: 16px 0 8px; border: 1px solid var(--border);
}
.splashProgressBar {
  width: 0%; height: 100%; border-radius: 999px;
  background: var(--btnGrad); transition: width .18s ease;
}
.splashMeta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-mid); }
.splashLinkRow { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.splashLink, .splashSkip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 18px; border-radius: 10px;
  font-weight: 700; text-decoration: none; cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: transform .16s ease, box-shadow .16s ease;
}
.splashLink { color: #fff !important; background: var(--btnGrad); box-shadow: var(--btnShadow); }
.splashSkip { color: var(--navy-dark) !important; background: var(--off-white); border: 1.5px solid var(--border); }
.splashLink:hover, .splashSkip:hover { transform: translateY(-1px); }

/* ── Benchmarking ────────────────────────────────────────────────────────────── */
.bm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media(max-width:800px){ .bm-grid2 { grid-template-columns: 1fr; } }
.bm-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media(max-width:1000px){ .bm-grid3 { grid-template-columns: 1fr 1fr; } }
@media(max-width:600px){ .bm-grid3 { grid-template-columns: 1fr; } }
.bm-chip { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.bm-best { background: rgba(19,136,8,0.14); color: #0a5e05; }
.bm-ours { background: rgba(0,71,171,0.12); color: var(--navy); }
.bm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bm-table th { background: linear-gradient(135deg, var(--saffron), var(--saffron2)); color: #fff; padding: 8px 10px; text-align: center; font-weight: 700; }
.bm-table td { padding: 7px 10px; text-align: center; border-bottom: 1px solid rgba(0,0,0,0.06); }
.bm-table tr:last-child td { background: linear-gradient(135deg, rgba(255,107,0,0.07), rgba(255,140,42,0.05)); font-weight: 700; }
.bm-table tr:hover td { background: rgba(255,107,0,0.04); }
.bm-best-cell { color: #0a5e05; font-weight: 800; }
.bm-metric-card { text-align: center; padding: 12px 8px; }
.bm-metric-val { font-size: 2em; font-weight: 800; color: var(--saffron); line-height: 1.1; }
.bm-metric-lbl { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.bm-metric-sub { font-size: 11px; color: var(--navy); font-weight: 600; margin-top: 1px; }
.bm-section-title { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.bm-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.bm-chart-wrap { position: relative; width: 100%; }
.bm-export-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bm-run-btn { background: var(--btnGrad); color: #fff; border: none; border-radius: 10px; padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Poppins', sans-serif; transition: opacity .15s; }
.bm-run-btn:hover { opacity: 0.88; }
.bm-run-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.bm-status { font-size: 12px; color: var(--text-soft); margin-top: 6px; }
.bm-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.bm-cat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bm-cat-table th { background: var(--saffron-light); color: var(--saffron); padding: 6px 10px; text-align: left; font-weight: 700; }
.bm-cat-table td { padding: 5px 10px; border-bottom: 1px solid var(--border); }

/* ── Pose compare dropzone ───────────────────────────────────────────────────── */
.pc-dropzone {
  border: 2px dashed rgba(255,107,0,0.35); border-radius: 12px;
  padding: 28px 16px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  background: rgba(255,107,0,0.03);
}
.pc-dropzone:hover, .pc-dropzone.drag-over {
  border-color: var(--saffron); background: rgba(255,107,0,0.07);
}
.pc-dz-icon { font-size: 2em; margin-bottom: 6px; }
.pc-dz-label { font-size: 13px; font-weight: 600; color: var(--saffron); }
.pc-dz-sub { font-size: 11px; color: var(--text-soft); margin-top: 3px; }
.pc-file-name { font-size: 12px; color: var(--navy); font-weight: 600; margin-top: 8px; background: rgba(0,71,171,0.07); padding: 4px 10px; border-radius: 8px; }

/* ── Evaluation feedback form ────────────────────────────────────────────────── */
.fb-wrap { max-width: 780px; margin: 0 auto; }
.fb-hero { text-align: center; margin-bottom: 28px; }
.fb-hero h2 { font-size: 22px; font-weight: 800; color: var(--saffron); margin-bottom: 6px; font-family: 'Poppins', sans-serif; }
.fb-hero p  { font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.fb-section-title {
  font-size: 12px; font-weight: 700; color: var(--text-soft); text-transform: uppercase;
  letter-spacing: .06em; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px;
}
.fb-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.fb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:600px){ .fb-grid2 { grid-template-columns: 1fr; } }
.fb-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 2px; }
.fb-field label { font-size: 12px; font-weight: 700; color: var(--text-mid); }
.fb-field input, .fb-field select, .fb-field textarea {
  width: 100%; padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 13px; outline: none;
  background: var(--off-white); transition: border-color .15s; font-family: 'Poppins', sans-serif;
}
.fb-field input:focus, .fb-field select:focus, .fb-field textarea:focus {
  border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255,107,0,0.10);
}
.fb-field textarea { resize: vertical; min-height: 72px; }
.fb-q-card { background: var(--saffron-light); border: 1px solid rgba(255,107,0,0.18); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.fb-q-title { font-size: 13px; font-weight: 700; color: var(--navy-dark); margin-bottom: 4px; }
.fb-q-hint  { font-size: 11px; color: var(--saffron); margin-bottom: 10px; }
.fb-scale   { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fb-scale-label { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.fb-scale input[type=radio] { display: none; }
.fb-scale label.fb-scale-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(255,107,0,0.30);
  font-size: 13px; font-weight: 700; color: var(--saffron);
  cursor: pointer; transition: all .15s; background: #fff;
}
.fb-scale input[type=radio]:checked + label.fb-scale-btn {
  background: var(--btnGrad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(255,107,0,0.32);
}
.fb-scale label.fb-scale-btn:hover { border-color: var(--saffron); background: var(--saffron-light); }
.fb-radio-group { display: flex; flex-direction: column; gap: 6px; }
.fb-radio-opt  { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.fb-radio-opt input[type=radio] { accent-color: var(--saffron); width: 15px; height: 15px; }
.fb-radio-opt span { font-size: 13px; color: var(--text-mid); }
.fb-submit-btn {
  width: 100%; padding: 13px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--btnGrad); color: #fff;
  font-size: 15px; font-weight: 800; font-family: 'Poppins', sans-serif;
  box-shadow: var(--btnShadow); transition: opacity .15s, transform .15s; margin-top: 20px;
}
.fb-submit-btn:hover { opacity: .9; transform: translateY(-1px); }
.fb-submit-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.fb-status  { text-align: center; font-size: 13px; margin-top: 10px; min-height: 20px; }
.fb-success { color: var(--india-green); font-weight: 700; }
.fb-error   { color: #dc2626; font-weight: 700; }
.fb-req     { color: #dc2626; }
.fb-slider-wrap { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.fb-slider {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 160px;
  height: 7px; border-radius: 4px; outline: none; cursor: pointer; border: none;
  background: linear-gradient(to right, var(--saffron) 50%, var(--light-gray) 50%);
}
.fb-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--saffron); cursor: pointer; box-shadow: 0 2px 6px rgba(255,107,0,0.45); border: 2px solid #fff;
}
.fb-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--saffron);
  cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(255,107,0,0.45);
}
.fb-pct-badge {
  min-width: 54px; text-align: center; font-size: 16px; font-weight: 800;
  color: var(--saffron); background: var(--saffron-light); border: 1.5px solid rgba(255,107,0,0.25);
  border-radius: 8px; padding: 3px 10px; letter-spacing: 0.5px;
}
.fb-pct-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-soft); margin-top: 2px; }

/* ── Site footer ────────────────────────────────────────────────────────────── */
.siteFooter {
  padding: 18px 16px;
  border-top: 1px solid var(--border);
  background: var(--navy-dark); color: rgba(255,255,255,0.65);
  text-align: center; font-size: 13px;
  font-family: 'Poppins', sans-serif;
}
.siteFooter a { color: var(--saffron2); text-decoration: none; font-weight: 600; }
.siteFooter a:hover { text-decoration: underline; }
.siteFooter .footerLogos {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; margin-bottom: 10px; flex-wrap: wrap;
}
.siteFooter .footerLogos img { height: 28px; width: auto; opacity: 0.82; filter: brightness(1.1); }
.siteFooter .footerLogoGroup {
  display: flex; align-items: center; gap: 12px;
}
.siteFooter .footerLogoLabel {
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.88);
  white-space: nowrap;
}
.siteFooter .footerLogoDivider {
  width: 1px; height: 32px; background: rgba(255,255,255,.18);
}

/* ── Navbar brand ───────────────────────────────────────────────────────────── */
.ccvBrand { display: flex; align-items: center; gap: 8px; }
.ccvBrand img.ccvLogo { height: 36px; width: auto; }
.ccvBrandText { display: flex; flex-direction: column; }
.ccvBrandKicker { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); }
.ccvBrandTitle { font-size: 15px; font-weight: 900; color: var(--navy-dark); letter-spacing: -.02em; font-family: 'Poppins', sans-serif; }
.auroraOrb { display: none; }

/* ── History panel ──────────────────────────────────────────────────────────── */
#histBtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid rgba(255,107,0,0.30);
  background: var(--white);
  font-size: 14px; font-weight: 700; color: var(--saffron);
  font-family: 'Poppins', sans-serif;
  cursor: pointer; box-shadow: 0 2px 10px rgba(255,107,0,0.12);
  transition: box-shadow .15s, transform .15s; white-space: nowrap;
}
#histBtn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,107,0,0.22); }
#histBtn.active { background: var(--btnGrad); color: #fff; border-color: transparent; }

#historyPanel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 900;
  width: 360px; max-width: 95vw;
  background: var(--white); border-left: 1.5px solid var(--border);
  box-shadow: -8px 0 40px rgba(0,31,77,0.14);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1); overflow: hidden;
}
#historyPanel.open { transform: translateX(0); }
#historyPanel .histHeader {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
}
#historyPanel .histHeader h3 { font-size: 15px; font-weight: 800; color: #fff; font-family: 'Poppins', sans-serif; margin: 0; }
#histCloseBtn { background: rgba(255,255,255,0.12); border: none; cursor: pointer; color: rgba(255,255,255,0.8); font-size: 18px; line-height: 1; padding: 5px 8px; border-radius: 8px; transition: background .15s; }
#histCloseBtn:hover { background: rgba(255,255,255,0.22); color: #fff; }

#historyList { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
#historyList::-webkit-scrollbar { width: 5px; }
#historyList::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 6px; }

.hist-empty { text-align: center; color: var(--text-soft); font-size: 13px; padding: 32px 16px; }
.hist-item {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 14px; cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.hist-item:hover { border-color: var(--saffron); box-shadow: 0 4px 16px rgba(255,107,0,0.14); transform: translateY(-1px); }
.hist-item.hist-active { border-color: var(--saffron); box-shadow: 0 6px 22px rgba(255,107,0,0.20); }
.hist-thumb { width: 100%; border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; background: var(--light-gray); display: block; margin-bottom: 8px; }
.hist-meta { font-size: 12px; color: var(--text-mid); line-height: 1.5; }
.hist-meta .hist-preview { font-size: 13px; font-weight: 700; color: var(--navy-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.hist-meta .hist-stats { color: var(--text-soft); font-size: 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-meta .hist-stats span { display: inline-flex; align-items: center; gap: 3px; }
.hist-badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--saffron-light); color: var(--saffron); margin-left: auto; letter-spacing: .04em; }

/* ── Per-segment download button ─────────────────────────────────────────────── */
.seg-dl-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  padding: 4px 12px; border-radius: 999px; border: 1.5px solid rgba(255,107,0,0.30);
  background: var(--saffron-light); color: var(--saffron);
  font-size: 11px; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.seg-dl-btn:hover { background: rgba(255,107,0,0.18); box-shadow: 0 2px 8px rgba(255,107,0,0.18); }

/* ── Merged ISL download section ─────────────────────────────────────────────── */
#mergeSection {
  margin-top: 14px; padding: 14px 16px;
  border: 1.5px solid rgba(255,107,0,0.20); border-radius: 14px;
  background: linear-gradient(180deg, var(--white), var(--saffron-light)); display: none;
}
#mergeSection.visible { display: block; }
#mergeSection h4 { font-size: 13px; font-weight: 800; color: var(--navy-dark); margin: 0 0 10px; font-family: 'Poppins', sans-serif; }
#dlMergedBtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px;
  border-radius: 999px; background: var(--btnGrad); color: #fff; border: none;
  cursor: pointer; font-size: 13px; font-weight: 700; font-family: 'Poppins', sans-serif;
  box-shadow: var(--btnShadow); transition: opacity .15s, transform .15s;
}
#dlMergedBtn:hover { opacity: .9; transform: translateY(-1px); }
#dlMergedBtn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
#dlMergedStatus { font-size: 12px; color: var(--text-soft); margin-top: 8px; min-height: 16px; }
#dlMergedLink {
  display: none; margin-top: 8px; padding: 8px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--india-green), #1AAD0E);
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 18px rgba(19,136,8,0.28); transition: opacity .15s;
  align-items: center; gap: 6px;
}
#dlMergedLink.ready { display: inline-flex; }
#dlMergedLink:hover { opacity: .9; }

/* ── History backdrop ────────────────────────────────────────────────────────── */
#histBackdrop { display: none; position: fixed; inset: 0; z-index: 899; background: rgba(0,31,77,0.35); }
#histBackdrop.open { display: block; }

/* ── Readable text overrides ─────────────────────────────────────────────────── */
body, .card, .ovBox, .resultItem, .statusBox, .playerCard,
.playerHeader .h b, .playerHeader .h span, #mainSubtitle, #langInfo,
#pillText, #selectedAvatarLabel, #selectedOriginalLabel,
#vocabSearchStatus, #compareSearchStatus, #textToIslStatus, #speechStatus,
#ovStage, #ovMsg, .ovPhaseName, .ovPhasePct,
.ovTitle, .ovTop, .ovBody {
  color: var(--text-dark);
}
.small, .muted, .playerHeader .h span, #langInfo, #ovHint { color: var(--text-soft); }
