/* ================================================================
   Kitap sitesi — stiller
   ================================================================ */
:root {
  --paper: #fbf6ea;
  --paper-2: #f3ead7;
  --ink: #2b241d;
  --ink-soft: #5a4d3f;
  --muted: #8c7b66;
  --gold: #d6b36a;
  --gold-2: #b08a4a;
  --accent: #8b2d24;
  --cover: #6d1f26;
  --line: #e4d8c1;
  --desk-1: #3a2b22;
  --desk-2: #17110d;
  --ui: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Lora', Georgia, serif;
  --display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ui);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, var(--desk-1) 0%, #241a14 55%, var(--desk-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
[hidden] { display: none !important; }

/* ---------------- Yükleniyor ---------------- */
.loading {
  height: 100dvh; display: grid; place-items: center; color: #e9dcc5;
  font-family: var(--display); font-size: 1.4rem; letter-spacing: .04em;
}
.loading .dot { animation: blink 1.2s infinite both; }
.loading .dot:nth-child(2) { animation-delay: .2s; } .loading .dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2 } 40% { opacity: 1 } }

/* ================================================================
   OKUYUCU
   ================================================================ */
.reader {
  position: relative; width: 100%; height: 100dvh; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
.reader.is-preview { height: 100%; grid-template-rows: 1fr; }
.stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  perspective: 2600px; perspective-origin: 50% 40%; overflow: hidden; min-height: 0;
}
.reader.single .stage { perspective: 1800px; }

.book {
  position: relative; z-index: 0;
  width: calc(var(--pw) * 2); height: var(--ph);
  transform-style: preserve-3d;
  touch-action: pan-y;
}
.reader.single .book { width: var(--pw); }
.reader.spread .book.closed { transform: translateX(calc(var(--pw) * -0.5)); }

/* kitabın kalınlığı: kapak tahtası + sayfa kenarları */
.book::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset: 3px -5px -5px -5px; border-radius: 4px 8px 8px 4px;
  background:
    repeating-linear-gradient(to bottom, #efe5cf 0 1px, #d9ccb1 1px 2px) right / 6px 100% no-repeat,
    repeating-linear-gradient(to bottom, #efe5cf 0 1px, #d9ccb1 1px 2px) left / 6px 100% no-repeat,
    repeating-linear-gradient(to right, #efe5cf 0 1px, #d9ccb1 1px 2px) bottom / 100% 6px no-repeat,
    #e7dcc5;
  box-shadow: 0 0 0 7px var(--cover), 0 0 0 8px rgba(0,0,0,.35), 0 40px 70px -10px rgba(0,0,0,.65), 0 14px 24px rgba(0,0,0,.4);
}
.reader.spread .book.closed::before { left: calc(var(--pw) - 2px); }
.reader.single .book::before { inset: 2px -4px -4px 0; box-shadow: 0 0 0 4px var(--cover), 0 24px 40px -8px rgba(0,0,0,.6); }
.book.opening::before { transition: none; }

.slot { position: absolute; top: 0; width: var(--pw); height: var(--ph); }
.slot-l { left: 0; }
.slot-r { left: var(--pw); }
.reader.single .slot-l { display: none; }
.reader.single .slot-r { left: 0; }
.reader.spread .book.closed .slot-l { visibility: hidden; }

.cover-leaf, .leaf {
  position: absolute; top: 0; width: var(--pw); height: var(--ph);
  transform-style: preserve-3d; z-index: 5; will-change: transform;
}
.cover-leaf, .leaf.on-right { left: var(--pw); transform-origin: left center; }
.reader.single .cover-leaf, .reader.single .leaf.on-right { left: 0; }
.leaf.on-left { left: 0; transform-origin: right center; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { transform: rotateY(180deg); }
.shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 3; }
.leaf.on-right .front .shade { background: linear-gradient(to right, rgba(40,25,10,.05), rgba(40,25,10,.45)); }
.leaf.on-right .back .shade, .leaf.on-left .front .shade { background: linear-gradient(to left, rgba(40,25,10,.05), rgba(40,25,10,.45)); }
.leaf.on-left .back .shade { background: linear-gradient(to right, rgba(40,25,10,.05), rgba(40,25,10,.45)); }
/* kıvrılan sayfanın parlaklığı (kâğıdın bükülmüş yeri ışığı yakalar) */
.gloss { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: 0; }
.leaf.on-right .gloss { background: linear-gradient(to left, rgba(255,255,255,0) 0%, rgba(255,250,235,.38) 14%, rgba(255,255,255,0) 34%, rgba(60,40,20,.10) 70%, rgba(60,40,20,0) 100%); }
.leaf.on-left .gloss { background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,250,235,.38) 14%, rgba(255,255,255,0) 34%, rgba(60,40,20,.10) 70%, rgba(60,40,20,0) 100%); }
/* kalkan sayfanın alttaki sayfaya düşen gölgesi */
.cast { position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0; }
.cast.from-left { background: linear-gradient(to right, rgba(30,18,8,.42) 0%, rgba(30,18,8,.16) 18%, rgba(30,18,8,0) 55%); }
.cast.from-right { background: linear-gradient(to left, rgba(30,18,8,.42) 0%, rgba(30,18,8,.16) 18%, rgba(30,18,8,0) 55%); }
.book.open { cursor: grab; }
.book.dragging { cursor: grabbing; }
/* köşe kıvrımı: sayfanın çevrilebileceğini hissettirir */
.slot-r .page:not(.blank):not(.endpaper)::before, .slot-l .page:not(.blank):not(.endpaper)::before {
  content: ''; position: absolute; bottom: 0; width: 26px; height: 26px; z-index: 2; pointer-events: none;
  transition: width .2s, height .2s;
}
.slot-r .page:not(.blank):not(.endpaper)::before { right: 0; border-radius: 10px 0 6px 0;
  background: linear-gradient(315deg, transparent 50%, #e9dcc3 50%, #fbf3e3 72%, #e2d3b6 100%);
  box-shadow: -2px -2px 4px rgba(60,40,20,.12); }
.reader.spread .slot-l .page:not(.blank):not(.endpaper)::before { left: 0; border-radius: 0 10px 0 6px;
  background: linear-gradient(45deg, transparent 50%, #e9dcc3 50%, #fbf3e3 72%, #e2d3b6 100%);
  box-shadow: 2px -2px 4px rgba(60,40,20,.12); }
.reader.single .slot-l .page::before { display: none; }
.book.open .slot-r:hover .page:not(.blank):not(.endpaper)::before,
.reader.spread .book.open .slot-l:hover .page:not(.blank):not(.endpaper)::before { width: 40px; height: 40px; }

/* ---------------- Kapak ---------------- */
.cover {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: 3px 9px 9px 3px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(0,0,0,.35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"),
    var(--cover);
  box-shadow: inset 10px 0 14px -6px rgba(0,0,0,.55), inset 18px 0 0 -14px rgba(255,255,255,.08), inset 0 0 0 1px rgba(0,0,0,.4), inset 0 0 60px rgba(0,0,0,.35);
  color: var(--gold);
  cursor: pointer;
}
.cover::before { /* sırt kabartması */
  content: ''; position: absolute; top: 0; bottom: 0; left: 14px; width: 2px;
  background: linear-gradient(to right, rgba(0,0,0,.35), rgba(255,255,255,.12));
}
.cover-frame {
  position: absolute; inset: 7% 9% 8% 11%;
  border: 1.5px solid rgba(214,179,106,.75); outline: 1px solid rgba(214,179,106,.35); outline-offset: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 8% 7%;
}
.cover-orn { font-size: calc(var(--pw) * .08); line-height: 1; opacity: .9; margin-bottom: .4em; }
.cover-title {
  margin: 0; font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, calc(var(--pw) * .105), 64px); line-height: 1.08; letter-spacing: .01em;
  background: linear-gradient(180deg, #f4dc9c 0%, #d6b36a 45%, #a9823d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.55)) drop-shadow(0 -1px 0 rgba(255,235,180,.15));
  text-wrap: balance;
}
.cover-rule { display: flex; align-items: center; gap: .6em; margin: 1.1em 0 .9em; font-size: 10px; color: var(--gold); width: 60%; }
.cover-rule span { flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); }
.cover-tag { margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(15px, calc(var(--pw) * .042), 24px); color: #e6cf98; opacity: .9; text-wrap: balance; }
.cover-author {
  margin-top: 2.2em; font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .22em; font-size: clamp(12px, calc(var(--pw) * .034), 18px); color: #e9d19a;
}
.cover-hint {
  position: absolute; left: 0; right: 0; bottom: 3.2%; text-align: center;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(233,209,154,.75);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .35 } 50% { opacity: 1 } }

/* forsa (kapak içi) */
.page.endpaper {
  position: absolute; inset: 0; border-radius: 6px 0 0 6px; overflow: hidden; padding: 0;
  background-color: var(--cover);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(214,179,106,.22) 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, transparent 0 9px, rgba(214,179,106,.16) 9.5px 10.5px, transparent 11px),
    radial-gradient(circle at 0 0, transparent 0 9px, rgba(214,179,106,.10) 9.5px 10.5px, transparent 11px),
    linear-gradient(to left, rgba(0,0,0,.45), rgba(0,0,0,0) 12%),
    linear-gradient(160deg, rgba(255,255,255,.07), rgba(0,0,0,.25));
  background-size: 28px 28px, 28px 28px, 28px 28px, 100% 100%, 100% 100%;
  display: flex; align-items: flex-end; justify-content: center;
}
.page.endpaper::after { display: none; }
.reader.single .page.endpaper { border-radius: 6px; }
.ep-label { margin-bottom: 8%; font-family: var(--display); font-style: italic; color: rgba(255,240,210,.55); font-size: 14px; }

/* ---------------- Sayfa ---------------- */
.page {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column;
  padding: calc(var(--ph) * .055) calc(var(--pw) * .1) calc(var(--ph) * .04);
  background-color: var(--paper);
  color: var(--ink);
}
.page::after { /* kâğıt dokusu */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .45  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
.page.right {
  border-radius: 0 6px 6px 0;
  background-image: linear-gradient(to right, #d9ccb2 0%, #ece1c9 2.5%, #f7efdf 8%, var(--paper) 18%, var(--paper) 96%, #f1e7d3 100%);
  padding-left: calc(var(--pw) * .11); padding-right: calc(var(--pw) * .09);
}
.page.left {
  border-radius: 6px 0 0 6px;
  background-image: linear-gradient(to left, #d9ccb2 0%, #ece1c9 2.5%, #f7efdf 8%, var(--paper) 18%, var(--paper) 96%, #f1e7d3 100%);
  padding-left: calc(var(--pw) * .09); padding-right: calc(var(--pw) * .11);
}
.reader.single .page.right {
  border-radius: 4px 8px 8px 4px;
  background-image: linear-gradient(to right, #e0d4bb 0%, #f3ead8 2%, var(--paper) 7%, var(--paper) 97%, #f1e7d3 100%);
  padding: calc(var(--ph) * .045) 7.5% calc(var(--ph) * .03) 8.5%;
}
.page.blank.backside { background-image: linear-gradient(to left, #e3d7be, var(--paper) 25%); }

.pg-head, .pg-foot {
  flex: none; height: 2em; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: #9c8b72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-head { margin-bottom: .6em; }
.pg-head > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-foot { margin-top: .5em; letter-spacing: .05em; font-size: 14px; }
.page.left .pg-foot { justify-content: flex-start; }
.page.right .pg-foot { justify-content: flex-end; }
.reader.single .page .pg-foot { justify-content: center; }
.pg-body { flex: 1; position: relative; overflow: hidden; min-height: 0; }

/* ---------------- Metin akışı (sütunlarla sayfalama) ---------------- */
.flow {
  position: absolute; top: 0; left: 0;
  column-fill: auto;
  font-family: var(--serif); line-height: 1.62; color: var(--ink);
  hyphens: auto; -webkit-hyphens: auto;
  text-align: justify;
  overflow-wrap: break-word;
}
.flow p { margin: 0 0 .7em; orphans: 2; widows: 2; }
.flow h2, .flow h3, .flow h4 {
  font-family: var(--display); font-weight: 600; line-height: 1.2; color: #2a1f17;
  margin: 1em 0 .45em; break-after: avoid; -webkit-column-break-after: avoid; clear: both; text-align: left;
}
.flow h2 { font-size: 1.35em; } .flow h3 { font-size: 1.15em; } .flow h4 { font-size: 1em; }
.flow blockquote {
  margin: .9em .6em .9em .2em; padding: .1em 0 .1em .9em; border-left: 2px solid var(--gold);
  font-style: italic; color: var(--ink-soft);
}
.flow ul, .flow ol { margin: 0 0 .8em; padding-left: 1.4em; }
.flow li { margin-bottom: .25em; }
.flow hr { border: 0; text-align: center; margin: 1.1em 0; height: 1em; }
.flow hr::after { content: '❦'; color: var(--gold-2); }
.flow a { color: var(--accent); }
.flow strong, .flow b { font-weight: 600; }

/* fotoğraflar */
.flow figure { margin: .5em 0 .9em; break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; }
.flow figure img {
  display: block; width: 100%; height: auto; max-height: calc(var(--bh) * .62);
  object-fit: contain; border-radius: 2px;
}
.flow figure:not(.img-page) img { filter: drop-shadow(0 1px 2px rgba(60,40,20,.25)); }
.flow figcaption {
  font-size: .78em; line-height: 1.35; text-align: center; font-style: italic; color: #7a6a55; margin-top: .4em;
  font-family: var(--serif);
}
.flow figure.img-center { margin-left: auto; margin-right: auto; }
.flow figure.img-center.size-s { width: 50%; }
.flow figure.img-center.size-m { width: 76%; }
.flow figure.img-center.size-l { width: 100%; }
.flow figure.img-left { float: left; margin: .3em 1.1em .5em 0; }
.flow figure.img-right { float: right; margin: .3em 0 .5em 1.1em; }
.flow figure.img-left.size-s, .flow figure.img-right.size-s { width: 34%; }
.flow figure.img-left.size-m, .flow figure.img-right.size-m { width: 46%; }
.flow figure.img-left.size-l, .flow figure.img-right.size-l { width: 58%; }
.flow figure.img-left img, .flow figure.img-right img { max-height: calc(var(--bh) * .5); }
.flow figure.img-page {
  break-before: column; break-after: column;
  -webkit-column-break-before: always; -webkit-column-break-after: always;
  height: var(--bh); width: 100%; margin: 0; float: none;
  display: flex; flex-direction: column; justify-content: center;
}
.flow figure.img-page img { max-height: calc(var(--bh) - 3.2em); }
/* başlığın hemen altındaki fotoğraf başlık sayfasına sığsın */
.flow .ch-open:not(.pos-page) + figure:not(.img-page) { margin-top: -.4em; }
.flow .ch-open:not(.pos-page) + figure:not(.img-page) img { max-height: calc(var(--bh) * .3); }

/* bölüm başı */
.ch-open { text-align: center; padding-top: calc(var(--bh) * .09); margin-bottom: 1.6em; break-inside: avoid; break-after: avoid; }
.ch-open.small { padding-top: calc(var(--bh) * .05); }
.ch-open.pos-top { padding-top: 0; }
.ch-open.pos-middle { padding-top: calc(var(--bh) * .26); }
.ch-open.pos-page {
  height: var(--bh); padding: 0; margin: 0;
  display: flex; flex-direction: column; justify-content: center;
  break-after: column; -webkit-column-break-after: always;
}
.ch-open.al-left, .ch-open.al-left .ch-title { text-align: left; }
.ch-open.al-right, .ch-open.al-right .ch-title { text-align: right; }
.ch-open.al-left .ch-meta { justify-content: flex-start; }
.ch-open.al-right .ch-meta { justify-content: flex-end; }
.ch-date { font-family: var(--display); font-size: .82em; letter-spacing: .18em; text-transform: uppercase; color: #a08860; }
.ch-title {
  margin: .35em 0 .25em; font-family: var(--display); font-weight: 600;
  font-size: 2.05em; line-height: 1.12; color: #2a1f17; text-align: center; text-wrap: balance;
  overflow-wrap: break-word; hyphens: manual;
}
.ch-orn { color: var(--gold-2); font-size: 1.15em; }
.ch-meta { margin-top: .5em; font-family: var(--ui); font-size: .72em; color: var(--muted); display: flex; justify-content: center; align-items: center; gap: .5em; flex-wrap: wrap; text-align: center; }
.ch-meta .vw { display: inline-flex; align-items: center; gap: .3em; }
.ch-meta .sep { opacity: .6; }
.ch-end { text-align: center; color: var(--gold-2); margin: 1.2em 0 0; font-size: .8em; clear: both; }
.flow.dropcap .ch-open + p::first-letter,
.flow.dropcap .ch-open + figure + p::first-letter {
  float: left; font-family: var(--display); font-weight: 600; color: var(--accent);
  font-size: 3.5em; line-height: .82; padding: .07em .09em 0 0;
}
.flow.font-elyazisi { line-height: 1.38; }
.flow.font-elyazisi .ch-title, .flow.font-elyazisi h2 { font-family: 'Caveat', cursive; font-weight: 600; }
.flow.font-daktilo { line-height: 1.55; }

/* içindekiler */
.flow.toc { font-family: var(--serif); text-align: left; hyphens: manual; }
.toc-title { font-family: var(--display); font-weight: 600; text-align: center; font-size: 1.9em; margin: calc(var(--bh) * .04) 0 .6em; color: #2a1f17; }
.toc-title::after { content: '❦'; display: block; font-size: .5em; color: var(--gold-2); margin-top: .2em; }
.toc-year {
  font-family: var(--display); font-weight: 600; font-size: 1.15em; color: var(--accent);
  margin: .9em 0 .35em; padding-bottom: .15em; border-bottom: 1px solid var(--line);
  break-after: avoid; -webkit-column-break-after: avoid;
}
.toc-item { display: block; color: inherit; text-decoration: none; padding: .32em .2em; border-radius: 4px; break-inside: avoid; -webkit-column-break-inside: avoid; cursor: pointer; }
.toc-item:hover, .toc-item:focus-visible { background: rgba(176,138,74,.12); outline: none; }
.toc-row { display: flex; align-items: baseline; gap: .35em; }
.toc-t { font-weight: 500; }
.toc-dots { flex: 1; border-bottom: 1.5px dotted #bba98a; transform: translateY(-.28em); min-width: 1em; }
.toc-n { font-variant-numeric: oldstyle-nums; color: var(--ink-soft); }
.toc-sub { display: block; font-size: .74em; color: var(--muted); margin-top: .1em; font-family: var(--ui); }
.toc-latest {
  margin: .2em 0 1.1em; padding: .35em .55em .45em; border: 1px solid #e2cfa6; border-radius: 6px;
  background: linear-gradient(180deg, rgba(214,179,106,.14), rgba(214,179,106,.05));
  break-inside: avoid; -webkit-column-break-inside: avoid;
}
.toc-latest-lbl { font-family: var(--ui); font-size: .68em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); margin: .1em .2em .15em; }
.toc-latest .toc-item { padding-top: .15em; }
.toc-latest .toc-t { color: var(--accent); }
.toc-empty { text-align: center; color: var(--muted); font-style: italic; margin-top: 2em; line-height: 1.8; }

/* yazar hakkında */
.flow.about { text-align: justify; }
.about-name { text-align: center; font-family: var(--display); font-size: 1.25em; font-weight: 600; margin-bottom: 1em; color: var(--accent); }

/* tek sayfalık özel sayfalar */
.pg-single { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; }
.title-page h1 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, calc(var(--pw) * .095), 54px); line-height: 1.1; margin: .2em 0 .3em; color: #2a1f17; text-wrap: balance; }
.title-page .tp-orn, .end-page .tp-orn { color: var(--gold-2); font-size: calc(var(--pw) * .07); }
.title-page .tp-tag { font-family: var(--display); font-style: italic; font-size: clamp(16px, calc(var(--pw) * .045), 24px); color: var(--ink-soft); margin: 0 1em; }
.title-page .tp-rule { color: var(--gold-2); margin: 1.4em 0; font-size: 11px; }
.title-page .tp-author { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .2em; font-size: clamp(13px, calc(var(--pw) * .035), 18px); color: var(--accent); }
.title-page .tp-foot { position: absolute; bottom: 4%; left: 0; right: 0; font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.dedication { font-family: var(--display); font-style: italic; font-size: clamp(17px, calc(var(--pw) * .05), 26px); color: var(--ink-soft); line-height: 1.5; max-width: 80%; margin-top: -15%; }
.end-page { font-family: var(--display); font-size: clamp(17px, calc(var(--pw) * .05), 24px); color: var(--ink-soft); font-style: italic; }
.end-page .small { font-size: .7em; font-family: var(--ui); font-style: normal; color: var(--muted); }

/* ---------------- Alt çubuk ---------------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px max(14px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: linear-gradient(to top, rgba(14,10,8,.85), rgba(14,10,8,.55));
  color: #eadfca; z-index: 10;
}
.bar > .bb:first-child { margin-right: auto; }
.bar-mid { display: flex; align-items: center; gap: 10px; }
.bar-end { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.bb {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; min-width: 42px; justify-content: center;
  padding: 0 12px; background: transparent; border: 0; border-radius: 21px; cursor: pointer;
  color: #eadfca; font-size: 14.5px; transition: background .15s;
}
.bb:hover { background: rgba(255,255,255,.08); }
.bb:disabled { opacity: .3; cursor: default; background: none; }
.bb.round { width: 44px; padding: 0; background: rgba(255,255,255,.07); }
.bb .ic { width: 20px; height: 20px; }
.bb a, a.bb { color: inherit; text-decoration: none; }
.aa { font-family: var(--display); font-weight: 700; }
.aa.s { font-size: 14px; } .aa.l { font-size: 21px; }
.pg-ind { min-width: 84px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; color: #cdbfa6; }
.bar-end { position: relative; }
.pop {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 30; min-width: 230px;
  background: #241a14; border: 1px solid rgba(214,179,106,.25); border-radius: 14px; padding: 8px;
  box-shadow: 0 14px 30px rgba(0,0,0,.5);
}
.pop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 4px 10px; font-size: 14px; color: #d9ccb4; }
.pop-seg { display: flex; gap: 4px; }
.pop .bb span:not(.aa) { display: inline !important; font-size: 13px; }
.pop-link { display: flex; align-items: center; gap: 8px; padding: 10px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.08); color: #bfae90; text-decoration: none; font-size: 14px; }
.pop-link:hover { color: #f0e2c6; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0;
  background: rgba(20,14,10,.92); color: #f3e8d4; padding: 10px 18px; border-radius: 22px; font-size: 14px;
  transition: .25s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.demo-badge {
  position: fixed; top: 10px; right: 10px; z-index: 40; background: rgba(214,179,106,.92); color: #2a1f17;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 12px; letter-spacing: .03em;
}

.measure { position: fixed; left: -20000px; top: 0; width: var(--pw); height: var(--ph); visibility: hidden; pointer-events: none; }

@media (max-width: 759px) {
  .bb span:not(.aa) { display: none; }
  .bb { padding: 0 8px; min-width: 40px; }
  .bar { gap: 2px; padding-left: 6px; padding-right: 6px; }
  .bar-mid { gap: 4px; }
  .pg-ind { min-width: 62px; font-size: 13px; }
  .pg-head { font-size: 11px; }
  .pg-foot { font-size: 12.5px; }
  .toast { bottom: 76px; }
}
@media (max-width: 359px) {
  .bar > .bb:first-child { display: none; }
}

/* ================================================================
   YÖNETİM PANELİ
   ================================================================ */
.admin {
  min-height: 100dvh; background: #f4eee3; color: var(--ink);
  font-family: var(--ui); user-select: text;
}
.adm-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: var(--cover); color: #f3e6c8;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.adm-brand { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin-right: auto; display: flex; align-items: center; gap: 8px; color: #f3e1b2; text-decoration: none; }
.demo-inline { font: 700 11px var(--ui); background: var(--gold); color: #2a1f17; padding: 2px 7px; border-radius: 8px; letter-spacing: .03em; }
.adm-top .btn { background: rgba(255,255,255,.1); color: #f6ead0; border-color: transparent; }
.adm-top .btn:hover { background: rgba(255,255,255,.18); }
.adm-top .btn.primary { background: var(--gold); color: #2a1f17; }
.adm-wrap { max-width: 1040px; margin: 0 auto; padding: 22px 16px 80px; }
.adm-h { font-family: var(--display); font-weight: 600; font-size: 2rem; margin: 6px 0 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid #d8cbb3;
  background: #fffdf8; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: #fff7ea; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #7a251d; }
.btn.danger { color: #a12a1e; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 36px; padding: 0 11px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn .ic { width: 18px; height: 18px; }

.card { background: #fffdf8; border: 1px solid #e6dac4; border-radius: 14px; box-shadow: 0 1px 2px rgba(60,40,20,.05); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; font-family: var(--display); }
.stat span { color: var(--muted); font-size: 14px; }

.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; align-items: center; }
.post-row h3 { margin: 0 0 4px; font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.post-row .meta { color: var(--muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.post-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; letter-spacing: .02em; }
.badge.pub { background: #e3efe3; color: #2f6a3a; }
.badge.draft { background: #f3e6cf; color: #8a5a17; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .ic { width: 42px; height: 42px; color: var(--gold-2); }

/* giriş */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login {
  width: min(400px, 100%); padding: 30px 26px; background: var(--paper);
  border-radius: 6px 12px 12px 6px; box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 8px 0 12px -8px rgba(0,0,0,.25);
}
.login h1 { font-family: var(--display); font-weight: 600; text-align: center; margin: 0 0 4px; font-size: 2rem; }
.login p.sub { text-align: center; color: var(--muted); margin: 0 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.field small { color: var(--muted); font-size: 13px; }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d8cbb3; border-radius: 10px;
  background: #fffefb; font: inherit; font-size: 16px; color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid rgba(139,45,36,.35); border-color: var(--accent); }
.err { color: #a12a1e; font-size: 14px; min-height: 1.2em; margin: 4px 0 10px; }
.ok { color: #2f6a3a; }
.back-link { display: block; text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.link-like { background: none; border: 0; width: 100%; cursor: pointer; text-decoration: underline; color: var(--accent); font: inherit; font-size: 14px; }
.login .note { background: #fff4de; border: 1px solid #ecd9b2; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: #6b4a14; }
.authors-list { list-style: none; margin: 0 0 12px; padding: 0; }
.authors-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #efe5d3; font-size: 15px; word-break: break-all; }
.authors-list li small { color: var(--muted); }
.authors-list li.pending span { color: #8a5a17; }
.invite-row { display: flex; gap: 8px; }
.invite-row .input { flex: 1; min-width: 0; }

/* editör */
.ed-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ed-title {
  display: block; width: 100%; border: 0; background: transparent; font-family: var(--display); font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; padding: 6px 0; margin-bottom: 8px; color: #2a1f17;
  border-bottom: 1px dashed #d8cbb3; resize: none; overflow: hidden; text-align: center;
}
.ed-title-hint { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.ed-style h4 { flex-basis: 100%; margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.ed-title:focus { outline: none; border-bottom-color: var(--accent); }
.ed-style { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 14px; margin: 12px 0; }
.ed-style .field { margin: 0; min-width: 150px; flex: 1; }
.seg { display: inline-flex; border: 1px solid #d8cbb3; border-radius: 10px; overflow: hidden; background: #fffefb; }
.seg button { min-width: 44px; min-height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0 10px; font-size: 14px; font-weight: 600; }
.seg button + button { border-left: 1px solid #e6dac4; }
.seg button.on { background: var(--accent); color: #fff; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.toolbar {
  position: sticky; top: 62px; z-index: 15;
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
  padding: 6px; background: #fffdf8; border: 1px solid #e6dac4; border-radius: 12px 12px 0 0; border-bottom: 0;
}
.toolbar .tb {
  min-width: 42px; min-height: 42px; border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  display: inline-grid; place-items: center; font-weight: 700; font-size: 15px; padding: 0 8px; color: var(--ink);
}
.toolbar .tb:hover { background: #f3eadb; }
.toolbar .tb.wide { display: inline-flex; gap: 6px; }
.toolbar .sep { width: 1px; height: 26px; background: #e6dac4; margin: 0 4px; }
.toolbar .tb .ic { width: 19px; height: 19px; }
.toolbar .tb.photo { background: var(--accent); color: #fff; }
.toolbar .tb.photo:hover { background: #7a251d; }
.imgbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px;
  background: #fff4de; border: 1px solid #ecd9b2; border-bottom: 0;
}
.imgbar .lbl { font-size: 13px; font-weight: 700; color: #8a5a17; }
.imgbar .input { min-height: 40px; flex: 1; min-width: 160px; font-size: 15px; }

.ed-paper {
  background: var(--paper); border: 1px solid #e6dac4; border-radius: 0 0 12px 12px;
  padding: clamp(18px, 5vw, 46px) clamp(16px, 7vw, 70px);
  box-shadow: inset 10px 0 14px -12px rgba(0,0,0,.25);
}
.ed-area {
  min-height: 55vh; outline: none; font-family: var(--serif); font-size: 19px; line-height: 1.65; color: var(--ink);
  max-width: 680px; margin: 0 auto; text-align: justify; hyphens: auto; overflow-wrap: break-word;
}
.ed-area:empty::before, .ed-area.is-empty::before { content: attr(data-ph); color: #b3a387; font-style: italic; }
.ed-area p { margin: 0 0 .75em; }
.ed-area h2, .ed-area h3 { font-family: var(--display); font-weight: 600; margin: 1em 0 .4em; text-align: left; clear: both; }
.ed-area blockquote { margin: .9em .4em; padding-left: .9em; border-left: 2px solid var(--gold); font-style: italic; color: var(--ink-soft); }
.ed-area hr { border: 0; text-align: center; height: 1em; margin: 1em 0; }
.ed-area hr::after { content: '❦'; color: var(--gold-2); }
.ed-area figure { margin: .5em 0 .9em; position: relative; cursor: pointer; border-radius: 4px; }
.ed-area figure img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; border-radius: 2px; }
.ed-area figure.sel { outline: 3px solid var(--accent); outline-offset: 3px; }
.ed-area figure.img-center { margin-left: auto; margin-right: auto; }
.ed-area figure.img-center.size-s { width: 50%; } .ed-area figure.img-center.size-m { width: 76%; } .ed-area figure.img-center.size-l { width: 100%; }
.ed-area figure.img-left { float: left; margin: .3em 1.1em .5em 0; }
.ed-area figure.img-right { float: right; margin: .3em 0 .5em 1.1em; }
.ed-area figure.img-left.size-s, .ed-area figure.img-right.size-s { width: 34%; }
.ed-area figure.img-left.size-m, .ed-area figure.img-right.size-m { width: 46%; }
.ed-area figure.img-left.size-l, .ed-area figure.img-right.size-l { width: 58%; }
.ed-area figure.img-page { width: 100%; clear: both; padding: 8px; background: repeating-linear-gradient(45deg, #f1e6d0 0 8px, #f6eedd 8px 16px); }
.ed-area figure.img-page::before { content: 'Tam sayfa fotoğraf'; position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font: 600 12px var(--ui); padding: 3px 8px; border-radius: 6px; }
.ed-area figcaption { font-size: .8em; text-align: center; font-style: italic; color: #7a6a55; margin-top: .35em; }
.ed-area figure.uploading { min-height: 140px; display: grid; place-items: center; background: #f1e6d0; color: var(--muted); font: 600 14px var(--ui); }
.ed-area::after { content: ''; display: block; clear: both; }
.ed-area.font-elyazisi { font-size: 25px; line-height: 1.4; }
.ed-area.size-s { font-size: 17px; } .ed-area.size-l { font-size: 21px; } .ed-area.size-xl { font-size: 23.5px; }
.ed-area.font-elyazisi.size-s { font-size: 22px; } .ed-area.font-elyazisi.size-l { font-size: 28px; } .ed-area.font-elyazisi.size-xl { font-size: 31px; }

.ed-foot { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.save-state { font-size: 14px; color: var(--muted); }

/* önizleme */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,10,8,.97);
  display: grid; grid-template-rows: auto 1fr auto;
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #f3e6c8; }
.modal-head b { margin-right: auto; font-family: var(--display); font-size: 1.3rem; }
.modal-body { position: relative; min-height: 0; }
.modal-foot { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); color: #eadfca; }
.modal .btn { background: rgba(255,255,255,.1); color: #f6ead0; border-color: transparent; }

/* ayarlar */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.set-grid .card { padding: 18px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 54px; height: 72px; border-radius: 3px 7px 7px 3px; border: 3px solid transparent; cursor: pointer; box-shadow: inset 4px 0 6px -2px rgba(0,0,0,.5), 0 2px 5px rgba(0,0,0,.25); position: relative; }
.swatch.on { border-color: var(--gold); outline: 2px solid #2a1f17; }
.swatch span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.mini-cover { margin: 26px auto 0; width: 200px; height: 286px; position: relative; border-radius: 3px 9px 9px 3px; overflow: hidden; --pw: 200px; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.mini-cover .cover-hint { display: none; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 10px; } .stat b { font-size: 1.35rem; } .stat span { font-size: 12.5px; }
  .post-row { grid-template-columns: 1fr; }
  .post-row .acts { justify-content: flex-start; }
  .ed-meta, .set-grid { grid-template-columns: 1fr; }
  .adm-top { padding: 8px 10px; gap: 6px; }
  .adm-top .btn span { display: none; }
  .adm-top .btn { min-width: 42px; padding: 0 10px; }
  .adm-brand { font-size: 1.1rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .toolbar { top: 58px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .ed-area { font-size: 18px; text-align: left; }
  .ed-paper { padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-hint { animation: none; }
}
