* { box-sizing: border-box; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #faf7f6;
  color: #1c1b1b;
}
.view { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; margin-bottom: 12px; }
.muted { color: #6b6461; font-size: 0.9rem; }
.center { text-align: center; }
.error { color: #b3261e; min-height: 1.2em; margin-top: 8px; }

button {
  font: inherit; border: 1px solid #c9c2c0; border-radius: 20px;
  padding: 8px 18px; background: #fff; cursor: pointer;
}
button:hover { filter: brightness(0.96); }
button.primary { background: #b3261e; border-color: #b3261e; color: #fff; }
button.danger { background: #7a1410; border-color: #7a1410; color: #fff; }
button.small { padding: 4px 12px; font-size: 0.85rem; }
button.big { padding: 12px 28px; font-size: 1.05rem; }
input[type=text], input[type=email], input[type=password] {
  font: inherit; width: 100%; padding: 10px 12px; margin: 6px 0;
  border: 1px solid #c9c2c0; border-radius: 10px;
}

/* login */
.login-card {
  max-width: 360px; margin: 12vh auto; padding: 28px;
  background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.08);
  text-align: center;
}
.login-card h1 { margin-bottom: 4px; }
.login-card p { margin-bottom: 16px; }
.login-card button { width: 100%; margin-top: 10px; }
.divider { margin: 14px 0 4px; color: #a9a2a0; font-size: 0.85rem; }

/* header */
header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 16px; }

/* add zone */
.add-zone {
  background: #fff; border: 2px dashed #d8cfcc; border-radius: 16px;
  padding: 20px; text-align: center; margin-bottom: 20px;
}
.add-zone.dragover { border-color: #b3261e; background: #fff3f1; }
.drop-hint { margin-top: 12px; color: #6b6461; font-size: 0.9rem; }
.drop-hint button { margin-top: 8px; }
#record-timer { font-size: 1.3rem; font-weight: 600; margin-left: 12px; }

/* clip list */
.clip {
  background: #fff; border-radius: 14px; padding: 12px 16px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 12px;
}
.clip .info { flex: 1; min-width: 0; }
.clip .label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip .meta { font-size: 0.8rem; color: #6b6461; }
.badge {
  display: inline-block; background: #e6f4e6; color: #2e7d32;
  font-size: 0.7rem; padding: 1px 8px; border-radius: 10px; margin-left: 6px;
}
.clip .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.clip .actions button { padding: 6px 12px; font-size: 0.85rem; }

/* trim modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 16px; padding: 20px;
  width: 100%; max-width: 720px;
}
#waveform { width: 100%; height: 160px; margin-top: 12px; border-radius: 8px; background: #f4efed; touch-action: none; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 0.95rem; }
.row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
