﻿/* ══════════════════════════════════════════
   KUR'AN-I KERİM — Premium Book Design v2
   ══════════════════════════════════════════ */

:root {
  --cover-bg: #1a120b;
  --cover-surface: #2c1e10;
  --cover-border: #6b4c2a;
  --cover-gold: #c9a84c;
  --cover-gold-light: #e8d48b;
  --cover-gold-dark: #8a6d2f;
  --cover-text: #f5e6c8;
  --cover-text-soft: #c4a67a;

  --paper: #fdf8ef;
  --paper-warm: #f9f0e0;
  --paper-border: #d4c4a0;
  --paper-line: #e8dcc4;
  --ink: #2a1f14;
  --ink-soft: #6b5a42;
  --ink-muted: #8a7a62;

  --gold: #9d7530;
  --gold-soft: #c9a84c;

  --shadow-cover: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 20px rgba(0, 0, 0, 0.3);
  --shadow-book: 0 12px 40px rgba(80, 60, 30, 0.25), 0 4px 12px rgba(80, 60, 30, 0.15);
  --shadow-btn: 0 4px 14px rgba(80, 60, 30, 0.2);

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Platform bazlı ölçek değişkenleri */
  --reader-frame-max-width: 980px;
  --reader-frame-max-height: 1020px;
  --reader-frame-vh-ratio: 0.84;
  --reader-frame-min-height: 360px;

  /* Okunabilir font ailesi */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Palatino Linotype", "Book Antiqua", "Georgia", serif;

}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-heading);
  color: var(--ink);
  background: var(--cover-bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(100, 70, 30, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(100, 70, 30, 0.1) 0%, transparent 50%);
}

/* ══════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════ */

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.view {
  width: 100%;
  max-width: 1180px;
  height: 100%;
}

.hidden {
  display: none !important;
}

/* ══════════════════════════════════════════
   KAPAK SAYFASI
   ══════════════════════════════════════════ */

.cover-view {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 12px;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 30%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 50% 70%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
}

.cover-card {
  position: relative;
  width: min(92vw, 420px);
  min-height: min(86dvh, 720px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  outline: none;
  background: linear-gradient(165deg, #3a2a18 0%, #2c1e10 40%, #1e140c 100%);
  border: 2px solid var(--cover-border);
  box-shadow: var(--shadow-cover);
  overflow: hidden;
  animation: coverFadeIn 0.8s ease-out;
}

@keyframes coverFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.cover-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--radius-xl) - 4px);
  border: 1px solid rgba(201, 168, 76, 0.3);
  pointer-events: none;
  z-index: 1;
}

.cover-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px solid rgba(201, 168, 76, 0.12);
  pointer-events: none;
  z-index: 1;
}

.cover-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.4), var(--shadow-cover);
}

/* ── Kapak Başlık ── */
.cover-header {
  position: relative;
  text-align: center;
  padding: 8px 12px 12px;
  z-index: 2;
}

.cover-kicker {
  color: var(--cover-gold);
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.cover-header h1 {
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--cover-gold-light);
  text-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
  margin-bottom: 6px;
}

.cover-sub {
  color: var(--cover-text-soft);
  font-size: clamp(0.92rem, 3vw, 1.1rem);
  letter-spacing: 0.05em;
  font-weight: 400;
}

/* ── Kapak Orta Alan ── */
.cover-canvas-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 0;
  border: 1px solid rgba(201, 168, 76, 0.25);
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 70%),
    linear-gradient(160deg, #2c1e10, #221810);
  z-index: 2;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(201, 168, 76, 0.1) 0%, transparent 60%);
}

.cover-panel {
  position: relative;
  width: min(200px, 55%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12) 0%, rgba(201, 168, 76, 0.03) 60%, transparent 80%);
  border: 2px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 0 40px rgba(201, 168, 76, 0.1), inset 0 0 30px rgba(201, 168, 76, 0.05);
}

.cover-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.15);
  pointer-events: none;
}

.cover-elif {
  color: var(--cover-gold);
  font-family: "Traditional Arabic", "Amiri", "Scheherazade", serif;
  font-size: clamp(7rem, 20vw, 10rem);
  line-height: 1;
  text-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
  opacity: 0.85;

}

/* ── Kapak Alt Bilgi ── */
.cover-meta {
  position: relative;
  text-align: center;
  padding: 8px 12px 4px;
  z-index: 2;
}

.cover-meta p {
  margin: 0;
}

#readyText {
  color: var(--cover-gold-light);
  font-weight: 700;
  font-size: 0.95rem;
}

.cover-hint {
  margin-top: 8px !important;
  color: var(--cover-text-soft);
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ══════════════════════════════════════════
   PWA BUTONLARI
   ══════════════════════════════════════════ */

.install-pwa-hint {
  min-height: 1.1rem;
  margin-top: 8px !important;
  color: var(--cover-text-soft);
  font-size: 0.78rem;
  opacity: 0.7;
}

.install-pwa-fab {
  position: fixed;
  --pwa-fab-right: 14px;
  right: 14px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 9999;
  border: 1px solid var(--cover-gold-dark);
  background: linear-gradient(180deg, #3a2a18, #2c1e10);
  color: var(--cover-gold-light);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  font-family: var(--font-body);
  white-space: nowrap;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.45s ease,
              box-shadow 0.2s ease;
}

.install-pwa-fab:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.install-pwa-fab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Kayma animasyonu */
.install-pwa-fab.pwa-slide-out {
  transform: translateX(calc(35% + var(--pwa-fab-right)));
  opacity: 0.45;
}

.install-pwa-fab.pwa-slide-out:hover,
.install-pwa-fab.pwa-slide-out:focus {
  transform: translateX(0);
  opacity: 1;
}

/* ══════════════════════════════════════════
   OKUYUCU GÖRÜNÜMÜ
   ══════════════════════════════════════════ */

.reader-view {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}

.book-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.reader-status-row {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

/* ── Kitap Çerçevesi ── */
.book-frame {
  position: relative;
  width: 100%;
  max-width: var(--reader-frame-max-width);
  height: min(var(--reader-frame-max-height), calc(var(--reader-frame-vh-ratio) * 100vh), 100%);
  height: min(var(--reader-frame-max-height), calc(var(--reader-frame-vh-ratio) * 100dvh), 100%);
  min-height: min(var(--reader-frame-min-height), 100%);
  max-height: 100%;
  margin: 0 auto;
  aspect-ratio: 3 / 4.2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  box-shadow: var(--shadow-book);
  perspective: 1700px;
  touch-action: pan-y;
}

/* Kenar gölgeleri - tek sayfa görünüm */
.book-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(100, 75, 40, 0.1) 0%,
      transparent 3%,
      transparent 97%,
      rgba(100, 75, 40, 0.1) 100%
    );
}

/* ── Sayfa ── */
.page,
.flip-sheet,
.face {
  position: absolute;
  inset: 0;
}

.current {
  z-index: 1;
}

.page-paper {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 14px 16px 16px;
  background: var(--paper);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

/* ── Sayfa Başlığı ── */
.paper-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  min-height: 34px;
  border-bottom: 1px solid var(--paper-line);
}

.paper-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 117, 48, 0.2), transparent);
  pointer-events: none;
}

.paper-page {
  position: static;
  transform: none;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.3;
}

.paper-title {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
  letter-spacing: 0.01em;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sayfa İçeriği ── */
.paper-content {
  overflow: hidden;
  line-height: 1.6;
  font-size: 1.05rem;
  font-family: var(--font-body);
  color: var(--ink);
  padding: 2px 2px 16px 0;
}

.page-paper.dense .paper-content {
  font-size: 1.02rem;
  line-height: 1.5;
}

.page-paper.ultra-dense .paper-content {
  font-size: 0.96rem;
  line-height: 1.42;
}

/* ── Satırlar ── */
.page-line {
  margin: 0 0 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.page-line:last-child {
  margin-bottom: 0;
}

.verse-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 6px;
  padding: 2px 0;
}

.verse-line:last-child {
  margin-bottom: 0;
}

.verse-no-inline {
  flex-shrink: 0;
  min-width: 28px;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: inherit;
}

.verse-text {
  flex: 1;
  min-width: 0;
}

.basmala-line {
  margin: 0 0 10px;
  padding: 4px 10px;
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.01em;
}

.basmala-line:last-child {
  margin-bottom: 0;
}

/* ── Ölçüm Elemanı ── */
.measure-wrap {
  position: fixed;
  left: -10000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

.measure-paper {
  position: relative;
  inset: auto;
  transform: none;
  box-shadow: none;
}

/* ══════════════════════════════════════════
   SAYFA ÇEVİRME ANİMASYONU (KİTAP HİSSİ)
   ══════════════════════════════════════════ */

.flip-sheet {
  z-index: 5;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  pointer-events: none;
  opacity: 0;
  will-change: transform, filter;
  filter: drop-shadow(-8px 5px 12px rgba(80, 60, 30, 0.18));
}

.flip-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 6;
  background:
    linear-gradient(90deg,
      rgba(74, 52, 22, 0.18) 0%,
      rgba(74, 52, 22, 0.08) 12%,
      transparent 44%,
      rgba(255, 248, 232, 0.2) 58%,
      rgba(255, 248, 232, 0.34) 66%,
      transparent 100%
    );
  mix-blend-mode: multiply;
}

.flip-sheet.active {
  opacity: 1;
}

.flip-sheet.forward {
  transform-origin: right center;
  transform: rotateY(0deg) translateZ(0);
}

.flip-sheet.backward {
  transform-origin: left center;
  transform: rotateY(180deg) translateZ(0);
  filter: drop-shadow(8px 5px 12px rgba(80, 60, 30, 0.18));
}

.face {
  background: var(--paper);
  backface-visibility: hidden;
}

.face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.08) 0%,
      transparent 26%,
      transparent 74%,
      rgba(0, 0, 0, 0.05) 100%
    );
}

.face.back {
  transform: rotateY(180deg);
}

.flip-sheet.anim-forward {
  animation: turnForward 620ms cubic-bezier(0.16, 0.74, 0.2, 1) forwards;
}

.flip-sheet.anim-forward::before {
  animation: foldShadowForward 620ms ease-out forwards;
}

.flip-sheet.anim-backward {
  animation: turnBackward 620ms cubic-bezier(0.16, 0.74, 0.2, 1) forwards;
}

.flip-sheet.anim-backward::before {
  animation: foldShadowBackward 620ms ease-out forwards;
}

@keyframes turnForward {
  0% {
    transform: rotateY(0deg) translateX(0) translateZ(0) scaleX(1);
  }
  52% {
    transform: rotateY(-94deg) translateX(1.4%) translateZ(8px) scaleX(0.992);
  }
  100% {
    transform: rotateY(-180deg) translateX(0) translateZ(0) scaleX(1);
  }
}

@keyframes turnBackward {
  0% {
    transform: rotateY(180deg) translateX(0) translateZ(0) scaleX(1);
  }
  52% {
    transform: rotateY(86deg) translateX(-1.4%) translateZ(8px) scaleX(0.992);
  }
  100% {
    transform: rotateY(0deg) translateX(0) translateZ(0) scaleX(1);
  }
}

@keyframes foldShadowForward {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  35% {
    opacity: 0.95;
    transform: translateX(-1.8%);
  }
  70% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes foldShadowBackward {
  0% {
    opacity: 0;
    transform: translateX(0) scaleX(-1);
  }
  35% {
    opacity: 0.95;
    transform: translateX(1.8%) scaleX(-1);
  }
  70% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateX(0) scaleX(-1);
  }
}

/* ══════════════════════════════════════════
   NAVİGASYON BUTONLARI
   ══════════════════════════════════════════ */

.nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--paper-border);
  color: var(--gold);
  background: linear-gradient(165deg, #fffaf0, #f0e4cc);
  box-shadow: var(--shadow-btn);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  display: grid;
  place-items: center;
  font-family: inherit;
  flex-shrink: 0;
}

.nav-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(80, 60, 30, 0.25);
}

.nav-btn:active {
  transform: scale(0.94);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ══════════════════════════════════════════
   ALT BİLGİ
   ══════════════════════════════════════════ */

.reader-footer {
  text-align: center;
  padding: 2px 8px max(2px, env(safe-area-inset-bottom));
  color: var(--cover-text-soft);
  overflow: hidden;
}

.status-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cover-gold-light);
  font-family: var(--font-body);
}

.presence-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.38;
  letter-spacing: 0.01em;
  color: rgba(245, 230, 200, 0.9);
  font-family: var(--font-body);
  min-height: 2.3em;
  white-space: pre-line;
  word-break: break-word;
}

.footer-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ghost-btn {
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 76, 0.08);
  color: var(--cover-gold-light);
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-family: var(--font-body);
}

.ghost-btn:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: rgba(201, 168, 76, 0.5);
}

.ghost-btn:active {
  background: rgba(201, 168, 76, 0.2);
}

/* ══════════════════════════════════════════
   AYRAÇ (BOOKMARK)
   ══════════════════════════════════════════ */

.page-paper.bookmarked-page::after {
  content: "";
  position: absolute;
  top: 0;
  right: 16px;
  width: 24px;
  height: 42px;
  background: linear-gradient(180deg, var(--gold), var(--cover-gold-dark));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.page-paper.bookmarked-page::before {
  content: "";
  position: absolute;
  top: 0;
  right: 17px;
  width: 22px;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  z-index: 11;
  border-radius: 0 0 2px 2px;
}

/* ══════════════════════════════════════════
   TABLET (max-width: 860px)
   ══════════════════════════════════════════ */

@media (max-width: 860px) {
  :root {
    --reader-frame-max-width: 760px;
    --reader-frame-max-height: 900px;
    --reader-frame-vh-ratio: 0.78;
    --reader-frame-min-height: 340px;
  }

  .book-shell {
    gap: 10px;
  }

  .nav-btn {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }

  .page-paper {
    padding: 12px 14px 14px;
  }

  .paper-content {
    font-size: 1.02rem;
    line-height: 1.52;
  }

  .page-paper.dense .paper-content {
    font-size: 0.98rem;
    line-height: 1.46;
  }

  .page-paper.ultra-dense .paper-content {
    font-size: 0.93rem;
    line-height: 1.38;
  }

  .verse-no-inline {
    min-width: 25px;
    font-size: 0.84rem;
  }
}

/* ══════════════════════════════════════════
   MOBİL (max-width: 620px)
   ══════════════════════════════════════════ */

@media (max-width: 620px) {
  :root {
    --reader-frame-max-width: 100%;
    --reader-frame-max-height: 860px;
    --reader-frame-vh-ratio: 0.72;
    --reader-frame-min-height: 320px;
  }

  .cover-view {
    padding: 8px;
  }

  .cover-card {
    width: 100%;
    max-width: 100%;
    padding: 16px 14px;
    border-radius: var(--radius-lg);
    min-height: min(84dvh, 650px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    gap: 12px;
  }

  .cover-card::before {
    inset: 6px;
  }

  .cover-card::after {
    inset: 10px;
  }

  .cover-header {
    padding: 4px 8px 8px;
  }

  .cover-canvas-wrap {
    border-radius: var(--radius-md);
  }

  .reader-view {
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
    gap: 4px;
  }

  .book-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .nav-btn {
    display: none;
  }

  .book-frame {
    height: min(var(--reader-frame-max-height), calc(var(--reader-frame-vh-ratio) * 100vh), 100%);
    height: min(var(--reader-frame-max-height), calc(var(--reader-frame-vh-ratio) * 100dvh), 100%);
    border-radius: var(--radius-md);
    aspect-ratio: auto;
  }

  .page-paper {
    padding: 10px 12px 12px;
  }

  .paper-header {
    justify-content: center;
    text-align: center;
    min-height: 28px;
    padding-bottom: 8px;
    flex-wrap: wrap;
  }

  .paper-page {
    font-size: 0.78rem;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
  }

  .paper-title {
    display: none;
  }

  .paper-content {
    font-size: 0.96rem;
    line-height: 1.44;
    padding-bottom: 14px;
  }

  .page-paper.dense .paper-content {
    font-size: 0.93rem;
    line-height: 1.38;
  }

  .page-paper.ultra-dense .paper-content {
    font-size: 0.88rem;
    line-height: 1.32;
  }

  .verse-no-inline {
    min-width: 23px;
    font-size: 0.82rem;
  }

  .verse-line {
    gap: 6px;
    margin-bottom: 5px;
  }

  .status-text {
    font-size: 0.78rem;
  }

  .presence-text {
    font-size: 0.72rem;
    line-height: 1.28;
    min-height: 2em;
  }

  .footer-actions {
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .ghost-btn {
    padding: 5px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .page-paper.bookmarked-page::after {
    right: 12px;
    width: 20px;
    height: 36px;
  }

  /* Mobilde PWA butonu küçük */
  .install-pwa-fab {
    --pwa-fab-right: 10px;
    right: 10px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    font-size: 0.8rem;
    padding: 8px 16px;
  }

  .flip-sheet.anim-forward,
  .flip-sheet.anim-backward,
  .flip-sheet.anim-forward::before,
  .flip-sheet.anim-backward::before {
    animation-duration: 520ms;
  }
}

/* ══════════════════════════════════════════
   LAPTOP (621px - 1200px)
   ══════════════════════════════════════════ */

@media (min-width: 621px) and (max-width: 1200px) {
  :root {
    --reader-frame-max-width: 860px;
    --reader-frame-max-height: 960px;
    --reader-frame-vh-ratio: 0.8;
    --reader-frame-min-height: 340px;
  }
}

/* ══════════════════════════════════════════
   BÜYÜK EKRAN (min-width: 1200px)
   ══════════════════════════════════════════ */

@media (min-width: 1200px) {
  :root {
    --reader-frame-max-width: 980px;
    --reader-frame-max-height: 1020px;
    --reader-frame-vh-ratio: 0.84;
    --reader-frame-min-height: 360px;
  }

  .cover-card {
    width: min(92vw, 460px);
    min-height: min(88dvh, 780px);
  }

  .nav-btn {
    width: 52px;
    height: 52px;
    font-size: 2rem;
  }

  .paper-content {
    font-size: 1.08rem;
    line-height: 1.62;
  }
}

/* ══════════════════════════════════════════
   KÜÇÜK YÜKSEKLİK (max-height: 700px)
   ══════════════════════════════════════════ */

@media (max-height: 700px) {
  :root {
    --reader-frame-vh-ratio: 0.68;
    --reader-frame-max-height: 700px;
    --reader-frame-min-height: 300px;
  }

  .cover-card {
    min-height: min(82dvh, 560px);
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 12px 12px;
    gap: 10px;
  }

  .cover-header h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .cover-kicker {
    font-size: 0.7rem;
  }

  .cover-sub {
    font-size: 0.88rem;
  }

  .reader-view {
    gap: 3px;
  }

  .reader-footer {
    padding-bottom: max(1px, env(safe-area-inset-bottom));
  }

  .presence-text {
    font-size: 0.72rem;
    line-height: 1.25;
    min-height: 2.05em;
  }

  .ghost-btn {
    padding: 4px 9px;
    font-size: 0.74rem;
  }
}

/* ══════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .flip-sheet.anim-forward,
  .flip-sheet.anim-backward,
  .flip-sheet.anim-forward::before,
  .flip-sheet.anim-backward::before {
    animation-duration: 260ms;
  }

  .nav-btn,
  .cover-card,
  .ghost-btn,
  .install-pwa-fab {
    transition: none;
  }

  .cover-card {
    animation: none;
  }
}
