:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --panel: #1f2937;
  --panel-soft: rgba(148, 163, 184, 0.08);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --danger: #f87171;
  --success: #34d399;
  --border: rgba(148, 163, 184, 0.25);
  --shadow: rgba(15, 23, 42, 0.3);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  padding: 16px 16px 24px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ghost-button,
.primary-button {
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  transition: opacity 0.15s ease;
}

.ghost-button {
  background: transparent;
  color: var(--text);
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #06131d;
  font-weight: 700;
}

.main-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-message {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.status-message.error {
  color: var(--danger);
}

.status-message.success {
  color: var(--success);
}

.microphone-button {
  width: min(100%, 280px);
  min-height: 220px;
  margin: 8px auto 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #06131d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.25);
}

.microphone-button.is-listening {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.25);
}

.microphone-emoji {
  font-size: 4rem;
  line-height: 1;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group input,
.settings-panel input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.2);
  color: var(--text);
  padding: 0 14px;
}

.input-group input::placeholder,
.settings-panel input::placeholder {
  color: var(--muted);
}

.settings-panel {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-panel.hidden {
  display: none;
}

.settings-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.setting-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.result-panel {
  padding: 12px 0 0;
  min-height: 24px;
}

.app-version {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.weather-box,
.helper-box {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.weather-location {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.weather-day {
  color: var(--muted);
  margin-bottom: 10px;
}

.weather-main {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.weather-details,
.weather-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--text);
  font-size: 0.96rem;
}

.weather-details {
  margin-bottom: 8px;
}

.helper-box strong {
  display: block;
  margin-bottom: 8px;
}

.helper-box div {
  margin: 6px 0;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 480px) {
  .app-shell {
    padding-top: 24px;
  }
}
