:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --ink: #141b1f;
  --muted: #5d686e;
  --line: #d8e0e4;
  --panel: #ffffff;
  --panel-2: #eef3f5;
  --accent: #136c63;
  --danger: #aa3d2d;
  --dark: #102327;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 4rem;
  line-height: 1;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.lede,
.hint,
.participant small,
label {
  color: var(--muted);
}

.share-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
}

button,
.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  padding: 9px 13px;
  text-decoration: none;
}

.actions,
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.compact-actions {
  margin-top: 0;
}

.invite-card {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 18px 0;
  padding: 18px 0;
}

.invite-card h2,
.invite-card p {
  margin-bottom: 0;
}

.invite-card .actions button {
  flex: 1 1 auto;
}

.remote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #101719;
}

.video-wrap video {
  display: block;
  width: 100%;
  min-height: 190px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-wrap span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(16, 23, 25, 0.76);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 740;
  padding: 5px 9px;
}

.local {
  max-width: 340px;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--dark);
  font-size: 0.82rem;
  font-weight: 760;
  padding: 5px 10px;
}

.badge.live {
  background: #dff4ed;
  color: #0d5d45;
}

.badge.warn {
  background: #fff0d5;
  color: #7a4a00;
}

.roster {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.participant {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.error-text {
  min-height: 22px;
  color: var(--danger);
  font-weight: 700;
}

/* Google Meet-like home and meeting pages */
.home-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: #fff;
}

.home-header {
  flex: 0 0 auto;
}

.home-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.home-date {
  color: #5f6368;
  font-size: 0.95rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: clamp(32px, 8vw, 96px);
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  flex: 1;
  margin: 0 auto;
  padding: 48px 0 84px;
}

.home-copy h1 {
  max-width: 700px;
  color: #202124;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.home-copy .lede {
  max-width: 620px;
  color: #5f6368;
  font-size: 1.35rem;
  line-height: 1.35;
}

.meet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
}

.primary-pill {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #1a73e8;
  color: #fff;
  padding: 0 22px;
}

.primary-pill::before {
  content: "+";
  margin-right: 8px;
  font-size: 1.35rem;
  line-height: 0;
}

.join-pill {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.join-pill input {
  min-height: 48px;
  border-color: #dadce0;
  border-radius: 8px;
}

.join-pill button {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #1a73e8;
}

.home-card {
  display: grid;
  justify-items: center;
  color: #202124;
  text-align: center;
}

.home-card h2 {
  margin: 20px 0 8px;
  font-size: 1.45rem;
  font-weight: 420;
}

.home-card p {
  max-width: 360px;
  color: #5f6368;
  line-height: 1.45;
}

.home-illustration {
  position: relative;
  display: grid;
  width: 280px;
  height: 280px;
  place-items: center;
  border-radius: 50%;
  background: #e8f0fe;
}

.link-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: #4285f4;
  color: #fff;
  font-size: 2rem;
}

.person {
  position: absolute;
  bottom: 58px;
  width: 68px;
  height: 108px;
  border-radius: 999px 999px 18px 18px;
  background: #34a853;
}

.person-one {
  left: 58px;
  background: #fbbc04;
  transform: rotate(12deg);
}

.person-two {
  right: 58px;
  background: #34a853;
  transform: rotate(-12deg);
}

.create-drawer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(32, 33, 36, 0.32);
  padding: 18px;
}

.create-card {
  display: grid;
  width: min(480px, 100%);
  gap: 14px;
  border: 1px solid #dadce0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(60, 64, 67, 0.28);
  padding: 24px;
}

.secondary-button {
  border-color: #dadce0;
  background: #fff;
  color: #202124;
}

.meet-page {
  display: flex;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  background: #fff;
}

.meet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px 24px;
}

.meet-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #202124;
  font-size: 1.2rem;
  font-weight: 720;
  text-decoration: none;
}

.meet-brand-text {
  display: grid;
  gap: 2px;
}

.meet-brand-text small {
  color: #5f6368;
  font-size: 0.72rem;
  font-weight: 520;
  letter-spacing: 0.02em;
}

.meet-logo {
  width: 30px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4285f4 0 45%, #34a853 45% 70%, #fbbc04 70% 85%, #ea4335 85% 100%);
}

.meet-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #3c4043;
  font-size: 0.94rem;
}

.dvrtc-strip {
  display: flex;
  overflow-x: auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid #f1f3f4;
  border-bottom: 1px solid #f1f3f4;
  background: #f8fbff;
  color: #3c4043;
  font-size: clamp(0.72rem, 1.1vw, 0.82rem);
  line-height: 1.2;
  padding: 7px 18px;
  text-align: center;
  white-space: nowrap;
}

.dvrtc-strip strong {
  color: #202124;
  white-space: nowrap;
}

.dvrtc-link,
.dvrtc-strip a {
  color: #1a73e8;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dvrtc-link:hover,
.dvrtc-strip a:hover {
  text-decoration: underline;
}

.meet-lobby {
  display: grid;
  min-height: 0;
  flex: 1;
  place-items: center;
  padding: 32px 16px;
}

.lobby-card {
  width: min(680px, 100%);
  text-align: center;
}

.lobby-card h1 {
  color: #202124;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 420;
  letter-spacing: -0.04em;
}

.join-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  width: min(760px, 100%);
  margin: 34px auto 0;
  text-align: left;
}

.call-shell {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 0 18px 18px;
}

.call-stage {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: #202124;
}

.call-error {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 4;
  max-width: min(680px, calc(100% - 44px));
  transform: translateX(-50%);
  border: 1px solid rgba(217, 48, 37, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  color: var(--danger);
  font-weight: 700;
  padding: 12px 16px;
  text-align: center;
}

.call-stage .remote-grid {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
  padding: 18px;
  align-items: stretch;
}

.call-stage .remote-grid:empty {
  display: none;
}

.call-stage .video-wrap {
  min-height: 0;
  height: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

.call-stage .video-wrap video {
  height: 100%;
  min-height: 0;
}

.call-stage .local {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(300px, 28vw);
  height: auto;
  max-width: none;
  aspect-ratio: 16 / 9;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.call-stage .local video {
  height: auto;
  aspect-ratio: 16 / 9;
}

.call-stage .remote-grid:empty + .local {
  position: static;
  width: min(760px, 82vw);
  height: auto;
  border: 0;
}

.call-controls {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  min-height: 72px;
}

.call-info {
  display: grid;
  color: #3c4043;
  line-height: 1.2;
}

.call-info small {
  color: var(--muted);
}

.call-controls .controls {
  justify-content: center;
  margin: 0;
}

.call-controls .controls .control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 0;
  min-height: 48px;
  border-radius: 50%;
  border-color: transparent;
  background: #eef3f5;
  color: #202124;
  padding: 0;
}

.call-controls .control-button:not(.danger-control) .control-label,
.meeting-details summary span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.call-controls .controls .control-button svg,
.meeting-details summary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.call-controls .controls .control-button.is-off {
  background: #3c4043;
  color: #fff;
}

.call-controls .controls .control-button.danger-control,
.call-controls .controls button:last-child {
  width: auto;
  gap: 8px;
  border-radius: 999px;
  border-color: #d93025;
  background: #d93025;
  color: #fff;
  padding: 0 18px;
}

.meeting-details {
  justify-self: end;
}

.meeting-details summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 48px;
  border: 1px solid #dadce0;
  border-radius: 50%;
  color: #202124;
  cursor: pointer;
  font-weight: 720;
  list-style: none;
  padding: 0;
}

.meeting-details summary::-webkit-details-marker {
  display: none;
}

.details-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 3;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  max-height: min(560px, calc(100vh - 150px));
  overflow: auto;
  gap: 16px;
  border: 1px solid #dadce0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(60, 64, 67, 0.28);
  padding: 18px;
}

.details-panel .invite-card {
  margin: 0;
}

.details-panel .roster {
  margin: 0;
}

@media (max-width: 900px) {
  .home-hero,
  .share-grid,
  .join-card,
  .join-pill,
  .call-controls {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

  .home-hero {
    width: min(100% - 32px, 620px);
    padding: 24px 0 48px;
    text-align: center;
  }

  .home-copy h1 {
    font-size: clamp(2.3rem, 12vw, 3.4rem);
  }

  .home-copy .lede {
    font-size: 1.05rem;
  }

  .meet-actions,
  .join-pill {
    width: 100%;
  }

  .primary-pill,
  .join-pill button {
    width: 100%;
  }

  .home-card {
    order: -1;
  }

  .home-illustration {
    width: 210px;
    height: 210px;
  }

  .person {
    bottom: 42px;
    width: 52px;
    height: 82px;
  }

  .person-one {
    left: 42px;
  }

  .person-two {
    right: 42px;
  }

  .link-mark {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .meet-header {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .home-header-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }

  .meet-brand-text small {
    font-size: 0.66rem;
  }

  .dvrtc-strip {
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
  }

  .meet-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }

  .call-shell {
    padding: 0 10px 12px;
  }

  .call-stage {
    min-height: 52vh;
    border-radius: 18px;
  }

  .call-stage .local {
    right: 12px;
    bottom: 12px;
    width: min(180px, 42vw);
  }

  .call-stage .remote-grid:empty + .local {
    width: min(100%, 520px);
  }

  .call-info,
  .meeting-details {
    justify-self: center;
    text-align: center;
  }

  .details-panel {
    right: 50%;
    transform: translateX(50%);
  }
}
