* { box-sizing: border-box; }

:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #263238;
  background: #fff8e7;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 213, 79, .24) 0 7%, transparent 7.2%),
    radial-gradient(circle at 92% 88%, rgba(255, 183, 77, .14) 0 12%, transparent 12.2%),
    linear-gradient(145deg, #fffaf0 0%, #f8f5ff 100%);
}

.app-shell {
  width: min(760px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  position: relative;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.avatar, .mini-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(151, 104, 20, .12);
}
.avatar { width: 68px; height: 68px; font-size: 36px; }
.mini-avatar { width: 38px; height: 38px; font-size: 22px; flex: 0 0 auto; }
.eyebrow { margin: 0 0 2px; color: #8b6c2f; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(24px, 5vw, 34px); color: #3d3423; }

.language {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #776b50;
}
.header-controls { display: flex; gap: 8px; align-items: flex-end; }
.language select,
.voice-control select {
  min-width: 112px;
  border: 1px solid #eee8dc;
  border-radius: 14px;
  padding: 10px 12px;
  background: white;
  color: #263238;
  box-shadow: 0 5px 18px rgba(82, 70, 105, .08);
}
.voice-control { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: #776b50; }
.voice-control select { max-width: 180px; }

.chat-card {
  min-height: 250px;
  border-radius: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 18px 50px rgba(91, 73, 122, .10);
}
.chat-row { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-row p {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: 17px;
}
.assistant p { background: #fff3b8; border: 1px solid #ffeca0; border-top-left-radius: 7px; }
.user { justify-content: flex-end; }
.user p { max-width: 78%; background: #e9f3ff; border-top-right-radius: 7px; }

.mic-area {
  min-height: 205px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.status { margin: 14px 0 12px; color: #736b59; font-weight: 700; }
.mic-button {
  width: 108px;
  height: 108px;
  border: 8px solid white;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffbd4a, #ff8f70);
  box-shadow: 0 12px 32px rgba(235, 126, 94, .28);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.mic-button span { font-size: 44px; }
.mic-button:hover { transform: translateY(-2px); }
.mic-button.listening {
  animation: pulse 1.2s infinite;
  background: linear-gradient(145deg, #ff7d7d, #ef5350);
}
.text-button {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #775f29;
  font-weight: 700;
  cursor: pointer;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick-actions button {
  min-height: 78px;
  border: 0;
  border-radius: 18px;
  background: white;
  color: #4b493f;
  border: 1px solid #f2edf4;
  box-shadow: 0 7px 22px rgba(91, 73, 122, .08);
  font-size: 27px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.quick-actions button:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(91, 73, 122, .12); }
.quick-actions span { display: block; margin-top: 5px; font-size: 13px; font-weight: 800; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(239, 83, 80, .2), 0 0 0 0 rgba(239, 83, 80, .3); }
  50% { box-shadow: 0 10px 30px rgba(239, 83, 80, .32), 0 0 0 16px rgba(239, 83, 80, 0); }
}

@media (max-width: 520px) {
  .app-shell { width: min(100% - 24px, 760px); }
  header { align-items: flex-start; }
  .eyebrow { display: none; }
  .avatar { width: 52px; height: 52px; font-size: 29px; }
  .chat-card { min-height: 220px; }
  .header-controls { max-width: 210px; flex-wrap: wrap; justify-content: flex-end; }
  .voice-control select { max-width: 112px; }
}
