/* Estilos de la app: pensados para usar con una mano en el iPhone */
:root {
  --green: #2e7d5b;
  --green-dark: #22603f;
  --bg: #f6f7f4;
  --card: #ffffff;
  --text: #1d2420;
  --muted: #5e6b63;
  --border: #dfe4df;
  --red: #b3261e;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

.page-narrow { max-width: 420px; justify-content: center; }

.title { margin: 0; font-size: 1.6rem; text-align: center; color: var(--green-dark); }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.form { display: flex; flex-direction: column; gap: 8px; }

label { font-weight: 600; }

input, textarea {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.btn {
  font: inherit;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.btn-link { border: none; background: none; color: var(--green-dark); padding: 10px 0; min-height: 44px; }

.row { display: flex; gap: 12px; }
.row .btn { flex: 1; }

.mic-area { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 24px 0; }

.mic-button {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(46, 125, 91, 0.35);
}

.mic-button img { border-radius: 50%; }

.mic-test { display: flex; flex-direction: column; gap: 12px; }

.level { height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; }
.level-bar { height: 100%; width: 0; background: var(--green); transition: width 60ms linear; }

audio { width: 100%; }

.checks { list-style: none; margin: 8px 0 0; padding: 0; }
.checks .ok { color: var(--green-dark); }
.checks .ko { color: var(--red); }

.status { margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.error { color: var(--red); margin: 0; }
.placeholder { text-align: center; }

.disclaimer {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
