/* Kitap — yatay çevrilen sayfalar: kapak, bölüm sayfaları, arka kapak */
.theme-kitap {
  --bg: #efe6d8; --paper: #fbf6ee; --surface: #fffaf3; --surface-2: #f3eadb; --text: #3a2f28; --muted: #726459; --faint: #b3a596;
  --line: rgba(58, 47, 40, .12); --line-strong: rgba(58, 47, 40, .3); --radius: 14px; --price: var(--text);
  --top-h: 56px;
}
html:has(body.theme-kitap:not(.image-mode)), body.theme-kitap:not(.image-mode) { height: 100%; overflow: hidden; }
body.theme-kitap { background: var(--bg); }

/* Üst çubuk */
.book-top { position: fixed; top: 0; inset-inline: 0; z-index: 30; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 10px 0 12px; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.bt-logo { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 700; }
.bt-cur { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.bt-name { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-cat { font-family: var(--font-head); font-style: italic; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-cat:empty::before { content: attr(data-empty); color: var(--muted); }
.bt-no { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); }
.bt-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.bt-btn .icon { width: 19px; height: 19px; }

/* Sayfalar */
.pager { position: fixed; inset: calc(var(--top-h) + var(--safe-t)) 0 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.image-mode .pager { position: static; display: block; overflow: visible; padding-top: calc(var(--top-h) + var(--safe-t)); }
.image-mode .page { height: auto; overflow: visible; }
.page { position: relative; flex: 0 0 100%; height: 100%; overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-align: start; scroll-snap-stop: always; padding: 14px 12px calc(20px + var(--safe-b)); }
.page-in, .cover-in { position: relative; max-width: 560px; min-height: 100%; margin: 0 auto; padding: 26px 22px 34px; background: var(--paper); border-radius: 4px 14px 14px 4px; box-shadow: inset 14px 0 18px -14px rgba(58, 47, 40, .28), 0 1px 0 rgba(255,255,255,.6), 0 18px 30px -22px rgba(58, 47, 40, .5); }
.page-in::after { content: ''; position: absolute; top: 0; bottom: 0; inset-inline-end: -4px; width: 4px; border-radius: 0 4px 4px 0; background: repeating-linear-gradient(180deg, #e6dccb 0 1px, #f6efe3 1px 3px); }

/* Kapak */
.cover-in { text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 16%, var(--paper)), var(--paper) 55%); }
/* Dil / para birimi / bilgi düğmeleri kapakta, durumun altında (üst çubuktaki düğmelerle üst üste binmez) */
.cover-tools { display: flex; justify-content: center; margin: 12px 0 0; }
.cover-tools .tools { gap: 6px; }
.cover-tools .tool { height: 34px; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.cover-tools .tool.round { width: 34px; }
.cover-img { margin: 6px 0 0; border-radius: 10px; overflow: hidden; box-shadow: 0 16px 30px -20px rgba(58,47,40,.6); }
.cover-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cover-logo { width: 82px; height: 82px; margin: -42px auto 10px; position: relative; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--primary); color: #fff; font-family: var(--font-head); font-size: 36px; box-shadow: 0 0 0 5px var(--paper); }
.cover-in:not(:has(.cover-img)) .cover-logo { margin-top: 10px; }
.cover-in h1 { font-size: clamp(32px, 9vw, 44px); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
.cover-sub { font-family: var(--font-head); font-style: italic; color: var(--muted); font-size: 18px; margin-top: 8px; }
.meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta .status-pill, .meta .table-pill { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.cover-in .acts { justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.cover-in .act { height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; }
.cover-in .act-ic { color: var(--primary); }
.cover-in .act-ic .icon { width: 15px; height: 15px; }
.cover-in .banner { margin-top: 14px; text-align: start; }
.toc { list-style: none; margin: 22px 0 0; padding: 0; text-align: start; }
.toc a { display: flex; align-items: baseline; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-family: var(--font-head); font-size: 18px; }
.toc i { flex: 1; border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-4px); }
.toc b { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted); }
.turn-hint { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; height: 46px; padding: 0 20px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 600; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--primary) 80%, transparent); }
.turn-hint .icon { width: 18px; height: 18px; animation: nudge-x 1.6s ease-in-out infinite; }
@keyframes nudge-x { 50% { transform: translateX(4px); } }

/* Bölüm sayfası */
.chapter { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ch-no { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 16%, var(--paper)); color: var(--primary-ink); font-weight: 700; font-size: 14px; }
.chapter h2 { font-size: 32px; font-weight: 600; font-style: italic; margin-top: 8px; }
.chapter p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.chapter .sec-closed { margin-top: 8px; }
.plate { margin: 16px 0 4px; border-radius: 10px; overflow: hidden; }
.plate img { width: 100%; aspect-ratio: 2.2 / 1; object-fit: cover; }
.entry { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.e-img { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.e-img img { width: 100%; height: 100%; object-fit: cover; }
.e-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.entry h3 { font-size: 18px; font-weight: 600; line-height: 1.2; }
.entry .price { font-weight: 700; font-size: 15px; color: var(--primary-ink); }
.desc { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.e-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.e-foot:has(.tags:empty):not(:has(.add)) { display: none; }
.add { margin-inline-start: auto; width: 32px; height: 32px; }
.tag { background: var(--surface-2); color: var(--muted); }
.folio { position: absolute; bottom: 12px; inset-inline: 0; text-align: center; font-family: var(--font-head); font-style: italic; color: var(--muted); font-size: 14px; }
.unavailable .items { opacity: .55; }
.back .page-in { display: grid; place-items: center; }

/* Sayfa çevirme okları (geniş ekran) */
.flip { position: fixed; z-index: 25; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; display: none; place-items: center; background: var(--surface); color: var(--text); box-shadow: 0 8px 20px -10px rgba(58,47,40,.5), 0 0 0 1px var(--line); }
.flip.prev { inset-inline-start: 16px; } .flip.next { inset-inline-end: 16px; }
.on-cover .flip.prev { opacity: .3; pointer-events: none; }
@media (min-width: 720px) and (hover: hover) { .flip { display: grid; } }

.cart-bar { background: var(--text); }
.cta { background: var(--primary); }
.sheet-panel { background: var(--paper); }
.sheet-body > h2, .p-body h2 { font-family: var(--font-head); font-style: italic; font-weight: 600; }
.cl-n { font-style: italic; font-weight: 600; }
body.dm-on { --paper: #1c1a17; --bg: #121110; }
