:root {
  --ink: #10130f;
  --paper: #f7ffe9;
  --acid: #bcff3f;
  --orange: #ff7a1a;
  --coal: #0a1008;
  --muted: #6f7d68;
  --line: rgba(16, 19, 15, 0.14);
  font-family: "Trebuchet MS", "Noto Sans SC", Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(188, 255, 63, 0.65), transparent 24rem),
    radial-gradient(circle at 90% 12%, rgba(255, 122, 26, 0.35), transparent 24rem),
    linear-gradient(135deg, #f9ffe9, #d9f7a4 45%, #5c8a34);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.minimal-app {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.chat-room {
  display: grid;
  width: min(820px, 100%);
  min-height: min(760px, calc(100vh - 36px));
  grid-template-rows: auto auto 1fr auto auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 246, 0.88);
  box-shadow: 0 28px 90px rgba(20, 48, 12, 0.28);
  padding: clamp(18px, 4vw, 34px);
  backdrop-filter: blur(18px);
}

.bot-list-view,
.chat-view {
  display: grid;
  gap: 14px;
}

.chat-view[hidden],
.bot-list-view[hidden] {
  display: none;
}

.wechat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px 16px;
}

.wechat-topbar strong {
  font-size: 1.25rem;
}

.wechat-topbar a,
.back-btn {
  border: 0;
  border-radius: 999px;
  background: var(--coal);
  color: var(--paper);
  padding: 9px 13px;
  font-weight: 900;
  text-decoration: none;
}

.bot-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
}

.bot-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px;
  text-align: left;
}

.bot-item:last-child {
  border-bottom: 0;
}

.bot-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--acid);
  font-size: 1.6rem;
}

.bot-name {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.bot-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.bot-provider {
  color: rgba(16, 19, 15, 0.45);
  font-size: 0.82rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2.6rem, 9vw, 6.2rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

.room-head p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.version-badge {
  display: inline-block;
  margin-top: 10px;
  color: rgba(16, 19, 15, 0.5);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.persona-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(16, 19, 15, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px;
}

.persona-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#personaSelect,
#voiceSelect,
#brainSelect {
  width: 100%;
  border: 0;
  border-radius: 16px;
  outline: none;
  background: var(--coal);
  color: var(--paper);
  padding: 13px 14px;
  font: inherit;
  font-weight: 900;
}

#personaHint,
#voiceHint,
#brainHint {
  color: var(--muted);
  line-height: 1.55;
}

#voiceSelect {
  background: linear-gradient(135deg, var(--coal), #26351d);
}

.voice-actions {
  display: grid;
  gap: 8px;
}

.provider-voice-panel {
  display: grid;
  gap: 8px;
}

.provider-voice-panel[hidden] {
  display: none;
}

.native-voice-card {
  border-radius: 16px;
  background: linear-gradient(135deg, #081017, #18324a);
  color: var(--paper);
  padding: 13px 14px;
  font: inherit;
  font-weight: 900;
}

.preview-voice-btn {
  width: max-content;
  border: 1px solid rgba(16, 19, 15, 0.14);
  border-radius: 999px;
  background: var(--acid);
  color: var(--coal);
  padding: 9px 14px;
  font-size: 0.92rem;
  font-weight: 900;
}

.status-card {
  display: flex;
  gap: 14px;
  align-items: center;
  border-radius: 24px;
  background: var(--coal);
  color: var(--paper);
  padding: 16px;
}

.status-card small {
  display: block;
  margin-top: 4px;
  color: rgba(247, 255, 233, 0.72);
}

.call-orb {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--acid);
  box-shadow: 0 0 0 8px rgba(188, 255, 63, 0.16);
}

.call-orb.speaking {
  animation: pulseOrb 850ms ease-in-out infinite alternate;
}

.call-orb.listening {
  background: var(--orange);
  animation: pulseOrb 520ms ease-in-out infinite alternate;
}

.minimal-log {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.48);
  padding: 16px;
}

.chat-bubble {
  width: fit-content;
  max-width: min(650px, 92%);
  border-radius: 20px;
  padding: 13px 15px;
  line-height: 1.65;
}

.chat-bubble.tutor {
  background: var(--coal);
  color: var(--paper);
}

.replay-voice-btn {
  display: block;
  width: fit-content;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(174, 255, 35, 0.16);
  color: var(--paper);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.replay-voice-btn:disabled {
  opacity: 0.55;
}

.chat-bubble.user {
  justify-self: end;
  background: var(--acid);
  color: var(--ink);
}

.live-transcript {
  min-height: 52px;
  border: 1px dashed rgba(16, 19, 15, 0.24);
  border-radius: 20px;
  background: rgba(188, 255, 63, 0.16);
  padding: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.control-row button {
  border: 0;
  border-radius: 999px;
  background: var(--coal);
  color: var(--paper);
  padding: 15px 18px;
  font-weight: 900;
}

#oneTapBtn {
  background: var(--orange);
  color: white;
}

.minimal-input {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 22px;
  outline: none;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 15px 16px;
}

.minimal-input:focus {
  border-color: var(--orange);
}

@keyframes pulseOrb {
  from {
    transform: scale(0.92);
  }

  to {
    transform: scale(1.08);
  }
}

@media (max-width: 620px) {
  .control-row {
    grid-template-columns: 1fr;
  }
}
