:root {
  color-scheme: dark;
  --md-sys-color-background: #0f1415;
  --md-sys-color-surface: #0f1415;
  --md-sys-color-surface-container: #1b2021;
  --md-sys-color-surface-container-high: #262b2c;
  --md-sys-color-surface-container-highest: #313536;
  --md-sys-color-primary: #4fd8eb;
  --md-sys-color-on-primary: #00363d;
  --md-sys-color-primary-container: #004f58;
  --md-sys-color-on-primary-container: #9eeffd;
  --md-sys-color-on-surface: #dee3e5;
  --md-sys-color-on-surface-variant: #bfc8ca;
  --md-sys-color-outline: #899294;
  --md-sys-color-outline-variant: #3f484a;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error: #690005;
  --md-sys-elevation-1: 0 1px 3px 1px rgb(0 0 0 / 15%), 0 1px 2px rgb(0 0 0 / 30%);
  --md-sys-elevation-2: 0 2px 6px 2px rgb(0 0 0 / 15%), 0 1px 2px rgb(0 0 0 / 30%);
  --md-sys-elevation-3: 0 4px 8px 3px rgb(0 0 0 / 15%), 0 1px 3px rgb(0 0 0 / 30%);
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--md-sys-color-background);
  color: var(--md-sys-color-on-surface);
  font-family: Roboto, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

[x-cloak] {
  display: none !important;
}

.md-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.md-icon svg {
  width: 1em;
  height: 1em;
  stroke-width: 1.75;
}

.md-typescale-title-small {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: 0.1px;
  color: var(--md-sys-color-primary);
}

.md-typescale-headline-small {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 2rem;
}

.md-typescale-body-medium {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0.25px;
  color: var(--md-sys-color-on-surface-variant);
}

.lobby {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.md-card {
  width: min(100%, 412px);
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-extra-large);
  box-shadow: var(--md-sys-elevation-2);
  overflow: hidden;
}

.md-card__hero {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 32px 24px 8px;
}

.md-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 28px;
}

.md-card__lede {
  max-width: 34ch;
}

.md-card__form {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.md-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.md-button-row > button {
  width: 100%;
}

.md-field {
  position: relative;
  display: block;
  min-height: 56px;
  background: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-corner-extra-small) var(--md-sys-shape-corner-extra-small) 0 0;
}

.md-field input {
  width: 100%;
  height: 56px;
  border: 0;
  padding: 20px 16px 8px;
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font: 400 1rem/1.5 Roboto, system-ui, sans-serif;
  outline: none;
}

.md-field--with-actions input {
  padding-right: 96px;
}

.md-field__actions {
  position: absolute;
  top: 8px;
  right: 4px;
  display: flex;
  gap: 0;
}

.md-field__label {
  position: absolute;
  left: 16px;
  top: 18px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1rem;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 150ms cubic-bezier(0.2, 0, 0, 1), color 150ms;
}

.md-field--active .md-field__label {
  transform: translateY(-10px) scale(0.75);
}

.md-field--active .md-field__label,
.md-field:focus-within .md-field__label {
  color: var(--md-sys-color-primary);
}

.md-field__indicator {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--md-sys-color-on-surface-variant);
}

.md-field:focus-within .md-field__indicator {
  height: 2px;
  background: var(--md-sys-color-primary);
}

.md-field--error .md-field__label,
.md-field--error:focus-within .md-field__label {
  color: var(--md-sys-color-error);
}

.md-field--error .md-field__indicator,
.md-field--error:focus-within .md-field__indicator {
  background: var(--md-sys-color-error);
}

.md-error {
  min-height: 1.25rem;
  margin: 0;
  color: var(--md-sys-color-error);
  font-size: 0.75rem;
  line-height: 1rem;
}

.md-filled-button,
.md-tonal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font: 500 0.875rem/1.25rem Roboto, system-ui, sans-serif;
  letter-spacing: 0.1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.md-filled-button .md-icon,
.md-tonal-button .md-icon {
  font-size: 20px;
}

.md-tonal-button {
  border: 0;
  border-radius: 24px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font: 500 0.875rem/1.25rem Roboto, system-ui, sans-serif;
  letter-spacing: 0.1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.md-filled-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--md-sys-color-on-primary);
  opacity: 0;
}

.md-filled-button:hover::after {
  opacity: 0.08;
}

.md-filled-button:active::after {
  opacity: 0.12;
}

.md-filled-button:disabled,
.md-tonal-button:disabled {
  background: rgb(222 227 229 / 12%);
  color: rgb(222 227 229 / 38%);
  cursor: wait;
}

.md-filled-button:disabled::after {
  display: none;
}

.call {
  position: fixed;
  inset: 0;
  background: #000;
}

.call video {
  object-fit: cover;
  background: #000;
}

.call > video:first-of-type {
  width: 100%;
  height: 100%;
}

.call__local {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: min(28vw, 132px);
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: var(--md-sys-shape-corner-medium);
  box-shadow: var(--md-sys-elevation-3);
  z-index: 2;
}

.md-assist-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  background: rgb(27 32 33 / 88%);
  color: var(--md-sys-color-on-surface);
  font: 500 0.875rem/1.25rem Roboto, system-ui, sans-serif;
  backdrop-filter: blur(12px);
}

.call__top {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  right: 160px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 3;
}

.call__tap {
  position: absolute;
  left: 50%;
  z-index: 3;
}

.call__tap {
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.call__bar {
  position: absolute;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
  padding: 12px;
  border-radius: 28px;
  background: rgb(27 32 33 / 86%);
  box-shadow: var(--md-sys-elevation-3);
  backdrop-filter: blur(16px);
}

.md-icon-button {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
}

.md-icon-button--small {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
}

.md-icon-button--small .md-icon {
  font-size: 20px;
}

.md-icon-button--tonal {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.md-icon-button--error {
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
  border-radius: 16px;
}

.md-icon-button .md-icon {
  font-size: 24px;
}
