/* ==========================================================================
   Ömür — mobil-first yaşam simülatörü
   Tasarım niyeti: BitLife'ın parlak/oyuncak dilinden uzak; koyu, sinematik,
   "okunan bir hikâye" hissi. Tek kolon, başparmakla ulaşılabilir alt bar.
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════
   RPG TEMA
   Ahşap, parşömen ve altın. İllüstrasyon üretemediğimiz için doku ve
   çerçeve dili tamamen prosedürel: katmanlı gradyanlar, SVG gürültü
   filtresi ve elle çizilmiş kenarlıklar. Tek bir görsel dosya yok.
   ══════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;

  /* Zemin: koyu yeşil-siyah, orman/deri hissi */
  --bg:        #0e1512;
  --bg-2:      #131d18;
  --surface:   #1a2620;
  --surface-2: #22302a;
  --line:      #33423a;
  --line-soft: #253129;

  /* Ahşap çerçeve */
  --wood:      #4a3826;
  --wood-dark: #2a1f14;
  --wood-lit:  #6b5236;

  /* Parşömen */
  --parch:      #e3d5b4;
  --parch-mid:  #d2c09a;
  --parch-deep: #b8a67e;
  --parch-ink:  #3d3020;
  --parch-dim:  #6b5940;

  --text:      #e9e3d4;
  --text-dim:  #a89e88;
  --text-mute: #7a7160;

  --accent:      #d4a94a;   /* altın — değer, miras, ana eylem */
  --accent-lit:  #f0d68a;
  --accent-soft: #3a2d14;
  --good:        #5cb85c;
  --bad:         #d9534f;
  --info:        #4a90d9;
  --butterfly:   #a678d6;
  --emerald:     #2d5a3d;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --bar-h: 62px;

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --parch-font: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  /*
   * Deri/kumaş hissi: üç katman radyal gradyan. Görsel dosya olmadan
   * düz bir zeminden kurtulmanın en ucuz yolu; GPU'da tek boyama.
   */
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(45, 90, 61, .10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(74, 56, 38, .16), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* Uygulama kabuğu — tam yükseklik, sadece orta bölge kayar */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}

/* ── Başlangıç ekranı ───────────────────────────────────────────── */

.intro {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--safe-t) + 32px) 22px calc(var(--safe-b) + 32px);
  display: flex;
  flex-direction: column;
  /* İçerik uzun olduğunda `center` üst kısmı kırpıyordu (scroll konteynerinde
     ortalanan içerik yukarı taşar ve erişilemez olur). */
  justify-content: flex-start;
  gap: 22px;
}

.intro-brand {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.intro h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 13vw, 56px);
  /* Türkçe'de ğ/Ğ üst aksanı .95 satır yüksekliğinde bir üst satıra çarpıyor */
  line-height: 1.06;
  margin: 0 0 4px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.intro .lead {
  color: var(--text-dim);
  margin: 0;
  font-size: 16px;
  max-width: 38ch;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.1em; }

.field input, .field select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 15px;
  outline: none;
  transition: border-color .16s;
  width: 100%;
  appearance: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }

.seg { display: flex; gap: 7px; }
.seg button {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: all .16s;
}
.seg button.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.diff-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: all .16s;
}
.diff-card.on { border-color: var(--accent); background: var(--accent-soft); }
.diff-card b { font-size: 14px; }
.diff-card small { color: var(--text-mute); font-size: 12px; line-height: 1.35; }
.diff-card.on small { color: var(--text-dim); }

.btn-primary {
  background: var(--accent);
  color: #171200;
  font-weight: 700;
  padding: 17px;
  border-radius: var(--r-md);
  font-size: 16px;
  width: 100%;
  transition: transform .1s, filter .16s;
}
.btn-primary:active { transform: scale(.985); filter: brightness(.93); }
.btn-primary:disabled { opacity: .4; }

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 13px;
  border-radius: var(--r-md);
  width: 100%;
  font-weight: 500;
}
.btn-ghost:active { background: var(--surface-2); }

.lang-toggle {
  position: absolute; top: calc(var(--safe-t) + 14px); right: 16px;
  display: flex; gap: 4px; z-index: 20;
}
.lang-toggle button {
  padding: 6px 11px; font-size: 11px; font-weight: 700;
  border-radius: 8px; background: var(--surface); color: var(--text-mute);
  border: 1px solid var(--line); letter-spacing: .06em;
}
.lang-toggle button.on { color: var(--accent); border-color: var(--accent); }

/* ── Üst başlık ─────────────────────────────────────────────────── */

.head {
  padding: calc(var(--safe-t) + 12px) 16px 10px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}

.head-row { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 24px;
}

.head-id { flex: 1; min-width: 0; }
.head-id h2 {
  margin: 0; font-size: 17px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.head-id p {
  margin: 1px 0 0; font-size: 12px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.head-money { text-align: right; flex-shrink: 0; }
.head-money strong { display: block; font-size: 15px; font-weight: 700; color: var(--accent); }
.head-money small { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; }
.head-money strong.neg { color: var(--bad); }

/* Stat şeritleri */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 11px;
}
.stat-cell { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.stat-cell > span { font-size: 14px; line-height: 1; }
.stat-cell > em { font-size: 9.5px; font-style: normal; color: var(--text-mute); line-height: 1; letter-spacing: .02em; }
.stat-bar { width: 100%; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 2px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.stat-cell.low .stat-bar i { background: var(--bad); }
.stat-cell.mid .stat-bar i { background: var(--accent); }
.stat-cell.high .stat-bar i { background: var(--good); }
.stat-cell.stress .stat-bar i { background: var(--bad); }

/* ── Kaydırılabilir gövde ───────────────────────────────────────── */

.body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 16px;
}

.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-mute); margin: 22px 0 9px; font-weight: 600;
}
.section-title:first-child { margin-top: 4px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 15px;
  margin-bottom: 10px;
}

.empty {
  color: var(--text-mute);
  font-size: 13.5px;
  text-align: center;
  padding: 26px 16px;
  line-height: 1.55;
}

/* ── Olay kartı ─────────────────────────────────────────────────── */

.event {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 19px 17px 15px;
  margin-bottom: 14px;
  animation: rise .34s cubic-bezier(.16,1,.3,1);
}
/*
 * Giriş animasyonu opacity 0'dan BAŞLAMAZ. Başlarsa, animasyon herhangi
 * bir sebeple çalışmadığında (arka plan sekmesi, düşük güç modu, render
 * gecikmesi) kart tamamen görünmez kalıyor — içerik oradadır ama boş
 * bir dikdörtgen görürsün. Yalnızca konum canlandırılıyor.
 */
@keyframes rise { from { transform: translateY(12px); opacity: .4; } }

.event.butterfly { border-color: #4a3a63; background: linear-gradient(165deg, #241d33, var(--surface)); }

.event-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent); font-weight: 700; margin-bottom: 9px;
}
.event.butterfly .event-tag { color: var(--butterfly); }

.event h3 {
  margin: 0 0 10px; font-size: 23px; font-weight: 600;
  font-family: var(--serif); line-height: 1.15; letter-spacing: -.015em;
  text-wrap: balance;
}
.event p {
  margin: 0 0 17px; color: var(--text-dim); font-size: 15px; line-height: 1.6;
  max-width: 42ch;
}

.choices { display: flex; flex-direction: column; gap: 8px; }

.choice {
  width: 100%; text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 15px;
  font-size: 14.5px; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: transform .1s, border-color .16s, background .16s;
}
.choice:active { transform: scale(.99); background: var(--surface-2); }
.choice .risk-hint { font-size: 11px; color: var(--text-mute); flex-shrink: 0; font-weight: 600; }
.choice.locked { opacity: .48; border-style: dashed; }
.choice.locked .risk-hint { color: var(--accent); }
.choice.trait-open { border-color: var(--accent); }
.choice.trait-open .risk-hint { color: var(--accent); }

/* ── Yıllık zaman + yaş butonu ──────────────────────────────────── */

.year-panel {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.time-dots { display: flex; gap: 5px; }
.time-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.time-dot.on { background: var(--accent); }
.year-panel span { font-size: 12px; color: var(--text-mute); flex: 1; }

/* Dört sütun: dokuz aktivite üç satırda ekranın yarısını yiyordu.
   Simge küçüldü, etiket kısaldı, satır sayısı üçten ikiye indi. */
.act-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.act {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 3px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  font-size: 10px; color: var(--text-dim); text-align: center; line-height: 1.2;
  transition: transform .1s, border-color .16s;
  min-height: 62px; justify-content: center;
}
.act span { font-size: 19px; }
.act:active { transform: scale(.96); border-color: var(--accent); }
.act:disabled { opacity: .3; }

/* Yılı bitir — alt sekme çubuğunun hemen üstünde, her zaman erişilebilir */
/*
 * Yıl düğmesi akışın içinde, sekme çubuğunun hemen üstünde.
 *
 * Sabit konumdayken içeriğin son satırını örtüyordu ve bunu telafi etmek
 * için gövdeye 128px boşluk bırakmak gerekiyordu — o boşluk da panelin
 * taşmasına yol açıyordu. Panel modu zaten tek ekrana sığdığı için
 * düğmenin sabit olmasına gerek yok.
 */
/*
 * "Yılı bitir" düğmesi.
 *
 * Önce tam genişlik ve 17px dolguyla ~75px yer kaplıyordu: ekranın en
 * büyük öğesi, yılda bir kez basılan bir düğmeydi. Bir oyuncu hem
 * yerinin hem boyutunun rahatsız ettiğini söyledi ve haklıydı.
 *
 * Artık sağa yaslı bir hap: başparmak erişiminde aynı yerde duruyor,
 * altın rengiyle hala ekranın tek birincil eylemi, ama yarı yüksekliğinde
 * ve yarı genişliğinde. Yasam çizgisine iki satır daha yer açıyor.
 */
.age-bar {
  flex-shrink: 0;
  display: flex; justify-content: flex-end;
  padding: 6px 16px 8px;
  background: var(--bg);
}
.age-bar button { pointer-events: auto; }
.body.with-agebar { padding-bottom: 8px; }
.age-bar button {
  width: auto; min-width: 148px;
  background: linear-gradient(180deg, var(--accent), #b8862f);
  color: #150f00; font-weight: 700; font-size: 14px;
  padding: 11px 20px; border-radius: 999px;
  box-shadow: 0 3px 14px -4px rgba(217,164,65,.42);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .1s, filter .16s;
}
.age-bar button:active { transform: scale(.97); filter: brightness(.93); }
.age-bar button:disabled { background: var(--surface-2); color: var(--text-mute); box-shadow: none; }

/* ── Yaşam günlüğü ──────────────────────────────────────────────── */

.log-year {
  display: flex; align-items: center; gap: 9px;
  margin: 18px 0 8px;
}
.log-year b { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .06em; }
.log-year i { flex: 1; height: 1px; background: var(--line-soft); }

.log-line {
  display: flex; gap: 10px; padding: 8px 0;
  font-size: 14px; line-height: 1.5; color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft);
}
.log-line:last-child { border-bottom: none; }
.log-line .dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--line); margin-top: 8px; }
.log-line.log-choice .dot { background: var(--accent); }
.log-line.log-butterfly .dot { background: var(--butterfly); }
.log-line.log-death .dot, .log-line.log-health .dot { background: var(--bad); }
.log-line.log-family .dot, .log-line.log-birth .dot { background: var(--good); }
.log-line.log-work .dot, .log-line.log-school .dot { background: var(--info); }

/* ── Kişi satırı ────────────────────────────────────────────────── */

.person {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  transition: transform .1s;
  width: 100%; text-align: left;
}
.person:active { transform: scale(.99); }
.person.gone { opacity: .45; }

.person-av {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: var(--surface-2); display: grid; place-items: center; font-size: 19px;
  border: 1px solid var(--line);
}
.person-info { flex: 1; min-width: 0; }
.person-info b { display: block; font-size: 14.5px; font-weight: 600; }
.person-info small { display: block; font-size: 11.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-info .mem { color: var(--butterfly); font-size: 11px; margin-top: 2px; }

.bond-ring {
  flex-shrink: 0; width: 38px; text-align: center;
}
.bond-ring b { display: block; font-size: 13px; font-weight: 700; }
.bond-ring .bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 3px; overflow: hidden; }
.bond-ring .bar i { display: block; height: 100%; background: var(--good); }
.bond-ring.low .bar i { background: var(--bad); }
.bond-ring.mid .bar i { background: var(--accent); }

/* ── İş / varlık satırı ─────────────────────────────────────────── */

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  width: 100%; text-align: left;
  transition: transform .1s, border-color .16s;
}
.row:active { transform: scale(.99); }
.row:disabled { opacity: .42; }
.row.on { border-color: var(--accent); background: var(--accent-soft); }
.row-icon { font-size: 22px; flex-shrink: 0; width: 30px; text-align: center; }
.row-body { flex: 1; min-width: 0; }
.row-body b { display: block; font-size: 14.5px; font-weight: 600; }
.row-body small { display: block; font-size: 11.5px; color: var(--text-mute); line-height: 1.4; }
.row-end { flex-shrink: 0; text-align: right; }
.row-end b { display: block; font-size: 13.5px; color: var(--accent); font-weight: 700; }
.row-end small { font-size: 10.5px; color: var(--text-mute); }

/* ── Karakter rozetleri ─────────────────────────────────────────── */

.trait-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.trait {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 13px; border-radius: 100px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  font-size: 13px; font-weight: 600; color: var(--accent);
}

.axis-row { margin-bottom: 13px; }
.axis-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-mute); margin-bottom: 5px; }
.axis-track { height: 4px; background: var(--line); border-radius: 2px; position: relative; }
.axis-track i {
  position: absolute; top: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%);
  transition: left .45s cubic-bezier(.16,1,.3,1);
  border: 2px solid var(--bg);
}
.axis-track::before {
  content: ''; position: absolute; left: 50%; top: -2px; width: 1px; height: 8px;
  background: var(--line); transform: translateX(-50%);
}

/* ── Kelebek / paralel ──────────────────────────────────────────── */

.bf-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 8px;
  background: linear-gradient(135deg, #1c1729, var(--surface));
  border: 1px solid #362b4a; border-radius: var(--r-md);
}
.bf-item span { font-size: 18px; }
.bf-item div { flex: 1; }
.bf-item b { display: block; font-size: 13.5px; }
.bf-item small { font-size: 11.5px; color: var(--text-mute); }

.branch {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px; margin-bottom: 10px;
}
.branch > b { display: block; font-family: var(--serif); font-size: 16px; margin-bottom: 4px; }
.branch > p { margin: 0 0 11px; font-size: 13px; color: var(--text-mute); line-height: 1.5; }
.branch-choice {
  width: 100%; text-align: left; padding: 11px 13px; margin-bottom: 6px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: 13.5px;
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.branch-choice.actual { border-color: var(--accent); color: var(--accent); }
.branch-choice small { font-size: 10.5px; color: var(--text-mute); flex-shrink: 0; }

/* ── Alt sekme çubuğu ───────────────────────────────────────────── */

.tabbar {
  flex-shrink: 0;
  height: calc(var(--bar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  /* Tam opak: yarı saydam zeminde altından kayan metin okunuyordu */
  background: var(--bg);
  box-shadow: 0 -16px 24px -16px var(--bg);
  border-top: 1px solid var(--line-soft);
  z-index: 30;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-mute); font-size: 10px; font-weight: 600;
  transition: color .16s;
  position: relative;
}
.tab span { font-size: 20px; line-height: 1; opacity: .62; transition: opacity .16s, transform .16s; }
.tab.on { color: var(--accent); }
.tab.on span { opacity: 1; transform: translateY(-1px); }
.tab .badge {
  position: absolute; top: 8px; right: calc(50% - 18px);
  min-width: 7px; height: 7px; border-radius: 100px;
  background: var(--accent);
}

/* ── Modal ──────────────────────────────────────────────────────── */

.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.66);
  z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }

.sheet {
  width: 100%; max-width: 560px;
  background: var(--bg-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-top: 1px solid var(--line);
  padding: 8px 16px calc(var(--safe-b) + 20px);
  max-height: 82dvh; overflow-y: auto;
  animation: slide .28s cubic-bezier(.16,1,.3,1);
}
@keyframes slide { from { transform: translateY(100%); } }

.sheet-grab { width: 34px; height: 4px; border-radius: 2px; background: var(--line); margin: 6px auto 14px; }
.sheet h3 { margin: 0 0 3px; font-size: 19px; font-family: var(--serif); font-weight: 600; }
.sheet .sheet-sub { margin: 0 0 15px; font-size: 13px; color: var(--text-mute); }

/* ── Toast ──────────────────────────────────────────────────────── */

.toast-wrap {
  position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + var(--safe-b) + 14px);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  z-index: 80; pointer-events: none; padding: 0 20px;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); padding: 11px 17px; border-radius: 100px;
  font-size: 13.5px; font-weight: 500; max-width: 100%;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.7);
  animation: toastIn .3s cubic-bezier(.16,1,.3,1);
}
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.94); } }

/* ── Ölüm ekranı ────────────────────────────────────────────────── */

.ending {
  flex: 1; overflow-y: auto;
  padding: calc(var(--safe-t) + 40px) 22px calc(var(--safe-b) + 30px);
  display: flex; flex-direction: column; gap: 18px;
  text-align: center;
  animation: fade .6s;
}
.ending .mark { font-size: 46px; }
.ending h1 { font-family: var(--serif); font-size: 32px; margin: 0; font-weight: 600; }
.ending .years { color: var(--text-mute); font-size: 14px; margin: 0; }
.ending .epitaph {
  font-family: var(--serif); font-size: 19px; line-height: 1.5;
  color: var(--accent); font-style: italic;
  padding: 20px 16px; margin: 4px 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.summary-cell {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 13px;
}
.summary-cell small { display: block; font-size: 10.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .09em; }
.summary-cell b { display: block; font-size: 18px; margin-top: 3px; }

.heir {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  width: 100%; margin-bottom: 8px;
}
.heir .person-av { background: var(--accent-soft); border-color: var(--accent); }
.heir-info { flex: 1; }
.heir-info b { display: block; font-size: 15px; }
.heir-info small { font-size: 11.5px; color: var(--text-mute); }

/* Nesil zinciri */
.ancestors { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ancestor {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  font-size: 12.5px;
}
.ancestor b { color: var(--text); }
.ancestor small { color: var(--text-mute); margin-left: auto; flex-shrink: 0; }

/* Erişilebilirlik: hareket azaltma */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ══ SUÇ ve ADALET ═══════════════════════════════════════════════════
   Görsel dil kasıtlı olarak soğuk: altın vurgu yerine kızıl/kurşuni.
   Oyuncu bu bölüme girdiğinde tonun değiştiğini hissetmeli.
   ═══════════════════════════════════════════════════════════════════ */

.dark-entry {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  margin-top: 6px; padding: 10px 14px;
  background: linear-gradient(135deg, #17121a, var(--surface));
  border: 1px solid #3a2733;
  border-radius: var(--r-md);
  transition: transform .1s, border-color .16s;
}
.dark-entry:active { transform: scale(.99); border-color: var(--bad); }
.dark-entry > span { font-size: 22px; flex-shrink: 0; }
.dark-entry div { flex: 1; min-width: 0; }
.dark-entry b { display: block; font-size: 14.5px; color: #d8b8c4; }
.dark-entry small { display: block; font-size: 11.5px; color: var(--text-mute); }
.dark-entry em {
  font-style: normal; font-size: 10px; font-weight: 700;
  color: var(--bad); border: 1px solid var(--bad);
  padding: 3px 8px; border-radius: 100px; flex-shrink: 0;
}

.crime-row { align-items: flex-start; }
.crime-row .row-body small { line-height: 1.4; }
.crime-meta { margin-top: 3px; }
.crime-row .row-end b { color: var(--bad); letter-spacing: 1px; font-size: 11px; }

/* Yakalanma riski — sayı kadar renk de konuşsun */
.risk { font-style: normal; font-weight: 700; }
.risk.r0 { color: var(--good); }      /* düşük */
.risk.r1 { color: var(--accent); }    /* orta */
.risk.r2 { color: #e08a4a; }          /* yüksek */
.risk.r3 { color: var(--bad); }       /* çok riskli */
.risk.r4 { color: #ff6b67; font-weight: 800; }  /* neredeyse kesin */

.locked-row { opacity: .45; }
.locked-row .row-body b { color: var(--text-mute); }

.warn-box {
  background: rgba(201, 82, 79, .12);
  border: 1px solid rgba(201, 82, 79, .4);
  color: #e8a9a7;
  border-radius: var(--r-md);
  padding: 11px 14px; margin-bottom: 10px;
  font-size: 12.5px; line-height: 1.45;
}

/* Cezaevi kartı */
.prison-card {
  margin-top: 12px; padding: 14px;
  background: linear-gradient(135deg, #14161c, #101218);
  border: 1px solid #2b3140;
  border-radius: var(--r-md);
}
.prison-head { display: flex; align-items: center; gap: 12px; }
.prison-head > span { font-size: 24px; }
.prison-head div { flex: 1; min-width: 0; }
.prison-head b { display: block; font-size: 14.5px; }
.prison-head small { display: block; font-size: 11.5px; color: var(--text-mute); }
.prison-left {
  font-size: 28px; font-weight: 800; color: var(--bad);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.prison-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.prison-bars small {
  display: block; font-size: 10px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: .09em; margin-bottom: 4px;
}

/* Ağır olaylar (mahkeme, cezaevi, yay düğümleri) altın değil kurşuni */
.event.grim {
  border-color: #333a4a;
  background: linear-gradient(165deg, #171a22, var(--surface));
}
.event.grim .event-tag { color: #b9c2d4; }

.log-line.log-crime .dot { background: var(--bad); }

/* ══ GERİ BİLDİRİM KATMANI ═══════════════════════════════════════════
   Bir karardan sonra neyin değiştiğini görmek, kararın ağırlığını
   hissettiren şey. Sayılar sessizce değişmemeli.
   ═══════════════════════════════════════════════════════════════════ */

.delta {
  position: fixed;
  transform: translate(-50%, 0);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 90;
  text-shadow: 0 2px 8px var(--bg), 0 0 3px var(--bg);
  animation: deltaFly 1.25s cubic-bezier(.2, .7, .3, 1) forwards;
  white-space: nowrap;
}
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.money { font-size: 14px; }

@keyframes deltaFly {
  0%   { opacity: 0; transform: translate(-50%, 6px) scale(.8); }
  18%  { opacity: 1; transform: translate(-50%, -6px) scale(1.12); }
  32%  { transform: translate(-50%, -10px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(.94); }
}

/* Değişen istatistik kısa bir an vurgulanır */
.stat-cell.pulse-up > span,
.stat-cell.pulse-down > span { animation: statPop .55s cubic-bezier(.2, .8, .3, 1); }
.stat-cell.pulse-up .stat-bar { box-shadow: 0 0 0 1px var(--good); }
.stat-cell.pulse-down .stat-bar { box-shadow: 0 0 0 1px var(--bad); }
.head-money strong.pulse-up { animation: statPop .55s cubic-bezier(.2, .8, .3, 1); }
.head-money strong.pulse-down { animation: statShake .5s ease; }

@keyframes statPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
@keyframes statShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Yıl geçişi — oyunun tek geri dönüşsüz eylemi bir an durmalı */
.year-mark {
  position: fixed;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 92px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  z-index: 85;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .8);
  animation: yearMark .85s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes yearMark {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.7); filter: blur(6px); }
  22%  { opacity: .95; transform: translate(-50%, -50%) scale(1.04); filter: blur(0); }
  62%  { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(.98); }
}

#app.year-flip .body { animation: yearBreath .45s ease; }
@keyframes yearBreath {
  0% { opacity: .35; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Duyuru şeridi — kazanılan karakter özelliği gibi kaçırılmaması gerekenler */
.banner {
  /* Başlığın ALTINA iner: üstte durduğunda karakter adını ve istatistik
     şeridini örtüyordu — tam da değişimin görülmesi gereken yeri. */
  position: fixed;
  left: 50%; top: calc(var(--safe-t) + 118px);
  transform: translateX(-50%);
  max-width: min(430px, calc(100vw - 28px));
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  padding: 13px 18px;
  z-index: 95;
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .8);
  animation: bannerIn .45s cubic-bezier(.16, 1, .3, 1);
  text-align: center;
}
.banner b { display: block; font-size: 15.5px; color: var(--accent); }
.banner small { display: block; font-size: 12.5px; color: var(--text-dim); margin-top: 3px; line-height: 1.45; }
.banner.out { animation: bannerOut .4s ease forwards; }

@keyframes bannerIn {
  from { opacity: 0; transform: translate(-50%, -22px) scale(.96); }
}
@keyframes bannerOut {
  to { opacity: 0; transform: translate(-50%, -18px) scale(.97); }
}

@media (prefers-reduced-motion: reduce) {
  .delta, .year-mark, .banner { animation-duration: .01ms !important; }
  .stat-cell.pulse-up > span, .stat-cell.pulse-down > span { animation: none !important; }
}

/* ══ HAYAT ANALİZİ ve BİYOGRAFİ ══════════════════════════════════════ */

.analysis { display: flex; flex-direction: column; gap: 11px; text-align: left; }
.dim-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text-dim); margin-bottom: 5px;
}
.dim-top b { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
.dim-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.dim-bar i {
  display: block; height: 100%; border-radius: 3px;
  animation: dimGrow .9s cubic-bezier(.16, 1, .3, 1) both;
}
.dim-bar i.hi  { background: var(--good); }
.dim-bar i.mid { background: var(--accent); }
.dim-bar i.lo  { background: var(--bad); }

@keyframes dimGrow { from { width: 0 !important; } }

.verdict {
  font-size: 14px; color: var(--text-dim); text-align: left;
  margin: 14px 0 0; line-height: 1.55;
  border-left: 2px solid var(--accent); padding-left: 13px;
}

.bio { text-align: left; }
.bio p {
  font-family: var(--serif);
  font-size: 15.5px; line-height: 1.68;
  color: var(--text-dim); margin: 0 0 13px;
}
.bio p:first-child { color: var(--text); font-size: 16.5px; }
.bio p:last-child { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .dim-bar i { animation: none; }
}

/* ══ YAŞAYAN DÜNYA ve SIRLAR ═════════════════════════════════════════ */

.world-strip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; margin-bottom: 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  font-size: 12px;
}
.world-econ { font-weight: 700; letter-spacing: .02em; }
.world-strip small { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.world-strip em {
  font-style: normal; margin-left: auto; color: var(--info);
  font-size: 11.5px; font-weight: 600; text-align: right;
}
.world-strip.econ-boom      { border-color: var(--good); }
.world-strip.econ-boom      .world-econ { color: var(--good); }
.world-strip.econ-stable    .world-econ { color: var(--text-dim); }
.world-strip.econ-recession { border-color: var(--accent); }
.world-strip.econ-recession .world-econ { color: var(--accent); }
.world-strip.econ-crisis    { border-color: var(--bad); background: rgba(201,82,79,.08); }
.world-strip.econ-crisis    .world-econ { color: var(--bad); }

.person-info .secret { color: var(--accent); font-size: 11px; margin-top: 2px; }

.secret-box {
  margin-top: 10px; padding: 11px 13px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--accent);
  line-height: 1.45;
}
.secret-box small {
  display: block; margin-top: 4px;
  color: var(--text-mute); font-size: 11px;
}

/* ══ KELEBEK YANKISI ═════════════════════════════════════════════════
   Oyunun en özgün mekaniği köşede küçük bir etiket olarak geçiyordu.
   "Otuz yıl önce verdiğin karar bugün geri döndü" görünmeli.
   ═══════════════════════════════════════════════════════════════════ */

.echo {
  display: flex; align-items: center; gap: 12px;
  margin: -4px -4px 14px; padding: 11px 14px;
  background: linear-gradient(135deg, #2a2140, #1e1a2c);
  border: 1px solid #4a3a63;
  border-radius: var(--r-md);
  animation: echoIn .6s cubic-bezier(.16, 1, .3, 1);
}
.echo > span { font-size: 22px; animation: echoFlutter 2.6s ease-in-out infinite; }
.echo div { flex: 1; min-width: 0; }
.echo b { display: block; font-size: 13.5px; color: var(--butterfly); font-weight: 700; }
.echo small { display: block; font-size: 11.5px; color: var(--text-mute); margin-top: 1px; }

@keyframes echoIn {
  from { opacity: 0; transform: translateY(-8px); }
}
@keyframes echoFlutter {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-3px) rotate(-7deg); }
  60% { transform: translateY(1px) rotate(5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .echo, .echo > span { animation: none; }
}


/* ══ RPG BİLEŞENLERİ ═════════════════════════════════════════════════ */

/* ── Parşömen yüzeyi ────────────────────────────────────────────────
   Kağıt lekesi ve elyaf dokusu, üst üste binen gradyanlarla üretiliyor.
   Kenarlardaki koyu halka, kağıdın yaşlanmış kenarını taklit eder. */
.parchment {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255, 250, 235, .55), transparent 45%),
    radial-gradient(ellipse at 80% 85%, rgba(160, 140, 100, .30), transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--parch) 25%, var(--parch-mid) 70%, var(--parch-deep) 100%);
  color: var(--parch-ink);
  border-radius: 4px;
  box-shadow:
    inset 0 0 30px rgba(120, 95, 55, .35),
    inset 0 2px 3px rgba(255, 252, 240, .5),
    0 6px 18px -6px rgba(0, 0, 0, .7);
}

/* Kağıt elyafı — çok ince çapraz çizgiler */
.parchment::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .35;
  background-image:
    repeating-linear-gradient(51deg, rgba(120, 95, 55, .06) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-38deg, rgba(120, 95, 55, .05) 0 1px, transparent 1px 6px);
}

/* ── Ahşap çerçeve ──────────────────────────────────────────────────
   Damar çizgileri repeating-linear-gradient ile; kenar ışığı ve iç
   gölge çerçeveye kabartma hissi verir. */
.woodframe {
  background:
    repeating-linear-gradient(97deg,
      rgba(0, 0, 0, .16) 0 2px, transparent 2px 7px,
      rgba(255, 255, 255, .04) 7px 8px, transparent 8px 13px),
    linear-gradient(160deg, var(--wood-lit), var(--wood) 45%, var(--wood-dark));
  border: 1px solid rgba(0, 0, 0, .5);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, .18),
    inset 0 -2px 6px rgba(0, 0, 0, .45),
    0 4px 14px -6px rgba(0, 0, 0, .8);
}

/* ── Altın kenarlık ─────────────────────────────────────────────── */
.goldedge {
  border: 1px solid var(--accent);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(240, 214, 138, .35),
    0 0 14px -6px rgba(212, 169, 74, .5);
}

/* ── Üst başlık: karakter künyesi ───────────────────────────────── */
.rpg-head {
  padding: calc(var(--safe-t) + 10px) 12px 10px;
  background:
    linear-gradient(180deg, rgba(20, 30, 24, .96), rgba(14, 21, 18, .92)),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--wood);
  box-shadow: 0 3px 12px -4px rgba(0, 0, 0, .8);
  flex-shrink: 0;
}

.rpg-id { display: flex; align-items: center; gap: 11px; }

/* Portre madalyonu — çift halka, altın kenar */
.portrait {
  position: relative;
  width: 58px; height: 58px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 27px;
  background:
    radial-gradient(circle at 35% 28%, #2f4438, #16211b 70%);
  border: 2px solid var(--accent);
  box-shadow:
    0 0 0 2px var(--wood-dark),
    0 0 0 3px rgba(212, 169, 74, .35),
    inset 0 2px 8px rgba(0, 0, 0, .6);
}
.portrait .lvl {
  position: absolute; bottom: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--accent-lit), var(--accent));
  color: #241a06;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 1.5px solid var(--wood-dark);
  font-variant-numeric: tabular-nums;
}

.rpg-name { flex: 1; min-width: 0; }
.rpg-name h2 {
  margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600;
  color: var(--parch); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.rpg-name .sub {
  margin: 1px 0 0; font-size: 11.5px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Yıl ilerlemesi — RPG'deki XP çubuğunun karşılığı */
.year-xp { margin-top: 5px; }
.year-xp .bar {
  height: 6px; border-radius: 3px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid var(--wood);
  overflow: hidden;
}
.year-xp .bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-lit));
  box-shadow: 0 0 8px rgba(212, 169, 74, .55);
  transition: width .5s cubic-bezier(.16, 1, .3, 1);
}
.year-xp small {
  display: block; margin-top: 2px;
  font-size: 9.5px; color: var(--text-mute);
  letter-spacing: .04em;
}

/* Kese — net değer */
.purse {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 8px;
  flex-shrink: 0;
}
.purse span { font-size: 15px; }
.purse b {
  font-size: 13px; font-weight: 700; color: var(--accent-lit);
  font-variant-numeric: tabular-nums;
}
.purse b.neg { color: var(--bad); }

/* ── Yaşam yılı parşömeni + hanedan arması ──────────────────────── */
/* Sol sütun: yaşam yılı parşömeni, arma altında */
.year-scroll {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  padding: 12px 10px 10px;
  margin: 0;
}
.year-scroll .yl { flex: 1; text-align: center; }
.year-scroll .kicker {
  font-family: var(--parch-font);
  font-size: 10.5px; letter-spacing: .22em;
  color: var(--parch-dim); text-transform: uppercase;
}
.year-scroll .big {
  font-family: var(--parch-font);
  font-size: 34px; font-weight: 700; line-height: 1.05;
  color: var(--parch-ink);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 252, 240, .6);
}
.year-scroll .age { font-size: 12px; color: var(--parch-dim); margin-top: 1px; }

.crest { width: 46px; height: 55px; flex-shrink: 0; margin-top: 6px; }

/* ── RPG istatistik satırı ──────────────────────────────────────── */
.stat-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.stat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  border-left: 3px solid var(--sc, var(--accent));
}
.stat-row > span { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.stat-row .nm { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); }
.stat-row .vl {
  font-size: 12.5px; font-weight: 700; color: var(--text-dim);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.stat-row .sbar {
  width: 100%; height: 7px; border-radius: 4px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(0, 0, 0, .35);
  overflow: hidden; margin-top: 5px;
}
.stat-row .sbar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--sc), color-mix(in srgb, var(--sc) 60%, white));
  transition: width .5s cubic-bezier(.16, 1, .3, 1);
}
.stat-row .col { flex: 1; min-width: 0; }
.stat-row .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

/* ── Bölüm başlığı — ahşap tabela ───────────────────────────────── */
.rpg-title {
  display: flex; align-items: center; gap: 9px;
  margin: 18px 0 9px;
  font-family: var(--serif);
  font-size: 12px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent);
}
.rpg-title i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--wood), transparent); }
.rpg-title a {
  font-size: 11px; letter-spacing: .04em; text-transform: none;
  color: var(--text-mute); text-decoration: none; font-weight: 500;
}

/* ── Devam eden olaylar (aktif yaylar) ──────────────────────────── */
.arc-rail {
  display: flex; gap: 9px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 12px;
  scrollbar-width: none;
}
.arc-rail::-webkit-scrollbar { display: none; }

.arc-card {
  flex: 0 0 128px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  text-align: left;
}
.arc-card .art {
  height: 74px;
  display: grid; place-items: center;
  font-size: 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
/* İllüstrasyon yerine: her yaya özel prosedürel desen */
.arc-card .art::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .10), transparent 55%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, .14) 0 6px, transparent 6px 12px);
}
.arc-card .art > span { position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.arc-card .meta { padding: 8px 10px 10px; }
.arc-card b { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.arc-card small { display: block; font-size: 10.5px; color: var(--text-mute); margin-top: 2px; line-height: 1.35; }
.arc-card .stage {
  display: inline-block; margin-top: 6px;
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 100px; padding: 2px 7px;
}

/* ── Görev sandığı (haftalık meydan okuma) ──────────────────────── */
.quest-chest {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; margin-bottom: 12px;
  border-radius: 8px;
}
.quest-chest > span { font-size: 30px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.6)); }
.quest-chest .qt { flex: 1; min-width: 0; }
.quest-chest b {
  display: block; font-family: var(--serif);
  font-size: 14.5px; color: var(--parch); letter-spacing: .02em;
}
.quest-chest small { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.4; }
.quest-chest .qbar {
  height: 5px; border-radius: 3px; margin-top: 8px;
  background: rgba(0, 0, 0, .5); border: 1px solid var(--wood); overflow: hidden;
}
.quest-chest .qbar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-lit));
}
.quest-chest .badge-n {
  min-width: 21px; height: 21px; border-radius: 11px;
  background: var(--bad); color: #fff;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center; flex-shrink: 0;
  border: 1.5px solid rgba(0, 0, 0, .5);
}
.quest-chest.done .qbar i { background: linear-gradient(90deg, var(--good), #8fd98f); }

/* ── Alt sekme çubuğu: ortada yükseltilmiş sekme ────────────────── */
.tabbar.rpg {
  background:
    linear-gradient(180deg, rgba(26, 38, 32, .99), rgba(14, 21, 18, 1));
  border-top: 1px solid var(--wood);
  box-shadow: 0 -3px 14px -4px rgba(0, 0, 0, .9);
}
.tabbar.rpg .tab { color: var(--text-mute); }
.tabbar.rpg .tab.on { color: var(--accent-lit); }
.tabbar.rpg .tab.center { position: relative; }
.tabbar.rpg .tab.center > span {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 25px;
  background: radial-gradient(circle at 36% 30%, #33513f, #16241c 72%);
  border: 2px solid var(--accent);
  box-shadow:
    0 0 0 3px var(--bg),
    0 6px 16px -4px rgba(0, 0, 0, .9),
    inset 0 2px 8px rgba(0, 0, 0, .55);
  opacity: 1;
}
.tabbar.rpg .tab.center { padding-top: 26px; }
.tabbar.rpg .tab.center.on > span { border-color: var(--accent-lit); }

/* ── Olay kartı: RPG çerçevesi ──────────────────────────────────── */
.event {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 30%),
    linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--wood);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(240, 214, 138, .10),
    0 6px 20px -8px rgba(0, 0, 0, .8);
}
.event::before {
  content: '';
  position: absolute; inset: 3px;
  border: 1px solid rgba(212, 169, 74, .16);
  border-radius: 7px;
  pointer-events: none;
}
.event { position: relative; }

.choice {
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line);
  border-left: 3px solid var(--wood);
  border-radius: 7px;
}
.choice:active { border-left-color: var(--accent); }
.choice.trait-open { border-left-color: var(--accent); }

/* ══ DİĞER SEKMELERİ RPG DİLİNE ÇEKME ═══════════════════════════════
   İnsanlar / İş / Varlık / Kendin sekmeleri kendi HTML'lerini koruyor;
   görsel dil tamamen CSS'ten geliyor. Böylece tek yerden tutarlılık
   sağlanıyor ve her sekmeyi elle yeniden yazmak gerekmiyor.
   ═══════════════════════════════════════════════════════════════════ */

/* Bölüm başlıkları: ahşap tabela — .rpg-title ile aynı dil */
.section-title {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--serif);
  font-size: 12px; font-weight: 700;
  letter-spacing: .13em;
  color: var(--accent);
  margin: 18px 0 9px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--wood), transparent);
}

/* Kart, satır ve kişi: kabartmalı yüzey + sol kenar vurgusu */
.card,
.row,
.person,
.branch,
.challenge,
.year-panel,
.bf-item {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(240, 214, 138, .06),
    0 2px 8px -4px rgba(0, 0, 0, .6);
}

.row, .person {
  border-left: 3px solid var(--wood);
}
.row:active, .person:active { border-left-color: var(--accent); }
.row.on { border-left-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }

/* Değer sütunu altın kalsın */
.row-end b { color: var(--accent-lit); }

/* Portre kutuları: künyedeki madalyonun küçük hâli */
.person-av,
.heir .person-av {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #2f4438, #16211b 70%);
  border: 1.5px solid var(--wood-lit);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .5);
}
.person-av { width: 38px; height: 38px; }

/* Bağ göstergesi: altın çubuk */
.bond-ring .bar { background: rgba(0, 0, 0, .45); border: 1px solid rgba(0, 0, 0, .3); }

/* Aktiviteler: ahşap düğme hissi */
.act {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(240, 214, 138, .05);
}
.act:active { border-color: var(--accent); }

/* Karanlık taraf: ahşap ve kızıl — diğerlerinden ayrışmalı */
.dark-entry {
  background:
    repeating-linear-gradient(97deg, rgba(0,0,0,.14) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #3a2028, #1d1216);
  border: 1px solid #5a2d33;
  border-radius: 8px;
}
.dark-entry b { color: #e0a3ae; }

/* Yıl bitir düğmesi: altın kabartma */
.age-bar button {
  background: linear-gradient(180deg, var(--accent-lit), var(--accent) 55%, #a8802e);
  color: #241a06;
  border: 1px solid var(--wood-dark);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, .55),
    inset 0 -2px 6px rgba(0, 0, 0, .3),
    0 -12px 26px -10px var(--bg),
    0 5px 16px -6px rgba(212, 169, 74, .45);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .4);
}

/* Modal: parşömen üstü koyu panel */
.sheet {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-top: 2px solid var(--wood);
  border-radius: 12px 12px 0 0;
}
.sheet h3 { color: var(--parch); }

/* Karakter rozetleri: altın madalyon */
.trait {
  background: linear-gradient(180deg, var(--accent-soft), rgba(0, 0, 0, .3));
  border: 1px solid var(--accent);
  color: var(--accent-lit);
}

/* Ölüm ekranı: kitabe parşömen üstünde */
.ending .epitaph {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 250, 235, .5), transparent 50%),
    linear-gradient(160deg, var(--parch), var(--parch-mid));
  color: var(--parch-ink);
  border: none;
  border-radius: 4px;
  padding: 22px 18px;
  box-shadow: inset 0 0 26px rgba(120, 95, 55, .3), 0 6px 18px -6px rgba(0,0,0,.7);
}
.summary-cell {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
}
.summary-cell b { color: var(--accent-lit); }

/* Giriş ekranı: ahşap düğmeler */
.diff-card, .seg button, .field input, .field select {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-color: var(--line);
  border-radius: 8px;
}
.diff-card.on, .seg button.on {
  background: linear-gradient(180deg, var(--accent-soft), var(--surface));
  border-color: var(--accent);
  color: var(--accent-lit);
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent-lit), var(--accent) 55%, #a8802e);
  color: #241a06;
  border: 1px solid var(--wood-dark);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, .5);
}
.btn-ghost {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--wood);
  border-radius: 8px;
}
.intro h1 { color: var(--parch); }
.intro-brand { color: var(--accent); }

/* ══ ANA EKRAN: ODAK ve PANEL ════════════════════════════════════════
   Karar anında ekranda yalnızca olay kartı olur; planlama anında panel.
   İkisini aynı anda göstermek 1500px içerik üretiyordu.
   ═══════════════════════════════════════════════════════════════════ */

/* Karar anı ekranın merkezinde durur — odak modunun bütün amacı bu */
/*
 * Olay kartı kalan alanı kaplar ve içinde ortalanır. `min-height: 100%`
 * iken kart gövdenin tamamını yiyor, altındaki zaman şeridi dışarı
 * taşıyordu (40px) — kart uzunsa kendi içinde kaysın, şerit yerinde kalsın.
 */
.focus {
  display: flex; flex-direction: column; justify-content: center;
  flex: 1; min-height: 0; overflow-y: auto;
}
.focus .event { margin-bottom: 10px; }

.focus-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
}
.focus-foot small { font-size: 12px; color: var(--text-mute); }
.dots { display: inline-flex; gap: 5px; }
.dots .time-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots .time-dot.on { background: var(--accent); box-shadow: 0 0 6px rgba(212,169,74,.5); }

/* İstatistikler: iki sütun, kompakt */
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-bottom: 10px;
}
.stat-mini {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-left: 3px solid var(--sc, var(--accent));
  border-radius: 7px;
}
.stat-mini > span { font-size: 15px; flex-shrink: 0; }
.stat-mini > div { flex: 1; min-width: 0; }
.stat-mini b {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-dim); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stat-mini .sbar {
  height: 5px; border-radius: 3px; margin-top: 4px;
  background: rgba(0, 0, 0, .45); overflow: hidden;
}
.stat-mini .sbar i { display: block; height: 100%; background: var(--sc); }
.stat-mini em {
  font-style: normal; font-size: 12px; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums; flex-shrink: 0;
}

/* Süren hikâyeler: kompakt yatay şerit */
.arc-rail { margin-bottom: 10px; }
.arc-card {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px 9px 9px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ac, #2d3f5a), var(--surface) 75%);
  border: 1px solid var(--line);
}
.arc-card .ai { font-size: 20px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.arc-card .am b { display: block; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.arc-card .am small { display: block; font-size: 10.5px; color: var(--text-dim); }

/* Dünya + görev: yan yana iki kutu */
.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.mini-box {
  padding: 7px 11px; border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  text-align: left; min-width: 0;
}
.mini-box small {
  display: block; font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-mute);
}
.mini-box b {
  display: block; font-size: 13px; font-weight: 700; color: var(--text);
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-box em {
  font-style: normal; font-size: 10.5px; color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
.mini-box.econ-boom { border-color: var(--good); }
.mini-box.econ-boom b { color: var(--good); }
.mini-box.econ-recession b { color: var(--accent); }
.mini-box.econ-crisis { border-color: var(--bad); }
.mini-box.econ-crisis b { color: var(--bad); }
.mini-box .qbar {
  height: 4px; border-radius: 2px; margin-top: 6px;
  background: rgba(0, 0, 0, .5); overflow: hidden;
}
.mini-box .qbar i { display: block; height: 100%; background: var(--accent); }
.mini-box.quest.done { border-color: var(--good); }
.mini-box.quest.done .qbar i { background: var(--good); }

/* Planlama çubuğu: aktiviteleri açan tek satır */
.plan-bar {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 14px; margin-bottom: 6px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--wood);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(240, 214, 138, .07);
}
.plan-bar b { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); }
.plan-bar em {
  font-style: normal; font-size: 20px; color: var(--accent);
  line-height: 1; flex-shrink: 0;
}
.plan-bar:active { border-color: var(--accent); }

/* Planlama sayfasındaki ızgara biraz daha ferah */
.sheet .act-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet .act { min-height: 72px; font-size: 11px; }
.sheet .act span { font-size: 22px; }


/* ══ ÜST BLOK: yaşam yılı | istatistik tablosu ═══════════════════════ */

.top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
  align-items: stretch;
}

/* Sağ sütun: istatistikler tablo gibi — satır başına tek çizgi */
.stat-table {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.st-row {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  padding: 0 9px;
  flex: 1;
  min-height: 27px;
  border-bottom: 1px solid rgba(0, 0, 0, .28);
}
.st-row:last-child { border-bottom: none; }

/* Değer çubuğu satırın kendi zemini olarak akar — ayrı bar yok, yer yok */
.st-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--sc);
  opacity: .16;
  transition: width .5s cubic-bezier(.16, 1, .3, 1);
}
.st-row > span { font-size: 13px; z-index: 1; flex-shrink: 0; }
.st-row > b {
  flex: 1; z-index: 1;
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-row > em {
  z-index: 1; flex-shrink: 0;
  font-style: normal; font-size: 12px; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.st-row::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--sc);
}

/* Dar ekranda parşömen daralınca yıl küçülsün */
@media (max-width: 360px) {
  .year-scroll .big { font-size: 28px; }
  .crest { width: 38px; height: 45px; }
}

/* Uyarı durumundaki istatistik: sakin bir nabız, sürekli titreme değil */
.st-row.alarm > em { color: var(--bad); }
.st-row.alarm > b { color: #e0a3a1; }
.st-row.alarm .st-fill { opacity: .26; }
.st-row.alarm::after { animation: alarmPulse 2.4s ease-in-out infinite; }
@keyframes alarmPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .st-row.alarm::after { animation: none; }
}

/* ── Vücut uyarısı ────────────────────────────────────────────────
 * Panelde tek satır. İstatistik tablosunun hemen altında durur çünkü
 * teşhis oradan okunuyor; dokununca planlama sayfası açılır.
 */
.body-warn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin: 8px 0 0; padding: 9px 11px;
  border: 1px solid rgba(217, 83, 79, .32);
  border-left: 3px solid var(--bad);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(217, 83, 79, .13), rgba(217, 83, 79, .03));
  color: var(--parch); font: inherit; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.body-warn > span { font-size: 15px; line-height: 1; flex: none; }
.body-warn > b { flex: 1; font-size: 12px; font-weight: 600; letter-spacing: .1px; }
.body-warn > em {
  flex: none; font-style: normal; font-size: 10px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--accent); opacity: .85;
}
.body-warn:active { transform: scale(.99); }
.body-warn.severe { animation: warnPulse 2.6s ease-in-out infinite; }
@keyframes warnPulse {
  0%, 100% { border-left-color: var(--bad); }
  50% { border-left-color: rgba(217, 83, 79, .35); }
}
@media (prefers-reduced-motion: reduce) { .body-warn.severe { animation: none; } }

/* ── Panel yaşam çizgisi ──────────────────────────────────────────
 * Kalan dikey alanı kaplar ve kendi içinde kayar. Böylece panelin
 * toplam yüksekliği içeriğe göre değişmez — ekran her zaman tam oturur.
 */
.panel-log { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: 12px; }
.log-head {
  display: flex; align-items: center; gap: 9px; flex: none; margin-bottom: 7px;
}
.log-head > i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.log-head > small {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted); opacity: .75;
}
.log-scroll {
  position: relative;
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  /* En yeni olay en üstte durur, o yüzden solma ALTTA: kesilen kenar
   * "devamı var" der. Üstten soldurmak en okunası satırı gizliyordu. */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent);
          mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent);
}
.log-scroll::-webkit-scrollbar { width: 0; }

/* Panel modunda gövde: sabit bloklar + esneyen günlük
 * Günlüğe bir taban yükseklik veriliyor. Tabansız bırakınca kısa ekranlarda
 * 28px'e sıkışıp okunamaz hale geliyordu — "hiç göstermemek" ile aynı şey,
 * üstelik yer harcayarak. Taban aşılırsa gövde hafifçe kayar; bu normal bir
 * mobil davranış, asıl kaçındığımız şey 1500px'lik taşmaydı.
 */
.body.flow { display: flex; flex-direction: column; overflow-y: auto; }
.body.flow > * { flex: none; }
.body.flow > .panel-log { flex: 1 1 auto; min-height: 76px; }
.body.flow > .focus { flex: 1 1 auto; }

/* ── Panel yoğunluğu ──────────────────────────────────────────────
 * Yaşam çizgisi panele girince kalan bloklara dar bir bütçe düştü.
 * Her biri birkaç piksel veriyor; toplamı günlüğe iki satır kazandırıyor.
 * Yalnız panel modunda (.flow) geçerli — sekmeler eski nefesini korur.
 */
/*
 * Ekonomi ve meydan okuma panelde tek satıra iner: etiket ile değer
 * yan yana. İki satırlık hâli 69px yiyordu — o piksellerin yaşam
 * çizgisinde işi var. Bilgi aynı, yüksekliğin yarısı.
 */
.body.flow .mini-row { gap: 6px; margin-bottom: 6px; }
.body.flow .mini-box {
  display: flex; align-items: baseline; gap: 6px;
  padding: 6px 10px; overflow: hidden;
}
.body.flow .mini-box small {
  flex: none; font-size: 9px; letter-spacing: .08em; opacity: .8;
  max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.body.flow .mini-box b { flex: 1; font-size: 12.5px; margin-top: 0; }
.body.flow .mini-box em { flex: none; }
.body.flow .mini-box .qbar { display: none; }
.body.flow .mini-box .qpct { font-size: 10.5px; font-weight: 700; color: var(--accent); }
.body.flow .mini-box.quest.done .qpct { color: var(--good); }
/* Şerit dışında yüzde gereksiz — orada çubuk zaten gösteriyor */
.mini-box .qpct { display: none; }
.body.flow .mini-box .qpct { display: inline; }
.body.flow .plan-bar { padding: 9px 14px; margin-bottom: 5px; }
.body.flow .dark-entry { padding-top: 7px; padding-bottom: 7px; }
.body.flow .dark-entry > span { font-size: 19px; }
.body.flow .dark-entry b { font-size: 13.5px; }
.body.flow .year-scroll { padding: 9px 10px 8px; }
.body.flow .year-scroll .big { font-size: 30px; }
.body.flow .crest { width: 40px; height: 48px; margin-top: 4px; }
.body.flow .body-warn { padding: 7px 11px; margin-top: 7px; }

/* ── Kurulum sihirbazı ────────────────────────────────────────────
 * Tek ekranda dört soru yerine sırayla dört adım. Her adım ekranın
 * ortasında tek başına durur; kaydırma yok, odak tek soruda.
 */
.intro.wizard { display: flex; flex-direction: column; min-height: 100dvh; gap: 0; }
.wz-top { flex: none; padding-top: 6px; }
.wz-body {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center;
  gap: 12px; overflow-y: auto; padding: 8px 0;
}
.wz-nav { flex: none; display: flex; gap: 10px; align-items: center; padding: 12px 0 4px; }
.wz-nav .btn-primary { flex: 1; }
.wz-nav .wz-back { flex: none; width: auto; padding-left: 18px; padding-right: 18px; }

/* İlerleme noktaları — kaçıncı adımdasın */
.wz-dots { display: flex; gap: 7px; margin-top: 14px; }
.wz-dots i {
  width: 22px; height: 3px; border-radius: 2px;
  background: var(--line); transition: background .25s ease, width .25s ease;
}
.wz-dots i.done { background: rgba(212, 169, 74, .45); }
.wz-dots i.on { background: var(--accent); width: 34px; }

.wz-q {
  font-family: var(--serif, Georgia, serif);
  font-size: 25px; font-weight: 600; color: var(--parch);
  letter-spacing: -.2px; line-height: 1.2;
}
.wz-hint { font-size: 13px; color: var(--text-mute); margin: -4px 0 2px; line-height: 1.45; }

.wz-input {
  width: 100%; padding: 15px 16px; font-size: 18px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
}
.wz-input:focus { outline: none; border-color: var(--accent); }
.wz-dice { width: 100%; }

/* Cinsiyet: üç büyük dokunma hedefi */
.wz-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.wz-opt {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 6px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
}
.wz-opt > span { font-size: 26px; line-height: 1; }
.wz-opt > b { font-size: 12.5px; font-weight: 600; }
.wz-opt.on { border-color: var(--accent); background: rgba(212, 169, 74, .1); }
.wz-opt:active { transform: scale(.98); }

/* Şehir: açılır liste yerine dokunulabilir etiketler */
.wz-cities { display: flex; flex-wrap: wrap; gap: 7px; max-height: 46dvh; overflow-y: auto; }
.wz-city {
  padding: 9px 14px; border-radius: 999px; font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
}
.wz-city.on { border-color: var(--accent); background: rgba(212, 169, 74, .12); color: var(--accent); }
.wz-city:active { transform: scale(.97); }

/* ── Yeni gelen günlük satırı ─────────────────────────────────────
 * Yıl sonu olayları eskiden üst üste popup olarak biniyordu. Artık
 * yaşam çizgisinde kısa bir vurguyla beliriyorlar: göz oraya gidiyor,
 * ekran kapanmıyor.
 */
.log-line.fresh {
  animation: freshIn .5s ease both;
  position: relative;
}
.log-line.fresh > div:last-child { color: var(--parch); }
.log-line.fresh::before {
  content: ''; position: absolute; left: -8px; top: 2px; bottom: 2px;
  width: 2px; border-radius: 2px; background: var(--accent);
  animation: freshFade 2.4s ease-out forwards;
}
@keyframes freshIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes freshFade {
  0%, 55% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .log-line.fresh { animation: none; }
  .log-line.fresh::before { animation: none; opacity: .6; }
}

/* Düğme artık dar olduğu için arkasındaki günlük satırı yarım görünüyordu;
   yumuşak bir geçiş kesilmeyi kasıtlı gösteriyor. */
.age-bar {
  background: linear-gradient(180deg, transparent, var(--bg) 55%);
  margin-top: -14px;
  padding-top: 20px;
}
