:root {
  --bg: #0f172a;
  --panel: #1f2937;
  --text: #f3f4f6;
  --muted: #94a3b8;
  --primary: #16a34a;
  --primary-hover: #15803d;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --border: #334155;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: 100%;
  max-width: 420px;
}

.view {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}

.hidden { display: none; }

h1 {
  font-size: 22px;
  margin: 0 0 16px;
  font-weight: 600;
}

.recording-title {
  color: #fca5a5;
}

.hint {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 8px 0 24px;
}

.note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 16px;
}

.btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  background: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
}
.btn:active { transform: scale(.98); }

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.dot.live {
  background: #ef4444;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.timer {
  font-variant-numeric: tabular-nums;
  font-size: 48px;
  font-weight: 700;
  margin: 16px 0 24px;
  letter-spacing: 1px;
}

progress {
  width: 100%;
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  background: #334155;
  border: none;
}
progress::-webkit-progress-bar { background: #334155; }
progress::-webkit-progress-value { background: var(--primary); }
progress::-moz-progress-bar { background: var(--primary); }

/* 녹음 중 백그라운드 전환 경고: 항상 표시되는 강조 배너 */
.bg-warning-fixed {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #422006;       /* amber-950 */
  border: 1px solid #d97706; /* amber-600 */
  color: #fde68a;            /* amber-200 */
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.bg-warning-fixed strong { color: #fcd34d; }

/* 백그라운드 진입 후 복귀 시 표시되는 강한 경고 (사이렌 톤) */
.bg-warning-alert {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #7f1d1d;       /* red-900 */
  border: 1px solid #ef4444; /* red-500 */
  color: #fecaca;            /* red-200 */
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  animation: alertPulse 1s ease-in-out 3;
}
.bg-warning-alert strong { color: #fee2e2; }

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
