:root {
  --bg: #faf7f2;
  --ink: #2b2420;
  --muted: #756a60;
  --accent: #c17a5a;
  --card: #ffffff;
  --border: #e8e0d6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  width: 100%;
  max-width: 480px;
  padding: 2rem 1.5rem 4rem;
  text-align: center;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 2.5rem;
}

.hidden {
  display: none;
}

#gatePassword {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.85rem;
  text-align: center;
}

#gatePassword:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-gate {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-gate:hover {
  opacity: 0.9;
}

.gate-error {
  min-height: 1.4rem;
  color: #a94b3c;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.record-btn {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(193, 122, 90, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.record-btn:active,
.record-btn.recording {
  transform: scale(0.96);
  box-shadow: 0 4px 12px rgba(193, 122, 90, 0.35);
}

.record-btn.recording {
  background: #a94b3c;
}

#recordIcon {
  font-size: 1.5rem;
}

.status {
  min-height: 1.5rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.results {
  margin-top: 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results.hidden {
  display: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.card h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.card p {
  margin: 0;
  line-height: 1.5;
}

.card.highlight {
  border-color: var(--accent);
  background: #fff6f0;
}

.copy-btn {
  margin-top: 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--accent);
  color: white;
}

.reset-btn {
  display: block;
  margin: 1.25rem auto 0;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.reset-btn:hover {
  background: var(--border);
  color: var(--ink);
}
