/* voclynx — brand system
   bone #FAF8F5 · espresso #2D2016 · coral #E8601C · teal #0F766E
   Poppins headlines · Roboto body */

:root {
  --bone: #FAF8F5;
  --bone-deep: #F3EEE7;
  --espresso: #2D2016;
  --espresso-soft: #4A382A;
  --ink-soft: #6B5D4F;
  --coral: #E8601C;
  --coral-dark: #C74E12;
  --teal: #0F766E;
  --teal-dark: #0B5A55;
  --card: #FFFFFF;
  --line: #E9DFD1;
  --amber: #B45309;
  --amber-bg: #FEF3E2;
  --green-bg: #E6F4F2;
  --red: #B91C1C;
  --red-bg: #FDECEC;
  --radius: 16px;
  --shadow: 0 2px 14px rgba(45, 32, 22, 0.07);
  --shadow-lg: 0 12px 40px rgba(45, 32, 22, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background: var(--bone);
  color: var(--espresso);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-head {
  font-family: 'Poppins', 'Roboto', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }

::selection { background: var(--coral); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  background: var(--coral);
  color: #fff;
  border: 2px solid var(--coral);
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--coral-dark); border-color: var(--coral-dark); text-decoration: none; color: #fff; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.btn-outline { background: transparent; color: var(--espresso); border-color: var(--espresso); }
.btn-outline:hover { background: var(--espresso); color: var(--bone); border-color: var(--espresso); }
.btn-teal { background: var(--teal); border-color: var(--teal); }
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--coral); border-color: transparent; }
.btn-ghost:hover { background: rgba(232, 96, 28, 0.1); color: var(--coral-dark); border-color: transparent; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.wordmark {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.65rem;
  color: var(--espresso); letter-spacing: -0.02em;
}
.wordmark:hover { text-decoration: none; }
.wordmark .dot { color: var(--coral); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.nav-link { color: var(--espresso-soft); font-weight: 500; font-size: 0.98rem; }
.nav-links a.nav-link:hover { color: var(--coral); text-decoration: none; }
@media (max-width: 760px) {
  .nav-links a.nav-link { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-block;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); background: var(--green-bg);
  padding: 0.4rem 0.9rem; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.1rem); font-weight: 800; margin-bottom: 20px; }
.hero h1 .accent { color: var(--coral); }
.hero .sub { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.proof-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.proof-stats .stat b {
  display: block; font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 700; color: var(--coral);
}
.proof-stats .stat span { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- lead form card ---------- */
.lead-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 34px; box-shadow: var(--shadow-lg);
}
.lead-card h3 { font-size: 1.45rem; margin-bottom: 6px; }
.lead-card p.lead-sub { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 22px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 500; font-size: 0.92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 0.75rem 1rem; border: 2px solid var(--line); border-radius: 12px;
  background: var(--bone); color: var(--espresso);
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--coral); background: #fff;
}
.field .hint { font-size: 0.84rem; color: var(--ink-soft); margin-top: 4px; }
.form-error {
  display: none; background: var(--red-bg); color: var(--red);
  border-radius: 10px; padding: 0.7rem 1rem; margin-bottom: 14px; font-size: 0.94rem;
}
.form-error.show { display: block; }
.fineprint { font-size: 0.84rem; color: var(--ink-soft); margin-top: 14px; text-align: center; }

/* ---------- benefit blocks ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.benefit {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 30px; box-shadow: var(--shadow); text-align: left;
}
.benefit .icon {
  width: 58px; height: 58px; border-radius: 16px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232, 96, 28, 0.12); color: var(--coral);
}
.benefit .icon svg { width: 30px; height: 30px; }
.benefit h3 { font-size: 1.25rem; margin-bottom: 10px; }
.benefit p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 860px) { .benefits { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 28px; box-shadow: var(--shadow);
}
.step .num {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 0.95rem;
  color: #fff; background: var(--teal);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- testimonial ---------- */
.testimonial { background: var(--espresso); color: var(--bone); border-radius: 24px; padding: 64px 56px; text-align: center; }
.testimonial blockquote {
  font-family: 'Poppins', sans-serif; font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500; line-height: 1.45; max-width: 46rem; margin: 0 auto 26px;
}
.testimonial blockquote::before { content: "“"; color: var(--coral); }
.testimonial blockquote::after { content: "”"; color: var(--coral); }
.testimonial cite { font-style: normal; color: #CBB9A6; }
.testimonial cite b { color: var(--bone); }
@media (max-width: 640px) { .testimonial { padding: 44px 28px; } }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 38px 32px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; position: relative;
}
.price-card.popular { border: 2.5px solid var(--coral); box-shadow: var(--shadow-lg); }
.price-card .flag {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  background: var(--coral); color: #fff; font-family: 'Poppins', sans-serif;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 1rem; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 1.35rem; margin-bottom: 6px; }
.price-card .price { font-family: 'Poppins', sans-serif; font-size: 2.6rem; font-weight: 800; margin: 10px 0 2px; }
.price-card .price small { font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.price-card .per { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; }
.price-card ul { list-style: none; margin-bottom: 28px; flex: 1; }
.price-card ul li { padding: 7px 0 7px 30px; position: relative; color: var(--espresso-soft); }
.price-card ul li::before {
  content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 20px 24px; font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 1.05rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--coral); font-size: 1.5rem; font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- CTA band + footer ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  color: #fff; border-radius: 24px; padding: 64px 48px; text-align: center;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.cta-band p { opacity: 0.92; margin-bottom: 28px; font-size: 1.1rem; }
.cta-band .btn { background: #fff; border-color: #fff; color: var(--coral-dark); }
.cta-band .btn:hover { background: var(--bone); border-color: var(--bone); color: var(--coral-dark); }
footer { border-top: 1px solid var(--line); padding: 48px 0 36px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-grid .tag { color: var(--ink-soft); font-size: 0.95rem; margin-top: 8px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; align-content: flex-start; }
.footer-links a { color: var(--espresso-soft); font-size: 0.95rem; }
.copyright { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.87rem; }

/* ---------- auth pages ---------- */
.auth-wrap { max-width: 520px; margin: 0 auto; padding: 64px 24px 96px; }
.auth-wrap .lead-card h2 { margin-bottom: 6px; }

/* ---------- console shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  background: var(--espresso); color: var(--bone); padding: 28px 20px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.side .wordmark { color: var(--bone); font-size: 1.5rem; margin-bottom: 4px; padding: 0 10px; }
.side .org-name { color: #CBB9A6; font-size: 0.88rem; padding: 0 10px; margin-bottom: 22px; }
.side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side nav a {
  color: #E8DCCB; padding: 11px 14px; border-radius: 10px; font-weight: 500; font-size: 0.98rem;
  display: flex; align-items: center; gap: 10px;
}
.side nav a:hover { background: rgba(255,255,255,0.07); text-decoration: none; color: #fff; }
.side nav a.active { background: var(--coral); color: #fff; }
.side .logout { color: #E8DCCB; background: none; border: none; font: inherit; text-align: left;
  padding: 11px 14px; border-radius: 10px; cursor: pointer; font-size: 0.98rem; }
.side .logout:hover { background: rgba(255,255,255,0.07); color: #fff; }
.main { padding: 40px 44px; max-width: 1060px; }
.main h1 { font-size: 2rem; margin-bottom: 6px; }
.main .page-sub { color: var(--ink-soft); margin-bottom: 28px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 18px 14px; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav a { white-space: nowrap; }
  .side .org-name { margin-bottom: 12px; }
  .main { padding: 28px 20px; }
}

/* ---------- dashboard cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-bottom: 28px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.12rem; margin-bottom: 14px; }
.plan-name { font-family: 'Poppins', sans-serif; font-size: 1.7rem; font-weight: 700; }
.pill {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.28rem 0.8rem; border-radius: 999px; margin-left: 10px;
  vertical-align: middle;
}
.pill.trialing { background: var(--green-bg); color: var(--teal-dark); }
.pill.active { background: var(--green-bg); color: var(--teal-dark); }
.pill.past_due { background: var(--amber-bg); color: var(--amber); }
.pill.canceled { background: #F1ECE4; color: var(--ink-soft); }
.pill.paid { background: var(--green-bg); color: var(--teal-dark); }
.pill.open { background: var(--amber-bg); color: var(--amber); }
.progress { height: 12px; background: var(--bone-deep); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.progress .bar { height: 100%; background: var(--coral); border-radius: 999px; transition: width 0.4s ease; }
.progress .bar.over { background: var(--red); }
.minutes-line { display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--ink-soft); }
.minutes-line b { color: var(--espresso); }
.meta-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.meta-row:last-child { border-bottom: none; }
.meta-row .k { color: var(--ink-soft); }
.call-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem;
}
.call-row:last-child { border-bottom: none; }
.call-row .peer { font-weight: 600; font-family: 'Poppins', sans-serif; font-size: 0.95rem; }
.call-row .detail { color: var(--ink-soft); font-size: 0.88rem; }
.empty { color: var(--ink-soft); padding: 18px 0; text-align: center; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; font-family: 'Poppins', sans-serif; font-size: 0.82rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-soft); padding: 14px 18px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FDFBF8; }
tr.clickable { cursor: pointer; }

/* ---------- directory / call screen ---------- */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 8px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.contact-card .avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.contact-card .c-name { font-weight: 600; font-family: 'Poppins', sans-serif; }
.contact-card .c-id { color: var(--teal-dark); font-size: 0.88rem; margin-bottom: 4px; }
.contact-card .c-lang { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 14px; }

.call-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(45, 32, 22, 0.96); color: var(--bone);
  flex-direction: column; align-items: center; padding: 40px 24px;
  min-height: 100vh; min-height: 100dvh; /* dynamic viewport height on mobile */
  padding-top: max(40px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  overscroll-behavior: contain;
}
.call-overlay.show { display: flex; }
/* Touch-friendly controls: no double-tap zoom delay on phones/tablets. */
.call-overlay button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.call-overlay .peer-id { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 700; }
.call-overlay .call-state { color: var(--coral); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; margin: 6px 0 4px; }
.call-overlay .call-mode { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); background: rgba(15,118,110,0.12); border: 1px solid rgba(15,118,110,0.35); border-radius: 999px; padding: 4px 12px; margin: 8px 0 2px; }
.call-overlay .call-timer { font-family: 'Poppins', sans-serif; font-size: 1.1rem; color: #CBB9A6; margin-bottom: 24px; }
.caption-box {
  width: min(680px, 100%); height: 300px; overflow-y: auto;
  background: #1E150E; border: 1px solid #4A382A; border-radius: var(--radius);
  padding: 24px; font-size: 1.25rem; line-height: 1.8; margin-bottom: 28px;
}
.caption-box .cap-line { margin-bottom: 12px; animation: capIn 0.3s ease; }
.caption-box .cap-line .who { color: var(--coral); font-weight: 600; font-size: 0.85rem; display: block; letter-spacing: 0.04em; }
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.call-controls { display: flex; gap: 16px; }
.btn-end { background: var(--red); border-color: var(--red); }
.btn-end:hover { background: #991515; border-color: #991515; }

/* ---------- modal ---------- */
.modal-back {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(45, 32, 22, 0.55); align-items: center; justify-content: center; padding: 24px;
}
.modal-back.show { display: flex; }
.modal {
  background: var(--card); border-radius: 20px; max-width: 620px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 34px; box-shadow: var(--shadow-lg);
  position: relative;
}
.modal .close-x {
  position: absolute; top: 16px; right: 18px; background: none; border: none;
  font-size: 1.6rem; cursor: pointer; color: var(--ink-soft); line-height: 1;
}
.modal h3 { margin-bottom: 14px; padding-right: 30px; }
.transcript { background: var(--bone); border: 1px solid var(--line); border-radius: 12px; padding: 20px; font-size: 1.02rem; line-height: 1.75; }

/* ---------- admin ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.metric .m-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; }
.metric .m-value { font-family: 'Poppins', sans-serif; font-size: 1.9rem; font-weight: 700; }
.metric .m-value.coral { color: var(--coral); }
.metric .m-value.teal { color: var(--teal); }
.metric .m-value.amber { color: var(--amber); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--espresso); color: var(--bone); padding: 0.85rem 1.6rem; border-radius: 999px;
  font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 120;
  box-shadow: var(--shadow-lg); max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 180px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.mt { margin-top: 24px; }
.mock-note {
  background: var(--amber-bg); border: 1px solid #F0DDBE; color: #7A4A0A;
  border-radius: 12px; padding: 14px 18px; font-size: 0.92rem; margin-bottom: 22px;
}

/* ---- Sign language avatar panel + call display settings ---- */
.call-visual { display: flex; gap: 20px; align-items: stretch; width: min(1060px, 100%); margin-bottom: 28px; }
.call-visual .caption-box { margin-bottom: 0; flex: 1 1 auto; }
/* Pinned bottom-right on laptop and phone; hidden entirely in the hearing view. */
.signer-panel {
  position: fixed; z-index: 60;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: 300px; background: #1E150E; border: 1px solid #4A382A;
  border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.signer-panel .signer-label {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); font-weight: 700; margin-bottom: 8px;
}
.signer-panel canvas { width: 100%; height: auto; border-radius: 8px; background: #FAF8F5; }
.signer-status { margin-top: 8px; font-size: 0.8rem; color: #CBB9A6; min-height: 1.2em; text-align: center; }
.caption-box .cap-line.interim { opacity: 0.55; font-style: italic; }
.mic-status { font-size: 0.82rem; color: #CBB9A6; min-height: 1.2em; margin: 2px 0 4px; }

/* ---- Explicit camera/mic permission gate (call overlay) ---- */
.permission-gate {
  width: min(560px, 100%); background: #1E150E; border: 1px solid #4A382A;
  border-radius: var(--radius); padding: 16px 18px; margin: 8px 0 4px; text-align: left;
}
.permission-gate .pg-title {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 6px;
}
.permission-gate .pg-help {
  font-size: 0.85rem; color: #CBB9A6; line-height: 1.55; margin: 0 0 12px;
}
.permission-gate .pg-actions { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.permission-gate .pg-actions .btn { min-height: 44px; } /* phone tap target */
.permission-gate .pg-status { display: flex; flex-direction: column; gap: 6px; }
.permission-gate .pg-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.82rem; color: #CBB9A6; min-height: 1.4em;
}

/* ---- Local camera preview tile (permission-gate camera path) ---- */
#co-self-tile { display: none; }
#co-self-tile video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--radius); background: #000;
}
.reply-form { display: flex; gap: 10px; width: min(680px, 100%); margin-bottom: 20px; }
.reply-form input {
  flex: 1; background: #1E150E; border: 1px solid #4A382A; border-radius: 999px;
  color: var(--bone); padding: 10px 18px; font: inherit;
}
.reply-form input::placeholder { color: #8A7A68; }
.hearing-panel {
  flex: 1 1 auto; width: min(680px, 100%); background: #1E150E; border: 1px solid #4A382A;
  border-radius: var(--radius); padding: 28px; font-size: 1.05rem; line-height: 1.7; color: #EDE4D6;
}
.hearing-panel .hearing-title {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); font-weight: 700; margin-bottom: 10px;
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button {
  border: 0; background: transparent; padding: 8px 16px; font: inherit; font-size: 0.88rem;
  cursor: pointer; color: var(--ink-soft);
}
.seg button[aria-pressed="true"] { background: var(--espresso); color: var(--bone); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink-soft); cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--teal); }
@media (max-width: 900px) {
  .call-visual { flex-direction: column; }
  .signer-panel {
    width: 168px; padding: 8px;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .signer-panel canvas { max-width: 100%; }
  .video-grid { width: 100%; flex-direction: row; }
  .video-tile { flex: 1 1 0; }
  .permission-gate { padding: 12px 14px; }
  .reply-form { flex-wrap: wrap; }
  .reply-form input { min-height: 44px; } /* comfortable tap target on phones */
}

/* ---- Video tiles + in-call device bar ---- */
.video-grid { width: 280px; flex: none; display: flex; flex-direction: column; gap: 12px; }
.video-tile {
  position: relative; aspect-ratio: 16 / 9; background: #14100B;
  border: 1px solid #4A382A; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.video-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile-placeholder { color: #CBB9A6; font-size: 0.85rem; text-align: center; padding: 0 12px; }
.tile-label {
  position: absolute; left: 8px; bottom: 6px; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.05em; background: rgba(20, 16, 11, 0.7); padding: 2px 8px;
  border-radius: 999px; color: var(--bone);
}
.device-bar {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 20px; font-size: 0.85rem; color: #CBB9A6;
}
.device-bar label { display: flex; flex-direction: column; gap: 4px; }
.device-bar select {
  background: #1E150E; color: var(--bone); border: 1px solid #4A382A;
  border-radius: 8px; padding: 6px 10px; font-size: 0.85rem; max-width: 190px;
}
.device-bar select:disabled { opacity: 0.55; }
