:root {
  --meet-ink: #0b0b0b;
  --meet-paper: #f7f5ee;
  --meet-lime: #9dff00;
  --meet-lime-pressed: #83d900;
  --meet-muted: #68655e;
  --meet-line: rgba(11, 11, 11, 0.12);
}

body.meet-modal-open {
  overflow: hidden;
}

.meet-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(8, 8, 8, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.meet-modal-backdrop.visible {
  display: flex;
}

.meet-modal {
  width: min(100%, 1180px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  background: var(--meet-paper);
  color: var(--meet-ink);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.45);
  animation: meetModalIn 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes meetModalIn {
  from { opacity: 0; transform: translateY(34px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.meet-modal-header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) 22px 18px;
  border-bottom: 1px solid var(--meet-line);
  background: rgba(247, 245, 238, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.meet-modal-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.meet-modal-eyebrow,
.meet-kicker {
  display: block;
  color: var(--meet-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.meet-modal-title {
  max-width: 100%;
  margin-top: 4px;
  font-size: clamp(25px, 5vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meet-done-button {
  min-width: 66px;
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--meet-line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: var(--meet-ink);
  cursor: pointer;
  font-weight: 800;
}

.meet-modal-content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 22px 24px;
}

.meet-hero-band,
.meet-overview-hero {
  position: relative;
  overflow: hidden;
  width: calc(100% + 44px);
  margin-left: -22px;
  margin-right: -22px;
}

.meet-hero-band {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 7vw, 70px) clamp(22px, 6vw, 64px);
  background:
    radial-gradient(circle at 78% 18%, rgba(157, 255, 0, 0.95), transparent 24%),
    radial-gradient(circle at 20% 75%, rgba(242, 255, 0, 0.6), transparent 28%),
    linear-gradient(140deg, #111 0%, #252525 56%, #111 100%);
  color: #fff;
}

.meet-hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(0, 0, 0, 0.66) 100%);
  pointer-events: none;
}

.meet-hero-band > * {
  position: relative;
  z-index: 2;
}

.meet-hero-band .meet-kicker {
  color: var(--meet-lime);
}

.meet-hero-band h3 {
  max-width: 760px;
  margin-top: 10px;
  font-size: clamp(36px, 8vw, 78px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
}

.meet-hero-band p {
  max-width: 620px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.meet-hero-orb {
  position: absolute;
  z-index: 1;
  right: -50px;
  top: -80px;
  width: min(48vw, 470px);
  aspect-ratio: 1;
  border: 2px solid rgba(157, 255, 0, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(157, 255, 0, 0.08), 0 0 0 84px rgba(157, 255, 0, 0.045);
}

.meet-open-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
  gap: 0;
  border-bottom: 1px solid var(--meet-line);
}

.meet-open-section {
  min-width: 0;
  padding: clamp(24px, 5vw, 48px) clamp(0px, 3vw, 36px) clamp(28px, 5vw, 48px) 0;
}

.meet-open-section + .meet-open-section {
  border-left: 1px solid var(--meet-line);
  padding-left: clamp(22px, 4vw, 42px);
}

.meet-open-section h3,
.meet-centered-section h3,
.meet-signin-card h3 {
  max-width: 100%;
  margin-top: 8px;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meet-open-section p,
.meet-centered-section p,
.meet-signin-card p {
  margin-top: 12px;
  color: var(--meet-muted);
  line-height: 1.52;
}

.meet-action-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.meet-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.meet-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.meet-field > span {
  color: var(--meet-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meet-input,
.meet-select,
.meet-textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--meet-line);
  border-radius: 15px;
  padding: 14px 15px;
  background: #fff;
  color: var(--meet-ink);
  outline: none;
  font: inherit;
}

.meet-input:focus,
.meet-select:focus,
.meet-textarea:focus {
  border-color: var(--meet-ink);
  box-shadow: 0 0 0 4px rgba(157, 255, 0, 0.32);
}

.meet-textarea {
  resize: vertical;
}

.meet-primary-button,
.meet-secondary-button,
.meet-danger-button,
.meet-control-button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.meet-primary-button {
  border: 1px solid rgba(11, 11, 11, 0.18);
  background: var(--meet-lime);
  color: #050505;
  box-shadow: inset 0 -3px 0 rgba(11, 11, 11, 0.16);
}

.meet-primary-button:hover {
  background: var(--meet-lime-pressed);
  transform: translateY(-1px);
}

.meet-primary-button.large {
  min-height: 58px;
  margin-top: 24px;
  font-size: 17px;
}

.meet-primary-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.meet-secondary-button {
  margin-top: 10px;
  border: 1px solid var(--meet-line);
  background: #fff;
  color: var(--meet-ink);
}

.meet-secondary-button.link {
  width: 100%;
}

.meet-danger-button {
  margin-top: 10px;
  border: 1px solid rgba(165, 27, 27, 0.22);
  background: #ffe5e0;
  color: #8f1c16;
}

.meet-signin-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--meet-line);
  border-radius: 22px;
  padding: 20px;
  background: #fff;
}

.meet-signin-card.compact {
  grid-template-columns: minmax(0, 1fr);
  padding: 18px;
}

.meet-signin-card.compact h3 {
  font-size: 24px;
}

.meet-signin-card.compact .meet-primary-button {
  width: 100%;
}

.meet-centered-section {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 10vw, 110px) 0;
  text-align: center;
}

.meet-code-input {
  margin-top: 24px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.meet-action-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.meet-action-row .meet-secondary-button {
  margin-top: 0;
}

.meet-status,
.meet-video-status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--meet-muted);
  font-size: 13px;
  text-align: center;
}

.meet-overview-hero {
  min-height: clamp(320px, 54vh, 590px);
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(circle at 82% 12%, rgba(157, 255, 0, 0.9), transparent 24%),
    radial-gradient(circle at 12% 78%, rgba(242, 255, 0, 0.4), transparent 32%),
    linear-gradient(145deg, #101010, #353535 62%, #111);
  background-image: var(--meet-cover-image), radial-gradient(circle at 82% 12%, rgba(157, 255, 0, 0.9), transparent 24%), linear-gradient(145deg, #101010, #353535 62%, #111);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.meet-overview-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.78) 100%);
}

.meet-overview-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(26px, 7vw, 70px);
}

.meet-overview-content h3 {
  max-width: 900px;
  margin-top: 18px;
  font-size: clamp(42px, 10vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.07em;
  overflow-wrap: anywhere;
}

.meet-overview-content p {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2.4vw, 22px);
}

.meet-overview-code {
  display: inline-flex;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.meet-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.meet-live-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a3a3a3;
}

.meet-live-pill.active span {
  background: var(--meet-lime);
  box-shadow: 0 0 14px rgba(157, 255, 0, 0.9);
}

.meet-tab-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  width: calc(100% + 44px);
  margin-left: -22px;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--meet-line);
  background: rgba(247, 245, 238, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.meet-tab {
  min-width: 112px;
  min-height: 54px;
  flex: 1 0 auto;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--meet-muted);
  cursor: pointer;
  font-weight: 850;
}

.meet-tab.active {
  border-bottom-color: var(--meet-lime);
  background: var(--meet-lime);
  color: #050505;
}

.meet-tab:hover:not(.active) {
  border-bottom-color: var(--meet-lime);
  background: rgba(157, 255, 0, 0.14);
  color: var(--meet-ink);
}

.meet-detail-list {
  margin-top: 22px;
  border-top: 1px solid var(--meet-line);
}

.meet-detail-list > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(90px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--meet-line);
}

.meet-detail-list span {
  color: var(--meet-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.meet-detail-list strong {
  overflow-wrap: anywhere;
}

.meet-waiting-state {
  margin-top: 22px;
  border-radius: 18px;
  padding: 18px;
  background: #e9e6dd;
  color: var(--meet-muted);
  font-weight: 750;
}

.meet-video-shell {
  width: calc(100% + 44px);
  min-height: calc(100dvh - 130px);
  margin-left: -22px;
  margin-bottom: -24px;
  display: flex;
  flex-direction: column;
  background: #090909;
  color: #fff;
}

.meet-video-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.meet-video-topbar > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meet-video-topbar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meet-presence-count {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.meet-video-grid {
  flex: 1 1 auto;
  min-height: 420px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  grid-auto-rows: minmax(220px, 1fr);
  gap: 8px;
  padding: 8px;
}

.meet-video-tile,
.meet-video-placeholder {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 220px;
  border-radius: 20px;
  background: #202020;
}

.meet-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.meet-video-tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #181818;
}

.meet-video-tile.local video {
  transform: scaleX(-1);
}

.meet-video-tile.content video {
  object-fit: contain;
  transform: none;
}

.meet-video-tile > span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.meet-video-controls {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(9, 9, 9, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.meet-control-button {
  min-width: 86px;
  min-height: 54px;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #262626;
  color: #fff;
}

.meet-control-button[aria-pressed="true"] {
  background: #fff;
  color: #111;
}

.meet-control-button.leave {
  background: #e83f36;
  color: #fff;
}

.meet-video-status {
  margin: 0;
  padding: 0 12px 12px;
  color: rgba(255, 255, 255, 0.62);
}

.meet-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  border: 3px solid rgba(11, 11, 11, 0.14);
  border-top-color: var(--meet-lime-pressed);
  border-radius: 50%;
  animation: meetSpin 0.8s linear infinite;
}

.meet-spinner.light {
  border-color: rgba(255, 255, 255, 0.18);
  border-top-color: var(--meet-lime);
}

@keyframes meetSpin {
  to { transform: rotate(360deg); }
}

.meet-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 15000;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, 22px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: #0b0b0b;
  color: #fff;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.meet-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  .meet-modal-backdrop {
    align-items: center;
    padding: 24px;
  }
}

@media (max-width: 760px) {
  .meet-modal-backdrop {
    padding: 0;
  }

  .meet-modal {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .meet-modal-header {
    padding-left: 16px;
    padding-right: 12px;
  }

  .meet-modal-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .meet-hero-band,
  .meet-overview-hero,
  .meet-tab-bar,
  .meet-video-shell {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
  }

  .meet-open-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .meet-open-section {
    padding-right: 0;
  }

  .meet-open-section + .meet-open-section {
    border-top: 1px solid var(--meet-line);
    border-left: 0;
    padding-left: 0;
  }

  .meet-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .meet-signin-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .meet-overview-content h3 {
    font-size: clamp(40px, 15vw, 74px);
  }

  .meet-video-grid {
    min-height: 58dvh;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(220px, 42dvh);
  }

  .meet-control-button {
    min-width: 70px;
    padding: 0 12px;
  }
}

@media (max-width: 440px) {
  .meet-modal-title {
    font-size: 26px;
  }

  .meet-done-button {
    min-width: 58px;
    padding: 0 12px;
  }

  .meet-hero-band {
    min-height: 320px;
  }

  .meet-hero-band h3 {
    font-size: clamp(38px, 14vw, 60px);
  }

  .meet-primary-button,
  .meet-secondary-button,
  .meet-danger-button {
    width: 100%;
    white-space: normal;
  }

  .meet-tab {
    min-width: 96px;
  }

  .meet-video-topbar {
    align-items: flex-start;
  }

  .meet-video-topbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .meet-video-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .meet-control-button {
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    gap: 2px;
    padding: 5px;
    font-size: 11px;
  }
}
