
:root{
    --ink: #10151f;
    --ink-soft: #1b2333;
    --paper: #eef1f6;
    --amber: #3b82f6;
    --amber-soft: #cfe0ff;
    --teal: #2fb8a6;
    --line: rgba(16,21,31,0.08);
    --white: #ffffff;
    --danger: #e35b4f;
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
  }

  @font-face {
    font-family: 'Space Grotesk';
    src: local('Space Grotesk');
  }

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

 body{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

body::before{ position:fixed; }

  /* ambient texture */
  /* body::before{
    content:"";
    position:absolute;
    inset:0;
    background-image:
      radial-gradient(circle, rgba(237, 243, 252, 0.08) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events:none;
  } */

  .topbar{
  position:fixed;
  top:0; left:0; right:0;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  background:var(--ink);
  border-bottom:1px solid rgba(255,255,255,0.08);
  z-index:5;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-logo{
  height:28px;
  width:auto;          /* viewBox holds the 87.51:72 ratio */
  display:block;
  flex-shrink:0;
}

.brand-name{
  color:var(--white);
  font-family:"Google Sans","Product Sans",var(--font-display),system-ui,sans-serif;
  font-weight:500;
  font-size:20px;
  letter-spacing:0.2px;
  white-space:nowrap;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:14px;
  color:rgba(255,255,255,0.6);
  font-size:13px;
}

  /* ---------- joining loader (scroll) ---------- */
  .loader-screen{
    position:fixed; inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:22px;
    z-index:10;
    background: radial-gradient(circle at 50% 40%, #1c2333 0%, #0b0e16 70%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
  }

  .loader-screen.hidden{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
  }

  .loader-ring{
    width:44px; height:44px;
    border-radius:50%;
    border:3px solid rgba(255,255,255,0.15);
    border-top-color: var(--amber);
    animation: spin 0.9s linear infinite;
  }
  @keyframes spin{ to{ transform: rotate(360deg); } }

  .loader-text{
    color: var(--white);
    font-family: var(--font-display);
    font-size:20px;
    font-weight:600;
    letter-spacing:0.2px;
  }

  /* ---------- main card ---------- */
  

 .stage{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  padding:76px 20px 20px;
  margin-top:0;
}

.card{
  display:flex;
  flex-direction:column;
  width:100%;
  max-width:720px;
  max-height:100%;
  background: var(--white);
  border-radius:22px;
  padding:26px 32px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 2px 0 rgba(255,255,255,0.6) inset;
  opacity:0;
  transform: translateY(14px) scale(0.98);
  transition: opacity .5s ease, transform .5s ease;
}
  .card.show{
    opacity:1;
    transform: translateY(0) scale(1);
  }

  .card-header{ margin-bottom:14px; }

  /* .meeting-title{
    font-family: var(--font-display);
    font-weight:700;
    font-size:15px;
    color: var(--ink);
    display:flex;
    align-items:center;
    gap:8px;
  } */

  .meeting-title .brand-mark{ width:100%; height:100%; }

  .guest-pill{
    display:flex; align-items:center; gap:6px;
    background: var(--paper);
    border-radius:999px;
    padding:6px 12px 6px 6px;
    font-size:12.5px;
    color: var(--ink);
    font-weight:600;
  }
  .guest-avatar{
    width:20px; height:20px;
    border-radius:50%;
    background: #3b82f6;
    display:flex; align-items:center; justify-content:center;
    color:var(--white); font-size:11px; font-weight:700;
  }

  .status-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color: #6b7280;
    font-size:12.5px;
    font-weight:600;
    margin: 0 auto 14px;
  }
  .status-chip::before{
    content:"";
    width:6px; height:6px;
    border-radius:50%;
    background: #1a8f6e;
  }
  .status-row{ display:flex; justify-content:center; }

  h1.ready{
  font-size:26px;          /* was 38 */
  margin-bottom:6px;
}

  .sub-meta{ margin-bottom:14px; }
  .sub-meta .sep{ opacity:0.5; }

  /* preview tile */
  .preview{
    position:relative;
    background: linear-gradient(160deg, #1a2030, #0d1119);
    border-radius:18px;
    min-height:250px;
  height:auto;  
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    margin-bottom:28px;
  }

  .preview-flag{
    position:absolute;
    top:14px; left:14px;
    background: rgba(0,0,0,0.55);
    color: var(--white);
    font-size:11.5px;
    font-weight:600;
    padding:5px 10px;
    border-radius:8px;
    display:flex;
    align-items:center;
    gap:6px;
  }
  .preview-flag .rd{
    width:6px; height:6px; border-radius:50%;
    background: var(--danger);
  }

  .avatar-big{
    width:84px; height:84px;
    border-radius:50%;
    background: linear-gradient(135deg, var(--amber), #6ea8ff);
    display:flex; align-items:center; justify-content:center;
    color:var(--white);
    font-family: var(--font-display);
    font-weight:700;
    font-size:32px;
    box-shadow: 0 10px 30px rgba(59,130,246,0.35);
  }

  .cam-caption{
    position:absolute;
    bottom:64px;
    left:50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: var(--white);
    font-size:12px;
    font-weight:600;
    padding:6px 12px;
    border-radius:8px;
  }

  .controls{
    position:absolute;
    bottom:16px;
    left:50%;
    transform: translateX(-50%);
    display:flex;
    gap:10px;
  }

  .ctrl{
    width:38px; height:38px;
    border-radius:50%;
    background: rgba(255,255,255,0.12);
    border:none;
    color: var(--white);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    transition: background 0.15s ease;
    font-size:15px;
  }
  .ctrl:hover{ background: rgba(255,255,255,0.22); }
  .ctrl.off{ background: rgba(227,91,79,0.85); }
  .ctrl.off:hover{ background: rgba(227,91,79,1); }

  .actions{
    display:flex;
    gap:12px;
    justify-content:center;
    margin-bottom:16px;
  }

  .btn{
    font-family: var(--font-body);
    font-weight:700;
    font-size:14.5px;
    border-radius:999px;
    padding:12px 26px;
    border:none;
    cursor:pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }
  .btn:active{ transform: scale(0.97); }

  .btn-primary{
    background: linear-gradient(135deg, var(--amber), #2563eb);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(59,130,246,0.35);
  }
  .btn-primary:hover{ box-shadow: 0 14px 30px rgba(59,130,246,0.45); }

  .btn-ghost{
    background: var(--paper);
    color: var(--ink);
  }
  .btn-ghost:hover{ background:#e4e8f0; }

  .footnote{
    text-align:center;
    font-size:11.5px;
    color:#9aa1ad;
  }

  /* ---------- post-join state ---------- */
  .joined-panel{
    display:none;
    text-align:center;
    padding: 10px 4px 4px;
  }
  .joined-panel.show{ display:block; }
  .joined-icon{
    width:56px; height:56px;
    border-radius:50%;
    background: #e8f8f2;
    color:#1a8f6e;
    display:flex; align-items:center; justify-content:center;
    margin: 0 auto 16px;
    font-size:26px;
  }
  .joined-panel h2{
    font-family: var(--font-display);
    font-size:22px;
    margin-bottom:8px;
  }
  .joined-panel p{
    color:#6b7280;
    font-size:13.5px;
    line-height:1.5;
    max-width:340px;
    margin: 0 auto 20px;
  }

  @media (prefers-reduced-motion: reduce){
    .loader-ring{ animation: none; }
  }

  @media (max-width: 480px){
    .card{ padding:24px 18px 20px; }
    h1.ready{ font-size:24px; }
    .preview{ height:230px; }
  }

  /* desktop-only gate */
  .desktop-gate{
    position:fixed; inset:0;
    z-index:30;
    display:none;
    align-items:flex-start;
    justify-content:center;
    padding:60px 24px;
    background: radial-gradient(circle at 50% 20%, #1c2333 0%, #0b0e16 70%);
    color: var(--white);
  }
  .gate-card{
    width:min(480px, 100%);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius:24px;
    padding:56px 44px;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
  }
  .gate-icon{
    width:76px; height:76px;
    border-radius:20px;
    background: rgba(255,255,255,0.08);
    display:flex; align-items:center; justify-content:center;
    margin-bottom:22px;
    color: var(--amber);
  }
  .desktop-gate h2{
    font-family: var(--font-display);
    font-size:26px;
    margin-bottom:10px;
  }
  .desktop-gate p{
    font-size:15px;
    color: rgba(255,255,255,0.55);
    max-width:340px;
    line-height:1.6;
  }

  /* live video preview */
  #liveVideo{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:none;
  }
  #liveVideo.show{ display:block; }
  .avatar-big.hide{ display:none; }
  .ctrl svg{ display:block; }

  /* generic modal (both permission-explainer and checkpoint) */
  .modal-brand-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin: -6px 0 20px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(10,12,18,0.08);
  text-align:left;              /* opt out of .modal-box's centering */
}

/* smaller logo + matching text */
.modal-brand-logo{
  height:14px;
  width:auto;
  display:block;
  flex-shrink:0;
}

.modal-brand-name{
  color: var(--ink);
  font-family: var(--font-display);
  font-weight:500;
  font-size:13px;
  letter-spacing:0.1px;
  white-space:nowrap;
}

.modal-brand{
  display:inline-flex;
  align-items:center;
  gap:7px;              /* tighter gap for the smaller mark */
}

.modal-joining{
  color:#6b7280;
  font-size:12.5px;
  white-space:nowrap;
  flex-shrink:0;
}
.modal-box{
  width:min(560px, 94%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius:20px;
  padding:38px 44px 32px;
  text-align:center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
  transform: translateY(10px);
  transition: transform 0.25s ease;
  box-sizing: border-box;
}
.modal-box p{
  max-width:42ch;
  margin-left:auto;
  margin-right:auto;
}
.modal-overlay{
  position:fixed;
  inset:0;
  display:flex;                 /* always flex — never toggled */
  align-items:center;
  justify-content:center;
  padding:20px;
  background: rgba(10,12,18,0.45);
  backdrop-filter: blur(3px);
  z-index:1000;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}

.modal-overlay.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition: opacity .25s ease, visibility 0s;
}

.modal-box p + p{ margin-top:12px; }      /* between paragraphs */
.modal-box p + h3{ margin-top:26px; }     /* between groups — the big one */

.modal-box p:last-of-type{ margin-bottom:26px; } 
.card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.meeting-title{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family: var(--font-display);
  font-weight:400;              /* replaces the inline style */
  font-size:15px;
  color: var(--ink);
  white-space:nowrap;
}

.meeting-logo{
  height:16px;
  width:auto;
  display:block;
  flex-shrink:0;
}
