:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #101014;
  color: #f7f4ec;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(11, 88, 102, 0.34), transparent 42%),
    linear-gradient(260deg, rgba(142, 48, 32, 0.28), transparent 38%),
    #101014;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.home-shell,
.room-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
}

.home-shell {
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.home-panel,
.share-panel,
.video-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(22, 22, 28, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.home-panel {
  width: min(680px, 100%);
  padding: clamp(24px, 5vw, 48px);
}

.eyebrow {
  margin: 0 0 10px;
  color: #8fd7c7;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lead {
  max-width: 44rem;
  margin-bottom: 32px;
  color: #d8d1c4;
  font-size: 1.1rem;
  line-height: 1.6;
}

.room-form,
.share-panel {
  display: grid;
  gap: 10px;
}

label {
  color: #d8d1c4;
  font-size: 0.92rem;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: #0c0c10;
  color: #f7f4ec;
  padding: 13px 14px;
}

select {
  width: 100%;
  cursor: pointer;
}

button,
.home-link,
.links a {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #e8b04d;
  color: #14100a;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
  text-decoration: none;
}

.links {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.links a {
  display: block;
  overflow-wrap: anywhere;
}

.room-shell {
  padding: 28px 0;
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.room-header h1 {
  max-width: 760px;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.7rem, 5vw, 3.4rem);
}

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

.push-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: start;
  gap: 18px;
}

.video-panel {
  padding: 14px;
}

.video-panel p {
  min-height: 1.5rem;
  margin-bottom: 0;
  color: #d8d1c4;
}

.camera-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.video-frame {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  border-radius: 6px;
  background: #050506;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.share-panel {
  margin-top: 18px;
  padding: 16px;
}

.push-grid .share-panel {
  margin-top: 0;
}

.share-panel p {
  min-height: 1.5rem;
  margin: 4px 0 0;
  color: #d8d1c4;
}

.viewer-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.viewer-video {
  width: 100vw;
  height: 100vh;
  background: #000;
  object-fit: cover;
}

.viewer-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.viewer-shell:hover .viewer-overlay,
.viewer-shell:focus-within .viewer-overlay {
  opacity: 1;
  pointer-events: auto;
}

.viewer-overlay p {
  max-width: min(460px, calc(100vw - 160px));
  margin: 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.58);
  color: #f7f4ec;
  padding: 12px 14px;
}

.viewer-overlay p:empty {
  display: none;
}

.viewer-overlay button {
  width: auto;
  background: rgba(247, 244, 236, 0.92);
  color: #111;
}

@media (max-width: 760px) {
  .input-row,
  .push-grid,
  .room-header {
    grid-template-columns: 1fr;
  }

  .room-header {
    display: grid;
    align-items: start;
  }

  .home-link,
  button {
    width: 100%;
    text-align: center;
  }

  .viewer-overlay {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .viewer-overlay p {
    max-width: 100%;
  }

  .viewer-overlay button {
    width: 100%;
  }
}
