@font-face {
  font-family: "Noto Serif";
  src: url("fonts/NotoSerif-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #893b93;
  --card: #fffaf4;
  --ink: #351a3a;
  --muted: #6f5574;
  --line: #decfe2;
  --accent: #f28a2e;
  --accent-dark: #d96f18;
  --playing: #e5338a;
  --playing-dark: #c82475;
  --on-purple: #fffafc;
  --on-purple-muted: #ead9ee;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body { min-height: 100vh; min-height: 100dvh; margin: 0; color: var(--on-purple); background: var(--paper); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgb(255 203 145 / 70%); outline-offset: 3px; }

.audio-app {
  width: min(620px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.site-header { min-height: 76px; display: flex; align-items: center; justify-content: center; }
.brand-logo {
  display: block;
  width: clamp(220px, 52vw, 280px);
  height: auto;
}

.book-intro {
  margin: 26px 0 36px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.cover-wrap {
  aspect-ratio: 1600 / 2263;
  overflow: hidden;
  border-radius: 9px;
  background: #dbe9ec;
  box-shadow: 0 18px 38px rgb(37 11 42 / 46%), 0 5px 12px rgb(28 8 32 / 32%);
}

.book-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-copy h1, .section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.book-copy h1, .section-heading h2 { color: var(--on-purple); }

.book-copy h1 { font-size: clamp(1.75rem, 7vw, 2.65rem); line-height: 1.05; }
.book-copy .intro-bilingual {
  margin: 14px 0 0;
  color: var(--on-purple-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

.audio-section { padding-top: 23px; border-top: 1px solid rgb(255 255 255 / 24%); }
.section-heading { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-heading h2 { font-size: 1.55rem; }
.section-title-el {
  margin: 2px 0 0;
  color: var(--on-purple-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}
.section-heading > span { padding-bottom: 2px; color: var(--on-purple-muted); font-size: 0.73rem; font-weight: 700; }
.track-list { display: grid; gap: 9px; }

.track-row {
  min-height: 64px;
  padding: 9px 12px 9px 10px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.track-row.is-selected { border-color: rgb(242 138 46 / 55%); box-shadow: 0 8px 24px rgb(91 54 34 / 8%); }
.track-play {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 5px 13px rgb(154 63 32 / 18%);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.track-play:hover { background: var(--accent-dark); transform: scale(1.04); }
.track-row.is-active .track-play {
  background: var(--playing);
  box-shadow: 0 5px 15px rgb(229 51 138 / 32%);
}
.track-row.is-active .track-play:hover { background: var(--playing-dark); }
.track-play:active { transform: scale(0.96); }
.track-icon { width: 20px; height: 20px; }
.track-main { min-width: 0; }
.track-meta { margin-bottom: 7px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.track-meta strong {
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0;
}
.track-time { color: var(--muted); font-size: 0.67rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.track-text {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  line-height: 1.35;
}

.track-text-fr { color: var(--ink); }
.track-text-el { margin-top: 2px; color: var(--muted); }

.track-seek {
  --progress: 0%;
  width: 100%;
  height: 4px;
  margin: 8px 0 0;
  display: block;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--progress), #e5ddd4 var(--progress));
  cursor: pointer;
}

.track-seek::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  appearance: none;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 5px rgb(73 43 29 / 25%);
}

.track-seek::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--accent);
}

footer {
  padding: 24px 0 4px;
  color: var(--on-purple-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-align: center;
}

.footer-fr,
.footer-el { display: block; }
.footer-el { margin-top: 4px; }
noscript { display: block; padding: 20px; text-align: center; }

@media (max-width: 440px) {
  .audio-app { padding-inline: 14px; }
  .brand-logo { width: 230px; }
  .book-intro { grid-template-columns: 100px minmax(0, 1fr); gap: 17px; margin-top: 18px; }
  .book-copy h1 { font-size: 1.63rem; }
  .book-copy .intro-bilingual { font-size: 0.82rem; line-height: 1.4; }
  .section-heading h2 { font-size: 1.4rem; }
  .track-row { min-height: 60px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

