:root {
  --bg: #f5f7f6;
  --card: #ffffff;
  --text: #14201e;
  --muted: #5b6b68;
  --accent: #0f766e;
  --accent-text: #ffffff;
  --line: #d5dedb;
  --error-bg: #fdecec;
  --error-text: #8a1c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1514;
    --card: #17211f;
    --text: #e8f0ee;
    --muted: #9bb0ac;
    --accent: #2dd4bf;
    --accent-text: #06201c;
    --line: #2a3835;
    --error-bg: #3a1a1a;
    --error-text: #ffb4b4;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 0 32px; }
.brand__book { margin: 0 0 16px; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; }
.title { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.25; }
.hint { margin: 0 0 20px; color: var(--muted); font-size: 0.95rem; }

.controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.btn { font: inherit; border: 0; cursor: pointer; border-radius: 999px; min-height: 52px; padding: 0 18px; color: var(--text); background: transparent; touch-action: manipulation; }
.btn--ghost { border: 1px solid var(--line); font-size: 0.95rem; }
.btn--ghost[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn--play { width: 84px; height: 84px; padding: 0; background: var(--accent); color: var(--accent-text); font-size: 2rem; }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.progress { margin-bottom: 14px; }
input[type="range"] { width: 100%; height: 36px; accent-color: var(--accent); }
.times { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }

.speed { display: flex; gap: 10px; justify-content: center; }
.chip { font: inherit; font-size: 0.95rem; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; touch-action: manipulation; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.textbox { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }
.textbox summary { cursor: pointer; min-height: 44px; line-height: 44px; font-weight: 600; color: var(--accent); }
.lines { margin: 8px 0 0; padding-left: 22px; }
.lines li { margin-bottom: 12px; }
.lines .en { font-weight: 600; }
.lines .pron { color: var(--accent); }
.lines .es { color: var(--muted); font-size: 0.95rem; }

.error { background: var(--error-bg); color: var(--error-text); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.error button { font: inherit; margin-left: 8px; }

.group { margin: 18px 0 0; }
.group h2 { margin: 0 0 8px; font-size: 1rem; color: var(--muted); font-weight: 600; }
.group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.group a { display: inline-block; min-height: 44px; line-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }

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

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

.btn:disabled { opacity: 0.5; cursor: default; }
