/* Floating controls stay visually independent from the page. */
/* Story covers are authored in portrait (2:3); the library deliberately crops a 16:9 preview. */
.story-card img {
  aspect-ratio: 16/9 !important;
  object-position: center 34% !important;
}
.reader {
  max-width: 680px !important;
  padding-bottom: calc(115px + env(safe-area-inset-bottom)) !important;
}
.reader-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--peach);
}
.reader .hero {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
}
.reader-intro {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 30px 30px 136px;
  text-align: center;
  color: var(--hero-title);
}
.reader-intro h1 {
  margin: 0 0 17px;
  color: var(--hero-title);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(13px, var(--hero-title-fluid, 10vw), var(--hero-title-max, 68px));
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}
.reader-intro .description {
  max-width: 610px;
  margin: 0 0 10px;
  color: var(--hero-description);
  font-size: clamp(16px, 4.4vw, 28px);
  font-weight: 500;
  line-height: 1.35;
}
.reader-intro .eyebrow {
  margin: 0;
  color: var(--hero-meta);
  font-size: 13px;
  letter-spacing: 0.14em;
}
.reader-content {
  margin-top: 0 !important;
  padding: 30px 30px 0 !important;
  border-radius: 40px 40px 0 0 !important;
  background: var(--paper) !important;
}
.reader-content article {
  margin-top: 0 !important;
}
.reader.is-entering .hero {
  opacity: 0;
}
.reader.is-entering .reader-intro > * {
  opacity: 0;
  transform: translateY(20px);
}
.reader.is-revealed .reader-intro h1 {
  animation: reader-copy-in 0.42s 0.02s both;
}
.reader.is-revealed .reader-intro .description {
  animation: reader-copy-in 0.42s 0.13s both;
}
.reader.is-revealed .reader-intro .eyebrow {
  animation: reader-copy-in 0.42s 0.24s both;
}
.story-image-transition {
  position: fixed;
  z-index: 100;
  display: block;
  object-fit: cover;
  pointer-events: none;
  transition:
    left 0.56s cubic-bezier(0.22, 0.8, 0.25, 1),
    top 0.56s cubic-bezier(0.22, 0.8, 0.25, 1),
    width 0.56s cubic-bezier(0.22, 0.8, 0.25, 1),
    height 0.56s cubic-bezier(0.22, 0.8, 0.25, 1),
    border-radius 0.56s cubic-bezier(0.22, 0.8, 0.25, 1);
}
@keyframes reader-copy-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 420px) {
  .reader-content {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
  .reader-intro {
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 118px;
  }
}
.bottom-bar {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  pointer-events: none;
}
.bottom-bar > * {
  pointer-events: auto;
}
.bottom-action[hidden] {
  display: none !important;
}
.bottom-action.audio {
  right: max(18px, env(safe-area-inset-right));
  font-size: 24px;
  font-weight: 700;
  padding: 0 0 1px 3px;
}
.flashcard,
.flashcard:nth-child(even) {
  transform: none !important;
  -webkit-transform: none !important;
}
.flashcard.flipped {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
}
html[data-ios-notch="true"] .hero {
  aspect-ratio: 16/11 !important;
}
.story-card img {
  object-position: center bottom;
}
.story-card span {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.story-card .story-meta {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.library {
  padding-top: 100px !important;
}
.eyebrow {
  text-transform: uppercase;
}
.reader .hero {
  position: relative;
  z-index: 0;
  will-change: transform;
}
.reader-content {
  position: relative;
  z-index: 1;
  background: var(--paper);
}
.word-popup {
  position: fixed !important;
  transform: none !important;
}
.word-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--ink);
}
.reader {
  overflow-anchor: none;
}
html[data-theme="dark"] .bottom-action img,
html[data-theme="dark"] .home-mark img {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .bottom-action img,
  html[data-theme="system"] .home-mark img {
    filter: invert(1);
  }
}

/* Softer home tiles, a featured quote, and a story midpoint. */
.story-card img {
  object-position: center 14% !important;
}
.reader-content {
  margin-top: -40px !important;
  position: relative;
  z-index: 2;
}
.reader-intro {
  padding-bottom: 90px !important;
}
.reader.is-entering .reader-content {
  opacity: 1;
  transform: translateY(40px);
}
.reader.is-entering ~ .bottom-bar {
  opacity: 0;
}
.reader.is-revealed .reader-content {
  animation: reader-content-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.reader.is-revealed ~ .bottom-bar {
  animation: reader-copy-in 0.35s 0.06s both;
}
.reader.is-entering.has-transferred-hero .hero {
  opacity: 1 !important;
}
#app {
  transition: opacity 0.16s ease;
}
#app.is-leaving-home {
  opacity: 0;
  pointer-events: none;
}
.story-image-transition {
  transition:
    left 0.64s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.64s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.64s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.64s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.64s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.quick-slider {
  margin-left: -30px !important;
  margin-right: -30px !important;
  padding-left: 30px !important;
  padding-right: 30px !important;
  scroll-padding-left: 30px !important;
}
@keyframes reader-copy-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes reader-content-in {
  from {
    transform: translateY(40px);
  }
  to {
    transform: translateY(0);
  }
}

/* Four-area navigation */
.main-bottom-bar {
  left: max(12px, env(safe-area-inset-left));
  right: 86px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  height: 66px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  background: color-mix(in srgb, var(--paper) 66%, transparent) !important;
  border: 1px solid var(--line) !important;
  border-radius: 34px !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  pointer-events: auto;
  transform: none !important;
}
.tab-button {
  border: 0;
  background: transparent;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 28px;
  color: var(--muted);
  cursor: pointer;
}
.tab-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab-button img {
  width: 25px;
  height: 23px;
  object-fit: contain;
}
.tab-button span {
  font-size: 9px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.back-icon {
  width: 23px !important;
  height: 23px !important;
  object-fit: contain;
}
.tab-button.is-active {
  color: var(--ink);
  /*
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  */
}
.language-fab {
  position: fixed;
  z-index: 11;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 66px;
  height: 66px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 66%, transparent) !important;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 3px 12px 12px;
  backdrop-filter: blur(18px) !important;
}
.language-fab img {
  width: 23px;
  height: 23px;
  object-fit: contain;
  grid-area: 1/1;
  opacity: 0.75;
}
.language-fab span {
  grid-area: 1/1;
  align-self: end;
  border-radius: 8px;
  line-height: 1;
  padding: 2px 3px;
}
.placeholder-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
html[data-theme="dark"] .tab-button img,
html[data-theme="dark"] .language-fab img,
html[data-theme="dark"] .placeholder-icon img,
html[data-theme="dark"] .landing-mark img {
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .tab-button img,
  html[data-theme="system"] .language-fab img,
  html[data-theme="system"] .placeholder-icon img,
  html[data-theme="system"] .landing-mark img {
    filter: invert(1);
  }
}
.landing-page,
.placeholder-page,
.settings-page {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: auto;
  padding: 68px 30px calc(125px + env(safe-area-inset-bottom));
}
.landing-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 30px;
}
.landing-mark {
  text-align: center;
  margin-bottom: 42px;
}
.landing-mark img {
  width: min(230px, 64vw);
  height: auto;
  color: var(--ink);
}
.landing-mark strong {
  display: block;
  margin-top: 13px;
  font-size: 23px;
  letter-spacing: -0.04em;
}
.landing-intro {
  max-width: 520px;
  text-align: center;
  margin: auto;
}
.landing-intro > p:last-child,
.placeholder-page > p:last-child {
  color: var(--muted);
}
.landing-cta {
  align-self: center;
  margin-top: 32px;
  padding: 13px 25px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  cursor: pointer;
}
.section-header {
  margin-bottom: 30px;
}
.stories-page {
  padding-top: 62px !important;
}
.placeholder-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.placeholder-page h1 {
  margin-top: 12px;
}
.placeholder-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
}
.placeholder-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-page h1 {
  margin-bottom: 38px;
}
.setting-group {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.setting-group h2 {
  font-size: 18px;
  margin: 0 0 13px;
  letter-spacing: -0.03em;
}
.setting-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.setting-options button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--card);
  cursor: pointer;
  font-weight: 650;
}
.setting-options button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
@media (min-width: 700px) {
  .main-bottom-bar {
    max-width: 680px;
  }
}

.songs-page,
.song-detail {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: auto;
  padding: 62px 30px calc(115px + env(safe-area-inset-bottom));
}
.song-list {
  display: grid;
  gap: 10px;
}
.song-card {
  width: 100%;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
}
.song-card > span:nth-child(2) {
  display: grid;
  gap: 1px;
}
.song-card strong {
  font-size: 17px;
  letter-spacing: -0.025em;
}
.song-card small {
  color: var(--muted);
}
.song-card b {
  color: var(--muted);
  font-size: 25px;
  font-weight: 400;
  padding-right: 4px;
}
.song-cover {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: end start;
  overflow: hidden;
  position: relative;
  border-radius: 15px;
  padding: 7px;
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.08em;
}
.song-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.song-cover i {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-style: normal;
  text-shadow: 0 1px 8px #0007;
}
.song-cover.la-mer {
  background: linear-gradient(145deg, #f7c25d 0%, #f08e53 42%, #075d87 43%, #102f52 100%);
}
.song-cover.cyanide {
  background: radial-gradient(circle at 70% 20%, #ecfeff 0 4%, transparent 5%), linear-gradient(135deg, #142a50 0%, #7a96cb 52%, #f1b7d3 100%);
}
.song-detail {
  padding-top: 52px;
}
.song-detail-header {
  text-align: center;
}
.song-detail-header .song-cover {
  width: min(220px, 58vw);
  height: min(220px, 58vw);
  margin: 0 auto 27px;
  border-radius: 28px;
  padding: 18px;
}
.song-detail-header .song-cover i {
  font-size: 40px;
}
.song-detail-header h1 {
  margin: 6px 0 4px;
}
.song-detail-header > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}
.apple-music-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 17px;
  border-radius: 999px;
  background: #fa2d48;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}
.apple-music-link img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}
.song-lyrics {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.song-lyrics h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.lyrics-list {
  display: grid;
  gap: 0;
}
.lyric-line {
  padding: 13px 2px 14px;
  border-bottom: 1px solid var(--line);
}
.lyric-line p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.38;
}
.lyric-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
@media (min-width: 700px) {
  .main-bottom-bar {
    left: calc(50% - 340px);
    right: auto;
    width: 600px;
    max-width: calc(100% - 88px);
  }
  .language-fab {
    right: calc(50% - 340px);
  }
}
.story-card,
.flashcard {
  border-radius: 23px !important;
}
.quote-card {
  grid-column: 1/-1;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 26px 8px 30px;
  text-align: center;
  cursor: pointer;
}
.quote-card span {
  display: block;
  max-width: 600px;
  margin: auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 5.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.16;
}
.quote-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.story-interlude {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: clamp(25px, 5vw, 34px);
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin: 1.5em 0 0.8em;
  color: inherit;
}
:root {
  --ink: #191817;
  --muted: #706d68;
  --paper: #fffaf5;
  --card: #fff;
  --line: #e8e1d9;
  --peach: #f5d0ad;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --ink: #f6f0e9;
    --muted: #b8b0a8;
    --paper: #1c1b1a;
    --card: #272523;
    --line: #403c38;
  }
}
html[data-theme="dark"] {
  --ink: #f6f0e9;
  --muted: #b8b0a8;
  --paper: #1c1b1a;
  --card: #272523;
  --line: #403c38;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  min-height: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.6 ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible {
  outline: 2px solid var(--accent, #2496c7);
  outline-offset: 3px;
}
.bottom-bar {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 10px;
  height: calc(70px + env(safe-area-inset-bottom));
  padding: 8px 18px 8px 18px;
  display: grid;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
}
.bottom-action {
  width: 54px;
  height: 54px;
  position: absolute;
  top: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 25px #2b21121c;
}
.bottom-action.nav {
  left: max(18px, env(safe-area-inset-left));
}
.bottom-action.theme {
  right: max(18px, env(safe-area-inset-right));
}
.bottom-action img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}
.bottom-action.nav img {
  width: 34px;
}
.bottom-action.back {
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}
.language-switch {
  height: 54px;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 10px 25px #2b21121c;
}
.language-switch button {
  height: 46px;
  min-width: 54px;
  padding: 0 12px;
  border: 0;
  border-radius: 23px;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  font-weight: 650;
}
.language-switch button[aria-pressed="true"] {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.library {
  width: min(100%, 760px);
  padding: 42px 30px calc(115px + env(safe-area-inset-bottom));
  margin: auto;
}
.home-mark {
  text-align: center;
  margin: 0 0 30px;
}
.home-mark img {
  width: min(145px, 42vw);
  height: auto;
  display: block;
  margin: 0 auto 8px;
}
.home-mark strong {
  font-size: 19px;
  letter-spacing: -0.03em;
}
.intro {
  margin: 0 auto 32px;
  max-width: 520px;
  text-align: center;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.11em;
  font-weight: 800;
  color: var(--accent, #2496c7);
  margin: 0 0 7px;
}
h1 {
  letter-spacing: -0.055em;
  line-height: 1.05;
  font-size: clamp(34px, 9vw, 56px);
  margin: 0 0 14px;
}
.intro > p:last-child,
.description {
  color: var(--muted);
  margin: 0;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.story-card {
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: left;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
}
.story-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--peach);
}
.story-card span {
  display: block;
  padding: 14px 15px 16px;
}
.story-card strong {
  font-size: 18px;
  display: block;
}
.story-card small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}
.quick {
  margin: 42px 0 32px;
}
.quick h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.quick-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 15px 30px 24px;
  margin: 0 -30px;
  scroll-padding-left: 30px;
  perspective: 900px;
}
.flashcard {
  scroll-snap-align: start;
  flex: 0 0 calc(100% - 56px);
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  position: relative;
  cursor: pointer;
  transform: rotateZ(-1.6deg) rotateY(-5deg);
  transform-style: preserve-3d;
  -webkit-transform: rotateZ(-1.6deg) rotateY(-5deg);
  -webkit-transform-style: preserve-3d;
  transition:
    transform 0.45s,
    box-shadow 0.25s;
  box-shadow: 7px 9px 16px #2b21111c;
}
.flashcard:nth-child(even) {
  transform: rotateZ(1.5deg) rotateY(5deg);
  -webkit-transform: rotateZ(1.5deg) rotateY(5deg);
}
.flashcard.flipped {
  transform: rotateY(175deg);
  -webkit-transform: rotateY(175deg);
}
.flashcard span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font-size: 24px;
  font-weight: 700;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(1px);
  -webkit-transform: translateZ(1px);
}
.flashcard .back {
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  color: var(--muted);
  font-size: 20px;
}
.legal-link {
  display: block;
  margin: 45px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: 12px;
  cursor: pointer;
}
.legal-page {
  width: min(100%, 680px);
  margin: auto;
  padding: 35px 20px calc(115px + env(safe-area-inset-bottom));
}
.legal-page a {
  color: inherit;
}
.reader {
  max-width: 680px;
  margin: auto;
  padding: 0 calc(0px) calc(115px + env(safe-area-inset-bottom));
  --accent: #2496c7;
}
.hero {
  width: 100vw;
  max-width: none;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--peach);
  margin-left: calc(50% - 50vw);
}
html[data-ios-notch="true"] .hero {
  aspect-ratio: 4/3;
}
.reader-content {
  padding: 28px 20px 0;
}
.reader article {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 3.5vw, 24px);
  line-height: 1.65;
  margin-top: 35px;
}
.paragraph {
  margin: 0 0 1.25em;
}
.word {
  font: inherit;
  border: 0;
  border-bottom: 1px dashed currentColor;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.word-popup {
  position: absolute;
  z-index: 8;
  max-width: 245px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 8px 25px #0003;
}
.quiz {
  border-top: 1px solid var(--line);
  margin-top: 45px;
  padding-top: 32px;
}
.quiz h2 {
  margin: 0 0 22px;
  font-size: 26px;
  letter-spacing: -0.03em;
}
.question {
  margin: 0 0 28px;
}
.question p {
  font-weight: 700;
  margin: 0 0 10px;
  font-size: 18px;
}
.question div {
  display: grid;
  gap: 8px;
}
.question button {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
}
.question button.correct {
  background: #dff4e4;
  color: #191817;
  border-color: #58a96c;
}
.question button.wrong {
  background: #f9dddd;
  color: #191817;
  border-color: #d86666;
}
.question small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}
@media (max-width: 420px) {
  .library,
  .reader-content {
    padding-left: 30px;
    padding-right: 30px;
  }
  .quick-slider {
    margin-left: -30px;
    margin-right: -30px;
    padding-left: 30px;
    padding-right: 30px;
    scroll-padding-left: 30px;
  }
  .flashcard {
    flex-basis: calc(100% - 40px);
  }
  .language-switch button {
    min-width: 47px;
    padding: 0 9px;
  }
}
@media (min-width: 700px) {
  .bottom-bar {
    max-width: 680px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
  }
  .bottom-action.nav {
    left: 18px;
  }
  .bottom-action.theme {
    right: 18px;
  }
}

/* Keep the detached Apple-Music-style controls intact at desktop widths too. */
.main-bottom-bar {
  max-width: none;
  left: max(12px, env(safe-area-inset-left));
  right: 86px;
  transform: none;
  border: 1px solid var(--line);
  border-radius: 34px;
}
@media (min-width: 700px) {
  .main-bottom-bar {
    left: calc(50% - 340px);
    right: auto;
    width: 600px;
    max-width: calc(100% - 88px);
  }
  .language-fab {
    right: calc(50% - 340px);
  }
}
