:root{--bg:#070d18;--panel:#0e1728;--panel2:#111d31;--text:#f5f8ff;--muted:#91a2bd;--line:#22314a;--mint:#49e2b3;--mint2:#72f0c9;--danger:#ff5c78;--shadow:0 30px 80px rgba(0,0,0,.35)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;background:radial-gradient(circle at 20% 10%,#13233e 0,transparent 33%),var(--bg);color:var(--text)}body{overflow-x:hidden}.ambient{position:fixed;width:420px;height:420px;border-radius:50%;filter:blur(110px);opacity:.16;pointer-events:none}.ambient-a{background:#38efb4;top:-170px;left:-120px}.ambient-b{background:#5278ff;right:-180px;bottom:-170px}.topbar{height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,76px);border-bottom:1px solid rgba(255,255,255,.07);backdrop-filter:blur(18px);position:relative;z-index:3}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,var(--mint2),#34caa0);color:#071019;font-weight:900;font-size:22px;box-shadow:0 10px 30px rgba(73,226,179,.25)}.brand strong,.brand small{display:block}.brand small{font-size:11px;color:var(--muted);letter-spacing:.12em;text-transform:uppercase}.top-actions{display:flex;align-items:center;gap:12px}select,.badge{border:1px solid var(--line);background:#0b1423;color:var(--text);border-radius:12px;padding:9px 12px}.badge{font-size:12px}.badge.online{border-color:rgba(73,226,179,.5);color:var(--mint)}main{max-width:1500px;margin:auto;padding:clamp(28px,6vw,90px)}.welcome-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(350px,.72fr);gap:clamp(36px,8vw,120px);align-items:center;min-height:calc(100vh - 170px)}.eyebrow{font-size:12px;letter-spacing:.18em;color:var(--mint);font-weight:800;margin-bottom:18px}.hero-copy h1{font-size:clamp(50px,7vw,100px);line-height:.92;letter-spacing:-.065em;margin:0 0 28px}.hero-copy h1 span{color:var(--mint)}.hero-copy>p{font-size:clamp(17px,2vw,22px);line-height:1.65;color:var(--muted);max-width:700px}.feature-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:42px}.feature-row article{padding:18px;border:1px solid var(--line);background:rgba(14,23,40,.7);border-radius:18px}.feature-row b,.feature-row span{display:block}.feature-row span{font-size:12px;color:var(--muted);margin-top:5px}.preview-card{background:linear-gradient(180deg,rgba(17,29,49,.95),rgba(8,15,27,.95));border:1px solid var(--line);border-radius:30px;padding:18px;box-shadow:var(--shadow)}.video-shell,.remote-panel,.local-panel{position:relative;overflow:hidden;background:#03070d;border:1px solid rgba(255,255,255,.06)}.video-shell{aspect-ratio:4/3;border-radius:22px}.video-shell video,.remote-panel video,.local-panel video{width:100%;height:100%;object-fit:cover}.placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;color:var(--muted);padding:25px}.placeholder strong{color:#dce7f8}.placeholder span{font-size:13px}.camera-icon{font-size:40px}.video-pill,.status-chip,.you-label{position:absolute;border:1px solid rgba(255,255,255,.12);background:rgba(5,10,18,.78);backdrop-filter:blur(14px);border-radius:999px;padding:9px 12px;font-size:12px}.video-pill{left:15px;bottom:15px}.check-row{display:flex;gap:12px;align-items:flex-start;margin:20px 2px 16px;color:#d9e4f5;font-size:14px;line-height:1.45}.check-row input{width:20px;height:20px;accent-color:var(--mint)}.text-button{border:0;background:none;padding:0;color:var(--mint);cursor:pointer}.primary-button,.secondary-button,.danger-button{border:0;border-radius:16px;padding:17px 20px;font-weight:900;font-size:16px;cursor:pointer}.primary-button{width:100%;display:flex;justify-content:center;gap:18px;background:linear-gradient(135deg,var(--mint2),#35d5a7);color:#06120e;box-shadow:0 16px 35px rgba(73,226,179,.18)}.primary-button:disabled{opacity:.4;cursor:not-allowed}.privacy-note{text-align:center;color:var(--muted);font-size:11px;margin:13px 0 2px}.hidden{display:none!important}.call-view{min-height:calc(100vh - 160px);display:flex;flex-direction:column;justify-content:center}.call-stage{position:relative;max-width:1250px;width:100%;margin:auto}.remote-panel{aspect-ratio:16/9;border-radius:28px;box-shadow:var(--shadow)}.local-panel{position:absolute;width:min(24vw,280px);aspect-ratio:4/3;right:20px;bottom:20px;border-radius:20px;box-shadow:0 18px 50px rgba(0,0,0,.5)}.placeholder.compact{font-size:13px}.status-chip{left:18px;top:18px}.you-label{left:10px;bottom:10px}.control-dock{display:flex;justify-content:center;gap:10px;margin:22px auto 0;padding:10px;border:1px solid var(--line);border-radius:22px;background:rgba(12,20,34,.88);backdrop-filter:blur(18px);width:max-content;max-width:100%}.control{border:0;min-width:78px;padding:11px 13px;border-radius:15px;background:#162238;color:#dce7f8;cursor:pointer}.control span,.control small{display:block}.control span{font-size:20px}.control small{margin-top:4px}.control.accent{background:var(--mint);color:#07120e}.control.danger{background:#2b1721;color:#ff9aad}.toast{position:fixed;right:22px;bottom:22px;max-width:380px;padding:15px 18px;border:1px solid var(--line);border-radius:16px;background:#111c2e;box-shadow:var(--shadow);transform:translateY(120px);opacity:0;transition:.25s;z-index:20}.toast.show{transform:translateY(0);opacity:1}dialog{border:0;background:transparent;color:var(--text)}dialog::backdrop{background:rgba(1,5,10,.78);backdrop-filter:blur(8px)}.dialog-card{width:min(520px,90vw);border:1px solid var(--line);border-radius:24px;background:#0d1727;padding:26px;box-shadow:var(--shadow)}.dialog-card label{display:block;padding:12px;border:1px solid var(--line);border-radius:12px;margin:9px 0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.secondary-button{background:#1b2940;color:white}.danger-button{background:var(--danger);color:white}.spinner{width:34px;height:34px;border:3px solid #233653;border-top-color:var(--mint);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:900px){.welcome-grid{grid-template-columns:1fr;min-height:auto}.feature-row{grid-template-columns:1fr}.hero-copy h1{font-size:58px}.call-stage{margin-top:20px}.local-panel{width:30vw}.topbar{padding:0 18px}main{padding:26px 16px}.control-dock{overflow-x:auto;justify-content:flex-start;width:100%}.control{min-width:72px}}@media(max-width:560px){.hero-copy h1{font-size:45px}.top-actions select{max-width:130px}.local-panel{width:38vw;right:10px;bottom:10px}.remote-panel{aspect-ratio:9/14}.control small{font-size:10px}}


/* ===== Mobile portrait + all-device video chat improvements ===== */
html, body {
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  overscroll-behavior: none;
}

.call-view {
  min-height: calc(100dvh - 120px);
}

.call-stage {
  max-height: calc(100dvh - 210px);
}

.remote-panel {
  width: 100%;
  min-height: 420px;
}

.remote-panel video,
.local-panel video,
.video-shell video {
  background: #02060c;
}

/* Tablet */
@media (max-width: 1024px) {
  .call-view {
    min-height: calc(100dvh - 105px);
  }

  .call-stage {
    max-height: calc(100dvh - 190px);
  }

  .remote-panel {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .local-panel {
    width: min(30vw, 240px);
  }
}

/* Mobile portrait — no rotation required */
@media (max-width: 700px) and (orientation: portrait) {
  .topbar {
    height: 64px;
  }

  main {
    padding: 12px;
  }

  .call-view {
    min-height: calc(100dvh - 76px);
    height: calc(100dvh - 76px);
    justify-content: flex-start;
    overflow: hidden;
  }

  .call-stage {
    width: 100%;
    height: calc(100dvh - 176px);
    max-height: none;
    margin: 0;
  }

  .remote-panel {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 22px;
  }

  .remote-panel video {
    object-fit: cover;
  }

  .local-panel {
    width: 34vw;
    min-width: 116px;
    max-width: 158px;
    height: 25vh;
    min-height: 150px;
    max-height: 215px;
    right: 10px;
    bottom: 10px;
    border-radius: 18px;
  }

  .local-panel video {
    object-fit: cover;
  }

  .control-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 50;
    width: auto;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    overflow: visible;
    border-radius: 20px;
  }

  .control {
    min-width: 0;
    width: 100%;
    padding: 10px 4px;
    border-radius: 14px;
  }

  .control span {
    font-size: 19px;
  }

  .control small {
    font-size: 9px;
    white-space: nowrap;
  }

  .status-chip {
    left: 10px;
    top: 10px;
  }

  .you-label {
    left: 8px;
    bottom: 8px;
  }

  .welcome-grid {
    display: block;
  }

  .hero-copy {
    margin-bottom: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 13vw, 58px);
    line-height: .94;
  }

  .hero-copy > p {
    font-size: 16px;
  }

  .preview-card {
    border-radius: 24px;
    padding: 12px;
  }

  .video-shell {
    aspect-ratio: 3 / 4;
    max-height: 58dvh;
  }

  .feature-row {
    display: none;
  }
}

/* Very small phones */
@media (max-width: 390px) and (orientation: portrait) {
  .brand small {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions select {
    max-width: 112px;
    padding: 8px;
  }

  .badge {
    display: none;
  }

  .local-panel {
    width: 31vw;
    min-width: 102px;
    height: 21vh;
    min-height: 132px;
  }

  .control small {
    font-size: 8px;
  }
}

/* Landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    height: 54px;
  }

  main {
    padding: 8px 12px;
  }

  .call-view {
    height: calc(100dvh - 62px);
    min-height: 0;
  }

  .call-stage {
    height: calc(100dvh - 122px);
    max-height: none;
  }

  .remote-panel {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .local-panel {
    width: 22vw;
    max-width: 190px;
    height: 36vh;
    right: 10px;
    bottom: 10px;
  }

  .control-dock {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(6px, env(safe-area-inset-bottom));
    margin: 0;
    padding: 6px;
  }

  .control {
    min-width: 65px;
    padding: 8px 10px;
  }
}
