/* Kullanıcı odaklı yeniden tasarım katmanı (bkz. docs/DESIGN-RESEARCH.md).
   app.css'teki temel tasarım sisteminin üzerine yüklenir. */

/* --- Kategori renkleri ------------------------------------------------------------------ */
.cat-poetry { --cat-fg: #6b4fa0; --cat-bg: #efe9f7; }
.cat-story { --cat-fg: #2f5f93; --cat-bg: #e5edf7; }
.cat-prose { --cat-fg: #4f5b66; --cat-bg: #eaeef1; }
.cat-article { --cat-fg: #1d6b62; --cat-bg: #e0f0ec; }
.cat-essay { --cat-fg: #5d6a1f; --cat-bg: #eef0d9; }
.cat-diary { --cat-fg: #a03d5c; --cat-bg: #f8e5eb; }
.cat-cartoon { --cat-fg: #9a4d14; --cat-bg: #fbe9d8; }
.cat-manga { --cat-fg: #a5303a; --cat-bg: #f9e3e4; }
.cat-comic { --cat-fg: #3e48a0; --cat-bg: #e7e8f8; }
.cat-novel { --cat-fg: #7a4c26; --cat-bg: #f3e7da; }

:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']), :root[data-reader-theme='dark'] {
  --cat-dark: 1;
}
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-poetry, :root[data-reader-theme='dark'] .cat-poetry { --cat-fg: #c7b3f0; --cat-bg: #2b2340; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-story, :root[data-reader-theme='dark'] .cat-story { --cat-fg: #9fc2ec; --cat-bg: #1d2a3b; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-prose, :root[data-reader-theme='dark'] .cat-prose { --cat-fg: #b9c4ce; --cat-bg: #252b30; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-article, :root[data-reader-theme='dark'] .cat-article { --cat-fg: #8fd3c8; --cat-bg: #16302c; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-essay, :root[data-reader-theme='dark'] .cat-essay { --cat-fg: #cdd88f; --cat-bg: #2a2f15; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-diary, :root[data-reader-theme='dark'] .cat-diary { --cat-fg: #f0a3bb; --cat-bg: #3a1f29; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-cartoon, :root[data-reader-theme='dark'] .cat-cartoon { --cat-fg: #f2b07a; --cat-bg: #3a2614; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-manga, :root[data-reader-theme='dark'] .cat-manga { --cat-fg: #f39aa1; --cat-bg: #3d1c20; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-comic, :root[data-reader-theme='dark'] .cat-comic { --cat-fg: #aab2f2; --cat-bg: #22254a; }
:root[data-theme='dark']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-novel, :root[data-reader-theme='dark'] .cat-novel { --cat-fg: #e0b48c; --cat-bg: #35261a; }
@media (prefers-color-scheme: dark) {
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-poetry { --cat-fg: #c7b3f0; --cat-bg: #2b2340; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-story { --cat-fg: #9fc2ec; --cat-bg: #1d2a3b; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-prose { --cat-fg: #b9c4ce; --cat-bg: #252b30; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-article { --cat-fg: #8fd3c8; --cat-bg: #16302c; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-essay { --cat-fg: #cdd88f; --cat-bg: #2a2f15; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-diary { --cat-fg: #f0a3bb; --cat-bg: #3a1f29; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-cartoon { --cat-fg: #f2b07a; --cat-bg: #3a2614; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-manga { --cat-fg: #f39aa1; --cat-bg: #3d1c20; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-comic { --cat-fg: #aab2f2; --cat-bg: #22254a; }
  :root[data-theme='system']:not([data-reader-theme='light']):not([data-reader-theme='sepia']) .cat-novel { --cat-fg: #e0b48c; --cat-bg: #35261a; }
}

/* --- Genel dokunuşlar -------------------------------------------------------------------- */
body {
  font-size: 1.0625rem;
  font-feature-settings: 'kern' 1;
  text-rendering: optimizeLegibility;
}
/* Başlık hiyerarşisi: içerik başlıkları Literata, arayüz etiketleri (h4/h5) Instrument Sans. */
h1,
h2.h3,
.page-title,
.section-title,
.hero-title,
.reader-title,
.post-card-title,
.profile-name,
.cover-card-title,
.continue-title {
  font-family: var(--font-read);
  font-weight: 650;
  letter-spacing: -0.012em;
}
.page-title {
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem);
  line-height: 1.12;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.site-header {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}
.btn-support {
  background: var(--support);
  color: var(--support-contrast);
}
.btn-support:hover {
  background: var(--support-hover);
  color: var(--support-contrast);
}
.empty-state {
  border-style: solid;
  border-color: var(--border);
}
.empty-art {
  width: 140px;
  height: auto;
  color: var(--text-muted);
  display: block;
  margin: 0 auto 4px;
}
.empty-art .art-page { fill: var(--surface-2); }
.empty-art .art-lines { stroke: var(--accent); opacity: 0.7; }
.empty-art .art-dot-support { fill: var(--support); }
.empty-art .art-dot { fill: var(--accent); opacity: 0.6; }
.empty-state .empty-icon {
  display: none;
}

/* Başlıktaki arama */
.header-search {
  flex: 1 1 280px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 0 14px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text-muted);
}
.header-search:focus-within {
  border-color: var(--accent);
  background: var(--surface);
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}
@media (max-width: 1023px) {
  .header-search {
    display: none;
  }
}
@media (max-width: 767px) {
  /* Mobilde "Yaz" alt gezinmede; başlıkta tekrarlanmaz. */
  .header-actions .header-write {
    display: none;
  }
}

/* Bildirim kutuları */
.toast-region {
  max-width: 1120px;
  margin: 16px auto 0;
  padding: 0 16px;
}
.js .toast-region {
  position: fixed;
  z-index: 60;
  top: calc(var(--header-h) + 12px);
  right: 16px;
  margin: 0;
  padding: 0;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--success);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  transition: opacity 0.25s, transform 0.25s;
}
.toast p {
  margin: 0;
  flex: 1;
}
.toast-error {
  border-left-color: var(--danger);
}
.toast-error .icon {
  color: var(--danger);
}
.toast-success .icon {
  color: var(--success);
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}
.toast-close {
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

/* --- Kategori çipleri ve hap sekmeler ------------------------------------------------------ */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: none;
  color: var(--cat-fg, var(--text-muted));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
a.cat-chip:hover {
  color: var(--cat-fg);
  filter: saturate(1.3);
}
.chip-scroller {
  margin: 4px -16px 24px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip-scroller::-webkit-scrollbar {
  display: none;
}
.chip-scroller ul {
  list-style: none;
  margin: 0;
  padding: 2px 0 6px;
  display: flex;
  gap: 8px;
}
.scroll-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.scroll-chip .icon {
  color: var(--cat-fg, var(--accent));
}
.scroll-chip:hover {
  border-color: var(--cat-fg, var(--accent));
  color: var(--text);
}
.scroll-chip.is-current {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.scroll-chip.is-current .icon {
  color: inherit;
}
.pill-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.pill:hover {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}
.pill.is-current {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* --- Kartlar ------------------------------------------------------------------------------ */
.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.post-card {
  box-shadow: none;
  transition: border-color 0.15s;
}
.post-card:hover {
  border-color: var(--border-strong);
}
.post-card:hover .post-card-title a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
/* Metin yazılarında kapak yok: ilk cümle, kategori renginde ince bir dikey çizgiyle alıntı olarak gösterilir. */
.post-card-quote {
  margin: 2px 0 4px;
  padding-left: 14px;
  border-left: 2px solid var(--cat-fg, var(--border-strong));
  font-family: var(--font-read);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  text-decoration: none;
}
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.type-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 16px 18px;
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, color-mix(in srgb, var(--cat-fg, #888) 12%, transparent) 26px 27px),
    var(--cat-bg, var(--surface-2));
  color: var(--cat-fg, var(--text));
  overflow: hidden;
}
.type-cover-icon {
  position: absolute;
  top: 14px;
  left: 16px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.type-cover-quote {
  font-family: var(--font-read);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.type-cover-title {
  font-family: var(--font-read);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.type-cover-note {
  font-weight: 700;
  font-size: 0.9rem;
}
.type-cover.is-sensitive {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, var(--bg) 14px 28px);
  color: var(--warn);
}
.post-card-body {
  gap: 8px;
  padding: 16px 18px 14px;
}
.post-card-meta {
  align-items: center;
}
.post-card-title {
  font-size: 1.32rem;
  line-height: 1.22;
}
.post-card-title a {
  text-underline-offset: 0.16em;
}
.post-card-footer {
  align-items: center;
  border-top: 0;
  padding-top: 6px;
}
.post-card-byline {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.post-card-byline .author-name {
  font-size: 0.875rem;
}
.post-card-byline .author-real + .author-handle {
  display: none;
}
.post-card-stats {
  gap: 12px;
}
.icon-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.icon-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}
.icon-toggle.is-pressed {
  color: var(--accent);
}
.icon-toggle.is-pressed .icon {
  fill: currentColor;
}

/* --- Raflar ------------------------------------------------------------------------------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head p {
  margin: 2px 0 0;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-read);
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem);
  margin: 0;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.link-more {
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shelf-buttons {
  display: inline-flex;
  gap: 4px;
}
.shelf-buttons .icon-toggle {
  border-color: var(--border);
  background: var(--surface);
}
.shelf {
  margin: 8px 0 28px;
}
.shelf-track {
  list-style: none;
  margin: 0 -16px;
  padding: 4px 16px 12px;
  display: grid;
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
  scrollbar-width: thin;
}
.shelf-track > li {
  scroll-snap-align: start;
}
.shelf-continue .shelf-track {
  grid-auto-columns: minmax(290px, 340px);
}
.shelf-covers .shelf-track {
  grid-auto-columns: minmax(150px, 176px);
}
.continue-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.continue-cover {
  flex: 0 0 82px;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
}
.continue-cover .type-cover {
  padding: 10px;
}
.continue-cover .type-cover-icon {
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
}
.continue-cover .type-cover-title {
  font-size: 0.8rem;
}
.continue-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.continue-body p {
  margin: 0;
}
.continue-title {
  font-family: var(--font-read);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.continue-title:hover {
  text-decoration: underline;
}
.continue-card progress {
  width: 100%;
  margin-top: auto;
}
.cover-card-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}
.cover-card-art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.cover-card-link:hover .cover-card-art {
  transform: translateY(-3px);
}
.cover-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-rank {
  position: absolute;
  left: 10px;
  bottom: -4px;
  font-family: var(--font-read);
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.cover-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--success);
  color: var(--surface);
  font-size: 0.7rem;
  font-weight: 800;
}
.cover-card-title {
  font-weight: 700;
  line-height: 1.25;
}
.cover-card-meta {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cover-card-meta .author-name {
  font-weight: 500;
}
.cover-card-meta .author-real + .author-handle {
  display: none;
}

/* --- Ana sayfa ----------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas:
    'copy line'
    'values values';
  gap: 28px 56px;
  align-items: center;
  padding: 28px 0 8px;
}
.hero-copy {
  grid-area: copy;
}
.line-of-day {
  grid-area: line;
}
.value-row {
  grid-area: values;
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'copy' 'line' 'values';
    gap: 24px;
  }
}
.hero-kicker {
  color: var(--accent);
}
.hero-title {
  font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.1rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin-bottom: 0.4em;
  text-wrap: balance;
}
.hero-lead {
  max-width: 36em;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
/* Günün satırı: çizgili kâğıt üzerinde, sitedeki gerçek bir yazıdan alıntı.
   Çizgiler alıntı metninin kendi satır yüksekliğinden çizilir; böylece her ekranda metin çizgiye oturur. */
.line-of-day {
  --line: 2rem;
  position: relative;
  margin: 0;
  padding: 20px 24px 20px 44px;
  background:
    linear-gradient(90deg, transparent 0 28px, color-mix(in srgb, var(--support) 40%, transparent) 28px 29px, transparent 29px),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.line-of-day figcaption {
  color: var(--support);
  margin-bottom: 6px;
}
.line-of-day blockquote {
  margin: 0;
}
.line-of-day blockquote p {
  margin: 0;
  font-family: var(--font-read);
  font-style: italic;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  line-height: var(--line);
  background: repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line));
  text-wrap: pretty;
}
.line-of-day-source .author-real + .author-handle {
  display: none;
}
.line-of-day-source {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.line-of-day-source a {
  color: var(--text);
  font-weight: 600;
}
.value-row {
  list-style: none;
  margin: 8px 0 0;
  padding: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--border);
}
@media (max-width: 700px) {
  .value-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}
.value-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.value-item p {
  margin: 0;
}
.value-icon {
  margin-top: 2px;
  color: var(--accent);
}
.value-item:last-child .value-icon {
  color: var(--support);
}
.home-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 8px 0 24px;
}
.home-head .eyebrow::first-letter {
  text-transform: uppercase;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1023px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.home-main .card-grid {
  margin-top: 12px;
}
.home-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
@media (max-width: 1023px) {
  .home-aside {
    position: static;
  }
}
.aside-card {
  border-top: 1px solid var(--border-strong);
  padding: 16px 0 0;
}
.aside-title {
  font-size: 1rem;
  margin: 0 0 12px;
}
.aside-cta .btn {
  margin-top: 4px;
}
.mini-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mini-people li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini-person-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mini-person-body .author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Dar sütunda kesik "@ay…" görünmesin: ad varsa yalnızca ad, yoksa takma ad. */
.mini-person-body .author-real + .author-handle {
  display: none;
}
.mini-person-body p {
  margin: 0;
}
.mini-people .btn {
  padding: 6px 10px;
}
.feed-filters {
  margin: 0 0 4px;
}
.filters-toggle {
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  min-height: 38px;
}
.category-tiles {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 12px;
}
.category-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  min-height: 112px;
  border-radius: var(--radius);
  background: var(--cat-bg);
  color: var(--cat-fg);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s;
}
.category-tile:hover {
  color: var(--cat-fg);
  transform: translateY(-2px);
}
.tile-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.search-hero {
  align-items: center;
  padding: 6px 6px 6px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.search-hero:focus-within {
  border-color: var(--accent);
}
.search-hero .input {
  border: 0;
  background: transparent;
  outline: none;
}

/* --- Okuma sayfası ---------------------------------------------------------------------------- */
.read-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 39;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}
.reader-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}
.reader-title {
  letter-spacing: -0.01em;
}
.reader-byline {
  border-top: 0;
  border-bottom: 0;
  padding: 0;
}
.reader-dock {
  position: sticky;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: 36px auto 0;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 767px) {
  .reader-dock {
    bottom: 82px;
  }
}
.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}
.dock-btn::-webkit-details-marker {
  display: none;
}
.dock-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.dock-btn.is-pressed {
  color: var(--support);
}
.dock-btn.is-pressed .icon {
  fill: currentColor;
}
.dock-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.dock-aa {
  font-family: var(--font-read);
  font-weight: 700;
  font-size: 1.15rem;
}
.dock-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}
.reader-settings .menu-panel {
  left: auto;
  right: -6px;
  top: auto;
  bottom: calc(100% + 14px);
}
.rs-panel {
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
}
.rs-title {
  font-weight: 700;
  margin: 0 0 8px;
}
.rs-group {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}
.rs-group legend {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.rs-options {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.rs-option {
  flex: 1;
  position: relative;
}
.rs-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.rs-option span {
  display: block;
  text-align: center;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}
.rs-option input:checked + span {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  color: var(--accent);
}
.rs-option input:focus-visible + span {
  outline: 3px solid var(--focus);
}
:root[data-reader-size='s'] .reader .prose { font-size: 1.05rem; }
:root[data-reader-size='l'] .reader .prose { font-size: 1.35rem; }
:root[data-reader-size='xl'] .reader .prose { font-size: 1.55rem; }
:root[data-reader-font='sans'] .reader .prose { font-family: var(--font-ui); }
:root[data-reader-spacing='wide'] .reader .prose { line-height: 2.05; }

/* --- Sesli dinleme (tarayıcının konuşma sentezi; public/js/listen.js) ------------------------------- */
.listen {
  max-width: var(--measure);
  margin: 0 0 28px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.listen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.listen-status {
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
  padding: 0 4px;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.listen.is-active .listen-status {
  color: var(--text);
  font-weight: 600;
}
.listen-toggle {
  margin-left: auto;
  color: var(--text-muted);
}
.listen-toggle[aria-expanded='true'] {
  background: var(--surface-2);
  color: var(--text);
}
.listen-meter {
  height: 3px;
  margin: 8px 4px 2px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.listen-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.4s linear;
}
.listen-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 10px 4px 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.listen-settings[hidden] {
  display: none;
}
.listen-field {
  display: grid;
  gap: 4px;
  align-content: start;
}
.listen-field-voice,
.listen-hint {
  grid-column: 1 / -1;
}
.listen-field .label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.listen-field output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.listen-select {
  min-height: 40px;
  padding: 6px 8px;
  font-size: 0.9rem;
}
.listen-field input[type='range'] {
  width: 100%;
  height: 32px;
  margin: 0;
  accent-color: var(--accent);
}
.listen-note {
  margin: 8px 4px 2px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.listen-note[data-tone='warn'] {
  color: var(--warn);
}
.listen-note[data-tone='error'] {
  color: var(--danger);
}
/* Okunan paragraf: yer değiştirmeyen hafif bir vurgu (gölgeyle taşar, metni itmez). */
.prose .is-speaking {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: 2px;
}
.listen-dock .icon-listen-pause,
.listen-dock.is-playing .icon-listen {
  display: none;
}
.listen-dock.is-playing .icon-listen-pause {
  display: inline;
}
.listen-dock.is-pressed {
  color: var(--accent);
}
.listen-dock.is-pressed .icon {
  fill: none;
}
.listen-dock.is-playing .icon-listen-pause {
  fill: currentColor;
}
@media (max-width: 520px) {
  .listen-settings {
    grid-template-columns: minmax(0, 1fr);
  }
  .listen-status {
    order: 5;
    flex-basis: 100%;
  }
  /* Dar ekranda ayar düğmesi yalnızca simge; metin ekran okuyucular için kalır. */
  .listen-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .listen-meter span {
    transition: none;
  }
}
.end-card {
  margin: 28px 0 8px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.end-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--success);
}
.end-card p {
  margin: 0;
}
.next-up {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}
.next-up:hover {
  color: var(--text);
}
.next-up-art {
  flex: 0 0 72px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
}
.next-up-art .type-cover {
  padding: 8px;
}
.next-up-art .type-cover-icon {
  width: 26px;
  height: 26px;
  top: 6px;
  left: 6px;
}
.next-up-art .type-cover-title {
  font-size: 0.7rem;
}
.next-up-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.next-up-body .eyebrow {
  margin: 0;
}
.next-up-title {
  font-family: var(--font-read);
  font-size: 1.2rem;
  font-weight: 700;
}
.end-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--support-soft);
}
.end-support p {
  flex: 1 1 220px;
}
.end-support-icon {
  color: var(--support);
}

/* Okuma temaları (yalnızca okuma sayfasında, kullanıcı seçimiyle) */
:root[data-reader-theme='sepia'] {
  --bg: #f3ead6;
  --surface: #faf3e3;
  --surface-2: #ebdfc4;
  --border: #dccdaa;
  --border-strong: #c7b48d;
  --text: #3a2e1f;
  --text-muted: #6b5940;
  --accent: #6b4a1f;
  --accent-hover: #553a17;
  --accent-contrast: #ffffff;
  --accent-soft: #eadcbc;
  --support: #a33b22;
  --support-hover: #8a2f1a;
  --support-soft: #f2dccb;
  --support-contrast: #ffffff;
  --success: #3f6b2a;
  --success-soft: #e1e8c9;
  --warn: #7a4f00;
  --warn-soft: #f1e1b5;
  --danger: #a8231b;
  --danger-soft: #f4d9cf;
  color-scheme: light;
}
:root[data-reader-theme='light'] {
  --bg: #f7f2ea;
  --surface: #fffdf9;
  --surface-2: #f1ebe1;
  --border: #e5dccd;
  --border-strong: #cdbfab;
  --text: #211d18;
  --text-muted: #5f574c;
  --accent: #1d5c58;
  --accent-hover: #164a47;
  --accent-contrast: #ffffff;
  --accent-soft: #e2eeec;
  --support: #b3402a;
  --support-hover: #983321;
  --support-soft: #fbe6df;
  --support-contrast: #ffffff;
  --success: #276030;
  --success-soft: #e4f1e5;
  --warn: #7a4f00;
  --warn-soft: #fcf1d8;
  --danger: #a8231b;
  --danger-soft: #fbe9e7;
  color-scheme: light;
}
:root[data-reader-theme='dark'] {
  --bg: #151412;
  --surface: #1d1b19;
  --surface-2: #262320;
  --border: #36322d;
  --border-strong: #4d473f;
  --text: #ece7df;
  --text-muted: #b3aa9c;
  --accent: #7cc3bb;
  --accent-hover: #9ad3cc;
  --accent-contrast: #0d1d1c;
  --accent-soft: #1f3331;
  --support: #ff9a7d;
  --support-hover: #ffb59f;
  --support-soft: #3b231c;
  --support-contrast: #2a0d05;
  --success: #8fd19a;
  --success-soft: #1b2e1e;
  --warn: #f3c969;
  --warn-soft: #362b15;
  --danger: #ff8a80;
  --danger-soft: #3a1f1c;
  color-scheme: dark;
}

/* --- Eser sayfası ---------------------------------------------------------------------------- */
.work {
  max-width: 980px;
}
.work-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  background: var(--cat-bg, var(--surface-2));
  padding: 28px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .work-hero {
    padding: 18px;
  }
}
.work-hero-bg {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  max-width: none;
  object-fit: cover;
  filter: blur(36px) saturate(1.2);
  opacity: 0.5;
}
.work-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 82%, transparent), color-mix(in srgb, var(--bg) 55%, transparent));
}
.work-hero .work-head {
  position: relative;
  z-index: 1;
}
.work-cover .type-cover {
  padding: 20px;
}
.work-cover .type-cover-icon {
  width: 48px;
  height: 48px;
}
.status-pill {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.78rem;
}
.status-pill.is-done {
  background: var(--success-soft);
  color: var(--success);
}
.chapter-item {
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  border-bottom: 0;
}
.chapter-item:hover {
  background: var(--surface);
}
.chapter-thumb {
  position: relative;
  flex: 0 0 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  display: block;
}
.chapter-thumb .type-cover {
  padding: 6px;
}
.chapter-thumb .type-cover-icon,
.chapter-thumb .type-cover-title,
.chapter-thumb .type-cover-note {
  display: none;
}
.chapter-thumb .chapter-num {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.chapter-list > li + li {
  border-top: 1px solid var(--border);
}

/* --- Profil ---------------------------------------------------------------------------------- */
.profile-banner {
  height: 132px;
  border-radius: var(--radius);
}
@media (max-width: 640px) {
  .profile-banner {
    height: 110px;
  }
}
.profile-banner {
  --ink: var(--accent);
  background:
    linear-gradient(90deg, transparent 0 64px, color-mix(in srgb, var(--support) 45%, transparent) 64px 65px, transparent 65px),
    repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--ink) 22%, transparent) 23px 24px),
    color-mix(in srgb, var(--ink) 7%, var(--surface));
  border: 1px solid var(--border);
}
.banner-1 { --ink: #6b4fa0; }
.banner-2 { --ink: #2f5f93; }
.banner-3 { --ink: #a03d5c; }
.banner-4 { --ink: #5d6a1f; }
.banner-5 { --ink: #7a4c26; }
.profile-head {
  margin-top: -52px;
  padding: 0 16px 20px;
}
.profile-head .avatar-xl {
  width: 112px;
  height: 112px;
  border: 5px solid var(--bg);
  box-shadow: var(--shadow);
}
.profile-head .profile-info,
.profile-head .profile-actions {
  padding-top: 58px;
}
@media (max-width: 720px) {
  .profile-head .profile-actions {
    padding-top: 0;
  }
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}
.profile-layout.is-single {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 1023px) {
  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-aside {
    order: -1;
  }
}
.profile-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
@media (max-width: 1023px) {
  .profile-aside {
    position: static;
  }
}
.support-box {
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--support-soft), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--support) 25%, transparent);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.support-box h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--support);
}
.support-box p {
  margin: 0;
}
.quick-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.quick-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 2px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.quick-tier:hover {
  border-color: var(--support);
  color: var(--text);
  transform: translateY(-1px);
}
.quick-tier-name {
  font-size: 0.78rem;
  font-weight: 800;
}
.quick-tier.tier-copper,
.quick-tier.tier-silver,
.quick-tier.tier-gold {
  background: var(--surface);
}
.quick-tier.tier-copper .quick-tier-name { color: var(--copper); }
.quick-tier.tier-silver .quick-tier-name { color: var(--silver); }
.quick-tier.tier-gold .quick-tier-name { color: var(--gold); }
.quick-tier-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.supporter-wall {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.supporter-wall li {
  position: relative;
}
.wall-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.wall-dot.tier-copper { background: var(--copper); }
.wall-dot.tier-silver { background: var(--silver); }
.wall-dot.tier-gold { background: var(--gold); }
.tier-card {
  position: relative;
}
.tier-card.is-featured {
  border-color: var(--support);
  box-shadow: 0 0 0 1px var(--support), var(--shadow);
}
.tier-ribbon {
  position: absolute;
  top: -11px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--support);
  color: var(--support-contrast);
  font-size: 0.72rem;
  font-weight: 800;
}

/* --- Bildirimler ---------------------------------------------------------------------------- */
.notif-group {
  margin-bottom: 18px;
}
.notif-group-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.notification-list {
  border-top: 1px solid var(--border);
}
.notification {
  position: relative;
  margin: 0;
  padding: 14px 8px 14px 18px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.notification.is-unread {
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}
.notification.is-unread::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent);
}
.notification-icon {
  width: 44px;
}
.notif-symbol {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.notif-support .notif-symbol,
.notif-payment_receipt .notif-symbol {
  background: var(--support-soft);
  color: var(--support);
}
.notif-moderation .notif-symbol,
.notif-appeal .notif-symbol {
  background: var(--warn-soft);
  color: var(--warn);
}

/* --- Başlangıç / ilgi alanı kutucukları ------------------------------------------------------ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 12px;
  margin-top: 10px;
}
.tile-check {
  position: relative;
  display: block;
  cursor: pointer;
}
.tile-check input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.tile-face {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  min-height: 108px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  transition: border-color 0.15s, background-color 0.15s;
}
.tile-face .tile-icon {
  background: var(--cat-bg);
  color: var(--cat-fg);
}
.tile-check-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  color: transparent;
}
.tile-check input:checked + .tile-face {
  border-color: var(--cat-fg);
  background: var(--cat-bg);
  color: var(--cat-fg);
}
.tile-check input:checked + .tile-face .tile-icon {
  background: var(--surface);
}
.tile-check input:checked + .tile-face .tile-check-mark {
  background: var(--cat-fg);
  border-color: var(--cat-fg);
  color: var(--surface);
}
.tile-check input:focus-visible + .tile-face {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* --- Editör odak modu ------------------------------------------------------------------------ */
.focus-mode .site-header,
.focus-mode .site-footer,
.focus-mode .bottom-nav,
.focus-mode .banner,
.focus-mode .editor-side,
.focus-mode .danger-zone,
.focus-mode .editor-head .eyebrow,
.focus-mode .help,
.focus-mode .upload-box,
.focus-mode .segmented-radio {
  display: none !important;
}
.focus-mode .editor {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}
.focus-mode .editor-body {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  min-height: 70vh;
}
.focus-mode .toolbar {
  top: 0;
}
.focus-toggle[aria-pressed='true'] {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 50;
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* --- Marka ---------------------------------------------------------------------------------- */
.brand {
  gap: 9px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
  fill: none;
}
.brand-mark .brand-caret {
  stroke: var(--support);
}
.brand-name {
  font-family: var(--font-read);
  font-weight: 650;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}
.brand-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.brand-footer .brand-name {
  font-size: 1.15rem;
}

/* --- Küçük tipografi ayarları ------------------------------------------------------------------ */
.eyebrow a {
  text-decoration: none;
}
.eyebrow a:hover {
  text-decoration: underline;
}
.stat-value,
.empty-title,
.chart-total {
  font-family: var(--font-read);
  font-variant-numeric: lining-nums tabular-nums;
}
.footer-links a {
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}
/* Editör başlığı: başlık solda; odak modu ve kayıt durumu sağda bir arada */
.editor-head .focus-toggle {
  margin-left: auto;
}
.editor-head .autosave-status {
  flex-basis: auto;
}

/* --- Metin kartları (kapaksız) --------------------------------------------------------------- */
.post-card.is-text .post-card-body {
  padding-top: 18px;
}
.post-card.is-text .post-card-quote {
  -webkit-line-clamp: 4;
}
.post-card.is-text .post-card-meta {
  margin-bottom: 2px;
}

/* --- Okuma: düzyazıda ilk harf büyük (şiir ve günlükte kullanılmaz) ---------------------------------- */
.prose.has-dropcap > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-read);
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.82;
  margin: 0.06em 0.09em 0 0;
  color: var(--accent);
}

/* --- Tema: açık / koyu mod geçişi ------------------------------------------------------------ */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, fill 0.25s ease !important;
}
.theme-toggle-form {
  display: contents;
}
button.icon-btn {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] .theme-toggle .icon-sun {
    display: block;
  }
  :root[data-theme='system'] .theme-toggle .icon-moon {
    display: none;
  }
}
.theme-toggle .icon {
  transition: transform 0.3s ease;
}
.theme-toggle:hover .icon {
  transform: rotate(-15deg);
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle .icon {
    transition: none;
  }
}

/* Ayarlar → Görünüm: önizlemeli tema kartları */
.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 14px;
  margin-top: 12px;
}
.theme-option {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.theme-option:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.theme-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.theme-option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}
.theme-option-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.theme-check {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.theme-option:has(input:checked) .theme-check {
  opacity: 1;
  transform: none;
}
.theme-preview {
  --p-bg: #f7f2ea;
  --p-surface: #fffdf9;
  --p-border: #e5dccd;
  --p-line: #d9cdbb;
  --p-text: #211d18;
  --p-accent: #1d5c58;
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10;
  background: var(--p-bg);
  border-bottom: 1px solid var(--border);
}
.theme-preview-dark {
  --p-bg: #151412;
  --p-surface: #1d1b19;
  --p-border: #36322d;
  --p-line: #4d473f;
  --p-text: #ece7df;
  --p-accent: #7cc3bb;
}
/* Cihazla eşleştir: sol yarı açık, sağ yarı koyu */
.theme-preview-system {
  background: linear-gradient(115deg, #f7f2ea 0 50%, #151412 50% 100%);
}
.theme-preview-system .tp-bar,
.theme-preview-system .tp-card {
  background: linear-gradient(115deg, #fffdf9 0 50%, #1d1b19 50% 100%);
  border-color: #8a8073;
}
.theme-preview-system .tp-line,
.theme-preview-system .tp-title,
.theme-preview-system .tp-pill {
  background: linear-gradient(90deg, #d9cdbb, #4d473f);
}
.theme-preview-system .tp-btn,
.theme-preview-system .tp-logo,
.theme-preview-system .tp-dot {
  background: linear-gradient(90deg, #1d5c58, #7cc3bb);
}
.tp-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 18%;
  padding: 0 8%;
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-border);
}
.tp-logo,
.tp-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--p-accent);
}
.tp-dot {
  margin-left: auto;
  border-radius: 50%;
}
.tp-pill {
  width: 34%;
  height: 7px;
  border-radius: 99px;
  background: var(--p-line);
}
.tp-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8% 8% 0;
  align-content: start;
}
.tp-title {
  grid-column: 1 / -1;
  width: 45%;
  height: 9px;
  border-radius: 4px;
  background: var(--p-text);
  opacity: 0.85;
}
.tp-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 6px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
}
.tp-line {
  height: 5px;
  border-radius: 3px;
  background: var(--p-line);
}
.tp-short {
  width: 60%;
}
.tp-btn {
  width: 50%;
  height: 8px;
  border-radius: 99px;
  background: var(--p-accent);
  margin-top: 2px;
}

@media (max-width: 560px) {
  .theme-option {
    flex-direction: row;
    align-items: stretch;
  }
  .theme-preview {
    flex: 0 0 112px;
    aspect-ratio: auto;
    min-height: 92px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
  .tp-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .tp-card + .tp-card {
    display: none;
  }
  .theme-option-text {
    justify-content: center;
    padding: 10px 12px;
  }
}

/* --- Duyarlı düzen düzeltmeleri ----------------------------------------------------------- */

/* Yatay kaydırılan şeritlerde kenar soluklaşması: devamı olduğunu gösterir (JS sınıfları ekler). */
.fade-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.fade-left {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent);
}
.fade-left.fade-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

/* Paylaş / koleksiyon / okuma ayarları menüleri: dar ekranda alttan açılan sayfa (bottom sheet) */
@media (max-width: 600px) {
  .main .menu-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 60;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    animation: sheet-in 0.18s ease-out;
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-panel {
    animation: none !important;
  }
}

/* Editör: dar ekranda biçim seçimi tam genişlik, kaydet/ayarlar çubuğu altta sabit */
.editor-quickbar {
  display: none;
}
@media (max-width: 960px) {
  .segmented-radio .choice-list {
    flex-wrap: nowrap;
  }
  .segmented-radio .choice {
    flex: 1 1 0;
    min-width: 0;
  }
  .segmented-radio .choice label {
    height: 100%;
    justify-content: center;
    text-align: center;
  }
  .editor-quickbar {
    display: flex;
    gap: 8px;
    position: sticky;
    bottom: 72px;
    z-index: 30;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .editor-quickbar .btn {
    flex: 1 1 0;
    justify-content: center;
  }
}
@media (min-width: 768px) and (max-width: 960px) {
  .editor-quickbar {
    bottom: 12px;
  }
}

/* Uzun ad, takma ad ve bağlantılar dar ekranda satır kırar */
.profile-name,
.profile-handle,
.profile-bio,
.post-title,
.card-title {
  overflow-wrap: anywhere;
}

/* Çok dar ekranlar (≤ 360px): üst çubuk sıkışmasın */
@media (max-width: 360px) {
  .header-inner {
    gap: 8px;
  }
  .header-actions {
    gap: 2px;
  }
  .header-actions .btn-sm {
    padding-inline: 10px;
  }
  .brand-name {
    display: none;
  }
}

/* --- Yorum yanıtları ----------------------------------------------------------------------------- */
.comment-replies {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--border);
}
.comment-reply {
  padding: 10px 0 4px;
  border-top: 0;
}
.comment-reply + .comment-reply {
  border-top: 1px dashed var(--border);
}
@media (min-width: 600px) {
  .comment-replies {
    margin-left: 18px;
  }
}
.reply-toggle[open] > summary {
  color: var(--accent);
}

/* --- Sıradaki bölüm kartı ---------------------------------------------------------------------- */
.next-chapter {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 75%);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.next-chapter:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text);
}
.next-chapter-kicker {
  font-size: 0.8125rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.next-chapter-title {
  font-family: var(--font-read);
  font-size: 1.35rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.next-chapter-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: var(--accent);
}
.next-chapter.is-last {
  background: var(--surface);
}
@media (prefers-reduced-motion: reduce) {
  .next-chapter {
    transition: none;
  }
}

/* --- Okunma grafiği (yazar paneli) ---------------------------------------------------------------- */
.chart-card {
  margin: 16px 0;
  padding: 16px 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.chart-total {
  font-size: 1.25rem;
  font-weight: 700;
}
.views-chart {
  display: block;
  width: 100%;
  height: 170px;
  overflow: visible;
}
.chart-bar {
  fill: var(--accent);
}
.chart-bar:hover {
  fill: var(--accent-hover);
}
.chart-bar.is-zero {
  fill: var(--border-strong);
}
.chart-axis {
  stroke: var(--border);
  stroke-width: 1;
}
.chart-label {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-ui);
}

/* --- Şifre gücü --------------------------------------------------------------------------------- */
.strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  min-height: 20px;
}
.strength-bar {
  flex: 0 0 120px;
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.2s ease, background-color 0.2s ease;
}
.strength[data-score='-1'] {
  visibility: hidden;
}
.strength[data-score='0'] .strength-bar span { width: 12%; background: var(--danger); }
.strength[data-score='1'] .strength-bar span { width: 30%; background: var(--danger); }
.strength[data-score='2'] .strength-bar span { width: 55%; background: var(--warn); }
.strength[data-score='3'] .strength-bar span { width: 80%; background: var(--success); }
.strength[data-score='4'] .strength-bar span { width: 100%; background: var(--success); }

/* --- Google düğmesi ve "daha fazla yükle" ---------------------------------------------------------- */
.btn-google .icon {
  flex: none;
}
.load-more {
  display: flex;
  margin: 24px auto 0;
  min-width: 220px;
  justify-content: center;
}

/* --- Tablet (768–1023 px): üst çubukta arama kutusu, gezinme yalnızca simge ----------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .header-inner {
    gap: 10px;
  }
  .header-search {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    margin-left: 4px;
  }
  .primary-nav {
    margin-left: 4px;
    gap: 0;
  }
  .header-actions {
    gap: 4px;
  }
  .primary-nav .nav-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .primary-nav .nav-link {
    padding-inline: 10px;
  }
}

/* --- Dokunmatik ekranlarda en az 44 px dokunma hedefi --------------------------------------------- */
@media (pointer: coarse) {
  .btn-sm,
  .icon-btn,
  .icon-toggle,
  .chip,
  .pill,
  .tab,
  .menu-list a,
  .menu-button {
    min-height: 44px;
  }
  .icon-btn,
  .icon-toggle {
    min-width: 44px;
  }
  .chip-sm {
    min-height: 36px;
  }
}

/* --- Alt bilgi: telefonda bağlantılar iki sütun ------------------------------------------------- */
@media (max-width: 767px) {
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
  }
}

/* --- Profil: telefonda önce yazılar, destek kutusu ardından ------------------------------------------ */
@media (max-width: 1023px) {
  .profile-aside {
    order: 0;
  }
}

/* --- Koyu modda kullanıcı görselleri zeminden ince bir çerçeveyle ayrılır ------------------------------ */
:root[data-theme='dark'] .card-media img,
:root[data-theme='dark'] .comic-page img,
:root[data-theme='dark'] .prose img {
  outline: 1px solid rgba(255, 255, 255, 0.08);
  outline-offset: -1px;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] .card-media img,
  :root[data-theme='system'] .comic-page img,
  :root[data-theme='system'] .prose img {
    outline: 1px solid rgba(255, 255, 255, 0.08);
    outline-offset: -1px;
  }
}

/* --- Dar ekranda tabloyu kartlara çevir (moderasyon kuyruğu vb.: .table-stack) ------------------------- */
@media (max-width: 720px) {
  .table-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }
  .table-stack tr {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .table-stack td {
    border: 0;
    padding: 4px 0;
  }
  .table-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .table-stack .cell-clip {
    max-width: none;
  }
}

@media print {
  .reader-dock,
  .listen,
  .read-progress,
  .end-card,
  .toast-region {
    display: none !important;
  }
}
