* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #4f46e5;
  color: #fff;
}
.app-header-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.app-header-right { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.btn-ghost {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); }

.app-main { flex: 1; padding: 24px 16px; }
.page-placeholder {
  max-width: 480px;
  margin: 40px auto;
  text-align: center;
  color: #64748b;
}

.capture-page { max-width: 560px; margin: 0 auto; }
.capture-form { display: flex; gap: 8px; margin-bottom: 20px; align-items: flex-end; }
.capture-input {
  flex: 1;
  resize: none;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}
.capture-input:focus { outline: none; border-color: #4f46e5; }
.btn-primary {
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary:hover { background: #4338ca; }

.btn-mic {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #4f46e5;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-mic:hover { background: #f1f5f9; }
.btn-mic.recording {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  animation: mic-pulse 1.2s infinite;
}
.btn-mic:disabled { opacity: 0.6; cursor: default; animation: none; }
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
.mic-status { font-size: 13px; color: #64748b; margin: -12px 0 16px; }

.capture-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.capture-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.capture-body { white-space: pre-wrap; word-break: break-word; }
.capture-meta { display: flex; align-items: center; justify-content: space-between; }
.capture-time { font-size: 12px; color: #94a3b8; }
.btn-delete {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-delete:hover { color: #ef4444; background: #fef2f2; }

.app-footer {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 16px;
}
.app-footer a { color: #64748b; }
