/* Gökyarığı okuyucusu: koyu masa, kâğıt sayfa, mürekkep çerçeveli paneller, el yazısı balonlar */
:root {
  --g: 600px;           /* sayfa genişliği (oku.js ayarlar) */
  --bolum: #e9c46a;
  --kagit: #f3ead6;
  --murekkep: #15120e;
  --oh-panel: #1b1916; --oh-panel-2: #2a2621; --oh-yazi: #f3ead6; --oh-soluk: #a59c8c; --oh-vurgu: #e9c46a; --oh-tehlike: #e5484d;
  --oh-baslik-yazi: 'Big Shoulders Display', sans-serif; --oh-govde-yazi: 'Comic Neue', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: radial-gradient(120% 90% at 50% 40%, #2b2621 0, #141210 70%);
  color: var(--kagit); font-family: 'Comic Neue', sans-serif;
  display: grid; grid-template-rows: auto 1fr auto;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* üst ve alt çubuk */
.ust { display: flex; align-items: center; gap: 16px; padding: 10px 18px; }
.geri { color: var(--oh-soluk); text-decoration: none; font-weight: 700; }
.geri:hover { color: var(--kagit); }
.baslik-dugme { font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: 24px; letter-spacing: 0.08em; }
.baslik-dugme span { font-family: 'Comic Neue', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0; color: var(--bolum); margin-left: 6px; }
.ust-sag { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.mod { padding: 6px 12px; border: 1px solid rgba(243, 234, 214, 0.25); font-weight: 700; font-size: 14px; }
.dizi-link { text-decoration: none; }
.mod.acik { background: var(--bolum); color: var(--murekkep); border-color: transparent; }
.sayfa-no { font-variant-numeric: tabular-nums; color: var(--oh-soluk); font-weight: 700; }
.alt { padding: 6px 18px 10px; }
.ilerleme { height: 3px; background: rgba(243, 234, 214, 0.1); }
.ilerleme i { display: block; height: 100%; width: 0; background: var(--bolum); transition: width 0.4s; }
.ipucu { margin: 6px 0 0; font-size: 12px; color: #7d7568; text-align: center; }

/* sahne ve kitap */
.sahne { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.kitap { position: relative; width: var(--g); height: calc(var(--g) * 1.5); perspective: 2200px; }
.ok { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; font-size: 56px; line-height: 1; width: 52px; height: 90px; color: rgba(243, 234, 214, 0.35); }
.ok:hover { color: var(--kagit); }
.ok.sol { left: 10px; } .ok.sag { right: 10px; }

/* sayfa */
.sayfa {
  position: absolute; inset: 0; background: var(--kagit); color: var(--murekkep);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3);
  transform-origin: 0 50%; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  background-image:
    radial-gradient(120% 80% at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.025) 0 2px, transparent 2px 5px),
    radial-gradient(140% 120% at 50% 50%, transparent 60%, rgba(120, 90, 50, 0.22));
  overflow: hidden;
}
.izgara { position: absolute; inset: calc(var(--g) * 0.035) calc(var(--g) * 0.035) calc(var(--g) * 0.06);
  display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(16, 1fr); gap: calc(var(--g) * 0.014); }
.sayfa-alt { position: absolute; bottom: calc(var(--g) * 0.018); width: 100%; text-align: center; font-weight: 700; font-size: calc(var(--g) * 0.02); color: #6d6253; }

/* panel */
.panel { position: relative; margin: 0; overflow: hidden; background: #d8ccb3; border: calc(var(--g) * 0.0045) solid var(--murekkep); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25); transition: filter 0.3s, opacity 0.3s; }
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.yer-tutucu { position: absolute; inset: 0; display: grid; place-items: center; padding: 8%;
  background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 0 6px, transparent 6px 14px), linear-gradient(160deg, color-mix(in srgb, var(--renk, #888) 35%, #e8dcc2), #cdbf9f); }
.yer-tutucu span { font-style: italic; font-size: calc(var(--g) * 0.019); color: #5a4f40; text-align: center; opacity: 0.85; }
.panel.yuklu .yer-tutucu { display: none; }
.kuyruklar { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.kuyruklar path { fill: #fffdf6; stroke: var(--murekkep); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.kuyruklar path.k-fisilti { stroke-dasharray: 4 3; }
.balonlar { position: absolute; inset: 0; pointer-events: none; }

/* balonlar */
.balon { position: absolute; max-width: 48%; font-size: calc(var(--g) * 0.0175); line-height: 1.2; }
.balon.konusma, .balon.fisilti, .balon.bagiris {
  background: #fffdf6; border: 2px solid var(--murekkep); border-radius: 46% 54% 50% 50% / 55% 50% 50% 45%;
  padding: 0.7em 1em; text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.18);
}
.balon.fisilti { border-style: dashed; font-weight: 400; font-style: italic; }
.balon.bagiris { border-width: 3px; font-size: calc(var(--g) * 0.02); }
.balon .kim { display: block; font-size: 0.7em; color: #7a5a2a; letter-spacing: 0.06em; }
.balon.anlati {
  background: #f6dc8c; border: 2px solid var(--murekkep); padding: 0.45em 0.7em; max-width: 46%;
  font-weight: 700; font-style: italic; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
}
.balon.ses {
  font-family: 'Bangers', 'Comic Neue', sans-serif; font-size: calc(var(--g) * 0.05); letter-spacing: 0.04em; max-width: 70%;
  color: color-mix(in srgb, var(--renk, #e9c46a) 85%, #fff); -webkit-text-stroke: 2px var(--murekkep); paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--murekkep); transform: rotate(var(--egim, -8deg)); white-space: nowrap;
}

/* kapak ve son */
.kapak, .son { background: #120f0c; color: var(--kagit); }
.kapak-ic { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(90% 60% at 50% 30%, #3a2c1a 0, #120f0c 70%); }
.kapak-yarik { position: absolute; left: 50%; top: -5%; width: 6%; height: 70%; transform: translateX(-50%) rotate(8deg);
  background: linear-gradient(180deg, transparent, #ffe9a8 30%, #f2c24a 55%, transparent);
  filter: blur(calc(var(--g) * 0.006)); clip-path: polygon(45% 0, 60% 0, 70% 30%, 52% 52%, 62% 75%, 48% 100%, 40% 100%, 50% 70%, 36% 48%, 54% 26%); box-shadow: 0 0 80px #f2c24a; }
.kapak-portreler { position: absolute; left: 0; right: 0; bottom: 20%; display: flex; justify-content: center; }
.kapak-portreler .portre { width: 26%; margin: 0 -2.5%; clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); filter: saturate(1.1) contrast(1.05); }
.kapak-portreler .portre:nth-child(3) { width: 30%; z-index: 1; }
.kapak-yazi { position: absolute; left: 0; right: 0; top: 50%; text-align: center; transform: translateY(-50%); }
.kapak-yazi h1 { margin: 0; font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: calc(var(--g) * 0.16); line-height: 0.9; letter-spacing: 0.04em; color: #fff3cf; text-shadow: 0 0 calc(var(--g) * 0.04) rgba(242, 194, 74, 0.7), 4px 4px 0 #000; }
.kapak-yazi p { margin: 0.6em 0 0; font-weight: 700; font-style: italic; font-size: calc(var(--g) * 0.024); color: #e9dcc0; }
.kapak-yazi .kucuk { font-size: calc(var(--g) * 0.02); font-style: normal; color: #a59c8c; }
.ust-etiket { font-weight: 700; letter-spacing: 0.3em; font-size: calc(var(--g) * 0.018); color: #f2c24a; }
.kapak-yazi { top: 30%; }
.kapak-alt { position: absolute; bottom: 4%; width: 100%; text-align: center; color: #8d8270; font-size: calc(var(--g) * 0.018); }
.son-ic .kapak-yazi { top: 50%; }
.son-ic .oyna, .son-ic .basa { display: inline-block; margin: 1.2em 0.4em 0; padding: 0.5em 1.4em; font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: calc(var(--g) * 0.03); letter-spacing: 0.08em; text-decoration: none; }
.son-ic .oyna { background: #f0a020; color: #111; }
.son-ic .basa { border: 1px solid rgba(243, 234, 214, 0.3); color: var(--kagit); }

/* bölüm açılışı */
.acilis { background: color-mix(in srgb, var(--renk) 22%, #120f0c); color: var(--kagit); }
.acilis-ic { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 35%, color-mix(in srgb, var(--renk) 55%, #120f0c), transparent 70%); }
.acilis-portre { position: absolute; left: 50%; top: 12%; width: 62%; transform: translateX(-50%); display: flex; justify-content: center; }
.acilis-portre .portre { width: 100%; clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); }
.acilis-portre.cok { width: 92%; top: 18%; }
.acilis-portre.cok .portre { width: 22%; margin: 0 -1.5%; }
.acilis-yazi { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; }
.bolum-no { font-weight: 700; letter-spacing: 0.35em; text-transform: uppercase; font-size: calc(var(--g) * 0.022); color: var(--renk); }
.acilis-yazi h2 { margin: 0.1em 0 0.05em; font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: calc(var(--g) * 0.15); line-height: 0.95; text-transform: uppercase; color: #fff6e0; text-shadow: 4px 4px 0 #000; }
.bolum-yer { font-style: italic; font-weight: 700; font-size: calc(var(--g) * 0.026); color: #d8ccb3; }

/* sayfa çevirme */
.sayfa.gelen-ileri { animation: gelIleri 0.5s ease-out both; }
.sayfa.giden-ileri { z-index: 2; animation: gitIleri 0.5s ease-in both; }
.sayfa.gelen-geri { z-index: 2; animation: gelGeri 0.5s ease-out both; }
.sayfa.giden-geri { animation: gitGeri 0.5s ease-in both; }
@keyframes gitIleri { to { transform: rotateY(-100deg); filter: brightness(0.6); } }
@keyframes gelIleri { from { filter: brightness(0.55); } }
@keyframes gelGeri { from { transform: rotateY(-100deg); filter: brightness(0.6); } }
@keyframes gitGeri { to { filter: brightness(0.55); } }

/* panel panel okuma */
.sayfa.panel-modu .panel { filter: brightness(0.25) blur(1px); }
.sayfa.panel-modu .panel.odak { filter: none; }

/* içindekiler */
.icindekiler { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(10, 8, 6, 0.8); backdrop-filter: blur(3px); }
.ic-kutu { width: min(520px, calc(100vw - 32px)); background: #1b1916; padding: 24px 28px; border-top: 3px solid var(--bolum); }
.ic-kutu h2 { margin: 0 0 12px; font-family: 'Big Shoulders Display', sans-serif; font-size: 34px; letter-spacing: 0.05em; }
.ic-kutu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ic-kutu li button { width: 100%; display: flex; align-items: baseline; gap: 12px; padding: 10px 12px; text-align: left; border-left: 4px solid var(--renk); background: rgba(255, 255, 255, 0.03); }
.ic-kutu li button:hover { background: rgba(255, 255, 255, 0.08); }
.ic-kutu li span { color: var(--oh-soluk); font-weight: 700; min-width: 80px; }
.ic-kutu li b { font-size: 18px; }
.ic-kutu li small { margin-left: auto; color: var(--oh-soluk); font-style: italic; }
.ic-kutu .kapat { margin-top: 16px; padding: 8px 18px; border: 1px solid rgba(243, 234, 214, 0.25); font-weight: 700; }

@media (max-width: 700px) { .ok { display: none; } .ipucu { display: none; } .baslik-dugme span { display: none; } }
.icindekiler[hidden] { display: none; }

/* önsöz açılışı: tek başına gökyarığı */
.acilis-yarik { height: 85%; top: 0; width: 9%; }
