/* Tayf — "Nocturnal Bibliophilia"
   Tasarım token'ları Google Stitch design system'inden eşlenmiştir. */

:root {
  --ground: #0d0b09;
  --surface: #151311;
  --surface-1: #14120e;
  --surface-2: #24201a;
  --surface-container: #221f1d;
  --surface-high: #2c2927;

  --gold: #c5a059;
  --gold-lit: #dfbe76;
  --bronze: #8e6f32;
  --rule: #2e2921;

  --ink: #f4ede0;
  --ink-muted: #e8ddcb;
  --ink-dim: #9a8f80;

  --radius: 4px;

  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Literata", Georgia, serif;
  --font-label: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* =========================================================
   SAYFA GEÇİŞLERİ (smooth fade + hafif kayma)
   ========================================================= */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Açılış: içerik yumuşakça belirir */
body.page-enter {
  animation: pageFadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Çıkış: başka sayfaya giderken yumuşakça kaybolur */
body.page-leave {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
@media (prefers-reduced-motion: reduce) {
  body.page-enter { animation: none; }
  body.page-leave { transition: none; opacity: 1; transform: none; }
}

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }
.muted { color: var(--ink-dim); }
.mark { color: var(--gold); font-size: 2rem; line-height: 1; }

h1 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.subtitle { font-family: var(--font-body); font-style: italic; color: var(--ink-muted); }

/* =========================================================
   GİRİŞ EKRANI — ikiye bölünmüş: sol auth, sağ dönen sahne
   ========================================================= */
.login-body { overflow: hidden; }
.login-split { display: grid; grid-template-columns: 1fr 1fr; height: 100vh; }

/* Sol panel: Google auth */
.login-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  background-image: radial-gradient(circle at 50% 40%, rgba(197,160,89,0.06) 0%, transparent 65%);
  border-right: 1px solid var(--rule);
}
.login-inner { width: min(360px, 80%); text-align: center; }
.login-inner h1 { font-size: 44px; margin: 0.4rem 0 0.25rem; }
.login-inner .subtitle { margin-bottom: 2.5rem; }

.google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: var(--ground);
  border: none;
  border-radius: var(--radius);
  padding: 13px 18px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.google-btn:hover { background: var(--gold-lit); box-shadow: 0 0 18px rgba(197,160,89,0.35); }
.login-inner .legal { font-size: 11px; margin-top: 1.5rem; line-height: 1.5; }
.auth-error {
  margin-top: 1rem;
  font-family: var(--font-label);
  font-size: 12px;
  color: #ffb4ab;
  line-height: 1.5;
}

/* Sağ panel: dönen karakter sahnesi */
.login-stage { position: relative; overflow: hidden; background: var(--ground); }
.stage-hero, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: center / cover no-repeat;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.82);
}
.hero-video { opacity: 0; transition: opacity 1.4s ease; }
.hero-video.on { opacity: 1; }

.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 3rem;
  text-align: left;
  background: linear-gradient(0deg, rgba(13,11,9,0.92) 0%, rgba(13,11,9,0.45) 45%, rgba(13,11,9,0.25) 100%);
}
.stage-overlay h1, .stage-overlay .stage-name { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; font-size: 56px; line-height: 1.2; }
.stage-overlay .subtitle { font-size: 18px; color: var(--ink-muted); }
.stage-overlay .blurb { max-width: 46ch; color: var(--ink-muted); font-size: 15px; margin-top: 0.5rem; }

/* =========================================================
   LOGIN SONRASI — full-page, açık 4 karakter %25'er kolon (tüm akış: #/map)
   ========================================================= */
.personae-body { overflow: hidden; }
.personae-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 100vh;
  height: 100vh;
  width: 100vw;
}

.col {
  position: relative;
  overflow: hidden;
  border: none;
  border-right: 1px solid var(--rule);
  background: var(--ground);
  cursor: pointer;
  color: inherit;
  text-align: left;
  padding: 0;
  display: block;
  text-decoration: none;
  transition: flex 0.4s ease;
}
.col:nth-child(4n), .col:last-child { border-right: none; }

/* Bir kolona hover edilince DİĞERLERİ hafifçe kararır — odak + gerginlik */
.personae-full:hover .col .col-bg { filter: saturate(0.7) brightness(0.42); }
.personae-full:hover .col:hover .col-bg { filter: saturate(1) brightness(0.9); }
.personae-full:hover .col:not(:hover) .col-scrim {
  background: linear-gradient(0deg, rgba(13,11,9,0.97) 0%, rgba(13,11,9,0.7) 45%, rgba(13,11,9,0.5) 100%);
}
.personae-full:hover .col:not(:hover) .col-content { opacity: 0.5; }
.col-content { transition: opacity 0.4s ease; }

.col-bg {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  filter: saturate(0.85) brightness(0.68);
  transform: scale(1.04);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.col-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13,11,9,0.95) 0%, rgba(13,11,9,0.55) 40%, rgba(13,11,9,0.15) 75%, rgba(13,11,9,0.35) 100%);
  transition: background 0.5s ease;
}
.col-accent {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--accent, var(--gold));
  opacity: 0.7;
  transition: opacity 0.4s ease, height 0.4s ease;
}

.col-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 2rem 1.6rem;
}
.col-meta {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.col-meta .numeral { color: var(--gold); font-size: 14px; }
.col-content h2 { font-family: var(--font-head); font-weight: 600; font-size: 30px; line-height: 1.1; }
.col-content .epigraph {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 15px;
  max-width: 32ch;
}
.col-content .epigraph::before { content: "“"; color: var(--bronze); font-family: var(--font-head); margin-right: 2px; }

.col-content .btn {
  margin-top: 0.75rem;
  align-self: flex-start;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--ground);
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s ease;
}

/* Hover: kolon aydınlanır, buton belirir, altın çizgi parlar */
.col:hover .col-bg,
.col:focus-visible .col-bg { filter: saturate(1) brightness(0.9); transform: scale(1); }
.col:hover .col-scrim,
.col:focus-visible .col-scrim {
  background: linear-gradient(0deg, rgba(13,11,9,0.9) 0%, rgba(13,11,9,0.4) 55%, rgba(13,11,9,0.1) 100%);
}
.col:hover .col-content .btn,
.col:focus-visible .col-content .btn { opacity: 1; transform: translateY(0); }
.col:hover .col-accent,
.col:focus-visible .col-accent { opacity: 1; height: 5px; box-shadow: 0 0 16px var(--accent, var(--gold)); }
.col:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: -2px; }

/* =========================================================
   HESAP TOGGLE + MENÜ (index sağ üst)
   ========================================================= */
.account { position: fixed; top: 18px; right: 20px; z-index: 50; }

.account-toggle {
  width: 40px; height: 40px;
  border-radius: 999px;
  padding: 0;
  border: 1px solid rgba(197, 160, 89, 0.35);
  background: rgba(13, 11, 9, 0.35);
  backdrop-filter: blur(6px);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: grid;
  place-items: center;
}
.account-toggle:hover,
.account.open .account-toggle,
.account-toggle:focus-visible {
  opacity: 1;
  transform: scale(1.12);
  border-color: var(--gold-lit);
  box-shadow: 0 0 16px rgba(197, 160, 89, 0.3);
  outline: none;
}
.account-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-initial {
  width: 100%; height: 100%;
  display: none;
  align-items: center; justify-content: center;
  font-family: var(--font-label); font-weight: 700; font-size: 15px;
  color: var(--gold); background: var(--surface-1);
}

.account-menu {
  position: absolute;
  top: 50px; right: 0;
  min-width: 220px;
  background: var(--surface-1);
  border: 1px solid var(--bronze);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--rule);
  padding: 0.5rem;
  animation: menuIn 0.18s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.account-id { padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.15rem; }
.account-name { font-family: var(--font-head); font-size: 16px; color: var(--ink); }
.account-email { font-family: var(--font-label); font-size: 11px; color: var(--ink-dim); word-break: break-all; }
.account-divider { height: 1px; background: var(--rule); margin: 0.4rem 0; }

.account-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 13px;
  padding: 0.6rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s ease;
}
.account-item:hover { background: rgba(197, 160, 89, 0.08); }
.account-item.danger { color: #ffb4ab; }
.account-item.danger:hover { background: rgba(255, 180, 171, 0.08); }
.account-item .soon {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ground); background: var(--bronze);
  padding: 2px 6px; border-radius: 2px;
}

/* =========================================================
   CHAT EKRANI — 50/50 split (sol sahne, sağ sohbet)
   ========================================================= */
.chat-body { overflow: hidden; }
.chat-split { display: grid; grid-template-columns: 1fr 1fr; height: 100vh; }

/* SOL: karakter sahnesi */
.stage-pane {
  position: relative;
  overflow: hidden;
  background: var(--ground);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.stage-portrait {
  position: absolute; inset: 0;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--ground);
  filter: saturate(0.9) brightness(0.8);
  transition: opacity 0.6s ease;
}
.stage-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 35%, transparent 40%, rgba(13,11,9,0.55) 100%),
    linear-gradient(0deg, rgba(13,11,9,0.95) 0%, rgba(13,11,9,0.1) 45%, rgba(13,11,9,0.4) 100%);
}
.stage-top {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.stage-top .back { margin-left: 52px; } /* sol üstteki ses düğmesine yer bırak */

.stage-caption {
  position: absolute;
  z-index: 3;
  left: 1.5rem; right: 1.5rem;
  bottom: 7.5rem;
}
.stage-caption h2 { font-family: var(--font-head); font-size: 34px; line-height: 1.1; }
.stage-caption .work {
  font-family: var(--font-label); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim);
  margin-top: 0.35rem;
}

/* Zaman çizelgesi */
.timeline {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: 0;
  padding: 1rem 1.5rem 1.5rem;
  background: linear-gradient(0deg, rgba(13,11,9,0.95) 0%, rgba(13,11,9,0.0) 100%);
}
.timeline-label {
  font-family: var(--font-label); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.75rem;
}
.tl-slider-row { display: flex; align-items: center; gap: 0.9rem; }
.tl-end {
  font-family: var(--font-label); font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim);
  white-space: nowrap;
}
.tl-slider {
  --fill: 0%;
  flex: 1;
  -webkit-appearance: none; appearance: none;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--gold) 0%, var(--gold) var(--fill),
    var(--rule) var(--fill), var(--rule) 100%
  );
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}
.tl-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--gold);
  border: 2px solid var(--ground);
  box-shadow: 0 0 10px rgba(197,160,89,0.6);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tl-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.tl-slider:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 6px; }
.tl-slider:active::-webkit-slider-thumb { cursor: grabbing; }
.tl-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--gold);
  border: 2px solid var(--ground);
  box-shadow: 0 0 10px rgba(197,160,89,0.6);
  cursor: grab;
}
.tl-slider::-moz-range-track { height: 2px; background: var(--rule); border-radius: 999px; }
.tl-slider::-moz-range-progress { height: 2px; background: var(--gold); border-radius: 999px; }

/* SAĞ: sohbet */
.chat-pane {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--surface);
}
/* Karaktere özgü atmosfer fonu: çok silik, metni bozmaz. */
.chat-backdrop {
  position: absolute; inset: 0; z-index: -1;
  background: center / cover no-repeat;
  opacity: 0; filter: blur(3px) saturate(0.7) brightness(0.9);
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.chat-backdrop.on { opacity: 0.16; }
.messages {
  flex: 1;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.1rem;
  padding: 2rem 2rem 1rem;
}
.msg { max-width: 85%; padding: 0.85rem 1.1rem; border-radius: var(--radius); font-size: 17px; }
.msg.character {
  align-self: flex-start;
  background: var(--surface-1);
  border-left: 2px solid var(--accent, var(--gold));
  color: var(--ink);
}
/* Sahne yönü (*parmakları titriyor* gibi): diyalogdan görsel olarak ayrışsın —
   italik, soluk, kendi satırında. Diyalog parçaları normal akışta kalır. */
.msg.character .stage-direction {
  display: block;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.92em;
  margin: 0.3em 0;
}
.msg.character .dialogue {
  display: inline;
}
.msg.character .dialogue + .stage-direction,
.msg.character .stage-direction + .dialogue {
  margin-top: 0.3em;
}
.msg.user {
  align-self: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  color: var(--ink-muted);
}
.msg.muted { color: var(--ink-dim); }
.msg.typing { color: var(--ink-dim); font-style: italic; }
.msg-note {
  align-self: center;
  font-family: var(--font-label);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
/* Mühür görevi tamamlandı: diğer notlardan ayrışsın, altın vurgu + hafif parıltı. */
.quest-sealed {
  color: var(--gold);
  border-color: rgba(197, 160, 89, 0.5);
  background: rgba(197, 160, 89, 0.08);
  font-size: 11px;
  padding: 0.35rem 0.9rem;
  animation: questSealedIn 0.5s ease;
}
@keyframes questSealedIn {
  from { opacity: 0; transform: translateY(4px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .quest-sealed { animation: none; }
}
.dots span { animation: blink 1.4s infinite both; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.composer {
  border-top: 1px solid var(--rule);
  padding: 1rem 2rem;
  background: var(--surface);
}
.composer .inner { display: flex; gap: 0.75rem; }
.composer textarea {
  flex: 1;
  resize: none;
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 0.75rem 1rem;
  min-height: 48px;
  max-height: 160px;
}
.composer textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: inset 0 0 12px rgba(197, 160, 89, 0.15);
}

/* Genel buton + ses toggle */
.btn {
  font-family: var(--font-label);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--gold); color: var(--ground);
  border: none; border-radius: var(--radius); padding: 8px 16px; cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--gold-lit); box-shadow: 0 0 16px rgba(197, 160, 89, 0.4); }
.btn.secondary { background: transparent; border: 1px solid var(--bronze); color: var(--ink); }
.btn.secondary:hover { background: rgba(197, 160, 89, 0.08); border-color: var(--gold); box-shadow: none; }
.sound-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: rgba(13,11,9,0.4);
  border: 1px solid var(--bronze);
  color: var(--gold);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sound-toggle:hover { background: rgba(197,160,89,0.1); border-color: var(--gold); }
.sound-toggle.off { color: var(--ink-dim); border-color: var(--rule); }

/* =========================================================
   DOKÜMAN SAYFALARI (privacy / terms)
   ========================================================= */
.doc-body { overflow-y: auto; }
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.doc .mark { margin-top: 1.5rem; }
.doc-back {
  font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em;
  text-decoration: none;
}
.doc h1 { font-family: var(--font-head); font-size: 40px; margin: 0.5rem 0 0.25rem; }
.doc-updated {
  font-family: var(--font-label); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 2rem;
}
.doc h2 {
  font-family: var(--font-head); font-size: 22px; color: var(--gold);
  margin: 2rem 0 0.6rem;
}
.doc p, .doc li { font-size: 16px; color: var(--ink-muted); line-height: 1.7; }
.doc ul { padding-left: 1.3rem; margin: 0.5rem 0; }
.doc li { margin: 0.35rem 0; }
.doc strong { color: var(--ink); }
.doc-note {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule);
  font-size: 13px; font-style: italic; color: var(--ink-dim);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; }
  .login-pane { order: 2; border-right: none; border-top: 1px solid var(--rule); }
  .login-stage { order: 1; min-height: 42vh; }
  .personae-body { overflow: auto; }
  .personae-full { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 60vh; height: auto; }
  .col { border-bottom: 1px solid var(--rule); }
  .col:nth-child(2n) { border-right: none; }
  .col:nth-child(4n+1), .col:nth-child(4n+3) { border-right: 1px solid var(--rule); }
  .col-content .btn { opacity: 1; transform: none; }

  /* Sohbet: sahne/sohbet yan yana değil, üst üste. Sahne kısa bir şerit,
     sohbet kalan yüksekliği alır ki klavye açıldığında da çalışsın. Klavye
     açılınca gerçek (daralan) yükseklik için 100dvh; onu desteklemeyen eski
     tarayıcılarda (dvh anlaşılmazsa bu satır yok sayılır) js/viewport.js'in
     yazdığı --app-vh'ye düşer — düz 100vh orada klavye açıkken hâlâ yanlış
     kalırdı. */
  .chat-split {
    grid-template-columns: 1fr;
    grid-template-rows: 34vh 1fr;
    grid-template-rows: 34dvh 1fr;
    /* Sıra önemli: 100vh (çok eski) → 100dvh → viewport.js'in visualViewport ölçümü (iOS klavyesini de bilir). */
    height: 100vh;
    height: 100dvh;
    height: var(--app-vh, 100dvh);
  }
  .stage-pane { border-right: none; border-bottom: 1px solid var(--rule); }
  .chat-pane { height: auto; min-height: 0; } /* masaüstünde 100vh; burada grid satırının yüksekliğini alsın */
  .stage-caption { bottom: 4.5rem; left: 1rem; right: 1rem; }
  .stage-caption h2 { font-size: 24px; }
  .timeline { padding: 0.75rem 1rem 1rem; }
  .stage-top { padding: 1rem 1rem; }
  .stage-top .back { margin-left: 48px; }

  .messages {
    padding: 1.1rem 1.1rem 0.75rem; gap: 0.85rem;
    /* iOS'ta momentum scroll + taşan içerik üstteki sahneyi de kaydırmasın. */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .msg { max-width: 92%; font-size: 16px; padding: 0.7rem 0.9rem; }
  .composer {
    padding: 0.75rem 1rem;
    /* Composer her zaman chat-pane'in (gerçek klavye-farkında) altında kalsın;
       sabit-konumlu hiçbir şey onu klavyenin arkasına göndermez çünkü grid
       zaten tüm sayfa yüksekliğini (100dvh) kullanıyor. */
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
  .composer textarea { font-size: 16px; min-height: 44px; } /* 16px: iOS Safari zoom-on-focus'u engeller */
  /* Gönder düğmesi kalsın (Enter her klavyede güvenilir değil) ama dar ekranda
     metin yerine ok ikonu olsun, textarea'ya daha çok yer kalsın. */
  .composer #send { padding: 8px 14px; min-width: 44px; }
  .composer #send .label { display: none; }
  .composer #send::after { content: "↑"; font-size: 16px; line-height: 1; }
  .paywall { padding: 1.2rem 1.1rem 1.4rem; }
  .paywall p { max-width: 100%; }

  /* Hesap menüsü: sol kenara taşmasın, çip metni kısalsın */
  .account { top: 10px; right: 10px; }
  .account-menu { min-width: 200px; max-width: calc(100vw - 20px); }
  .quota-chip { font-size: 10px; padding: 0.4rem 0.65rem; }

  .app-sound { top: 10px; left: 12px; }
}
@media (max-width: 520px) {
  .personae-full { grid-template-columns: 1fr; }
  .col { border-right: none; }

  .chat-split { grid-template-rows: 30vh 1fr; grid-template-rows: 30dvh 1fr; }
  .stage-caption h2 { font-size: 21px; }
  .stage-caption .work { font-size: 9px; }
  .msg { font-size: 15.5px; }
  .doc { padding: 2rem 1.25rem 3rem; }
  .doc h1 { font-size: 30px; }
}

/* Çok kısa ekranlar (küçük telefon, yatay mod): sahne şeridini daha da
   küçült ki composer ve mesajlar her zaman görünür kalsın. */
@media (max-width: 860px) and (max-height: 700px) {
  .chat-split { grid-template-rows: 26vh 1fr; grid-template-rows: 26dvh 1fr; }
  /* Dar şeritte başlık sağ üste küçülür (sohbetle çakışmaz, karakter adı yine görünür). */
  .stage-caption { bottom: auto; top: 1.1rem; left: auto; right: 1rem; text-align: right; max-width: 50%; }
  .stage-caption h2 { font-size: 17px; }
  .stage-caption .work { display: none; }
  .timeline { padding: 0.5rem 0.9rem 0.75rem; }
  .timeline-label, .tl-part { display: none; }
}

/* --- Medya katmanları (video) --- */
.col-video, .stage-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease;
}
.stage-video { filter: saturate(0.9) brightness(0.8); }
.col-video.on, .stage-video.on { opacity: 1; }

/* Sabit ses düğmesi: tek yerde, sol üst */
.app-sound { position: fixed; top: 18px; left: 20px; z-index: 80; }
body[data-view="login"] .app-sound,
body[data-view="boot"] .app-sound { display: none; }
/* Ses kilitliyken (ilk dokunuş bekleniyor) nazikçe nabız atar */
.app-sound.locked { animation: soundHint 2.4s ease-in-out infinite; }
@keyframes soundHint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(197,160,89,0); }
  50%      { box-shadow: 0 0 14px 2px rgba(197,160,89,0.5); border-color: var(--gold); }
}

@media (prefers-reduced-motion: reduce) {
  .col-video, .stage-video { display: none; }
}

/* --- Giriş sonrası yükleme ekranı --- */
.loader-body {
  background: radial-gradient(ellipse at 50% 42%, #1b150d 0%, var(--ground) 62%);
  overflow: hidden;
}
.loader {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 2rem; text-align: center;
}
.loader-mark {
  font-size: 88px; line-height: 1; color: var(--gold);
  animation: loaderBreath 3.2s ease-in-out infinite;
}
@keyframes loaderBreath {
  0%, 100% { opacity: 0.75; transform: scale(1);    text-shadow: 0 0 18px rgba(197,160,89,0.30); }
  50%      { opacity: 1;    transform: scale(1.06); text-shadow: 0 0 40px rgba(197,160,89,0.65); }
}
.loader-title {
  font-family: var(--font-head); font-weight: 500; font-size: 42px;
  letter-spacing: 0.34em; text-indent: 0.34em; text-transform: uppercase; color: var(--ink);
}
.loader-line {
  min-height: 1.7em; margin-top: 0.4rem;
  font-family: var(--font-body); font-style: italic; font-size: 16px; color: var(--ink-muted);
  opacity: 0; transition: opacity 0.3s ease;
}
.loader-line.in { opacity: 1; }
.loader-bar {
  width: min(320px, 70vw); height: 2px; margin-top: 0.8rem;
  background: rgba(142,111,50,0.25); border-radius: 2px; overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--bronze), var(--gold-lit));
  box-shadow: 0 0 10px rgba(197,160,89,0.6);
}
.loader-pct { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.22em; color: var(--ink-dim); }

/* Közler: mum kıvılcımları gibi yukarı süzülür */
.embers { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.ember {
  position: absolute; left: var(--x, 50%); bottom: -10px;
  width: 3px; height: 3px; border-radius: 50%;
  background: #e8c77a; box-shadow: 0 0 8px 2px rgba(232,199,122,0.55);
  opacity: 0;
  animation: emberUp var(--d, 9s) linear var(--delay, 0s) infinite;
}
@keyframes emberUp {
  0%   { opacity: 0;   transform: translate(0, 0) scale(0.6); }
  12%  { opacity: 0.9; }
  100% { opacity: 0;   transform: translate(var(--dx, 20px), -105vh) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .loader-mark { animation: none; }
  .ember { display: none; }
}

/* =========================================================
   TEK SAYFA KABUĞU (SPA): görünümler, açılış perdesi
   ========================================================= */
body { overflow: hidden; }
.view {
  position: fixed; inset: 0;
  overflow-x: hidden; overflow-y: auto;
  background: var(--surface);
  opacity: 0;
  transition: opacity 0.32s ease; /* js/main.js FADE_MS ile aynı */
}
/* Sohbet ekranı: sayfanın kendisi kaymasın, tek kaydırılabilir alan .messages
   olsun. Aksi halde mobilde klavye/yükseklik oynamalarında hem sayfa hem
   mesaj listesi birden kayar, "tutarsız" bir scroll hissi verir. */
body[data-view="chat"] #view-chat { overflow: hidden; }
.view.on { opacity: 1; }
.view[hidden] { display: none; }
#view-loading.loader-body {
  background: radial-gradient(ellipse at 50% 42%, #1b150d 0%, var(--ground) 62%);
  overflow: hidden;
}
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: var(--ground); color: var(--gold); font-size: 56px;
  transition: opacity 0.6s ease;
}
.boot span { animation: loaderBreath 3.2s ease-in-out infinite; }
.boot.gone { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .view { transition: none; }
  .boot span { animation: none; }
  .app-sound.locked { animation: none; }
}

/* Ücretsiz kota satırı + ödeme duvarı */
.quota {
  font-family: var(--font-label);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
}
.quota[hidden], .paywall[hidden], .composer[hidden] { display: none; }
.paywall {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.6rem 2rem 1.8rem;
  text-align: center;
}
.paywall h3 { margin: 0 0 0.5rem; font-family: var(--font-display, inherit); font-size: 22px; font-weight: 500; }
.paywall p { margin: 0 auto 1.1rem; max-width: 34ch; color: var(--ink-dim); font-size: 16px; line-height: 1.5; }
.paywall .pw-note { min-height: 1.2em; margin-top: 0.8rem; font-size: 14px; color: var(--ink-dim); }

/* Hak göstergesi: hesap yanındaki çip + menüdeki plan bloğu */
.account { display: flex; align-items: center; gap: 0.6rem; }
.quota-chip {
  font-family: var(--font-label);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); background: rgba(13, 11, 9, 0.45);
  border: 1px solid rgba(197, 160, 89, 0.35); border-radius: 999px;
  padding: 0.45rem 0.8rem; cursor: pointer;
  backdrop-filter: blur(6px);
}
.quota-chip:hover { border-color: var(--gold); }
.quota-chip.empty { color: #ffb4ab; border-color: rgba(255, 180, 171, 0.45); }
.quota-chip[hidden], .account-plan[hidden] { display: none; }
.account-plan { padding: 0.5rem 0.7rem 0.2rem; }
.plan-row { display: flex; justify-content: space-between; gap: 0.8rem; font-family: var(--font-label); font-size: 12px; }
.plan-name { color: var(--ink); font-weight: 600; letter-spacing: 0.04em; }
.plan-count { color: var(--ink-dim); }
.plan-bar { height: 3px; margin-top: 0.45rem; background: var(--rule); border-radius: 2px; overflow: hidden; }
.plan-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.4s ease; }

/* Mühür puanı: hesap menüsünde, abonelik bloğunun altında. */
.account-muhur {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink);
}
.account-muhur .muhur-mark { color: var(--gold); font-size: 13px; }
.account-muhur[hidden] { display: none; }

/* Yanıt beklenirken yazma kilitli */
.composer.waiting textarea { opacity: 0.55; cursor: progress; }
.composer.waiting .btn { opacity: 0.5; cursor: progress; }

/* =========================================================
   YOLCULUK — seçim ekranı bağlantısı + harita (#/map)
   ========================================================= */
.journey-link {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 40;
  font-family: var(--font-label); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  color: var(--gold); padding: 0.55rem 1rem;
  background: rgba(13, 11, 9, 0.62); border: 1px solid var(--bronze); border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.journey-link:hover, .journey-link:focus-visible { color: var(--gold-lit); border-color: var(--gold); }
.personae-done {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  font-family: var(--font-head); font-size: 26px; color: var(--ink-muted);
}

.journey-view { background: radial-gradient(ellipse at 50% 0%, #1b150d 0%, var(--surface) 60%); }
.journey-head {
  display: flex; align-items: flex-start; gap: 1.5rem;
  max-width: 1180px; margin: 0 auto; padding: 22px 24px 8px 76px;
}
.journey-title h1 { font-family: var(--font-head); font-weight: 600; font-size: 34px; color: var(--ink); }
.journey-sub { color: var(--ink-dim); max-width: 60ch; margin-top: 0.4rem; line-height: 1.5; }
.journey-summary {
  margin-top: 0.7rem; font-family: var(--font-label); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
}
.journey {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px;
  max-width: 1180px; margin: 0 auto; padding: 24px 24px 56px;
  counter-reset: none;
}
.jr-link { display: none; } /* ızgarada sıra numarası yeterli; dar ekranda dikey çizgi olur */
.jr-step {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface-1); border: 1px solid var(--rule); border-radius: var(--radius);
  color: inherit; text-decoration: none; overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
a.jr-step:hover, a.jr-step:focus-visible { border-color: var(--accent, var(--gold)); transform: translateY(-2px); }
.jr-num {
  position: absolute; top: 10px; left: 12px; z-index: 2;
  font-family: var(--font-head); font-size: 15px; color: var(--gold);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.jr-portrait {
  position: relative; aspect-ratio: 4 / 3; background-size: cover; background-position: center 25%;
}
.jr-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, var(--surface-1)); }
.jr-lock, .jr-seal {
  position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 28px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
}
.jr-seal { color: var(--gold-lit); font-size: 34px; top: auto; bottom: 12px; left: auto; right: 12px; transform: none; }
.jr-body { padding: 0.75rem 0.95rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.jr-badge {
  align-self: flex-start; font-family: var(--font-label); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 2px;
  border: 1px solid var(--rule); color: var(--ink-dim);
}
.jr-step h3 { font-family: var(--font-head); font-weight: 600; font-size: 20px; color: var(--ink); line-height: 1.15; }
.jr-work { font-size: 12.5px; color: var(--ink-dim); }
.jr-bar { height: 3px; background: var(--surface-high); border-radius: 2px; overflow: hidden; margin-top: 0.4rem; }
.jr-bar i { display: block; height: 100%; background: var(--gold); }
.jr-hint { font-family: var(--font-label); font-size: 11px; color: var(--ink-dim); letter-spacing: 0.02em; }

.jr-active .jr-badge { color: var(--gold); border-color: var(--bronze); }
.jr-completed .jr-badge { color: var(--ground); background: var(--gold); border-color: var(--gold); }
.jr-completed { border-color: var(--bronze); }
.jr-locked { cursor: default; }
.jr-locked .jr-portrait { filter: grayscale(1) brightness(0.32) blur(1.5px); }
.jr-locked h3 { color: var(--ink-dim); }
.jr-next { border-style: dashed; border-color: var(--bronze); }
.jr-next .jr-badge { color: var(--gold); }

.story-closed { text-transform: none; letter-spacing: 0.02em; font-size: 12px; color: var(--gold); border-color: var(--bronze); }
.story-closed a { color: var(--gold-lit); margin-left: 0.25rem; }

@media (max-width: 960px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .journey-link { top: auto; bottom: 16px; }
  .journey-head { flex-direction: column; gap: 0.8rem; padding: 16px 16px 4px 16px; }
  .journey-head .back { margin-left: 44px; }
  .journey-title h1 { font-size: 28px; }
  .journey { grid-template-columns: 1fr; gap: 0; padding: 16px 16px 48px; }
  .jr-step { flex-direction: row; }
  .jr-portrait { aspect-ratio: auto; width: 34%; min-height: 128px; }
  .jr-portrait::after { background: linear-gradient(90deg, transparent 55%, var(--surface-1)); }
  .jr-link { display: block; width: 1px; height: 18px; margin-left: 17%; background: var(--bronze); }
}

/* =========================================================
   ERİŞİLEBİLİRLİK + İYİLEŞTİRMELER (UI denetimi)
   ========================================================= */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Görünmeyen (solan) görünüm tıklamaları yutmasın */
.view:not(.on) { pointer-events: none; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }

/* Dokunmatikte hover yok: "Sohbete Başla" hep görünür */
@media (hover: none) {
  .col-content .btn { opacity: 1; transform: none; }
}

/* Seçim: "Yeni" rozeti */
.col-new {
  position: absolute; z-index: 3; top: 72px; left: 1.6rem;
  font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ground); background: var(--gold-lit); padding: 0.25rem 0.55rem; border-radius: 2px;
  box-shadow: 0 0 14px rgba(223, 190, 118, 0.45);
}

/* Kısa bildirim */
.toast {
  position: fixed; z-index: 95; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); max-width: min(92vw, 460px);
  font-family: var(--font-label); font-size: 13px; letter-spacing: 0.02em; color: var(--ink);
  background: var(--surface-1); border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6); padding: 0.7rem 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast:empty { padding: 0; border: 0; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Mobil sohbet: kısım adı etiket satırının sağına; başlık zaman çizelgesinin üstünde kalsın */
@media (max-width: 860px) {
  .tl-part { position: absolute; top: 0.6rem; right: 1rem; margin: 0; font-size: 13px; }
  .stage-caption { bottom: 5.4rem; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .stage-caption { bottom: auto; }
}

/* Mobil: yolculuk hapı kartların son satırını örtmesin */
@media (max-width: 560px) {
  .journey-link { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .personae-full { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* Zaman çizelgesi: 5 nötr kısım (I–V) + etkin kısım adı */
.tl-track { flex: 1; display: flex; flex-direction: column; gap: 0.45rem; }
.tl-track .tl-slider { width: 100%; }
.tl-ticks { display: flex; }
.tl-ticks span {
  flex: 1; text-align: center; border-left: 1px solid var(--rule);
  font-family: var(--font-label); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-dim);
}
.tl-ticks span:last-child { border-right: 1px solid var(--rule); }
.tl-ticks span.on { color: var(--gold-lit); }
.tl-part {
  margin-top: 0.45rem; text-align: center;
  font-family: var(--font-head); font-style: italic; font-size: 14px; color: var(--gold-lit);
}

/* Sohbet üst araçları: yeni sohbet + mühür defteri */
.chat-tools {
  display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem 0; min-height: 0;
}
.chat-tools:not(:has(button:not([hidden]))) { padding: 0; }
.chat-tool {
  font-family: var(--font-label); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted); background: rgba(13, 11, 9, 0.5); border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.4rem 0.8rem; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease;
}
.chat-tool:hover, .chat-tool:focus-visible { color: var(--gold-lit); border-color: var(--gold); outline: none; }
.chat-tool[hidden] { display: none; }
.chat-tool:disabled { opacity: 0.5; cursor: progress; }
.seal-toggle { color: var(--gold); border-color: var(--bronze); }
.seal-toggle[aria-expanded="true"] { background: rgba(197, 160, 89, 0.12); border-color: var(--gold); }

/* Mühür defteri: sohbet panelinin üstüne açılan çekmece (mobilde tam genişlik) */
.seal-panel {
  position: absolute; z-index: 6; top: 0; right: 0; bottom: 0; width: min(380px, 100%);
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--surface-1); border-left: 1px solid var(--bronze);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.55);
  padding: 1rem 1.1rem 1.2rem; overflow-y: auto; overscroll-behavior: contain;
}
.seal-panel[hidden] { display: none; }
.seal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.seal-head h3 { font-family: var(--font-head); font-weight: 600; font-size: 20px; color: var(--ink); }
.seal-close {
  width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer;
  background: transparent; border: 1px solid var(--rule); color: var(--ink-muted); font-size: 20px; line-height: 1;
}
.seal-close:hover, .seal-close:focus-visible { border-color: var(--gold); color: var(--gold-lit); outline: none; }
.seal-final { font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em; color: var(--gold); }
.seal-final[hidden] { display: none; }
.seal-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.seal-item {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.6rem 0.7rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
}
.seal-mark {
  flex: none; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  font-family: var(--font-label); font-size: 10px; font-weight: 700; color: var(--ink-dim); border: 1px solid var(--rule);
}
.seal-item.sealed { border-color: rgba(197, 160, 89, 0.45); background: rgba(197, 160, 89, 0.06); }
.seal-item.sealed .seal-mark { color: var(--ground); background: var(--gold); border-color: var(--gold); font-size: 13px; }
.seal-item.final { border-style: dashed; }
.seal-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.seal-title { font-family: var(--font-body); font-size: 15px; color: var(--ink); line-height: 1.35; }
.seal-item.secret .seal-title { color: var(--ink-dim); letter-spacing: 0.2em; }
.seal-meta { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.04em; color: var(--gold); }
.seal-hint { font-size: 13.5px; font-style: italic; color: var(--ink-dim); line-height: 1.45; }

/* Akış notları: hata (sakin, kırmızı değil), kısım geçişi, sakin bilgi */
.msg-note.msg-error { color: #ffb4ab; border-color: rgba(255, 180, 171, 0.35); text-transform: none; letter-spacing: 0.02em; font-size: 12px; }
.msg-note.msg-calm { color: var(--ink-muted); text-transform: none; letter-spacing: 0.02em; font-size: 12px; }
.msg-note.msg-period { border: none; text-transform: none; letter-spacing: 0.04em; font-family: var(--font-head); font-style: italic; font-size: 13px; color: var(--gold); }

/* Harita: liste öğeleri, son mühür satırı, durum satırı, derin bağlantı vurgusu */
.jr-item { display: flex; flex-direction: column; min-width: 0; }
.jr-item > .jr-step { flex: 1; }
.jr-final { color: var(--gold); }
.journey-flash { margin-top: 0.4rem; font-family: var(--font-label); font-size: 12px; color: var(--gold-lit); min-height: 1em; }
.journey-flash:empty { display: none; }
.jr-step.jr-flash { border-color: var(--gold-lit); box-shadow: 0 0 0 2px rgba(223, 190, 118, 0.45), 0 0 26px rgba(223, 190, 118, 0.35); }
@media (max-width: 560px) {
  .jr-link { margin-left: 17%; }
}

/* Azaltılmış hareket: yumuşak kaydırma ve süs dönüşümleri kapalı */
@media (prefers-reduced-motion: reduce) {
  html, .messages, .view { scroll-behavior: auto; }
  .account-menu { animation: none; }
  .dots span { animation: none; opacity: 0.7; }
  .account-toggle:hover, .account.open .account-toggle, .account-toggle:focus-visible { transform: none; }
  a.jr-step:hover, a.jr-step:focus-visible { transform: none; }
  .col-bg, .col:hover .col-bg, .col:focus-visible .col-bg { transform: none; transition: filter 0.2s ease; }
  .col-content .btn { transform: none; transition: opacity 0.2s ease; }
  .tl-slider::-webkit-slider-thumb, .tl-slider::-webkit-slider-thumb:hover { transform: none; transition: none; }
  .toast { transition: none; transform: translate(-50%, 0); }
}

/* =========================================================
   TUR 2 — deneme, günün sorusu, kitaplık, alıntı, mektup, kader, salon, okur adı, hatıra
   ========================================================= */

/* Seçim: üst gezinme (Yolculuk · Kitaplık · Salon) */
.select-nav {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; gap: 0.5rem; flex-wrap: nowrap;
}
.select-nav .journey-link { position: static; transform: none; white-space: nowrap; }

/* Seçim: deneme rozeti + günün sorusu (masaüstünde üstte süzülür, dar ekranda akışta) */
.select-extras {
  position: fixed; z-index: 30; top: 68px; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  pointer-events: none;
}
.select-extras > * { pointer-events: auto; }
.select-extras:not(:has(.trial-pill:not([hidden]), .daily)) { display: none; }
.trial-pill {
  font-family: var(--font-label); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ground); background: var(--gold); border-radius: 999px; padding: 0.4rem 0.9rem;
  text-decoration: none; box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}
.trial-pill:hover, .trial-pill:focus-visible { background: var(--gold-lit); outline: none; }
.trial-pill.empty { color: var(--ink); background: rgba(13,11,9,0.7); border: 1px solid var(--bronze); }
.trial-pill[hidden] { display: none; }
#dailySlot { width: 100%; }
#dailySlot:empty { display: none; }
.daily {
  display: flex; gap: 0.85rem; align-items: center; width: 100%;
  padding: 0.7rem 0.9rem; color: inherit; text-decoration: none;
  background: rgba(20, 18, 14, 0.82); border: 1px solid var(--bronze); border-left: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.daily:hover, .daily:focus-visible { border-color: var(--gold); outline: none; transform: translateY(-1px); }
.daily-portrait {
  flex: none; width: 52px; height: 52px; border-radius: 999px;
  background: center 25% / cover no-repeat; border: 1px solid var(--gold);
}
.daily-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.daily-kicker { font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.daily-q {
  font-family: var(--font-body); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.daily-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-family: var(--font-label); font-size: 11px; color: var(--ink-dim); }
.daily-streak { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--gold-lit); }
.daily-streak .candle { color: var(--gold-lit); }
.daily-done { color: var(--gold); }
.daily-lock { color: var(--ink-dim); }
.daily.done { opacity: 0.85; }

/* Seçim kartı etiketi: "Abonelere açık" / "Ücretsiz deneme" */
.col-tag {
  align-self: flex-start; font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-muted);
  border: 1px solid rgba(232, 221, 203, 0.35); border-radius: 2px; padding: 0.15rem 0.45rem; background: rgba(13,11,9,0.5);
}
.col-tag.trial { color: var(--ground); background: var(--gold); border-color: var(--gold); }

/* Hesap: okur adı */
.account-reader { padding: 0.2rem 0.7rem 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.account-reader[hidden], .reader-form[hidden], .reader-row[hidden] { display: none; }
.reader-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-family: var(--font-label); font-size: 12px; color: var(--ink-dim); }
.reader-row strong { color: var(--gold-lit); font-weight: 600; }
.reader-edit {
  font-family: var(--font-label); font-size: 11px; color: var(--gold); background: transparent;
  border: 1px solid var(--rule); border-radius: 2px; padding: 0.2rem 0.5rem; cursor: pointer;
}
.reader-edit:hover, .reader-edit:focus-visible { border-color: var(--gold); outline: none; }
.reader-form { display: flex; flex-direction: column; gap: 0.4rem; }
.reader-input {
  font-family: var(--font-body); font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--bronze); border-radius: var(--radius); padding: 0.4rem 0.6rem; width: 100%;
}
.reader-input:focus { outline: none; border-color: var(--gold); }
.reader-actions { display: flex; gap: 0.4rem; }
.reader-actions .btn { padding: 6px 12px; font-size: 11px; }
.reader-help { font-family: var(--font-label); font-size: 10.5px; color: var(--ink-dim); }
.reader-note { font-family: var(--font-label); font-size: 11px; color: var(--gold); }
.reader-note:empty { display: none; }
a.account-item { text-decoration: none; }

/* Sohbet: ✦ Alıntıla */
.msg-actions { display: flex; justify-content: flex-end; margin-top: 0.35rem; }
.quote-btn {
  font-family: var(--font-label); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-dim); background: transparent; border: 1px solid transparent; border-radius: 999px;
  padding: 0.15rem 0.55rem; cursor: pointer; opacity: 0.55; transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.msg.character:hover .quote-btn, .quote-btn:focus-visible { opacity: 1; }
.quote-btn:hover, .quote-btn:focus-visible { color: var(--gold-lit); border-color: var(--bronze); outline: none; }
.quote-btn.done { color: var(--gold); opacity: 0.9; cursor: default; }
@media (hover: none) { .quote-btn { opacity: 0.8; } }
.link-btn {
  background: none; border: none; padding: 0; margin-left: 0.25rem; cursor: pointer;
  font: inherit; color: var(--gold-lit); text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 2px; }

/* Sohbet: günün sorusu repliği */
.msg.daily-line { border-left-color: var(--gold-lit); background: linear-gradient(90deg, rgba(197,160,89,0.10), var(--surface-1) 60%); }
.daily-tag { display: block; font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }

/* Ödeme duvarı: ikincil eylem */
.pw-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.pw-actions .btn { text-decoration: none; }
.pw-actions [hidden] { display: none; }

/* Defter: kader bölümü + hatıra */
.seal-section {
  margin-top: 0.4rem; font-family: var(--font-label); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 0.6rem;
}
.seal-section::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.seal-item.kader { border-color: var(--bronze); background: linear-gradient(135deg, rgba(91,74,122,0.18), var(--surface) 70%); }
.seal-item.kader .seal-mark { color: var(--gold-lit); border-color: var(--bronze); }
.quest-sealed.kader { color: var(--gold-lit); }
.mem { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.5rem; }
.mem[hidden], .mem-empty[hidden], .mem-actions[hidden], .mem-list[hidden], .mem-actions [hidden] { display: none; }
.mem-title { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--ink); }
.mem-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.mem-list li { font-size: 14px; color: var(--ink-muted); line-height: 1.45; padding-left: 1rem; position: relative; }
.mem-list li::before { content: "·"; position: absolute; left: 0.2rem; color: var(--gold); }
.mem-empty { font-size: 13.5px; font-style: italic; color: var(--ink-dim); }
.mem-actions { display: flex; gap: 0.4rem; }
.mem-note { font-family: var(--font-label); font-size: 11.5px; color: var(--gold); }
.mem-note:empty { display: none; }

/* Kipli pencere */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(8, 7, 5, 0.78); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.2s ease;
}
.modal-backdrop.on { opacity: 1; }
.modal {
  width: min(620px, 100%); max-height: calc(100dvh - 32px); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-1); border: 1px solid var(--bronze); border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0,0,0,0.7);
  transform: translateY(8px); transition: transform 0.25s ease;
}
.modal-backdrop.on .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.25rem 0.6rem; }
.modal-head h2 { font-family: var(--font-head); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--ink); }
.modal-kicker { font-family: var(--font-label); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.2rem; }
.modal-close {
  flex: none; width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer;
  background: transparent; border: 1px solid var(--rule); color: var(--ink-muted); font-size: 20px; line-height: 1;
}
.modal-close:hover, .modal-close:focus-visible { border-color: var(--gold); color: var(--gold-lit); outline: none; }
.modal-body { overflow-y: auto; padding: 0.4rem 1.25rem 1rem; overscroll-behavior: contain; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; padding: 0.8rem 1.25rem 1.1rem; border-top: 1px solid var(--rule); }
.modal-actions .btn { text-decoration: none; }
body.modal-open { overflow: hidden; }

/* Mektup kağıdı */
.letter-paper {
  background: radial-gradient(ellipse at 50% 0%, rgba(197,160,89,0.08), transparent 60%), var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem 1.4rem 1.5rem;
}
.letter-paper.kader { border-color: var(--bronze); background: radial-gradient(ellipse at 50% 0%, rgba(91,74,122,0.2), transparent 60%), var(--surface); }
.letter-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--rule); }
.letter-portrait { flex: none; width: 46px; height: 46px; border-radius: 999px; background: center 25% / cover no-repeat; border: 1px solid var(--gold); }
.letter-from { font-family: var(--font-head); font-style: italic; font-size: 17px; color: var(--gold-lit); }
.letter-work { font-family: var(--font-label); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.letter-body p { font-family: var(--font-body); font-size: 17px; line-height: 1.75; color: var(--ink-muted); margin: 0 0 0.9em; text-wrap: pretty; }
.letter-body p.cap::first-letter { font-family: var(--font-head); font-size: 2.1em; float: left; line-height: 0.9; margin: 0.08em 0.1em 0 0; color: var(--gold); }
.letter-sign { text-align: right; font-family: var(--font-head); font-style: italic; font-size: 18px; color: var(--gold-lit); margin-top: 0.4rem; }
.letter-note { text-transform: none; }

/* Alıntı kartı önizlemesi */
.card-preview { margin: 0; display: flex; justify-content: center; }
.card-preview img { width: 100%; max-width: 360px; height: auto; aspect-ratio: 1080 / 1350; border: 1px solid var(--rule); border-radius: var(--radius); }

/* Kitaplık */
.library { max-width: 1180px; margin: 0 auto; padding: 16px 24px 64px; display: flex; flex-direction: column; gap: 2rem; }
.lib-h { font-family: var(--font-head); font-weight: 600; font-size: 24px; color: var(--ink); margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.8rem; }
.lib-h::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.lib-empty { color: var(--ink-dim); font-style: italic; list-style: none; }
.lib-letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.lib-letters > .lib-empty { grid-column: 1 / -1; }
.lib-shelf { display: flex; flex-direction: column; gap: 0.7rem; padding: 1rem; background: var(--surface-1); border: 1px solid var(--rule); border-top: 3px solid var(--accent, var(--gold)); border-radius: var(--radius); }
.lib-shelf-head { display: flex; align-items: center; gap: 0.75rem; }
.lib-portrait { flex: none; width: 48px; height: 48px; border-radius: 999px; background: center 25% / cover no-repeat; border: 1px solid var(--bronze); }
.lib-name { font-family: var(--font-head); font-weight: 600; font-size: 19px; color: var(--ink); line-height: 1.15; }
.lib-work { font-family: var(--font-label); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.lib-letter { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.8rem 0.9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.lib-letter.kader { border-color: var(--bronze); }
.lib-letter.pending { border-style: dashed; }
.lib-letter .btn { align-self: flex-start; }
.lib-kind { font-family: var(--font-label); font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.lib-excerpt { font-size: 15px; font-style: italic; color: var(--ink-muted); line-height: 1.55; }
.lib-quotes { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lib-quotes > .lib-empty { grid-column: 1 / -1; }
.lib-quote { display: flex; flex-direction: column; justify-content: space-between; gap: 0.8rem; padding: 1.1rem 1.1rem 0.9rem; background: var(--surface-1); border: 1px solid var(--rule); border-left: 3px solid var(--accent, var(--gold)); border-radius: var(--radius); }
.lib-quote figure { margin: 0; }
.lib-quote-text { font-family: var(--font-body); font-style: italic; font-size: 16.5px; line-height: 1.55; color: var(--ink); }
.lib-quote-text::before { content: "“"; font-family: var(--font-head); color: var(--gold); font-size: 1.5em; line-height: 0; margin-right: 0.1em; vertical-align: -0.3em; }
.lib-quote-by { margin-top: 0.6rem; font-family: var(--font-label); font-size: 11.5px; color: var(--gold); }
.lib-quote-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chat-tool.danger.armed { color: #ffb4ab; border-color: rgba(255,180,171,0.5); }

/* Harita: kader ipucu + bağlantılar */
.jr-kader { color: var(--gold-lit); }
.journey-links { margin-top: 0.6rem; display: flex; gap: 1rem; flex-wrap: wrap; font-family: var(--font-label); font-size: 12px; letter-spacing: 0.06em; }
.journey-links a { text-decoration: none; }
.journey-links a:hover, .journey-links a:focus-visible { color: var(--gold-lit); text-decoration: underline; }

/* Salon */
.salon-kicker { font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.salon { max-width: 1180px; margin: 0 auto; padding: 16px 24px 64px; }
.salon-wait { color: var(--ink-dim); font-style: italic; }
.salon-h { font-family: var(--font-head); font-weight: 600; font-size: 22px; color: var(--ink); margin-bottom: 0.7rem; }
.salon-intro { max-width: 720px; display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
.salon-intro-text p { font-size: 17px; line-height: 1.75; color: var(--ink-muted); margin-bottom: 0.8em; }
.salon-cast { list-style: none; display: flex; gap: 1rem; flex-wrap: wrap; }
.salon-cast li { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 120px; text-align: center; }
.salon-face { display: block; width: 84px; height: 84px; border-radius: 999px; background: center 25% / cover no-repeat; border: 2px solid var(--accent, var(--gold)); box-shadow: 0 0 18px rgba(0,0,0,0.6); }
.salon-face.sm { width: 32px; height: 32px; border-width: 1px; box-shadow: none; flex: none; }
.salon-cast-name { font-family: var(--font-head); font-size: 15px; color: var(--ink); line-height: 1.2; }
.salon-cast-work { font-family: var(--font-label); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.salon-locked { width: 100%; padding: 1.2rem 1.3rem; border: 1px dashed var(--bronze); border-radius: var(--radius); background: var(--surface-1); }
.salon-locked h3 { font-family: var(--font-head); font-weight: 500; font-size: 21px; margin-bottom: 0.4rem; }
.salon-locked p { color: var(--ink-dim); margin-bottom: 0.9rem; }
.salon-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.salon-room { display: flex; flex-direction: column; min-width: 0; background: var(--surface-1); border: 1px solid var(--rule); border-radius: var(--radius); }
.salon-tabs { display: flex; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.salon-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-width: 0;
  padding: 0.7rem 0.6rem; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-dim);
}
.salon-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent, var(--gold)); background: rgba(197,160,89,0.06); }
.salon-tab:hover, .salon-tab:focus-visible { color: var(--gold-lit); outline: none; }
.salon-tab:focus-visible { box-shadow: inset 0 0 0 2px var(--gold-lit); }
.salon-log { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.2rem; height: clamp(320px, 58vh, 640px); overflow-y: auto; overscroll-behavior: contain; }
.salon-composer { border-top: 1px solid var(--rule); background: transparent; }
.salon-side { display: flex; flex-direction: column; gap: 0.8rem; padding: 1rem 1.1rem 1.2rem; background: var(--surface-1); border: 1px solid var(--bronze); border-radius: var(--radius); }
.salon-side .salon-h { font-size: 19px; margin: 0; }
.salon-clues { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.salon-clue-count { font-family: var(--font-label); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.salon-clue { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0.55rem; border: 1px solid var(--rule); border-radius: var(--radius); font-size: 14px; }
.salon-clue.found { border-color: rgba(197,160,89,0.45); background: rgba(197,160,89,0.06); }
.salon-clue strong { font-weight: 400; color: var(--ink); display: block; }
.salon-clue-hint { display: block; font-size: 13px; font-style: italic; color: var(--ink-dim); }
.salon-clue-mark { flex: none; width: 20px; text-align: center; color: var(--gold); }
.salon-clue-secret { color: var(--ink-dim); letter-spacing: 0.2em; }
.salon-clue-empty { font-size: 13.5px; font-style: italic; color: var(--ink-dim); }
.salon-accuse { display: flex; flex-direction: column; gap: 0.8rem; }
.salon-accuse[hidden] { display: none; }
.salon-accuse fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.6rem 0.7rem 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
.salon-accuse legend { font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); padding: 0 0.3rem; }
.salon-min { color: var(--ink-dim); font-weight: 600; text-transform: none; letter-spacing: 0; }
.salon-opt { display: flex; align-items: center; gap: 0.5rem; font-size: 14.5px; color: var(--ink-muted); cursor: pointer; min-height: 32px; }
.salon-opt input { accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.salon-opt input[type="text"] { width: 100%; height: auto; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.4rem 0.6rem; }
.salon-err { font-family: var(--font-label); font-size: 12px; color: #ffb4ab; }
.salon-err:empty { display: none; }
.salon-accuse-actions { display: flex; align-items: center; gap: 0.8rem; }
.salon-attempts { font-family: var(--font-label); font-size: 11.5px; color: var(--ink-dim); }
.salon-result { font-size: 14.5px; color: var(--gold-lit); font-style: italic; }
.salon-result:empty { display: none; }
.salon-epilogue .btn { text-decoration: none; }

/* Dar ekran düzenleri */
@media (max-width: 860px) {
  .select-extras { position: relative; top: auto; left: auto; transform: none; margin: 62px auto 12px; width: calc(100% - 32px); }
  .salon-grid { grid-template-columns: 1fr; }
  .salon-log { height: clamp(240px, 52vh, 520px); }
}
@media (max-width: 560px) {
  .select-nav { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); gap: 0.35rem; }
  .select-nav .journey-link { padding: 0.5rem 0.7rem; letter-spacing: 0.06em; font-size: 10.5px; }
  .nav-long { display: none; }
  .select-extras { margin-top: 60px; }
  .library, .salon { padding: 12px 16px 56px; }
  .lib-letters, .lib-quotes { grid-template-columns: 1fr; }
  .modal-head h2 { font-size: 20px; }
  .modal-body { padding: 0.3rem 1rem 0.8rem; }
  .letter-paper { padding: 1rem 1rem 1.2rem; }
  .letter-body p { font-size: 16px; }
  .salon-cast li { width: 96px; }
  .salon-face { width: 68px; height: 68px; }
  .salon-tab span:not(.salon-face) { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal { transition: none; }
  .modal { transform: none; }
  .daily, .daily:hover, .daily:focus-visible { transition: none; transform: none; }
  .quote-btn { transition: none; }
}
.salon-face.npc { display: grid; place-items: center; background: var(--surface-high); color: var(--gold); font-size: 13px; border-color: var(--bronze); }

/* =========================================================
   UX DENETİMİ DÜZELTMELERİ (tur 2)
   ========================================================= */
/* Üst gezinme: 1180px altında uzun etiket gizli (hesap çipiyle çakışmasın); 860px altında alta iner. */
@media (max-width: 1180px) { .nav-long { display: none; } }
@media (max-width: 860px) {
  .select-nav { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); gap: 0.35rem; }
  .select-nav .journey-link { padding: 0.5rem 0.75rem; letter-spacing: 0.08em; font-size: 10.5px; }
  .personae-full { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
/* Masaüstü: deneme rozeti + günün sorusu üstte kendi şeridinde; kartlar şeridin altından başlar
   (portrelerin yüzü örtülmez). */
@media (min-width: 861px) {
  .select-extras { flex-direction: row; align-items: center; justify-content: center; width: min(860px, calc(100vw - 340px)); top: 66px; }
  .select-extras .trial-pill { flex: none; max-width: 260px; white-space: normal; text-align: center; line-height: 1.35; }
  #dailySlot { flex: 1; min-width: 0; max-width: 560px; }
}
.trial-pill:focus-visible, .daily:focus-visible, .daily-sub:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 3px; }
.daily.locked { cursor: default; }
.daily.locked:hover { transform: none; border-color: var(--bronze); }
.daily-sub { flex: none; margin-left: auto; align-self: center; }
@media (max-width: 420px) { .daily.locked { flex-wrap: wrap; } .daily-sub { margin-left: 0; width: 100%; } }

/* Defter: "Kader" başlığı gerçek başlık */
.seal-section h4 { font: inherit; letter-spacing: inherit; color: inherit; }
.mem-title:focus { outline: none; }

/* Kitaplık: kartlar içerik yüksekliğinde; alıntı tarihi */
.lib-letters, .lib-quotes { align-items: start; }
.lib-quote-date { display: block; margin-top: 0.15rem; color: var(--ink-dim); font-size: 10.5px; letter-spacing: 0.04em; }

/* Salon: başlık yanında tekrar eden abonelik çağrısı */
.salon-head-cta { margin-top: 0.7rem; }
.salon-head-cta[hidden] { display: none; }
.salon-log .msg.character .stage-direction { display: block; font-style: italic; color: var(--ink-dim); font-size: 0.92em; margin: 0.3em 0; }
.salon-result:focus { outline: none; }

/* Günün sorusu: üst gezinmede yuvarlak düğme; soru paneli üzerine gelince/odakta açılır.
   Kartlar tam sayfa kalır (eski üst şerit kaldırıldı). */
.select-extras { display: none; }
#dailySlot { display: contents; }
.daily-pill { position: relative; display: inline-flex; align-items: center; gap: 0.2rem; cursor: pointer;
  background: rgba(13, 11, 9, 0.62); border: 1px solid var(--bronze); border-left-width: 1px; padding: 0.55rem 1rem;
  box-shadow: none; width: auto; border-radius: 999px; }
.daily-pill.done { opacity: 1; color: var(--gold); }
.daily-pill .daily-pop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px)); display: flex; gap: 0.8rem; align-items: center;
  padding: 0.75rem 0.9rem; text-align: left; white-space: normal; text-transform: none; letter-spacing: normal;
  background: rgba(20, 18, 14, 0.96); border: 1px solid var(--bronze); border-left: 3px solid var(--accent, var(--gold));
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.55); color: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease, visibility 0.15s; z-index: 60;
}
.daily-pill:hover .daily-pop, .daily-pill:focus .daily-pop, .daily-pill:focus-within .daily-pop { opacity: 1; visibility: visible; }
.daily-pill .daily-portrait { width: 44px; height: 44px; }
@media (max-width: 860px) { .daily-pill .daily-pop { top: auto; bottom: calc(100% + 10px); } }
@media (prefers-reduced-motion: reduce) { .daily-pill .daily-pop { transition: none; } }

/* Salon: sağda konak odası (Phaser) + altında dedektif defteri; solda sorgu. */
.salon-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.salon-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.salon-stage { display: none; aspect-ratio: 16 / 9; width: 100%; border: 1px solid var(--bronze); border-radius: var(--radius); overflow: hidden; background: var(--ground); }
.salon-stage.on { display: block; }
.salon-stage canvas { display: block; }
@media (max-width: 860px) { .salon-right { order: -1; } }

/* =========================================================================
   SALON OYUN (tur 3) — oyun ekranı: oda kahraman, HUD, yükleme perdesi, tanıtım, defter vurgusu
   ========================================================================= */
.salon.is-game { max-width: 1400px; }
.salon-grid { grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr); gap: 18px; }
.salon-room, .salon-right { min-width: 0; min-height: 0; }
.salon-panel { display: flex; flex-direction: column; min-height: 0; }
.salon-tab { flex: 1 1 0; min-width: 0; }

/* Oyun çerçevesi: sabit 16:9; Phaser kapsayıcısı, HUD ve perde üst üste */
.salon-game {
  position: relative; flex: none; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
  border: 1px solid var(--bronze); border-radius: var(--radius); background: var(--ground);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(223,190,118,0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.salon-game .salon-stage, .salon-game .salon-stage.on { display: block; position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.salon-game .salon-stage canvas { outline: none; }
.salon-game.kb { border-color: var(--gold-lit); box-shadow: 0 18px 40px rgba(0,0,0,0.45), 0 0 0 2px rgba(223,190,118,0.35); }

/* HUD: tıklamalar tuvale geçer, yalnızca düğmeler yakalar */
.salon-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; }
.salon-hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.salon-hud-who {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; max-width: 60%;
  background: rgba(13,11,9,0.78); border: 1px solid var(--accent, var(--bronze)); border-radius: 999px;
  font-family: var(--font-head); font-size: 15px; color: var(--ink); line-height: 1.1; backdrop-filter: blur(4px);
}
.salon-hud-who:empty { display: none; }
.salon-hud-who .salon-face.sm { width: 30px; height: 30px; border-color: var(--accent, var(--gold)); }
.salon-hud-who small { display: block; font-family: var(--font-label); font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-lit); }
.salon-hud-who > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salon-hud-tools { display: inline-flex; gap: 6px; }
.salon-hud-btn {
  pointer-events: auto; min-width: 36px; height: 36px; padding: 0 10px; cursor: pointer;
  font-family: var(--font-label); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--gold-lit);
  background: rgba(13,11,9,0.8); border: 1px solid var(--bronze); border-radius: 999px; backdrop-filter: blur(4px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.salon-hud-btn:hover, .salon-hud-btn[aria-expanded="true"] { border-color: var(--gold); background: rgba(44,41,39,0.92); }
.salon-hud-btn:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 2px; }
.salon-hud-count.bump { animation: salonBump 0.9s ease; }
@keyframes salonBump { 0% { transform: scale(1); } 25% { transform: scale(1.22); box-shadow: 0 0 22px rgba(223,190,118,0.7); border-color: var(--gold-lit); } 100% { transform: scale(1); } }

.salon-help {
  pointer-events: auto; position: absolute; top: 54px; right: 10px; z-index: 4; width: min(320px, calc(100% - 20px));
  max-height: calc(100% - 64px); overflow: auto; padding: 0.8rem 0.9rem;
  background: rgba(20,18,14,0.96); border: 1px solid var(--bronze); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.salon-help[hidden] { display: none; }
.salon-help-h { font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.salon-help dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 0.3rem 0; border-top: 1px solid var(--rule); font-size: 13px; }
.salon-help dt { font-family: var(--font-label); font-weight: 600; color: var(--ink); }
.salon-help dd { font-family: var(--font-label); color: var(--ink-muted); }

.salon-hud-hint {
  align-self: center; max-width: 92%; padding: 6px 14px; text-align: center;
  font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: #0d0b09;
  background: rgba(223,190,118,0.94); border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.salon-hud-hint.on { opacity: 1; transform: none; }
.salon-hud-kb {
  position: absolute; left: 10px; bottom: 10px; font-family: var(--font-label); font-size: 11px; color: var(--ink-muted);
  background: rgba(13,11,9,0.78); border-radius: 999px; padding: 3px 10px; opacity: 0; transition: opacity 0.2s ease;
}
.salon-hud-kb kbd { font-family: inherit; font-weight: 700; color: var(--gold-lit); }
.salon-game.kb .salon-hud-kb { opacity: 1; }
.salon-game:not([data-state="ready"]) .salon-hud-hint, .salon-game:not([data-state="ready"]) .salon-hud-kb { visibility: hidden; }

/* Yükleme / hata perdesi: odanın bulanık küçük resmi üstünde */
.salon-veil {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px; text-align: center;
  background: linear-gradient(rgba(13,11,9,0.55), rgba(13,11,9,0.82)), url("../assets/salon/room.png") center / cover no-repeat;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.salon-veil::before { content: ""; position: absolute; inset: 0; backdrop-filter: blur(6px) saturate(0.8); z-index: -1; }
.salon-game[data-state="ready"] .salon-veil { opacity: 0; visibility: hidden; pointer-events: none; }
.salon-veil-box { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; max-width: 420px; }
.salon-veil-t { font-family: var(--font-head); font-size: 19px; color: var(--ink); }
.salon-veil-s { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.salon-veil-s:empty { display: none; }
.salon-veil .btn[hidden] { display: none; }
.salon-game[data-state="loading"] .salon-veil-box::after {
  content: ""; width: 140px; height: 2px; margin-top: 0.3rem; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-lit), transparent) 0 0 / 50% 100% no-repeat, rgba(197,160,89,0.2);
  animation: salonShimmer 1.3s linear infinite;
}
@keyframes salonShimmer { from { background-position: -70px 0, 0 0; } to { background-position: 140px 0, 0 0; } }

/* İlk kez tanıtım */
.salon-coach {
  position: absolute; z-index: 5; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(380px, calc(100% - 24px));
  padding: 0.85rem 1rem 0.8rem; background: rgba(20,18,14,0.97); border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,0.65); animation: salonIn 0.35s ease;
}
@keyframes salonIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.salon-coach-step { display: flex; gap: 5px; margin-bottom: 0.45rem; }
.salon-coach-step span { width: 18px; height: 3px; border-radius: 2px; background: var(--rule); }
.salon-coach-step span.on { background: var(--gold-lit); }
.salon-coach-t { font-family: var(--font-head); font-size: 18px; color: var(--ink); }
.salon-coach-d { font-size: 14px; line-height: 1.5; color: var(--ink-muted); margin-top: 0.2rem; }
.salon-coach-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.8rem; margin-top: 0.7rem; }
.salon-coach-skip { background: none; border: 0; cursor: pointer; font-family: var(--font-label); font-size: 12px; color: var(--ink-dim); text-decoration: underline; padding: 0.4rem; }
.salon-coach-skip:hover, .salon-coach-skip:focus-visible { color: var(--ink); }
.salon-coach .btn { padding: 0.5rem 1rem; }
.salon-spot { box-shadow: 0 0 0 2px var(--gold-lit), 0 0 26px rgba(223,190,118,0.35) !important; }

/* Defter: sağ sütunda kalan alanı doldurur, kendi içinde kayar */
.salon-side { min-height: 0; }
.salon-side .salon-h { display: flex; align-items: baseline; justify-content: space-between; }
.salon-side .salon-h:focus { outline: none; }
.salon-side .salon-h:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 3px; }
.salon-clues { gap: 0.35rem; }
.salon-clue { padding: 0.4rem 0.55rem; }
.salon-clues { flex-direction: row; flex-wrap: wrap; }
.salon-clues > li { flex: 1 1 100%; }
/* Bulunmamış ipuçları tek satırda küçük mühürler: defter kısa kalır, suçlama düğmesi görünür */
.salon-clues > li.salon-clue:not(.found) { flex: 0 0 auto; padding: 0.2rem 0.5rem; font-size: 12.5px; gap: 0.2rem; }
.salon-clues > li.salon-clue:not(.found) .salon-clue-mark { display: none; }
.salon-game:has(.salon-coach) .salon-hud-hint { opacity: 0; }
.salon-clue.fresh { animation: salonFresh 2.4s ease; }
@keyframes salonFresh { 0%, 35% { background: rgba(223,190,118,0.22); border-color: var(--gold-lit); box-shadow: 0 0 18px rgba(223,190,118,0.35); } 100% { background: rgba(197,160,89,0.06); } }

/* Masaüstü: sayfa kaydırmadan oynanır — sohbet solda, oda + defter sağda, sabit yükseklik */
@media (min-width: 1024px) and (min-height: 640px) {
  .salon.is-game { padding-bottom: 24px; }
  .salon-grid { --salon-h: clamp(520px, calc(100dvh - 168px), 960px); height: var(--salon-h); align-items: stretch; }
  .salon-room { height: 100%; }
  .salon-panel { flex: 1; }
  .salon-log { height: auto; flex: 1; min-height: 0; }
  .salon-right { height: 100%; gap: 12px; }
  .salon-side { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  /* Defterin başlığı + birkaç satırı her zaman görünsün: oda en fazla (yükseklik − 170px) kadar uzar */
  .salon-game { width: min(100%, calc((var(--salon-h) - 170px) * 16 / 9)); align-self: center; }
  .salon-side #accuseOpen { position: sticky; bottom: -1.2rem; z-index: 1; box-shadow: 0 -10px 16px var(--surface-1); }
}

/* Dar ekran: oyun üstte (sabit 16:9), sohbet altında, defter en altta */
@media (max-width: 1023px), (max-height: 639px) {
  .salon-grid { grid-template-columns: 1fr; gap: 14px; }
  .salon-right { display: contents; }
  .salon-game { order: 0; }
  .salon-room { order: 1; }
  .salon-side { order: 2; }
  .salon-log { height: clamp(220px, 46dvh, 520px); }
}
@media (max-width: 1023px), (max-height: 639px) {
  /* Yazı alanı her zaman erişilebilir: sohbet bölümü görünürken alta yapışır */
  .salon-composer { position: sticky; bottom: 0; z-index: 3; background: var(--surface-1); }
}
@media (max-width: 860px) {
  .salon-view .journey-head .back { margin-left: 52px; } /* ses düğmesine değmesin */
}
@media (max-width: 560px) {
  .salon-view:has(.salon.is-game) .salon-kicker { display: none; }
  .salon-view:has(.salon.is-game) .journey-title h1 { font-size: 24px; line-height: 1.2; }
  .salon-view:has(.salon.is-game) .journey-summary { margin-top: 0.35rem; }
  .salon.is-game { padding-left: 0; padding-right: 0; padding-top: 4px; }
  .salon.is-game .salon-game { border-left: 0; border-right: 0; border-radius: 0; }
  .salon.is-game .salon-room, .salon.is-game .salon-side { margin: 0 12px; }
  .salon-hud { padding: 6px; }
  .salon-hud-who { font-size: 13px; padding-right: 10px; }
  .salon-hud-who .salon-face.sm { width: 24px; height: 24px; }
  .salon-hud-who small { display: none; }
  .salon-hud-btn { height: 32px; min-width: 32px; font-size: 12px; }
  .salon-help { top: 44px; }
  .salon-hud-hint { font-size: 12px; padding: 4px 10px; }
  .salon-hud-kb { display: none; }
  .salon-coach { bottom: 8px; padding: 0.6rem 0.75rem; }
  .salon-coach-t { font-size: 16px; }
  .salon-coach-d { font-size: 13px; }
  .salon-coach-actions { margin-top: 0.4rem; }
  .salon-veil-t { font-size: 16px; }
  .salon-veil-s { font-size: 12.5px; }
  /* Oda (56.25vw) + başlık + sekmeler + yazı alanı ilk ekrana sığsın */
  .salon-log { height: clamp(170px, calc(100dvh - 56.25vw - 330px), 420px); }
}
@media (prefers-reduced-motion: reduce) {
  .salon-hud-count.bump, .salon-clue.fresh, .salon-coach, .salon-game[data-state="loading"] .salon-veil-box::after { animation: none; }
  .salon-clue.fresh { background: rgba(223,190,118,0.18); border-color: var(--gold-lit); }
  .salon-hud-hint, .salon-veil, .salon-game { transition: none; }
}
