:root {
  --ink: #15110e;
  --muted: #6b625a;
  --paper: #fbf7ef;
  --paper-soft: #f2eadc;
  --line: rgba(21, 17, 14, .14);
  --gold: #9f7d49;
  --gold-dark: #6d5028;
  --shadow: 0 24px 80px rgba(40, 28, 16, .18);
  --radius: 28px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --site-bg: none;
  --hero-image: none;
  --modal-image: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(159, 125, 73, .12), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(60, 39, 25, .08), transparent 32%),
    var(--paper);
  font-family: var(--sans);
  min-height: 100vh;
}
body.has-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--site-bg);
  background-size: cover;
  background-position: center;
  opacity: .12;
  pointer-events: none;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(21,17,14,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,17,14,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .45;
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(251, 247, 239, .86);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.logo-mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  background: #fffaf0;
}
.brand-title {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.nav {
  justify-self: center;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: .2s ease;
}
.nav a:hover, .nav a.active {
  color: var(--ink);
  background: rgba(159, 125, 73, .14);
}
.auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.btn {
  border: 1px solid var(--line);
  background: #fffaf3;
  color: var(--ink);
  padding: 11px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(21,17,14,.05);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(21,17,14,.1); }
.btn.primary { background: var(--ink); color: #fffaf3; border-color: var(--ink); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { padding: 8px 12px; min-height: 34px; font-size: 13px; }
.btn.danger { color: #8a231c; border-color: rgba(138,35,28,.3); background: rgba(138,35,28,.06); }
.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, .8);
  border-radius: 999px;
  padding: 5px 11px 5px 5px;
  min-width: 0;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink), var(--gold));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

main { max-width: 1180px; margin: 0 auto; padding: 34px 22px 70px; }
.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, .97fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 18px;
}
.hero-copy {
  background: rgba(255, 250, 243, .72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(34px, 6vw, 78px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-copy::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(159,125,73,.22);
  border-radius: 50%;
  right: -80px;
  top: -70px;
}
.eyebrow {
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
}
h1, h2, h3 {
  font-family: var(--serif);
  margin: 0;
  line-height: .98;
}
h1 { font-size: clamp(54px, 8.6vw, 110px); letter-spacing: -.045em; }
h2 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -.035em; }
h3 { font-size: 34px; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.8; max-width: 680px; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; }
.hero-art {
  min-height: 590px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(21,17,14,.02), rgba(21,17,14,.4)),
    var(--hero-image),
    linear-gradient(135deg, #efe3ce, #cbb489 48%, #2b211b 49%, #15110e 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 22px;
}
.hero-art-card {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255,250,243,.88);
  backdrop-filter: blur(14px);
  z-index: 2;
}
.hero-art-card b { font-family: var(--serif); font-size: 30px; }
.hero-art-card p { color: var(--muted); line-height: 1.6; margin: 8px 0 0; }

.section { margin-top: 74px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head p { margin: 10px 0 0; color: var(--muted); line-height: 1.7; max-width: 620px; }
.grid { display: grid; gap: 22px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.window-card, .book-card, .post-card, .panel-card {
  border: 1px solid var(--line);
  background: rgba(255,250,243,.76);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(48,35,22,.08);
}
.window-image, .book-cover, .post-cover, .panel-image {
  min-height: 230px;
  background: linear-gradient(135deg, #e7d8be, #b1905e 55%, #201713 56%, #38271d);
  background-size: cover;
  background-position: center;
  position: relative;
}
.window-image::after, .book-cover::after, .post-cover::after, .panel-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(21,17,14,.32));
}
.card-body { padding: 24px; }
.card-body p { color: var(--muted); line-height: 1.72; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(159,125,73,.12);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
}
.book-card { display: grid; grid-template-columns: 220px 1fr; min-height: 270px; }
.book-cover { min-height: 100%; }
.book-card h3 { font-size: 40px; }
.quote {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.2;
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin: 24px 0;
}

.page-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(34px, 6vw, 68px);
  background: rgba(255,250,243,.76);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.page-hero.with-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-image) center / cover no-repeat;
  opacity: .12;
}
.page-hero > * { position: relative; }
.article-body {
  max-width: 860px;
  margin: 44px auto 0;
  background: rgba(255,250,243,.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 58px);
}
.article-body p {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 33px);
  line-height: 1.68;
  margin: 0 0 28px;
}
.book-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}
.book-side {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  background: rgba(255,250,243,.82);
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(48,35,22,.08);
}
.book-side-cover {
  min-height: 390px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e7d8be, #ae8753 55%, #201713 56%, #38271d);
  background-size: cover;
  background-position: center;
  margin-bottom: 18px;
}
.chapter-tabs { display: grid; gap: 8px; margin-top: 18px; }
.chapter-tab {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.35);
}
.chapter-tab.active { background: rgba(159,125,73,.14); border-color: rgba(159,125,73,.35); }
.reader {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,250,243,.86);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 62px);
}
.reader h2 { font-size: clamp(42px, 5vw, 72px); margin-bottom: 16px; }
.chapter-image {
  min-height: 260px;
  border-radius: 24px;
  margin: 24px 0 34px;
  background: linear-gradient(135deg, #e9dcc3, #7e6039, #1e1714);
  background-size: cover;
  background-position: center;
}
.paragraph-block {
  position: relative;
  padding: 16px 58px 16px 0;
  border-bottom: 1px solid rgba(21,17,14,.07);
}
.paragraph-block p {
  font-family: var(--serif);
  font-size: clamp(24px, 2.7vw, 32px);
  line-height: 1.78;
  margin: 0;
}
.comment-trigger {
  position: absolute;
  right: 0;
  top: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fffaf3;
  display: grid;
  place-items: center;
  color: var(--gold-dark);
}
.comment-trigger .count {
  position: absolute;
  right: -6px;
  top: -6px;
  background: var(--ink);
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  padding: 0 5px;
}
.reader-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 10, .5);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(980px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border-radius: 30px;
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 40px 120px rgba(0,0,0,.35);
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
}
.modal.compact { grid-template-columns: 1fr; width: min(700px, 100%); }
.modal-art {
  min-height: 420px;
  background:
    linear-gradient(160deg, rgba(21,17,14,.12), rgba(21,17,14,.65)),
    var(--modal-image),
    linear-gradient(135deg, #eadcc4, #9f7d49, #211714);
  background-size: cover;
  background-position: center;
}
.modal-content { padding: clamp(24px, 5vw, 46px); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 20px; }
.close-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.45);
}
.form-grid { display: grid; gap: 14px; }
.input, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--ink);
}
.textarea { min-height: 120px; resize: vertical; }
.helper { color: var(--muted); font-size: 13px; line-height: 1.6; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.comment-list { display: grid; gap: 14px; margin-top: 18px; }
.comment-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.45);
  padding: 16px;
}
.comment-card .comment-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.comment-user { display: flex; gap: 10px; align-items: center; min-width: 0; }
.comment-card p { color: var(--ink); line-height: 1.7; white-space: pre-wrap; }
.comment-place { color: var(--gold-dark); font-size: 12px; font-weight: 700; }

.profile-card { display: grid; gap: 18px; }
.avatar-large { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--ink), var(--gold)); color: white; display: grid; place-items: center; font-size: 32px; font-weight: 700; }
.avatar-large img { width: 100%; height: 100%; object-fit: cover; }

.audio-control {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(21,17,14,.86);
  color: #fffaf3;
  border-radius: 999px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 11px 15px;
  box-shadow: 0 18px 42px rgba(0,0,0,.24);
}
.audio-control.active { background: var(--gold-dark); }
.audio-icon { font-family: var(--serif); font-size: 22px; line-height: 1; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fffaf3;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 200;
  max-width: min(90vw, 720px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty-state { padding: 34px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); background: rgba(255,255,255,.35); }

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 60px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--gold-dark); }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr; gap: 14px; }
  .brand, .auth-actions { justify-content: center; }
  .hero, .book-layout, .modal { grid-template-columns: 1fr; }
  .hero, .hero-art { min-height: unset; }
  .hero-art { height: 420px; }
  .book-side { position: static; }
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 1fr; }
  .book-cover { min-height: 280px; }
  .modal-art { min-height: 220px; }
}
@media (max-width: 600px) {
  main { padding: 20px 14px 60px; }
  .header-inner { padding: 13px 14px; }
  .nav { gap: 4px; }
  .nav a { padding: 8px 9px; font-size: 13px; }
  .auth-actions { flex-wrap: wrap; }
  .hero-copy, .page-hero, .reader, .article-body { border-radius: 20px; padding: 24px; }
  .paragraph-block { padding-right: 0; }
  .comment-trigger { position: static; margin-top: 14px; }
  .audio-text { display: none; }
}

/* --- Geliştirilmiş okuma, yorum ve koruma alanları --- */
body { font-size: var(--base-font-size, 16px); }
.reader,
.article-body.rich-content {
  font-family: var(--reader-font, Georgia, serif);
  font-size: var(--reader-font-size, 20px);
  line-height: var(--reader-line-height, 1.9);
}
.reader, .article-body, .protected-content {
  -webkit-user-select: none;
  user-select: none;
}
.modal, .modal *, .auth-actions, .auth-actions *, .comment-card, .comment-card *, input, textarea, button, select, a {
  -webkit-user-select: auto;
  user-select: auto;
}
.rich-paragraph p,
.rich-content p { margin: 0 0 1.25em; }
.rich-paragraph h2,
.rich-paragraph h3,
.rich-content h2,
.rich-content h3 {
  font-family: var(--serif);
  line-height: 1.15;
  margin: 1.8em 0 .75em;
}
.rich-paragraph blockquote,
.rich-content blockquote {
  margin: 1.6em 0;
  padding: 1em 1.2em;
  border-left: 3px solid var(--gold);
  background: rgba(159,125,73,.08);
  border-radius: 14px;
}
.chapter-break,
.rich-media-block figure {
  margin: 28px 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,250,243,.7);
  box-shadow: 0 16px 50px rgba(21,17,14,.08);
}
.chapter-break img,
.rich-media-block img,
.rich-content img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}
.chapter-break figcaption,
.rich-media-block figcaption { padding: 10px 14px; color: var(--muted); font-size: 14px; }
.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.emoji-row button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,250,243,.85);
  font-size: 18px;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.edited-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.comment-edit-box { display: grid; gap: 10px; margin-top: 12px; }
.comment-edit-box .textarea { min-height: 110px; }
.protect-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
@media print {
  body { display: none !important; }
}
