:root {
  color-scheme: light;
  --ink: #182230;
  --muted: #687386;
  --line: #e8ebf1;
  --accent: #5268e8;
  --accent-dark: #4356ce;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -15%, rgba(108, 129, 255, .14), transparent 42rem),
    #f5f7fb;
}

button { font: inherit; }

.shell {
  width: min(100% - 40px, 900px);
  margin: 0 auto;
  padding: 26px 0 24px;
}

.topbar, .brand, .mode-pill, .card-top, .connection, .controls, footer, footer > span {
  display: flex;
  align-items: center;
}

.topbar { justify-content: space-between; }

.brand {
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
  letter-spacing: .01em;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #7689ff, #4d5edb);
  box-shadow: 0 4px 12px rgba(73, 92, 218, .24);
  font-size: 15px;
}

.mode-pill {
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #e2e7f2;
  border-radius: 999px;
  color: #5c6679;
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.top-actions { display: flex; align-items: center; gap: 9px; }
.signin-link, .logout-button {
  padding: 7px 11px;
  border: 1px solid #dce2f2;
  border-radius: 999px;
  color: #4d5fbd;
  background: rgba(255, 255, 255, .8);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.logout-button { font-family: inherit; }
.signin-link[hidden], .logout-button[hidden] { display: none; }

.auth-guidance {
  margin: -10px 0 16px;
  padding: 12px 15px;
  border: 1px solid #f0ddba;
  border-radius: 12px;
  color: #72562f;
  background: #fffaf0;
  font-size: 12px;
  line-height: 1.7;
}
.auth-guidance[hidden] { display: none; }

.dot, .connection-dot, .service-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d98a9;
}

.dot { background: #efab50; }

.hero {
  max-width: 620px;
  margin: 54px auto 30px;
  text-align: center;
}

.eyebrow {
  color: #7784d8;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
}

h1 {
  margin: 13px 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 680;
  letter-spacing: -.045em;
}

.intro {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.call-card {
  overflow: hidden;
  border: 1px solid rgba(227, 231, 240, .95);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 55px rgba(38, 52, 100, .08), 0 2px 7px rgba(38, 52, 100, .03);
}

.card-top {
  justify-content: space-between;
  padding: 23px 26px;
  border-bottom: 1px solid #f0f2f6;
}

.section-label {
  margin: 0 0 4px;
  color: #929bad;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
}

h2 { margin: 0; font-size: 16px; font-weight: 650; }

.connection {
  gap: 8px;
  color: #707a8d;
  font-size: 12px;
}

.connection.online .connection-dot, .service-dot.online { background: #43b883; }
.connection.offline .connection-dot, .service-dot.offline { background: #df6670; }
.connection.active .connection-dot { background: #7884fa; box-shadow: 0 0 0 4px #eef0ff; }

.voice-stage {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 27px 20px 17px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(108, 128, 255, .065), transparent 45%),
    #fff;
}

.avatar {
  position: relative;
  display: grid;
  width: 106px;
  height: 106px;
  place-items: center;
  margin: 3px 0 18px;
}

.avatar-core {
  z-index: 1;
  width: 62px;
  height: 62px;
  border: 1px solid #dce2ff;
  border-radius: 22px;
  background: linear-gradient(145deg, #f0f2ff, #dfe4ff);
  box-shadow: inset 0 1px 2px #fff, 0 9px 22px rgba(90, 109, 233, .13);
}

.avatar-core::before, .avatar-core::after {
  position: absolute;
  top: 45px;
  width: 5px;
  height: 10px;
  border-radius: 5px;
  background: #6e7de1;
  content: "";
}

.avatar-core::before { left: 45px; }
.avatar-core::after { right: 45px; }

.avatar-ring {
  position: absolute;
  border: 1px solid rgba(126, 142, 244, .22);
  border-radius: 50%;
}

.ring-one { inset: 7px; }
.ring-two { inset: -5px; border-color: rgba(126, 142, 244, .12); }

.avatar.listening .ring-one, .avatar.listening .ring-two { animation: pulse 1.8s ease-out infinite; }
.avatar.listening .ring-two { animation-delay: .45s; }

@keyframes pulse {
  0% { transform: scale(.93); opacity: .1; }
  40% { opacity: .85; }
  100% { transform: scale(1.08); opacity: .06; }
}

.session-state { margin: 0; font-size: 14px; font-weight: 650; }
.session-hint { min-height: 20px; margin: 5px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.timer { margin: 11px 0 0; color: #77809a; font-variant-numeric: tabular-nums; font-size: 12px; }
.meter { width: min(100%, 320px); height: 42px; margin-top: 9px; }
#remote-audio { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.controls {
  justify-content: center;
  gap: 11px;
  padding: 16px 24px 24px;
}

.start-button, .end-button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.start-button {
  min-width: 164px;
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 13px rgba(82, 104, 232, .19);
  font-size: 13px;
  font-weight: 650;
}

.start-button:not(:disabled):hover { background: var(--accent-dark); transform: translateY(-1px); }
.start-button:disabled, .end-button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.mic-icon { font-size: 10px; }

.end-button {
  border: 1px solid #e6e9ef;
  color: #485366;
  background: #fff;
  font-size: 13px;
}

.end-button:not(:disabled):hover { border-color: #d4d9e3; background: #f8f9fb; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(82, 104, 232, .34); outline-offset: 3px; }

.billing-consent {
  display: flex;
  max-width: 570px;
  gap: 9px;
  align-items: flex-start;
  margin: 0 auto 20px;
  padding: 0 20px;
  color: #686f80;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
}

.billing-consent[hidden] { display: none; }
.billing-consent input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); }

.error-box {
  margin: 0 24px 22px;
  padding: 11px 13px;
  border: 1px solid #f0d3d5;
  border-radius: 10px;
  color: #9d3e49;
  background: #fff8f8;
  font-size: 12px;
  line-height: 1.6;
}

.notice {
  display: flex;
  gap: 11px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid #e7eafd;
  border-radius: 14px;
  color: #616c83;
  background: #f5f6ff;
  font-size: 12px;
  line-height: 1.7;
}

.notice p { margin: 0; }
.notice strong { color: #414f77; }
.notice-icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  margin-top: 1px;
  border: 1px solid #cbd2fa;
  border-radius: 50%;
  color: #6978d7;
  font-size: 11px;
  font-weight: 700;
}

footer {
  justify-content: space-between;
  gap: 12px;
  margin-top: 19px;
  color: #8b94a4;
  font-size: 11px;
}

footer > span { gap: 7px; }
.service-dot { width: 6px; height: 6px; }

@media (max-width: 560px) {
  .shell { width: min(100% - 28px, 900px); padding-top: 18px; }
  .hero { margin-top: 42px; }
  .intro { font-size: 13px; }
  .card-top { padding: 19px 18px; }
  .voice-stage { min-height: 277px; }
  .controls { padding-right: 16px; padding-left: 16px; }
  footer { align-items: flex-start; flex-direction: column; }
  .top-actions { gap: 5px; }
  .mode-pill { padding: 7px 8px; font-size: 11px; }
  .signin-link, .logout-button { padding: 7px 8px; font-size: 11px; }
}

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