:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, sans-serif;
  background: #0b1120;
  color: #f3f6ff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, textarea { font: inherit; }
.app {
  width: min(100% - 24px, 650px);
  margin: 0 auto;
  padding: 20px 0 calc(28px + env(safe-area-inset-bottom));
}
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}
.logo, .avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #2c80ff, #8058f5);
}
.logo { width: 48px; height: 48px; font-size: 24px; }
.header h1 { margin: 0; font-size: 17px; }
.header p { margin: 4px 0 0; color: #9eacc7; font-size: 13px; }
.status {
  margin-left: auto;
  font-size: 11px;
  border-radius: 20px;
  padding: 6px 9px;
  background: #263148;
  white-space: nowrap;
}
.status.online { color: #7ff0bd; }
.status.offline { color: #ff9eaa; }
.hero {
  text-align: center;
  padding: 25px 15px;
  border: 1px solid #27334b;
  border-radius: 24px;
  background: radial-gradient(ellipse at top, #1b3158, #111a2c 75%);
}
.avatar {
  width: 86px;
  height: 86px;
  margin: 0 auto 15px;
  border-radius: 50%;
  font-size: 43px;
  box-shadow: 0 0 35px #367dff45;
}
.hero h2 { font-size: 22px; margin: 8px 0; }
.hero p { color: #b3bfd5; font-size: 14px; }
.voice-status { color: #8db8ff; font-size: 14px; margin-top: 15px; }
.panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #29364d;
  border-radius: 20px;
  background: #141e30;
}
label { display: block; font-weight: 650; margin-bottom: 10px; }
textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  color: #f3f6ff;
  background: #0c1424;
  border: 1px solid #35445f;
  border-radius: 12px;
  padding: 13px;
  line-height: 1.6;
}
textarea:focus { outline: 2px solid #438bff; }
.text-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #a8b5cc;
  font-size: 12px;
  margin: 10px 0 18px;
}
button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  touch-action: manipulation;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: #367eff; color: white; }
.secondary { background: #26354d; color: #edf3ff; }
audio { display: none; width: 100%; margin-top: 18px; }
audio.visible { display: block; }
.error { color: #ffabb4; font-size: 13px; line-height: 1.5; }
.diagnostic h3 { margin-top: 0; }
.diagnostic-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #2b374c;
  font-size: 14px;
}
.diagnostic-row strong { color: #9fc4ff; text-align: right; }
footer { color: #8391aa; font-size: 12px; text-align: center; padding: 22px 0 0; }
@media (max-width: 380px) {
  .app { width: calc(100% - 16px); }
  .header h1 { font-size: 14px; }
  .status { font-size: 10px; padding: 5px 7px; }
  .panel { padding: 15px; }
}
