/* ============================================================
   Inkwell English - core stylesheet
   Palette: warm paper + ink + tea-green accent
   ============================================================ */

:root {
  --paper:        #fbfaf6;
  --paper-deep:   #f3f0e6;
  --card:         #ffffff;
  --ink:          #1a1814;
  --ink-soft:     #3a362f;
  --ink-muted:    #6b6658;
  --ink-faint:    #9a948a;
  --rule:         #e4dfd2;
  --rule-soft:    #eeeadc;
  --accent:       #1f5f52;       /* tea-green */
  --accent-deep:  #164a40;
  --accent-soft:  #e6efec;
  --highlight:    #f4d16a;       /* gentle marker */
  --danger:       #b8432c;
  --success:      #3a7d5c;
  --shadow-sm:    0 1px 2px rgba(26,24,20,0.04), 0 1px 3px rgba(26,24,20,0.06);
  --shadow-md:    0 4px 12px rgba(26,24,20,0.06), 0 2px 4px rgba(26,24,20,0.05);
  --shadow-lg:    0 10px 30px rgba(26,24,20,0.08), 0 4px 10px rgba(26,24,20,0.05);
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    18px;
  --font-serif:   "Fraunces", "Newsreader", "Source Serif Pro", "Noto Serif SC", ui-serif, Georgia, serif;
  --font-sans:    "Inter", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw:         1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}

/* ---- typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.12; font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); line-height: 1.22; }
h3 { font-size: 1.2rem; line-height: 1.3; }
h4 { font-size: 1rem; color: var(--ink-soft); }
p  { margin: 0 0 1em; color: var(--ink-soft); }
a  { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
a:hover { border-bottom-color: var(--accent); }
small { color: var(--ink-faint); }
code, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}
kbd {
  box-shadow: inset 0 -1px 0 var(--rule);
}
hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
::selection { background: var(--highlight); color: var(--ink); }

/* ---- layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.mb-lg { margin-bottom: 3rem; }
.spacer { flex: 1; }

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,250,246,0.88);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
  border: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav {
  display: flex;
  gap: 1.4rem;
  margin-left: 1.2rem;
}
.nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  border: none;
  padding: 0.3rem 0;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover, .nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

/* language switcher */
.lang-switch {
  display: inline-flex;
  background: var(--paper-deep);
  border-radius: 999px;
  padding: 2px;
  border: 1px solid var(--rule-soft);
}
.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.8rem;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.lang-switch button.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
}
.btn:hover { background: var(--paper-deep); border-color: var(--ink-faint); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn.primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn.accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-soft);
}
.btn.ghost:hover { background: var(--paper-deep); }
.btn.small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn.large { padding: 0.9rem 1.6rem; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* inline link styled like a button */
a.btn { border-bottom-color: transparent; }
a.btn:hover { border-bottom-color: transparent; }

/* ---- hero ---- */
.hero {
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--rule-soft);
  background:
    radial-gradient(ellipse 80% 40% at 10% -10%, rgba(31,95,82,0.06), transparent 60%),
    radial-gradient(ellipse 60% 30% at 100% 0%, rgba(244,209,106,0.08), transparent 60%);
}
.hero h1 {
  max-width: 18ch;
  margin-bottom: 0.6em;
}
.hero .eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-block;
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2rem;
}
.hero .actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---- sections ---- */
.section { padding: 4rem 0; }
.section.tight { padding: 2.5rem 0; }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-title h2 { margin-bottom: 0; }
.section-title .lede { color: var(--ink-muted); margin: 0; max-width: 48ch; }

/* ---- cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--rule); }
.card h3 { margin-top: 0.2rem; }
.card p  { color: var(--ink-muted); font-size: 0.95rem; }
.card .tag { display: inline-block; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav { display: none; }
}

/* ---- tags ---- */
.tag {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-right: 0.35rem;
}
.tag.accent { color: var(--accent-deep); background: var(--accent-soft); border-color: #c6d9d3; }
.tag.warn   { color: #8a5a00; background: #fbf1d6; border-color: #e9d9a7; }
.tag.free   { color: var(--success); background: #e6f0ea; border-color: #c7ddd0; }
.tag.paid   { color: var(--ink-soft); background: var(--paper-deep); }

/* ---- method page timeline ---- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
}
.step {
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 4rem;
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.3rem;
  top: 1.3rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}
.step h3 { margin-bottom: 0.3rem; }

/* ---- library ---- */
.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 1.5rem;
  position: sticky;
  top: 62px;
  background: var(--paper);
  z-index: 20;
}
.chip {
  appearance: none;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink-soft);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.library-toolbar .search {
  flex: 1 1 220px;
  min-width: 180px;
}
input[type="text"], input[type="password"], input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,95,82,0.12);
}

.library-group { margin: 2.5rem 0; }
.library-group h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}
.library-group .sub {
  color: var(--ink-muted);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.resource {
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
}
.resource:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--rule); }
.resource h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.resource h3 a { color: var(--ink); border: none; }
.resource h3 a:hover { color: var(--accent); }
.resource .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}
.resource p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 0.8rem;
  flex: 1;
}
.resource .link {
  font-size: 0.82rem;
  color: var(--accent);
  border: none;
}
.resource .link:hover { text-decoration: underline; }
.resource.empty {
  background: transparent;
  border: 1px dashed var(--rule);
  color: var(--ink-faint);
  text-align: center;
  padding: 2rem 1rem;
  box-shadow: none;
}

/* ---- practice ---- */
.practice-shell {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.8rem;
  align-items: start;
}
@media (max-width: 900px) {
  .practice-shell { grid-template-columns: 1fr; }
  .practice-side { order: -1; }
}
.practice-card {
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-md);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.practice-progress {
  height: 4px;
  background: var(--rule-soft);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}
.practice-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.3s ease;
}
.prompt-cn {
  font-size: 1.25rem;
  color: var(--ink);
  font-family: var(--font-serif);
  margin-bottom: 0.3rem;
}
.prompt-hint {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1.8rem;
  min-height: 1.2em;
}
.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.3rem;
  min-height: 44px;
}
.word-chip {
  appearance: none;
  font-family: inherit;
  font-size: 1rem;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
}
.word-chip:hover { background: var(--card); border-color: var(--ink-faint); }
.word-chip.used { opacity: 0; pointer-events: none; transform: translateY(-4px); }
.answer-area {
  min-height: 80px;
  background: var(--paper-deep);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-content: flex-start;
  margin-bottom: 1.3rem;
  cursor: text;
  transition: border-color 0.15s, background 0.15s;
}
.answer-area.correct { background: #eef6f0; border-color: #b9d6c4; }
.answer-area.wrong   { background: #fbecec; border-color: #e5bdb3; }
.answer-chip {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.12s;
}
.answer-chip:hover { border-color: var(--danger); color: var(--danger); }
.practice-footer {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  flex-wrap: wrap;
}
.practice-side .side-card {
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 1.2rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.side-card h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
.side-card .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.stat-row strong {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--ink);
  font-weight: 500;
}
.level-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.level-pick .chip { justify-self: stretch; text-align: center; font-weight: 500; }

/* ---- auth pages ---- */
.auth-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2rem;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-size: 1.7rem;
  margin-bottom: 0.2em;
  text-align: center;
}
.auth-card .lede {
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 2rem;
}
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
.form-error, .form-notice {
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
}
.form-error  { background: #fbecec; color: var(--danger); border: 1px solid #e5bdb3; }
.form-notice { background: #eef6f0; color: var(--success); border: 1px solid #b9d6c4; }
.form-foot {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: 1.4rem;
}

/* ---- footer ---- */
.site-footer {
  margin-top: auto;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer a { color: var(--ink-muted); border: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .col { display: flex; flex-direction: column; gap: 0.35rem; }

/* ---- utility ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* skeleton for async content */
.skeleton {
  background: linear-gradient(90deg, var(--paper-deep), var(--rule-soft), var(--paper-deep));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: var(--radius-sm);
  min-height: 1em;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 100;
}
.toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }

/* keyboard legend */
.kbd-hints {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.6rem;
}
.kbd-hints span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ---- mode switcher tabs on the practice page ---- */
.mode-tabs {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper-deep);
  margin-bottom: 1.4rem;
  gap: 2px;
}
.mode-tabs button {
  appearance: none;
  font-family: inherit;
  font-size: 0.88rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s;
}
.mode-tabs button.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.mode-tabs button:hover:not(.on) { color: var(--ink); }

/* ---- dictation ---- */
.dict-input {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem;
  resize: vertical;
  min-height: 110px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.dict-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,95,82,0.14);
}
.dict-input.correct { background: #eef6f0; border-color: #b9d6c4; }
.dict-input.wrong   { background: #fbecec; border-color: #e5bdb3; }

.dict-diff {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  margin-top: 1rem;
}
.dict-diff .diff-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}
.diff-ok      { color: var(--ink); }
.diff-missing { background: #fde2dd; color: #b8432c; border-radius: 3px; padding: 0 3px; text-decoration: underline dotted; }
.diff-wrong   { background: #fde2dd; color: #b8432c; border-radius: 3px; padding: 0 3px; text-decoration: line-through; }
.diff-extra   { color: #b8432c; text-decoration: line-through; opacity: 0.75; }
.diff-correct { color: var(--success); }

.audio-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.4rem 0 1.2rem;
}
.btn-audio {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-audio:hover { background: var(--paper-deep); border-color: var(--ink-faint); transform: scale(1.03); }
.btn-audio:active { transform: scale(0.97); }
.btn-audio.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  width: 80px; height: 80px;
  font-size: 1.9rem;
}
.btn-audio.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-audio.playing { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,95,82,0.35); }
  50%      { box-shadow: 0 0 0 12px rgba(31,95,82,0); }
}
