* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Meiryo", sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  text-align: center;
}

h1 {
  font-size: 1.5rem;
  color: #1a202c;
  margin-bottom: 8px;
}

.description {
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ステータス */
.status {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 20px;
}
.status.idle     { background: #edf2f7; color: #718096; }
.status.recording { background: #fff5f5; color: #e53e3e; animation: pulse 1.2s infinite; }
.status.done     { background: #f0fff4; color: #38a169; }
.status.sending  { background: #ebf8ff; color: #3182ce; }
.status.error    { background: #fff5f5; color: #e53e3e; }

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

/* タイマー */
.timer {
  font-size: 2.5rem;
  font-weight: bold;
  color: #2d3748;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* 波形 */
.waveform {
  margin-bottom: 24px;
  background: #f7fafc;
  border-radius: 8px;
  overflow: hidden;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
canvas {
  display: block;
}

/* ボタン共通 */
.controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn .icon {
  font-size: 0.8rem;
}

.btn-record {
  background: #e53e3e;
  color: #fff;
}
.btn-record:not(:disabled):hover { background: #c53030; }

.btn-stop {
  background: #4a5568;
  color: #fff;
}
.btn-stop:not(:disabled):hover { background: #2d3748; }

.btn-send {
  background: #3182ce;
  color: #fff;
}
.btn-send:not(:disabled):hover { background: #2b6cb0; }

.btn-retry {
  background: #edf2f7;
  color: #4a5568;
}
.btn-retry:not(:disabled):hover { background: #e2e8f0; }

/* プレビュー */
.preview {
  background: #f7fafc;
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
}
.preview p {
  font-size: 0.9rem;
  color: #4a5568;
  margin-bottom: 12px;
}
.preview audio {
  width: 100%;
  margin-bottom: 16px;
}
.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* 結果 */
.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.result.success {
  background: #f0fff4;
  color: #276749;
}
.result.error-msg {
  background: #fff5f5;
  color: #c53030;
}

.hidden { display: none; }
