/* ==========================================================================
   अनुपम शर्मा · काव्य-संग्रह
   Archival Indian Literary Press / Handmade Kagaz Aesthetic
   ========================================================================== */

:root {
  --bg: #f6efe2;
  --bg-elevated: #fbf7ef;
  --bg-subtle: #eee4d2;
  --ink: #221c17;
  --ink-soft: #5c5045;
  --ink-muted: #847566;
  --accent: #a63a28;        /* Sindoor / Terracotta Vermilion */
  --accent-soft: rgba(166, 58, 40, 0.1);
  --brass: #b08944;         /* Antique Brass / Gold Hairlines */
  --border: rgba(114, 87, 56, 0.22);
  --border-strong: rgba(114, 87, 56, 0.38);
  --shadow-soft: 0 12px 36px rgba(46, 32, 18, 0.07);
  --shadow-sheet: 0 24px 80px rgba(24, 16, 10, 0.24);

  --font-hi: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', Georgia, serif;
  --font-latin: 'Cormorant Garamond', Georgia, serif;
  --reader-scale: 1;
}

[data-theme="sandhya"] {
  --bg: #181411;
  --bg-elevated: #211b16;
  --bg-subtle: #2a221c;
  --ink: #efe6d5;
  --ink-soft: #c5b69f;
  --ink-muted: #92826c;
  --accent: #d96b52;
  --accent-soft: rgba(217, 107, 82, 0.15);
  --brass: #c9a25e;
  --border: rgba(215, 184, 134, 0.16);
  --border-strong: rgba(215, 184, 134, 0.34);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-sheet: 0 28px 90px rgba(0, 0, 0, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-hi);
  line-height: 1.85;
  transition: background-color 0.35s ease, color 0.35s ease;
  min-height: 100vh;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

body.reader-open {
  overflow: hidden;
}

.latin {
  font-family: var(--font-latin);
  letter-spacing: 0.03em;
}

/* Subtle handmade paper texture overlay */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-monogram {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  background: var(--bg-elevated);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-hi {
  font-size: 1.1rem;
  font-weight: 500;
}

.brand-en {
  font-family: var(--font-latin);
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.25rem 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.icon-btn:hover,
.icon-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.icon-btn[aria-pressed="true"] svg {
  fill: var(--accent);
}

.fav-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-latin);
  font-size: 0.7rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.fav-count[hidden] {
  display: none;
}

.icon-sun { display: none; }
[data-theme="sandhya"] .icon-sun { display: block; }
[data-theme="sandhya"] .icon-moon { display: none; }

/* ==========================================================================
   Book-Cover Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.5rem 3.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-ornament {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--brass);
  opacity: 0.22;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.6rem, 6.2vw, 4.3rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}

.hero-subtitle {
  margin: 0.25rem 0 0;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-style: italic;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
}

.divider-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.6rem auto;
  max-width: 240px;
  color: var(--brass);
}

.divider-flourish span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.divider-flourish.compact {
  margin: 1.2rem auto 0;
  max-width: 180px;
}

.hero-lead {
  margin: 0 auto 2.5rem;
  max-width: 600px;
  font-size: 1.12rem;
  color: var(--ink-soft);
  line-height: 1.95;
}

/* Featured Couplet Card */
.featured-card {
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 1.6rem 1.85rem;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--border);
  pointer-events: none;
}

.featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.featured-label {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.featured-quote {
  margin: 0 0 1.15rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--brass);
  font-size: clamp(1.12rem, 2.1vw, 1.32rem);
  line-height: 2;
  color: var(--ink);
  white-space: pre-line;
}

.featured-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.featured-source {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.primary-link,
.text-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s, opacity 0.2s;
}

.primary-link {
  color: var(--accent);
  font-size: 0.98rem;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.primary-link:hover {
  border-bottom-color: var(--accent);
}

.text-btn {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.text-btn:hover {
  color: var(--accent);
}

/* ==========================================================================
   Collection / Anukramanika
   ========================================================================== */

.collection {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.6rem;
}

.section-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass);
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.3rem);
  font-weight: 400;
  line-height: 1.3;
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  max-width: 340px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.62rem 0.95rem 0.62rem 2.4rem;
  font-family: var(--font-hi);
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Theme Filter Bar */
.theme-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-family: var(--font-hi);
  font-size: 0.94rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.theme-pill:hover {
  border-color: var(--brass);
  color: var(--ink);
}

.theme-pill[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.theme-pill .pill-count {
  font-family: var(--font-latin);
  font-size: 0.82rem;
  opacity: 0.78;
}

.results-meta {
  margin: 0 0 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* Poem Cards Grid */
.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1.35rem;
}

.poem-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.5rem 1.55rem 1.35rem;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.poem-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass);
  box-shadow: var(--shadow-soft);
}

.poem-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.card-num {
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.card-theme {
  font-size: 0.8rem;
  color: var(--ink-muted);
  border-bottom: 1px dotted var(--border-strong);
}

.card-title-hi {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}

.card-title-en {
  margin: 0.1rem 0 0.85rem;
  font-family: var(--font-latin);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-muted);
}

.card-excerpt {
  margin: 0 0 1.15rem;
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--ink-soft);
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.card-read {
  color: var(--accent);
  transition: transform 0.2s ease;
}

.poem-card:hover .card-read {
  transform: translateX(3px);
}

.card-fav-mark {
  color: var(--accent);
  margin-left: 0.35rem;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  border: 1px dashed var(--border-strong);
  background: var(--bg-elevated);
}

.empty-hi {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   About Section & Footer
   ========================================================================== */

.about {
  max-width: 820px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.about-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  position: relative;
  text-align: center;
}

.about-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--border);
  pointer-events: none;
}

.about-body {
  margin-top: 1.25rem;
  font-size: 1.06rem;
  line-height: 2;
  color: var(--ink-soft);
}

.about-en {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.4rem 1.5rem 3rem;
  text-align: center;
}

.footer-ornament {
  color: var(--brass);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.footer-hi {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-soft);
}

.footer-en {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.footer-notice {
  margin: 0.55rem auto 0;
  max-width: 560px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  opacity: 0.85;
  line-height: 1.5;
}

/* ==========================================================================
   Full-Page Serene Poem Reader
   ========================================================================== */

.reader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 13, 9, 0.58);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 1.25rem;
}

.reader-backdrop[hidden] {
  display: none;
}

.reader-sheet {
  width: 100%;
  max-width: 780px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sheet);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetIn 0.24s ease-out;
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.reader-back {
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-hi);
  font-size: 0.98rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.reader-back:hover {
  color: var(--accent);
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 0.65rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-family: var(--font-hi);
  font-size: 0.86rem;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.tool-btn:hover,
.tool-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.tool-btn[aria-pressed="true"] svg {
  fill: var(--accent);
}

.reader-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 2.4rem clamp(1.35rem, 5vw, 3.8rem) 3rem;
}

.reader-page {
  max-width: 560px;
  margin: 0 auto;
}

.reader-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.reader-num {
  display: inline-block;
  font-size: 1rem;
  color: var(--accent);
  margin-right: 0.55rem;
}

.reader-theme {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.reader-title {
  margin: 0.45rem 0 0.15rem;
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  font-weight: 400;
  line-height: 1.3;
}

.reader-subtitle {
  margin: 0;
  font-size: 1.12rem;
  font-style: italic;
  color: var(--ink-muted);
}

.reader-body {
  font-size: calc(1.2rem * var(--reader-scale));
  line-height: 2.15;
  color: var(--ink);
}

.reader-stanza {
  margin: 0 0 1.75rem;
}

.reader-stanza p {
  margin: 0;
}

.reader-attribution {
  margin: 2.4rem 0 0;
  text-align: right;
}

.reader-signature {
  margin: 0;
  font-style: italic;
  color: var(--accent);
  font-size: 1.08rem;
}

.reader-copyright {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.reader-pagination {
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.page-turn {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-family: var(--font-hi);
  color: var(--ink);
  transition: border-color 0.2s;
}

.page-turn:hover {
  border-color: var(--brass);
}

.page-turn.prev { text-align: left; }
.page-turn.next { text-align: right; }

.turn-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.turn-title {
  font-size: 1.05rem;
  color: var(--accent);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1.25rem;
  border-radius: 2px;
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}

.toast[hidden] {
  display: none;
}

/* ==========================================================================
   Responsive & Print
   ========================================================================== */

@media (max-width: 640px) {
  .header-inner {
    padding: 0.7rem 1rem;
    gap: 0.5rem;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand-monogram {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    flex-shrink: 0;
  }

  .brand-hi {
    font-size: 1rem;
  }

  .brand-en {
    font-size: 0.72rem;
  }

  .header-nav {
    gap: 0.6rem;
  }

  .nav-link {
    font-size: 0.92rem;
    padding: 0.35rem 0.2rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding: 2.4rem 1rem 2.2rem;
  }

  .hero-ornament svg {
    width: 200px;
    height: 200px;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 1.75rem;
  }

  .featured-card {
    padding: 1.15rem 1.15rem;
  }

  .featured-quote {
    padding-left: 0.85rem;
    font-size: 1.08rem;
    line-height: 1.9;
  }

  .collection {
    padding: 2.25rem 1rem 3rem;
  }

  .section-header {
    align-items: stretch;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
  }

  .search-wrap {
    max-width: 100%;
    flex: 1 1 100%;
  }

  /* 16px prevents iOS Safari auto-zoom on input focus */
  .search-input {
    font-size: 1rem;
    padding: 0.7rem 0.95rem 0.7rem 2.5rem;
  }

  /* Horizontal swipeable theme ribbon on mobile */
  .theme-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    margin: 0 -1rem 1.1rem;
    padding: 0.1rem 1rem 0.25rem;
    gap: 0.5rem;
  }

  .theme-bar::-webkit-scrollbar {
    display: none;
  }

  .theme-pill {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0.5rem 0.9rem;
    min-height: 40px;
    font-size: 0.92rem;
  }

  .poem-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .poem-card {
    padding: 1.2rem 1.2rem 1.1rem;
  }

  .poem-card:hover {
    transform: none;
  }

  .card-title-hi {
    font-size: 1.32rem;
  }

  .about {
    padding: 0 1rem;
    margin-bottom: 2.75rem;
  }

  .about-frame {
    padding: 1.75rem 1.2rem;
  }

  .about-body {
    font-size: 0.98rem;
    line-height: 1.9;
  }

  .reader-backdrop {
    padding: 0;
    height: 100dvh;
  }

  .reader-sheet {
    border: none;
    height: 100dvh;
    max-width: 100%;
  }

  .reader-toolbar {
    padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 0.85rem 0.65rem;
    gap: 0.5rem;
  }

  .reader-back {
    font-size: 0.94rem;
    padding: 0.35rem 0.25rem;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  .reader-controls {
    gap: 0.32rem;
  }

  .tool-btn {
    height: 38px;
    min-width: 38px;
    padding: 0 0.55rem;
    font-size: 0.84rem;
  }

  .reader-scroll {
    padding: 1.65rem 1.15rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }

  .reader-header {
    margin-bottom: 1.6rem;
  }

  .reader-body {
    font-size: calc(1.1rem * var(--reader-scale));
    line-height: 2.05;
  }

  .reader-stanza {
    margin-bottom: 1.45rem;
  }

  .reader-pagination {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 2rem;
  }

  .page-turn {
    padding: 0.75rem 0.75rem;
  }

  .turn-label {
    font-size: 0.76rem;
  }

  .turn-title {
    font-size: 0.96rem;
  }

  .toast {
    bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 2rem);
    text-align: center;
  }
}

@media (max-width: 400px) {
  .brand-en {
    display: none;
  }

  .nav-link {
    font-size: 0.86rem;
  }

  .reader-pagination {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .hero,
  .collection,
  .about,
  .site-footer,
  .reader-toolbar,
  .reader-pagination,
  .paper-grain {
    display: none !important;
  }

  .reader-backdrop {
    position: static;
    background: none;
    padding: 0;
  }

  .reader-sheet {
    box-shadow: none;
    border: none;
    max-width: none;
  }
}
