* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", sans-serif;
  color: #1c1915;
  background: #f3efe6;
}

button, input { font: inherit; }

.setup {
  min-height: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: #6b645b;
}

h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 650;
}

.copy {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: #4d473f;
}

.code {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #6b645b;
}

.code input {
  height: 56px;
  border: 1px solid #d9d1c6;
  border-radius: 12px;
  padding: 0 16px;
  background: #fff;
  color: #1c1915;
  font-size: 18px;
}

.pick { display: flex; flex-direction: column; gap: 12px; }

button {
  min-height: 72px;
  border: 0;
  border-radius: 14px;
  background: #1f7a4d;
  color: #f4fff8;
  font-size: 22px;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }

.dark, #join-wife, #switch { background: #243126; }

.cut, .leave { background: #9c2f2f; }

.error {
  margin: 0;
  color: #9c2f2f;
  font-size: 16px;
}

.call {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #12110f;
  color: #f6f3ee;
}

.call-bar { padding: 18px 20px 8px; }

.partner { margin: 0; font-size: 28px; font-weight: 650; }

.status { margin: 4px 0 0; color: #c8c0b6; font-size: 16px; }

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 8px 12px;
  border-radius: 18px;
  overflow: hidden;
  background: #1c1b18;
}

#remote, #local {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1c1b18;
}

#local {
  position: absolute;
  width: 28%;
  min-width: 96px;
  max-width: 160px;
  height: auto;
  aspect-ratio: 3 / 4;
  right: 12px;
  bottom: 12px;
  border-radius: 12px;
  transform: scaleX(-1);
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
}

.controls button {
  min-height: 56px;
  font-size: 16px;
  background: #2a2824;
  color: #f6f3ee;
}

.controls button[aria-pressed="true"] { background: #6b645b; }

.controls .leave { background: #9c2f2f; }
