/* ShqipTV design system
   Palette: Albanian flag red on warm black. One accent, used for actions only.
   Type: Bricolage Grotesque (brand, headlines), Inter (UI). */
:root {
  --bg: #0d0a0b;
  --bg-2: #15100f;
  --bg-3: #1f1818;
  --bg-4: #2a2121;
  --border: #2c2324;
  --border-2: #3d3132;
  --text: #f7f2f1;
  --text-2: #d9d0cf;
  --muted: #9d9192;
  --red: #e0202b;
  --red-2: #f0333e;
  --red-soft: rgba(224, 32, 43, 0.14);
  --green: #35c777;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font-ui);
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; }
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- icons ---------- */
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -5px; }
.ic-lg { width: 24px; height: 24px; }
.ic-xl { width: 32px; height: 32px; }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 10, 11, 0.86);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; }
.brand b { color: var(--red); font-weight: 800; }
.topbar nav { display: flex; align-items: center; gap: 10px; }
.online-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--bg-3); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.online-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(53, 199, 119, 0.2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--border-2);
  background: var(--bg-3); color: var(--text);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s, transform 0.08s;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--bg-4); border-color: #4a3c3d; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .ic { width: 18px; height: 18px; vertical-align: middle; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-2); border-color: var(--red-2); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-3); border-color: transparent; }
.btn-lg { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-provider { background: #fff; color: #111; border-color: #fff; }
.btn-provider:hover { background: #ececec; border-color: #ececec; }
.btn-provider svg { width: 18px; height: 18px; }
.btn-icon { padding: 11px; }

/* ---------- forms ---------- */
.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 30px; box-shadow: var(--shadow);
}
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: var(--bg); color: var(--text);
  font-size: 16px; /* 16px stops iOS Safari from zooming on focus */
  font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: #6a5557; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05); }
.input.error { border-color: var(--red); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239d9192' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hint.ok { color: var(--green); }
.hint.err { color: var(--red-2); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.providers { display: grid; gap: 10px; }
.providers:empty, .providers.hidden { display: none; }
.form-footer { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }
.form-footer a { color: var(--text); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.45; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--red); flex: none; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: var(--red-soft); border-color: rgba(224, 32, 43, 0.45); color: #ffb9bd; }
.alert-ok { background: rgba(53, 199, 119, 0.12); border-color: rgba(53, 199, 119, 0.4); color: #a9f0c9; }
.alert:empty { display: none; }

/* choice tiles (onboarding) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 10px 14px; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--bg);
  font-weight: 600; font-size: 14px; text-align: center; color: var(--text-2);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice .ico { display: flex; align-items: center; justify-content: center; height: 32px; color: var(--muted); }
.choice .ico .ic { width: 28px; height: 28px; }
.choice input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--text); }
.choice input:checked + span .ico { color: var(--red-2); }
.choice input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--bg-3); border: 1px solid var(--border-2); color: var(--text); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); animation: toast-in 0.2s ease; }
.toast.err { border-color: rgba(224, 32, 43, 0.6); }
.toast.ok { border-color: rgba(53, 199, 119, 0.6); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- landing ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding: 72px 0 56px;
}
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); margin: 0 0 20px; line-height: 1.02; }
.hero p { color: var(--text-2); font-size: 18px; max-width: 520px; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .country-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-top: 22px; }
.hero .country-row .flag-img { width: 24px; margin: 0; }
.hero .country-row .flag-img + .flag-img { margin-left: -6px; }

/* Preview: a sketch of an actual chat, built with CSS only. */
.preview { position: relative; }
.preview .tiles { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-2); }
.tile.a { background: radial-gradient(120% 90% at 30% 20%, #5a3a3d, #1b1416 70%); }
.tile.b { background: radial-gradient(120% 90% at 70% 25%, #3b4a63, #141518 70%); }
.tile .person { position: absolute; left: 50%; bottom: -8%; width: 70%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50% 50% 40% 40%; background: rgba(255, 255, 255, 0.07); }
.tile .person::before { content: ''; position: absolute; left: 50%; top: -30%; width: 46%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: rgba(255, 255, 255, 0.09); }
.tile .chip { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); font-size: 13px; font-weight: 600; }
.tile .chip .flag-img { width: 18px; margin: 0; }
.tile .dot { position: absolute; right: 12px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(224, 32, 43, 0.25); }
.preview .bubble {
  position: absolute; left: 6%; bottom: 8%; max-width: 60%;
  background: #fff; color: #111; padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
}
.preview .bubble.reply { left: auto; right: 6%; bottom: 22%; background: var(--red); color: #fff; border-radius: 16px 16px 4px 16px; }
.preview .bar { margin-top: 10px; display: flex; gap: 8px; }
.preview .bar span { flex: 1; height: 42px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.preview .bar span.accent { background: var(--red); border-color: var(--red); color: #fff; }

.section { padding: 40px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: 28px; margin: 0 0 24px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; margin: 0; padding: 0; list-style: none; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft); color: var(--red-2); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature .ico .ic { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 64px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 0 0 4px; font-size: 16px; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.closing { padding: 56px 0 72px; text-align: center; border-top: 1px solid var(--border); }
.closing h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 20px; }

footer.site { border-top: 1px solid var(--border); padding: 24px 20px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto; }
footer.site nav { display: flex; gap: 18px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }

/* ---------- legal / simple pages ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 48px 20px 90px; }
.prose h1 { font-size: 36px; margin: 0 0 16px; }
.prose h2 { font-size: 20px; margin-top: 30px; }
.prose p, .prose li { color: var(--text-2); }
.empty-state { text-align: center; }
.empty-state .ico { width: 64px; height: 64px; border-radius: 20px; background: var(--red-soft); color: var(--red-2); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.empty-state .ico .ic { width: 30px; height: 30px; }

/* ---------- chat ---------- */
body.chat-page { overflow: hidden; }
.chat-layout {
  display: grid; grid-template-columns: 1fr 340px;
  height: calc(100vh - 64px); height: calc(100dvh - 64px);
}
.stage { display: flex; flex-direction: column; min-width: 0; background: #000; }
.video-area { position: relative; flex: 1; min-height: 0; background: radial-gradient(900px 500px at 50% 30%, #241a1b, #000); overflow: hidden; }
.video-area video.remote { width: 100%; height: 100%; object-fit: cover; background: #000; }
.video-area video.remote.hidden { visibility: hidden; }
.local-preview {
  position: absolute; right: 16px; top: 16px; width: 180px; aspect-ratio: 4 / 3;
  border-radius: 14px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.22);
  background: #111; box-shadow: var(--shadow); z-index: 3;
}
.local-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.partner-badge {
  position: absolute; left: 16px; top: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px);
  font-weight: 600; font-size: 14px;
}
.partner-badge:empty { display: none; }
.status-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 20px; pointer-events: none;
}
.status-overlay h2 { margin: 0; font-size: 26px; }
.status-overlay p { margin: 0; color: var(--muted); max-width: 400px; font-size: 15px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.12); border-top-color: var(--red); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.controls {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--bg-2); border-top: 1px solid var(--border); flex-wrap: wrap;
}
.controls .btn-main { min-width: 140px; }
.controls .spacer { flex: 1; }
.controls label { color: var(--muted); font-size: 13px; font-weight: 600; }
.controls select.input { width: auto; padding: 10px 34px 10px 12px; font-size: 14px; }
.kbd { font-size: 11px; opacity: 0.7; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 4px; padding: 0 5px; margin-left: 2px; font-family: var(--font-ui); }

.chat-panel { display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-2); min-height: 0; }
.chat-panel header { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; font-size: 14px; word-wrap: break-word; white-space: pre-wrap; line-height: 1.4; }
.msg.me { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--bg-4); border-bottom-left-radius: 4px; }
.msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: 12px; padding: 2px 8px; text-align: center; }
.typing { font-size: 12px; color: var(--muted); padding: 0 16px 6px; height: 22px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-form .input { flex: 1; }

/* report modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 400px; }
.modal h3 { margin: 0 0 8px; font-size: 22px; }
.modal .list { display: grid; gap: 8px; margin: 16px 0 8px; }
.modal .list .btn { justify-content: flex-start; padding: 13px 14px; }
.modal .list .btn .ic { color: var(--muted); }

/* user menu */
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 30; }
.menu.open .menu-list { display: block; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; background: none; border: 0; color: var(--text); font-size: 14px; cursor: pointer; text-decoration: none; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg-3); }
.menu-list .ic { color: var(--muted); width: 18px; height: 18px; }
.menu-list .me { color: var(--muted); font-size: 12px; padding: 8px 12px 6px; word-break: break-all; }

.flag-img { display: inline-block; width: 22px; height: auto; border-radius: 3px; vertical-align: -3px; margin-right: 6px; }
.choice .ico .flag-img { width: 34px; margin: 0; border-radius: 4px; }
.partner-badge .flag-img { width: 22px; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .toast { animation: none; }
  .btn { transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 40px; }
  .preview { max-width: 460px; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}

/* ---------- mobile ---------- */
@media (max-width: 480px) {
  .topbar { padding: 0 14px; height: 60px; }
  .topbar nav { gap: 6px; flex: none; }
  .topbar nav .btn { padding: 8px 10px; font-size: 14px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand .logo { width: 28px; height: 28px; border-radius: 8px; }
  .online-pill { font-size: 12px; padding: 5px 9px; }
  .menu #menuBtn > span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
  .menu #menuBtn .flag-img { margin-right: 2px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .hero .cta .btn { width: 100%; }
  .features { grid-template-columns: 1fr; gap: 22px; }
  .section h2 { font-size: 24px; }
  .card { padding: 24px 18px; }
  .auth-wrap { padding: 20px 12px; align-items: flex-start; min-height: calc(100vh - 60px); }
  footer.site { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 400px) {
  .menu #menuBtn > span { display: none; }
}

@media (max-width: 860px) {
  .hide-mobile { display: none !important; }

  /* Chat: full-screen video, everything else floats on top of it. */
  body.chat-page .topbar { height: 52px; }
  .chat-layout {
    display: block; position: relative;
    height: calc(100vh - 52px); height: calc(100dvh - 52px);
  }
  .stage { position: absolute; inset: 0; display: block; }
  .video-area { position: absolute; inset: 0; }
  .local-preview { width: 96px; right: 10px; top: 10px; border-radius: 10px; }
  .partner-badge { top: 10px; left: 10px; font-size: 13px; padding: 6px 12px 6px 8px; }
  .status-overlay { padding: 20px 20px 160px; }
  .status-overlay h2 { font-size: 22px; }
  .status-overlay p { font-size: 14px; }

  .controls {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
    flex-wrap: nowrap; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.6));
    border-top: 0;
  }
  .controls .btn { padding: 12px 12px; font-size: 15px; min-height: 46px; }
  .controls .btn-main { min-width: 0; flex: 1; }
  .controls .spacer, .controls label { display: none; }
  .controls .kbd { display: none; }
  .controls select.input { padding: 10px 30px 10px 10px; font-size: 14px; min-height: 46px; max-width: 120px; }
  .controls .btn-report .label { display: none; }

  .chat-panel {
    position: absolute; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 5;
    max-height: 45%; height: auto; background: transparent; border: 0;
    pointer-events: none;
  }
  .chat-panel header { display: none; }
  .messages {
    pointer-events: auto; padding: 10px 10px 4px; gap: 6px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%);
  }
  .msg { font-size: 14px; }
  .msg.them { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(4px); }
  .msg.me { background: rgba(224, 32, 43, 0.92); }
  .msg.sys { color: #ddd; text-shadow: 0 1px 2px #000; }
  .typing { text-shadow: 0 1px 2px #000; color: #ccc; padding: 0 12px 2px; height: 20px; }
  .chat-form { pointer-events: auto; background: transparent; border: 0; padding: 6px 10px 8px; }
  .chat-form:has(.input:disabled) { display: none; }
  .chat-form .input { background: rgba(0, 0, 0, 0.58); border-color: rgba(255, 255, 255, 0.2); backdrop-filter: blur(4px); }
  .chat-form .btn { padding: 11px 14px; }
}

/* Landscape phones: keep controls compact so the video stays visible. */
@media (max-width: 860px) and (max-height: 450px) {
  body.chat-page .topbar { height: 40px; }
  .chat-layout { height: calc(100vh - 40px); height: calc(100dvh - 40px); }
  .controls { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 6px; }
  .controls .btn { min-height: 36px; padding: 6px 10px; font-size: 13px; }
  .controls select.input { min-height: 36px; padding: 6px 26px 6px 8px; font-size: 13px; }
  .chat-panel { bottom: calc(48px + env(safe-area-inset-bottom)); max-height: 50%; }
  .messages { padding: 4px 8px 2px; gap: 4px; }
  .msg { font-size: 13px; padding: 5px 10px; }
  .msg.sys { display: none; }
  .typing { height: 16px; font-size: 11px; }
  .chat-form { padding: 2px 8px 4px; }
  .chat-form .input { padding: 7px 10px; font-size: 14px; }
  .chat-form .btn { padding: 7px 12px; font-size: 14px; }
  .local-preview { width: 76px; top: 6px; right: 6px; }
  .partner-badge { top: 6px; left: 6px; font-size: 12px; padding: 4px 8px; }
  .status-overlay { padding-bottom: 90px; }
  .status-overlay h2 { font-size: 17px; }
  .status-overlay p { display: none; }
}
