:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #667069;
  --paper: #f3f1e8;
  --paper-light: #faf9f4;
  --line: #c9cec6;
  --green: #176b45;
  --green-dark: #0d3f2a;
  --acid: #d8ff63;
  --orange: #e2673f;
  --red: #ae382f;
  --shadow: 0 22px 60px rgba(23, 37, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 12%, rgba(216, 255, 99, 0.25), transparent 24rem),
    var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(23, 37, 31, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 37, 31, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
}

.site-header,
.site-footer,
.main-content {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  color: var(--acid);
  background: var(--green-dark);
}

.brand-mark i {
  width: 2px;
  height: 8px;
  display: block;
  border-radius: 2px;
  background: currentColor;
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(4) {
  height: 16px;
}

.brand-mark i:nth-child(3) {
  height: 23px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 94px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 249, 244, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8c938e;
}

.status-pill[data-state="busy"] .status-dot {
  background: #c6842e;
  animation: pulse 1.2s ease-in-out infinite;
}

.status-pill[data-state="live"] .status-dot {
  background: #27a866;
  box-shadow: 0 0 0 4px rgba(39, 168, 102, 0.14);
}

.status-pill[data-state="error"] .status-dot {
  background: var(--red);
}

.main-content {
  padding-block: 70px 38px;
}

.join-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.72fr);
  gap: clamp(48px, 9vw, 128px);
  align-items: center;
  min-height: 590px;
}

.eyebrow,
.card-kicker,
.card-index,
.site-footer {
  font-family: Consolas, "SFMono-Regular", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.intro-block h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(48px, 7.2vw, 92px);
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: -0.065em;
}

.intro-copy {
  max-width: 580px;
  margin: 32px 0 42px;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.85;
}

.feature-list {
  max-width: 610px;
  border-top: 1px solid var(--line);
}

.feature-list > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.feature-list span {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.feature-list p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.join-card {
  position: relative;
  padding: 42px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 2px 46px 2px 2px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.join-card::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  top: -88px;
  right: -68px;
  border-radius: 50%;
  background: var(--acid);
}

.card-index {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
}

.card-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.join-card h2 {
  margin: 0 0 38px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.number-field {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px 11px;
  border-bottom: 2px solid var(--ink);
}

.number-field:focus-within {
  border-color: var(--green);
}

.number-field > span {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
}

.number-field input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.number-field input::placeholder {
  color: #b4b9b3;
}

.field-help {
  margin: 10px 0 28px;
  color: var(--muted);
  font-size: 11px;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 24px;
  border-radius: 2px;
  color: white;
  background: var(--green-dark);
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--green);
}

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

.primary-button:focus-visible,
.secondary-button:focus-visible,
.danger-button:focus-visible,
.text-button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(23, 107, 69, 0.3);
  outline-offset: 3px;
}

.button-arrow {
  font-size: 22px;
}

.form-message {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--red);
  color: var(--red);
  background: rgba(174, 56, 47, 0.07);
  font-size: 12px;
  line-height: 1.6;
}

.form-message[data-type="info"] {
  border-color: var(--green);
  color: var(--green-dark);
  background: rgba(23, 107, 69, 0.07);
}

.privacy-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.call-view {
  min-height: 590px;
}

.call-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.call-toolbar .eyebrow {
  margin-bottom: 8px;
}

.call-toolbar h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.call-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.participant-count {
  margin-right: 7px;
  color: var(--muted);
  font-size: 12px;
}

.secondary-button,
.danger-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.secondary-button:hover {
  background: var(--paper-light);
}

.danger-button {
  border-color: var(--red);
  color: var(--red);
}

.danger-button:hover:not(:disabled) {
  color: white;
  background: var(--red);
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.call-container {
  height: clamp(520px, calc(100vh - 240px), 760px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 2px 32px 2px 2px;
  background: var(--green-dark);
  box-shadow: var(--shadow);
}

.call-container iframe {
  display: block;
}

.diagnostics {
  margin-top: 64px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(250, 249, 244, 0.46);
}

.diagnostics summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 800;
}

.diagnostics summary::-webkit-details-marker {
  display: none;
}

.diagnostics summary::before {
  content: "+";
  width: 34px;
  font-family: Consolas, monospace;
  font-size: 19px;
}

.diagnostics[open] summary::before {
  content: "−";
}

.diagnostics summary > span:first-of-type {
  flex: 1;
}

.log-count {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.diagnostics-body {
  padding: 0 0 22px 34px;
}

.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.log-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.text-button {
  padding: 5px 0;
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.log-list {
  max-height: 250px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line);
  background: #eae9e1;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.log-list li {
  display: grid;
  grid-template-columns: 82px 48px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(23, 37, 31, 0.09);
  font-size: 10px;
  line-height: 1.5;
}

.log-list li:last-child {
  border-bottom: 0;
}

.log-list time {
  color: var(--muted);
}

.log-level {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}

.log-list li[data-level="warn"] .log-level {
  color: #a16413;
}

.log-list li[data-level="error"] .log-level {
  color: var(--red);
}

.log-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 17px;
  color: white;
  background: var(--green-dark);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 900px) {
  .join-layout {
    grid-template-columns: 1fr;
    gap: 58px;
    min-height: auto;
  }

  .intro-block,
  .join-card {
    max-width: 680px;
  }

  .join-card {
    width: 100%;
  }
}

@media (max-width: 660px) {
  .site-header,
  .site-footer,
  .main-content {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 72px;
  }

  .main-content {
    padding-top: 46px;
  }

  .intro-block h1 {
    font-size: clamp(44px, 14vw, 68px);
  }

  .intro-copy {
    margin-block: 26px 32px;
  }

  .join-card {
    padding: 34px 24px;
    border-radius: 2px 34px 2px 2px;
  }

  .call-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .call-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .participant-count {
    width: 100%;
    margin: 0 0 3px;
  }

  .secondary-button,
  .danger-button {
    flex: 1;
  }

  .call-container {
    height: 68vh;
    min-height: 480px;
    border-radius: 2px 22px 2px 2px;
  }

  .diagnostics {
    margin-top: 48px;
  }

  .diagnostics-body {
    padding-left: 0;
  }

  .log-toolbar {
    align-items: flex-start;
  }

  .log-list li {
    grid-template-columns: 72px 42px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
