@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Lexend-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Lexend-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Lexend-700.ttf') format('truetype');
}

:root {
  --bg: #fff8e7;
  --card: #fffef9;
  --ink: #1a1a1a;
  --muted: #5c5346;
  --accent: #ff6f00;
  --accent2: #1565c0;
  --hi: #ffe566;
  --sent: #fff3b0;
  --border: #f0d9a8;
  --ok: #2e7d32;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Lexend', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 14px 80px;
}

.hero {
  background: linear-gradient(135deg, #ff8a65, #ffd54f);
  border-radius: 22px;
  padding: 22px 18px;
  text-align: center;
  color: #fff;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(255,111,0,.25);
}
.hero h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.hero p { margin: 8px 0 0; font-size: 1.05rem; opacity: .95; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
  justify-content: center;
}
.toc a {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
}
.toc a:hover { border-color: var(--accent); color: var(--accent); }

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 18px 16px 16px;
  margin: 0 0 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: #bf360c;
}
.card.tue h2 { color: #0d47a1; }
.card .prompt {
  background: #fff3e0;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  font-size: 1.05rem;
  color: #4e342e;
}
.card.tue .prompt {
  background: #e3f2fd;
  border-left-color: var(--accent2);
  color: #1a237e;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,254,249,.95);
  padding: 8px 0;
  backdrop-filter: blur(6px);
}
.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-play {
  background: var(--accent);
  color: #fff;
  min-width: 120px;
  box-shadow: 0 3px 0 #e65100;
}
.btn-play:active { transform: translateY(2px); box-shadow: none; }
.btn-replay {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--border);
}
.speed {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.speed button {
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
  padding: 8px 12px;
  cursor: pointer;
}
.speed button.active {
  background: #fff8e1;
  border-color: var(--accent);
  color: var(--accent);
}

.script {
  font-size: 1.35rem; /* ~22px base; bump on larger screens */
  line-height: 1.85;
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
}
@media (min-width: 600px) {
  .script { font-size: 1.55rem; } /* ~25-28px */
}
@media (min-width: 900px) {
  .script { font-size: 1.75rem; } /* ~28-32px */
}

.script .w {
  display: inline;
  border-radius: 6px;
  padding: 1px 2px;
  cursor: pointer;
  transition: background .08s linear, box-shadow .08s linear;
}
.script .w:hover { outline: 2px dashed #ffcc80; }
.script .w.active {
  background: var(--hi);
  box-shadow: 0 0 0 3px var(--hi);
  font-weight: 700;
}
.script .sent-active {
  background: var(--sent);
  border-radius: 8px;
}
.script .nl { display: block; height: .55em; }

.status {
  font-size: .95rem;
  color: var(--muted);
  margin-top: 8px;
}

.footer {
  text-align: center;
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.05rem;
}
.footer strong { color: var(--accent); }

.nav-day {
  font-size: 1.2rem;
  margin: 24px 0 8px;
  padding-bottom: 4px;
  border-bottom: 3px solid #ffcc80;
  color: #e65100;
}
.nav-day.tue { color: #1565c0; border-color: #90caf9; }
