/* WieLiebe — system fonts only, no external requests (see CLAUDE.md) */

:root {
  --rose: #d98a92;
  --rose-deep: #b5616b;
  --plum: #3b2c35;
  --cream: #fff8f3;
  --card: #ffffff;
  --muted: #7a6a72;
  --border: #ecdfe1;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--plum);
  font-family: var(--sans);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 80px;
}

.lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.lang-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--rose);
  color: white;
  border-color: var(--rose);
}

.screen {
  display: none;
  width: 100%;
  max-width: 520px;
  text-align: center;
  margin-top: 48px;
}

.screen.active { display: block; }

h1 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 12px;
}

.sub {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 1rem;
}

.mode-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.mode-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--plum);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
}

.mode-btn.active {
  background: var(--rose-deep);
  color: white;
  border-color: var(--rose-deep);
}

.panel { display: none; margin-bottom: 24px; }
.panel.active { display: block; }

.record-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--rose-deep);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.record-btn:active { transform: scale(0.96); }

.record-btn.recording {
  animation: pulse 1.4s infinite;
  background: #c23b4a;
}

.record-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
}

.record-btn.recording .record-dot {
  border-radius: 4px;
  width: 18px;
  height: 18px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 59, 74, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(194, 59, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 59, 74, 0); }
}

.status {
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.record-timer {
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
  color: var(--rose-deep);
  margin: 0 0 2px;
  min-height: 1.6rem;
  letter-spacing: 0.02em;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  margin: 4px 0 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.waveform.active { opacity: 1; }

.waveform-bar {
  width: 3px;
  border-radius: 3px;
  background: var(--rose-deep);
  height: 3px;
  transition: height 0.06s ease;
  flex-shrink: 0;
}

audio {
  display: none;
  width: 100%;
  margin: 10px 0;
}

audio.visible { display: block; }

.link-btn {
  display: none;
  background: none;
  border: none;
  color: var(--rose-deep);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 4px;
}

.link-btn.visible { display: inline; }

textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 1rem;
  resize: vertical;
  background: var(--card);
}

.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 20px;
  text-align: left;
}

.contact-fields .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.contact-fields label {
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-fields input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--card);
  color: var(--plum);
}

.contact-fields input:focus {
  outline: none;
  border-color: var(--rose);
}

.consent {
  text-align: left;
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.consent label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.consent input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.consent a { color: var(--rose-deep); }

.submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--rose-deep);
  color: white;
  font-size: 1.05rem;
  cursor: pointer;
}

.submit-btn:disabled {
  background: #d8c9cc;
  cursor: not-allowed;
}

.error {
  color: #b3261e;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 10px;
}

.ref {
  font-size: 1.1rem;
  margin: 18px 0 4px;
}

.ref code {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 1rem;
}

.ref-note {
  color: var(--muted);
  font-size: 0.88rem;
}

footer {
  position: fixed;
  bottom: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a { color: var(--muted); text-decoration: underline; }
