:root {
  --bg-top: #f2dfba;
  --bg-bottom: #ecd0c6;
  --card-strong: rgba(255, 250, 244, 0.94);
  --line: rgba(79, 53, 43, 0.14);
  --ink: #2c211d;
  --muted: #6a5c57;
  --accent: #d4633f;
  --accent-strong: #b64a28;
  --danger: #ef3b3b;
  --call-dark: #100d18;
  --call-soft: #1f1728;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font-body: "Avenir Next", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "Trebuchet MS", "Avenir Next Condensed", "Apple SD Gothic Neo", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 228, 165, 0.72), transparent 32%),
    radial-gradient(circle at 94% 12%, rgba(212, 99, 63, 0.2), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  overflow: hidden;
}

body[data-view="call"] {
  color: #fff7f1;
  background:
    radial-gradient(circle at 50% -12%, rgba(228, 103, 84, 0.32), transparent 48%),
    linear-gradient(180deg, #22182f 0%, #0c0914 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 78%);
}

.app-shell,
.view {
  min-height: 100dvh;
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.setup-view {
  display: grid;
  place-items: center;
  padding: 12px;
}

.setup-stack {
  width: min(100%, 430px);
  height: calc(100dvh - 24px);
}

.stack-card {
  height: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: 0 26px 64px rgba(85, 49, 27, 0.16);
  backdrop-filter: blur(16px);
}

.hero-card {
  background:
    linear-gradient(145deg, rgba(255, 249, 238, 0.98), rgba(255, 243, 234, 0.92)),
    var(--card-strong);
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 10px;
}

.hero-copybox {
  display: grid;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 0.88;
}

.hero-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.hero-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.96rem;
}

.hero-art {
  position: relative;
  min-height: 84px;
  border-radius: 22px;
  border: 1px solid rgba(209, 100, 66, 0.15);
  background:
    radial-gradient(circle at center, rgba(209, 100, 66, 0.17), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 242, 236, 0.26));
  overflow: hidden;
}

.signal-ring,
.signal-core {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  border-radius: 999px;
}

.signal-ring {
  border: 1px solid rgba(182, 74, 40, 0.26);
}

.ring-1 {
  inline-size: 54px;
  block-size: 54px;
}

.ring-2 {
  inline-size: 94px;
  block-size: 94px;
}

.ring-3 {
  inline-size: 136px;
  block-size: 136px;
}

.signal-core {
  inline-size: 16px;
  block-size: 16px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow:
    0 0 0 10px rgba(212, 99, 63, 0.11),
    0 12px 24px rgba(182, 74, 40, 0.24);
}

.intro-panel {
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 12px 2px 4px;
}

.intro-pulse {
  position: relative;
  inline-size: 146px;
  block-size: 146px;
}

.intro-pulse-ring,
.intro-pulse-core {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  border-radius: 999px;
}

.intro-pulse-ring {
  border: 1px solid rgba(182, 74, 40, 0.2);
  animation: introPulse 2.2s ease-out infinite;
}

.ring-a {
  inline-size: 92px;
  block-size: 92px;
}

.ring-b {
  inline-size: 136px;
  block-size: 136px;
  animation-delay: 0.4s;
}

.intro-pulse-core {
  inline-size: 20px;
  block-size: 20px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow:
    0 0 0 12px rgba(212, 99, 63, 0.12),
    0 16px 28px rgba(182, 74, 40, 0.22);
}

.intro-lead {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.intro-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.93rem;
}

.intro-alt-btn {
  min-width: 210px;
}

.lobby-panel {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lobby-kicker {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mini-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

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

.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.field-input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(79, 53, 43, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 1rem;
  padding: 0 14px;
  outline: none;
}

.field-input:focus {
  border-color: rgba(182, 74, 40, 0.54);
  box-shadow: 0 0 0 3px rgba(212, 99, 63, 0.14);
}

.check-field {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(79, 53, 43, 0.16);
  background: rgba(255, 255, 255, 0.76);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.93rem;
  font-weight: 700;
  white-space: nowrap;
}

.check-field input {
  inline-size: 16px;
  block-size: 16px;
}

.primary-btn,
.secondary-btn {
  min-height: 50px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-btn {
  color: #fff8f2;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(181, 74, 40, 0.22);
}

.secondary-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(79, 53, 43, 0.12);
}

.waiting-rooms-panel {
  min-height: 0;
}

.waiting-room-list {
  display: grid;
  gap: 10px;
}

.waiting-room-card,
.waiting-room-empty {
  border-radius: 22px;
  border: 1px solid rgba(79, 53, 43, 0.12);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.waiting-room-card {
  display: grid;
  gap: 12px;
}

.waiting-room-copy {
  display: grid;
  gap: 6px;
}

.waiting-room-title {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.waiting-room-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.waiting-room-badge {
  inline-size: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(212, 99, 63, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.waiting-room-btn {
  width: 100%;
}

.waiting-room-empty {
  display: grid;
  gap: 8px;
  text-align: center;
}

.waiting-room-empty strong {
  font-size: 1rem;
}

.waiting-room-empty span,
.setup-status {
  color: var(--muted);
  line-height: 1.45;
}

.setup-status {
  margin: 0;
  font-size: 0.93rem;
}

.call-view {
  padding: 0;
}

.call-stage {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(222, 114, 88, 0.2), transparent 40%),
    linear-gradient(180deg, var(--call-soft), var(--call-dark));
}

.remote-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 14px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 126px);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}

.remote-grid[data-count="1"] {
  grid-template-columns: 1fr;
}

.remote-grid[data-count="5"],
.remote-grid[data-count="6"],
.remote-grid[data-count="7"],
.remote-grid[data-count="8"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.peer-tile {
  position: relative;
  min-height: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 8, 16, 0.66);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.local-stage-tile {
  z-index: 1;
}

.call-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-video.mirrored {
  transform: scaleX(-1);
}

.peer-placeholder,
.stage-placeholder,
.pip-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(224, 124, 93, 0.24), transparent 40%),
    linear-gradient(180deg, rgba(18, 13, 28, 0.58), rgba(8, 7, 12, 0.88));
}

.peer-placeholder strong,
.stage-placeholder strong,
.pip-placeholder strong {
  font-size: 1.02rem;
}

.peer-placeholder span,
.stage-placeholder span,
.pip-placeholder span {
  color: rgba(255, 243, 237, 0.72);
  line-height: 1.45;
}

.stage-placeholder {
  z-index: 1;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 138px);
}

.doodle-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.doodle-canvas.doodle-active {
  pointer-events: auto;
  cursor: crosshair;
}

.doodle-notice {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  left: 14px;
  z-index: 4;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #fff9f2;
  background: rgba(212, 99, 63, 0.88);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  font-size: 0.84rem;
  font-weight: 800;
}

.call-copy,
.control-dock {
  position: absolute;
  z-index: 3;
}

.call-copy {
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 112px);
  display: grid;
  gap: 6px;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.36);
}

.status-line {
  margin: 0;
  color: rgba(255, 241, 236, 0.74);
  font-size: 0.9rem;
}

.local-stack {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 14px;
  z-index: 4;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.local-stack.stage-local-hidden .local-pip {
  display: none;
}

.local-stack.stage-local-hidden {
  top: auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
}

.local-pip {
  position: relative;
  width: 104px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 9, 19, 0.86);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.3);
}

.chat-bubble {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 4;
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 16px;
  color: #fffaf5;
  background: rgba(14, 11, 23, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.control-dock {
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  inline-size: min(100% - 12px, 470px);
  min-height: 74px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.32);
}

.icon-button {
  position: relative;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff9f4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(26, 21, 35, 0.8);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -6px 12px rgba(0, 0, 0, 0.24),
    0 8px 14px rgba(0, 0, 0, 0.24);
}

.icon-button[data-active="false"] {
  background:
    linear-gradient(180deg, rgba(121, 73, 84, 0.92), rgba(77, 45, 56, 0.94)),
    rgba(25, 20, 34, 0.85);
}

.end-button {
  inline-size: 52px;
  block-size: 52px;
  background:
    linear-gradient(180deg, #ff4646, #de2323),
    rgba(207, 36, 36, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -8px 12px rgba(137, 17, 17, 0.44),
    0 12px 20px rgba(165, 16, 16, 0.42);
}

.control-icon {
  inline-size: 18px;
  block-size: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-off-indicator {
  stroke: #ffb8b8;
}

.video-toggle-icon .camera-fill,
.switch-camera-icon .camera-fill {
  fill: currentColor;
  stroke: none;
}

.switch-camera-icon {
  inline-size: 20px;
  block-size: 20px;
}

.switch-camera-icon path:not(.camera-fill) {
  stroke-width: 1.65;
}

.hangup-icon {
  inline-size: 22px;
  block-size: 22px;
}

.hangup-icon path {
  fill: currentColor;
  stroke: none;
}

.icon-text {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.waiting-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 7, 12, 0.42);
  backdrop-filter: blur(12px);
}

.waiting-modal {
  width: min(100%, 360px);
  border-radius: 28px;
  padding: 18px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.97), rgba(249, 240, 232, 0.92)),
    #fff9f3;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-kicker {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.waiting-modal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.88rem;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.modal-close {
  inline-size: 38px;
  block-size: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid rgba(79, 53, 43, 0.12);
  background: rgba(79, 53, 43, 0.08);
  font-size: 1.35rem;
  line-height: 1;
}

.modal-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.room-code-box,
.room-pin-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(79, 53, 43, 0.12);
  background: rgba(255, 255, 255, 0.84);
  display: grid;
  gap: 5px;
}

.room-code-label,
.room-pin-box span {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
}

.room-code-box strong,
.room-pin-box strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.room-meta-line {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-share-btn {
  width: 100%;
  margin-top: 10px;
}

.help-modal {
  padding-bottom: 16px;
}

.help-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.55;
}

.help-list li + li {
  margin-top: 8px;
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

@keyframes introPulse {
  0% {
    scale: 0.9;
    opacity: 0.9;
  }

  70% {
    scale: 1.04;
    opacity: 0.3;
  }

  100% {
    scale: 1.1;
    opacity: 0;
  }
}

@media (max-height: 760px) {
  .hero-card {
    padding: 14px;
    gap: 10px;
  }

  .hero-card h1 {
    font-size: clamp(2.28rem, 11vw, 3.3rem);
  }

  .hero-copy {
    margin-top: 8px;
    font-size: 0.9rem;
  }

  .intro-pulse {
    inline-size: 124px;
    block-size: 124px;
  }

  .field-input {
    min-height: 44px;
  }

  .primary-btn,
  .secondary-btn {
    min-height: 46px;
  }

  .setup-status {
    font-size: 0.86rem;
  }

  .local-pip {
    width: 92px;
  }

  .control-dock {
    inline-size: min(100% - 10px, 430px);
  }
}

@media (min-width: 860px) {
  .setup-view {
    padding: 24px;
  }

  .setup-stack {
    width: min(100%, 980px);
    height: min(calc(100dvh - 48px), 760px);
  }

  .icon-button {
    inline-size: 56px;
    block-size: 56px;
  }

  .end-button {
    inline-size: 70px;
    block-size: 70px;
  }

  .hero-card {
    grid-template-columns: 0.96fr 1.04fr;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 28px;
  }

  .hero-grid {
    align-content: center;
    grid-column: 1 / 2;
    grid-row: 1 / 4;
  }

  .intro-panel,
  .lobby-panel,
  .setup-status {
    grid-column: 2 / 3;
  }

  .hero-art {
    min-height: 118px;
  }

  .call-view {
    padding: 16px;
  }

  .call-stage {
    width: min(430px, 100%);
    min-height: calc(100dvh - 32px);
    margin: 0 auto;
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 34px 84px rgba(0, 0, 0, 0.44);
  }
}

/* Landing: photo, introduction, waiting rooms, then room creation. */
body[data-view="setup"] { background: #fff; color: #202529; overflow: auto; }
body[data-view="setup"]::before { display: none; }
.setup-view { display: block; padding: 32px 24px 48px; }
.setup-stack { width: min(100%, 760px); height: auto; margin: 0 auto; }
.setup-view .hero-card { display: flex; flex-direction: column; gap: 28px; padding: 0; height: auto; overflow: visible; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; background: none; }
.hero-grid { display: flex; flex-direction: column; gap: 28px; }
.meeting-photo { display: block; width: 100%; height: 260px; object-fit: cover; object-position: center 48%; border-radius: 6px; }
.hero-copybox { display: block; }
.setup-view .eyebrow { color: #606870; font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.setup-view h1 { margin: 16px 0; font-family: var(--font-body); font-size: clamp(30px,4.8vw,44px); line-height: 1.3; letter-spacing: -.045em; font-weight: 700; }
.setup-view .hero-copy { color: #5b6269; font-size: 16px; line-height: 1.7; margin: 0; }
.setup-view .lobby-panel, .setup-view .intro-panel { margin: 0; padding: 26px 0 0; border: 0; border-top: 1px solid #dfe3e6; border-radius: 0; background: transparent; box-shadow: none; }
.setup-view h2 { font: 700 21px/1.4 var(--font-body); letter-spacing: -.03em; }
.setup-view .room-form { margin: 24px 0 0; gap: 16px; }
.setup-view .primary-btn { background: #245bc2; color: #fff; border-radius: 5px; box-shadow: none; min-height: 48px; }
.setup-view .primary-btn:hover { background: #19469e; }
.setup-view .secondary-btn { background: #fff; color: #39434e; border: 1px solid #cdd3d9; border-radius: 5px; box-shadow: none; }
.setup-view .waiting-rooms-panel { background: none; border: 0; border-radius: 0; padding: 0; margin-top: 18px; }
.setup-view .waiting-room-card { background: #fff; border: 1px solid #dfe3e6; border-radius: 5px; box-shadow: none; }
.setup-view .setup-status { margin: 0; color: #69737b; font-size: 13px; line-height: 1.6; }
.setup-view .field-input { background: #fff; border: 1px solid #aeb8c2; border-radius: 5px; color: #202529; }
.setup-view :focus-visible { outline: 3px solid #245bc2; outline-offset: 4px; }
.setup-view .check-field { background: transparent; border: 0; padding: 0; border-radius: 0; }
.setup-view .waiting-room-empty { padding: 24px; border-radius: 5px; border: 0; background: #f5f6f7; text-align: left; }
.setup-view .waiting-room-empty span { font-size: 13px; color: #69737b; }
.setup-view .waiting-room-badge { background: #edf2fb; color: #245bc2; }
@media(max-width:600px) {
 .setup-view { padding: 20px 20px 36px; }
 .meeting-photo { height: 180px; }
 .hero-grid { gap: 22px; }
 .setup-view h1 { font-size: 30px; }
 .setup-view .hero-copy { font-size: 14px; }
}
@media(prefers-reduced-motion:reduce) { .setup-view *, .setup-view *::before { animation: none !important; transition: none !important; } }

/* Responsive meeting room, with independent collaboration tools. */
body[data-view="call"], .call-stage { background: #15181c; }
body[data-view="call"]::before { display: none; }
.call-stage { height: 100dvh; min-height: 0; }
.call-toolbar { position: absolute; inset: 0 0 auto; height: 64px; padding: 12px 20px; display: flex; align-items: center; gap: 18px; z-index: 6; background: #20242a; color: #eef1f5; }
.call-brand { margin-right: auto; font-weight: 700; }
.call-toolbar label { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.call-toolbar select { color: #f1f3f5; background: #30363e; border: 1px solid #555e69; padding: 8px; border-radius: 5px; max-width: 145px; }
.remote-grid { inset: 64px 0 130px; padding: 12px; gap: 12px; }
.peer-tile,.local-pip { border-radius: 6px; border: 1px solid #3a424c; background: #242a31; box-shadow: none; }
.call-video { object-fit: contain; }
.call-stage[data-fit="cover"] .call-video { object-fit: cover; }
.local-stack { top: 80px; right: 24px; }
.local-pip { width: clamp(110px,17vw,240px); aspect-ratio: 16/9; }
.control-dock { bottom: calc(env(safe-area-inset-bottom,0px) + 12px); width: auto; inline-size: auto; min-height: 64px; padding: 8px 16px; gap: 12px; border: 0; border-radius: 8px; box-shadow: none; backdrop-filter: none; background: #252b32; }
.call-view .icon-button { width: 52px; height: 46px; inline-size: 52px; block-size: 46px; border-radius: 5px; background: #39414b; box-shadow: none; }
.call-view .end-button { background: #bd343b; }
.call-view .icon-text { display: block; font-size: 10px; white-space: nowrap; }
.call-view .control-icon { width: 20px; height: 20px; }
.collaboration-tools { position: absolute; right: 16px; bottom: calc(env(safe-area-inset-bottom,0px) + 24px); display: flex; gap: 8px; z-index: 5; }
.call-copy { bottom: calc(env(safe-area-inset-bottom,0px) + 92px); text-shadow: none; }
.status-line { font-size: 12px; color: #b6c0cb; }
.call-view :focus-visible { outline: 2px solid #93baff; outline-offset: 3px; }
@media(max-width:850px) {
 .call-toolbar { height: 94px; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
 .call-brand { width: 100%; font-size: 14px; }
 .call-toolbar label { font-size: 12px; }
 .remote-grid { inset: 94px 0 174px; padding: 8px; gap: 8px; }
 .local-stack { top: 108px; right: 16px; }
 .control-dock { gap: 8px; padding: 8px; max-width: calc(100% - 16px); }
 .call-view .icon-button { width: 46px; inline-size: 46px; }
 .collaboration-tools { right: 12px; bottom: calc(env(safe-area-inset-bottom,0px) + 86px); }
 .call-copy { bottom: calc(env(safe-area-inset-bottom,0px) + 140px); }
}
@media(max-height:500px) and (min-width:600px) {
 .call-toolbar { height: 52px; flex-wrap: nowrap; }
 .call-brand { width: auto; }
 .remote-grid { inset: 52px 0 90px; }
 .collaboration-tools { bottom: 20px; }
 .call-copy { bottom: 77px; }
 .local-stack { top: 65px; }
}
.call-view { padding: 0; }
.call-stage { width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.peer-placeholder,.stage-placeholder,.pip-placeholder { background: #242a31; }
.call-view .icon-text { position: static; opacity: 1; transform: none; }
.call-view .icon-text { inline-size: auto; block-size: auto; margin: 0; overflow: visible; clip: auto; }
.call-view .waiting-modal { background: #fff; color: #252b32; border-radius: 10px; box-shadow: 0 12px 40px #0005; }
.call-view .modal-kicker { color: #576573; }
.call-view .primary-btn { background: #245bc2; border-radius: 5px; box-shadow: none; }
.call-view .room-code-box { border-radius: 5px; background: #f2f4f6; }
#resumeMediaBtn { position: absolute; top: calc(100% + 8px); right: 20px; padding: 10px 14px; color: #fff; background: #245bc2; border-radius: 5px; box-shadow: none; z-index: 8; }
