:root {
  --night-0: #07091300;
  --night-1: #0a0d1a;
  --night-2: #12142a;
  --night-3: #1d1a35;
  --ink: #ece6d6;
  --ink-soft: #cfc9da;
  --ink-mute: #a29db5;
  --line: rgba(236, 230, 214, 0.12);
  --moon: #f4ead0;
  --candle: #f6b95c;
  --candle-deep: #e07b2e;
  --moss: #6f8f3e;
  --alive: #7fd69a;

  --stone-hi: #b6b9c1;
  --stone-mid: #8d919b;
  --stone-lo: #5d616c;
  --engrave: #2c2f37;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--night-1);
  background-image: linear-gradient(180deg, #070912 0%, var(--night-1) 30%, var(--night-2) 70%, var(--night-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--candle); outline-offset: 3px; border-radius: 6px; }

/* ---------- Gökyüzü ---------- */

.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.stars {
  position: absolute; inset: 0;
  background-repeat: repeat;
}
.stars--far {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 140px 80px, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 260px 160px, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 90px 210px, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 330px 40px, #fff6 50%, transparent 51%);
  background-size: 360px 260px;
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}
.stars--near {
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px, #fffc 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 420px 60px, #fffa 50%, transparent 51%),
    radial-gradient(2px 2px at 300px 300px, #fff9 50%, transparent 51%);
  background-size: 520px 420px;
  animation: twinkle 6s ease-in-out infinite alternate;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

.moon {
  position: absolute; z-index: 0; pointer-events: none;
  top: clamp(40px, 9vh, 96px);
  right: clamp(24px, 12vw, 180px);
  width: clamp(64px, 9vw, 112px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, #0000 0 9%, #d9cfb3 9.5% 13%, #0000 13.5%),
    radial-gradient(circle at 62% 64%, #0000 0 6%, #d9cfb3 6.5% 9%, #0000 9.5%),
    radial-gradient(circle at 40% 35%, #fffaf0, var(--moon) 55%, #d6caa8);
  box-shadow:
    0 0 40px 6px rgba(244, 234, 208, .25),
    0 0 140px 40px rgba(244, 234, 208, .08);
}

/* ---------- Üst bar ---------- */

.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto;
  padding: 20px 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-soft); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: .01em;
}
.brand svg { color: var(--stone-hi); }
.brand:hover { color: var(--ink); }

.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.03);
}
.lang button {
  border: 0; background: transparent; color: var(--ink-mute);
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  padding: 5px 11px; border-radius: 999px;
}
.lang button[aria-pressed="true"] { background: rgba(255,255,255,.1); color: var(--ink); }

/* ---------- Hero ---------- */

main { position: relative; z-index: 1; }

.hero {
  max-width: 760px; margin: 0 auto;
  padding: clamp(48px, 12vh, 132px) 16px 40px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--serif); font-style: italic; font-size: 19px;
  color: var(--candle);
  letter-spacing: .04em;
}
h1 {
  margin: 0;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(48px, 9vw, 96px);
  line-height: .95; letter-spacing: -.015em;
  background: linear-gradient(180deg, #fbf6ea 20%, #b8b0c4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(244, 234, 208, .08);
}
.lede {
  max-width: 520px; margin: 22px auto 36px;
  color: var(--ink-soft); font-size: 17px; line-height: 1.6;
}

.search {
  display: flex; gap: 10px;
  max-width: 560px; margin: 0 auto;
}
.field {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  height: 56px; padding: 0 6px 0 18px;
  border: 1px solid rgba(236,230,214,.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px -12px rgba(0,0,0,.6);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within {
  border-color: rgba(246,185,92,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 4px rgba(246,185,92,.12), 0 10px 30px -12px rgba(0,0,0,.6);
}
.field__prefix { color: var(--ink-mute); font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-family: var(--mono); font-size: 15px; color: var(--ink);
  padding: 0 4px 0 1px;
}
.field input::placeholder { color: #5f5a72; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--candle {
  color: #2a1a07;
  background: linear-gradient(180deg, #ffd38c, var(--candle) 55%, #e89a45);
  box-shadow: 0 0 0 1px rgba(255,211,140,.4) inset, 0 12px 30px -10px rgba(246,185,92,.55);
}
.btn--candle:hover { box-shadow: 0 0 0 1px rgba(255,211,140,.5) inset, 0 14px 40px -8px rgba(246,185,92,.7); }
.btn--ghost {
  height: 40px; padding: 0 16px; font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  border-color: var(--line); background: rgba(255,255,255,.03);
}
.btn--ghost:hover { color: var(--ink); border-color: rgba(236,230,214,.28); }

.flame {
  width: 9px; height: 14px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 70%, #fff6dc, #ffb347 50%, #c4521b);
  box-shadow: 0 0 10px 2px rgba(255,170,60,.65);
  animation: flicker 1.6s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(-2deg); }
  30% { transform: scale(.92, 1.08) rotate(2deg); }
  60% { transform: scale(1.05, .95) rotate(-1deg); }
}

.options {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px 22px; margin-top: 20px;
  font-size: 14px; color: var(--ink-mute);
}
.seg { display: inline-flex; align-items: center; gap: 4px; }
.seg__label { margin-right: 6px; }
.seg button {
  border: 1px solid transparent; background: transparent; color: var(--ink-mute);
  padding: 5px 11px; border-radius: 999px; font-size: 13px;
}
.seg button:hover { color: var(--ink-soft); }
.seg button[aria-checked="true"] { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.05); }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1px solid rgba(236,230,214,.3);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.check input:checked + .check__box { background: var(--candle); border-color: var(--candle); }
.check input:checked + .check__box::after {
  content: ""; width: 8px; height: 4px; margin-top: -2px;
  border-left: 2px solid #2a1a07; border-bottom: 2px solid #2a1a07; transform: rotate(-45deg);
}
.check input:focus-visible + .check__box { outline: 2px solid var(--candle); outline-offset: 2px; }

/* ---------- Durum ---------- */

.status {
  max-width: 560px; margin: 18px auto 0; padding: 0 16px;
  text-align: center; color: var(--ink-soft);
  font-family: var(--serif); font-style: italic; font-size: 21px;
}
.status .flame { display: inline-block; margin-right: 10px; vertical-align: -1px; }
.status--error { color: #f0a58f; }

/* ---------- Sonuçlar ---------- */

.results { max-width: 1120px; margin: 0 auto; padding: 8px 16px 80px; }

.ledger {
  position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, rgba(24,25,44,.92), rgba(16,17,32,.92));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}
.ledger__head {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px 24px 18px; border-bottom: 1px solid var(--line);
}
.ledger__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 28px; }
.ledger__title a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(236,230,214,.3); }
.ledger__title a:hover { border-bottom-color: var(--candle); }
.ledger__sub { color: var(--ink-mute); font-size: 14px; }
.stat { padding: 18px 24px 22px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.stat__value {
  margin-top: 8px; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat__value--small { font-size: 22px; }
.stat__hint { margin-top: 4px; color: var(--ink-mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat__value .num { font-family: var(--mono); font-weight: 600; font-size: .82em; letter-spacing: -.02em; }

.share { display: flex; justify-content: flex-end; gap: 8px; margin: 14px 0 0; }

/* ---------- Mezarlık ---------- */

.yard {
  --cols: 4;
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 64px 28px;
  margin-top: 48px;
  padding: 24px 8px 40px;
}

.plot {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-decoration: none; color: inherit;
  animation: rise .8s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* toprak tümseği */
.plot::after {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -18px; height: 34px; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #2a2a2a 0%, #17161f 55%, transparent 72%);
}
/* çimen */
.plot__grass {
  position: absolute; left: 6%; right: 6%; bottom: -6px; height: 14px; z-index: 2; pointer-events: none;
  background:
    radial-gradient(4px 12px at 10% 100%, #34482a 60%, transparent 62%),
    radial-gradient(3px 10px at 22% 100%, #2b3d22 60%, transparent 62%),
    radial-gradient(4px 13px at 37% 100%, #3a5130 60%, transparent 62%),
    radial-gradient(3px 9px at 55% 100%, #2b3d22 60%, transparent 62%),
    radial-gradient(4px 12px at 70% 100%, #34482a 60%, transparent 62%),
    radial-gradient(3px 10px at 84% 100%, #3a5130 60%, transparent 62%),
    radial-gradient(4px 11px at 95% 100%, #2b3d22 60%, transparent 62%);
}

.stone-wrap {
  width: 100%;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)) drop-shadow(0 2px 0 rgba(0,0,0,.35));
  transform: rotate(calc(var(--tilt, 0) * 1deg));
  transform-origin: 50% 100%;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.plot:hover .stone-wrap, .plot:focus-visible .stone-wrap { transform: rotate(0deg) translateY(-6px); }
.plot:focus-visible { outline: none; }
.plot:focus-visible .stone { box-shadow: inset 0 0 0 2px var(--candle); }

.stone {
  position: relative; overflow: hidden;
  min-height: calc(300px * var(--h, 1));
  padding: 52px 20px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  color: var(--engrave);
  background:
    radial-gradient(120% 60% at 30% 10%, rgba(255,255,255,.28), transparent 60%),
    linear-gradient(160deg, var(--stone-hi), var(--stone-mid) 50%, var(--stone-lo));
  border-radius: 110px 110px 6px 6px / 90px 90px 6px 6px;
}
/* taş dokusu */
.stone::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .32 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* yosun */
.stone::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  opacity: var(--moss, 0);
  background:
    radial-gradient(40% 30% at 12% 100%, rgba(95,130,50,.85), transparent 70%),
    radial-gradient(30% 22% at 80% 100%, rgba(110,145,60,.8), transparent 70%),
    radial-gradient(22% 18% at 50% 100%, rgba(80,110,40,.7), transparent 70%),
    radial-gradient(14% 10% at 95% 70%, rgba(110,145,60,.55), transparent 70%),
    radial-gradient(10% 8% at 4% 55%, rgba(95,130,50,.5), transparent 70%);
  mix-blend-mode: multiply;
}

.stone--arch { border-radius: 999px 999px 6px 6px / 140px 140px 6px 6px; }
.stone--slab { border-radius: 16px 16px 6px 6px; padding-top: 38px; }
.stone--gothic {
  border-radius: 6px;
  clip-path: polygon(0 18%, 18% 7%, 50% 0, 82% 7%, 100% 18%, 100% 100%, 0 100%);
  padding-top: 62px;
}
.stone--obelisk {
  border-radius: 4px;
  clip-path: polygon(14% 9%, 50% 0, 86% 9%, 92% 100%, 8% 100%);
  padding: 64px 34px 22px;
}

.stone__rip {
  font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: .32em;
  margin-right: -.32em; opacity: .7;
}
.stone__name {
  margin: 10px 0 0;
  font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1.1;
  word-break: break-word; hyphens: auto;
  max-width: 100%;
}
.engraved {
  color: #3a3d46;
  text-shadow: 0 1px 0 rgba(255,255,255,.35), 0 -1px 0 rgba(0,0,0,.28);
}
.stone__years {
  margin-top: 8px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; opacity: .85;
}
.stone__orn { width: 46px; height: 10px; margin: 12px 0 10px; opacity: .55; }
.stone__lived { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.stone__epitaph {
  margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 16px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.stone__cause { margin-top: 8px; font-size: 11.5px; line-height: 1.35; opacity: .72; }
.stone__base {
  margin-top: auto; padding-top: 14px;
  display: flex; gap: 12px; align-items: center; justify-content: center;
  font-size: 12px; opacity: .8;
}
.stone__base .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; box-shadow: 0 1px 0 rgba(255,255,255,.3); }

.crack { position: absolute; top: 0; width: 60px; height: 110px; pointer-events: none; opacity: .55; }

/* ---------- Boş mezarlık ---------- */

.empty {
  grid-column: 1 / -1; text-align: center; padding: 40px 16px;
  font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--ink-soft);
}

/* ---------- Canlılar ---------- */

.alive { margin-top: 56px; }
.alive h2 {
  margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 30px;
}
.alive p.sub { margin: 0 0 18px; color: var(--ink-mute); font-size: 14px; }
.alive ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
}
.alive li a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.025);
  color: var(--ink); text-decoration: none;
  transition: border-color .2s, background .2s;
}
.alive li a:hover { border-color: rgba(127,214,154,.35); background: rgba(127,214,154,.05); }
.pulse {
  flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--alive);
  box-shadow: 0 0 0 0 rgba(127,214,154,.6); animation: pulse 2.2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(127,214,154,0); } 100% { box-shadow: 0 0 0 0 rgba(127,214,154,0); } }
.alive .name { font-family: var(--mono); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alive .when { margin-left: auto; color: var(--ink-mute); font-size: 12px; white-space: nowrap; }

/* ---------- Sis ---------- */

.fog { position: fixed; left: 0; right: 0; bottom: 0; height: 40vh; pointer-events: none; z-index: 3; overflow: hidden; }
.fog div {
  position: absolute; bottom: -10vh; left: 0; width: 200%; height: 100%;
  background:
    radial-gradient(30% 50% at 15% 80%, rgba(190,185,215,.10), transparent 70%),
    radial-gradient(25% 40% at 45% 90%, rgba(190,185,215,.08), transparent 70%),
    radial-gradient(30% 45% at 75% 85%, rgba(190,185,215,.10), transparent 70%);
  animation: drift 60s linear infinite;
}
.fog div:last-child { animation-duration: 95s; animation-direction: reverse; opacity: .7; bottom: -16vh; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Alt bilgi ---------- */

.foot {
  position: relative; z-index: 4;
  text-align: center; color: var(--ink-mute); font-size: 13px;
  padding: 24px 16px 40px;
}

/* ---------- Duyarlı ---------- */

@media (max-width: 900px) {
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-of-type(2n) { border-right: 0; }
  .stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

@media (max-width: 560px) {
  .search { flex-direction: column; }
  .btn--candle { width: 100%; }
  .field__prefix { font-size: 13px; }
  .yard { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 14px; padding-inline: 0; }
  .stone { padding: 40px 10px 16px; min-height: calc(240px * var(--h, 1)); }
  .stone--obelisk { padding-inline: 20px; }
  .stone__name { font-size: 18px; }
  .stone__epitaph { font-size: 14px; }
  .stone__cause { display: none; }
  .share { justify-content: center; }
  .stat { padding: 14px 16px 16px; }
  .stat__value { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   3D mod
   ========================================================= */

#scene { display: none; }
.vignette { display: none; }

body.is3d { overflow: hidden; height: 100dvh; }
body.is3d #scene {
  display: block; position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 0;
  touch-action: none; outline: none;
}
body.is3d .vignette {
  display: block; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(3,4,10,.55) 100%);
}
body.is3d .sky, body.is3d .moon, body.is3d .fog { display: none; }
body.is3d main { position: static; }
body.is3d .topbar { position: fixed; inset: 0 0 auto 0; max-width: none; padding: 18px 24px; z-index: 10; }
body.is3d .topbar::before {
  content: ""; position: absolute; inset: 0 0 -30px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,6,14,.6), transparent);
}
.topbar__right { display: flex; align-items: center; gap: 10px; }
.yard-only { display: none !important; }
body.in-yard .yard-only { display: inline-flex !important; }

body.is3d .hero {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  max-width: none; padding: 80px 16px 90px;
  background: radial-gradient(60% 55% at 50% 50%, rgba(6,7,16,.74), rgba(6,7,16,.25) 70%, transparent);
  transition: opacity .8s ease, transform .8s ease, visibility .8s;
}
body.is3d .hero > * { max-width: 760px; width: 100%; }
body.is3d .hero .lede { max-width: 520px; color: var(--ink); text-shadow: 0 2px 16px rgba(0,0,0,.9); }
body.is3d .options { color: var(--ink-soft); text-shadow: 0 1px 10px rgba(0,0,0,.9); }
body.is3d .hero .search { max-width: 560px; }
body.is3d.in-yard .hero { opacity: 0; visibility: hidden; transform: scale(1.04); pointer-events: none; }
body.is3d .hero h1 { text-shadow: 0 4px 40px rgba(0,0,0,.6); }

body.is3d .foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 14px 16px 18px;
  font-size: 12px; transition: opacity .5s;
}
body.is3d .foot p { margin: 2px 0; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
body.is3d .foot { font-size: 13px; }
body.is3d.in-yard .foot { opacity: 0; pointer-events: none; }
.foot a { color: var(--ink-soft); }
.credits { opacity: .7; }

.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--md { height: 44px; padding: 0 18px; font-size: 14px; }
.btn--candle.btn--md { box-shadow: 0 0 0 1px rgba(255,211,140,.4) inset, 0 10px 28px -10px rgba(246,185,92,.6); }

/* ---------- HUD ---------- */

.hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 0 24px 24px; pointer-events: none;
  animation: hudIn .9s .6s both cubic-bezier(.2,.8,.2,1);
}
.hud[hidden] { display: none; }
.hud > * { pointer-events: auto; }
@keyframes hudIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.glass {
  border: 1px solid rgba(236,230,214,.12);
  background: linear-gradient(180deg, rgba(18,19,36,.78), rgba(10,11,24,.82));
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.8);
}

.ledger--hud {
  display: grid; grid-template-columns: repeat(4, auto); max-width: min(860px, 64vw);
  border-radius: 16px;
}
.ledger--hud .ledger__head { padding: 14px 18px 12px; }
.ledger--hud .ledger__title { font-size: 24px; }
.ledger--hud .stat { padding: 12px 18px 14px; }
.ledger--hud .stat__value { font-size: 24px; margin-top: 4px; }
.ledger--hud .stat__value--small { font-size: 19px; }
.ledger--hud .stat__label { font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
.ledger--hud .stat__hint { font-size: 13px; }
.ledger__avatar { width: 28px; height: 28px; border-radius: 50%; vertical-align: -6px; margin-right: 10px; border: 1px solid var(--line); }

.hud__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hud__actions .btn--ghost { background: rgba(14,15,30,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.hint {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%); margin: 0;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--ink);
  background: rgba(10,11,24,.82); border: 1px solid var(--line); white-space: nowrap;
  transition: opacity .6s; pointer-events: none; z-index: 8;
}
body:not(.in-yard) .hint { display: none; }
.hint.is-gone { opacity: 0; }

/* ---------- Taş kartı ---------- */

.card {
  position: fixed; right: 24px; top: 50%; z-index: 9; width: min(360px, calc(100vw - 32px));
  transform: translateY(-50%); padding: 22px 22px 18px; border-radius: 18px;
  animation: cardIn .45s cubic-bezier(.2,.8,.2,1);
}
.card[hidden] { display: none; }
@keyframes cardIn { from { opacity: 0; transform: translate(14px, -50%); } }
.card__rip { font-family: var(--serif); font-weight: 700; letter-spacing: .3em; font-size: 13px; color: var(--candle); }
.card h3 { margin: 6px 0 2px; font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.05; word-break: break-word; }
.card__years { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.card__desc { margin: 14px 0 0; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--ink); }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 16px 0 0; font-size: 14.5px; line-height: 1.4; }
.card dt { color: var(--ink-mute); }
.card dd { margin: 0; color: var(--ink); }
.card__nav { display: flex; gap: 8px; margin-top: 18px; align-items: center; }
.card__nav .grow { flex: 1; }
.card__count { font-family: var(--mono); font-size: 12px; color: var(--ink-mute); }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink-soft); font-size: 16px;
}
.icon-btn:hover { color: var(--ink); border-color: rgba(236,230,214,.28); }
.card__close { position: absolute; top: 14px; right: 14px; }

/* ---------- Canlılar çekmecesi ---------- */

.drawer {
  position: fixed; right: 24px; bottom: 90px; z-index: 9; width: min(380px, calc(100vw - 32px));
  max-height: 55vh; overflow: auto; padding: 18px; border-radius: 18px;
  animation: cardIn2 .35s cubic-bezier(.2,.8,.2,1);
}
.drawer[hidden] { display: none; }
@keyframes cardIn2 { from { opacity: 0; transform: translateY(10px); } }
.drawer h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 26px; }
.drawer .sub { margin: 0 0 14px; color: var(--ink-mute); font-size: 13px; }
.drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.drawer li a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.drawer li a:hover { border-color: rgba(127,214,154,.35); background: rgba(127,214,154,.05); }
.drawer .name { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .when { margin-left: auto; color: var(--ink-mute); font-size: 12px; white-space: nowrap; }

/* ---------- İpucu balonu ---------- */

.tip {
  position: fixed; z-index: 9; pointer-events: none; padding: 6px 10px; border-radius: 8px;
  font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink);
  background: rgba(10,11,24,.85); border: 1px solid var(--line);
  transform: translate(14px, 14px); white-space: nowrap;
}
.tip[hidden] { display: none; }

/* ---------- Yükleme ---------- */

.loader {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 999px;
  font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft);
  background: rgba(10,11,24,.7); border: 1px solid var(--line);
}
.loader[hidden] { display: none; }
.loader__bar { width: 90px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--candle); transition: width .3s; }

/* ---------- Poster penceresi ---------- */

.poster {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto;
  border: 1px solid rgba(236,230,214,.14); border-radius: 20px; color: var(--ink);
  background: linear-gradient(180deg, #15162b, #0d0e1e);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.9);
}
.poster::backdrop { background: rgba(3,4,10,.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.poster__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; margin: 0; }
.poster__head h2 { margin: 0; font-family: var(--serif); font-size: 28px; }
.poster__tabs { display: flex; gap: 4px; padding: 8px 20px 14px; }
.poster__tabs button {
  border: 1px solid transparent; background: transparent; color: var(--ink-mute);
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px;
}
.poster__tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.06); }
.poster__preview {
  position: relative; margin: 0 20px; display: grid; place-items: center;
  min-height: 240px; border-radius: 12px; background: #07080f; overflow: hidden;
}
.poster__preview img { display: block; max-width: 100%; max-height: 56dvh; width: auto; height: auto; }
.poster__wait { position: absolute; }
.poster__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 6px; }
.poster__note { margin: 0; padding: 4px 20px 18px; font-size: 12.5px; color: var(--ink-mute); }

/* ---------- Mobil ---------- */

@media (max-width: 760px) {
  body.is3d .topbar { padding: 12px 16px; }
  .hud { flex-direction: column; align-items: stretch; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); gap: 10px; }
  .ledger--hud { max-width: none; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ledger--hud .ledger__head { padding: 10px 14px 8px; }
  .ledger--hud .ledger__title { font-size: 19px; }
  .ledger--hud .ledger__sub { display: none; }
  .ledger--hud .stat { padding: 8px 10px 10px; border-bottom: 0; }
  .ledger--hud .stat:nth-of-type(2n) { border-right: 1px solid var(--line); }
  .ledger--hud .stat:last-child { grid-column: auto; border-right: 0; }
  .ledger--hud .stat__value { font-size: 18px; }
  .ledger--hud .stat__value--small { font-size: 14px; }
  .ledger--hud .stat__hint { display: none; }
  .ledger--hud .stat__label { font-size: 10.5px; letter-spacing: .03em; }
  .hud__actions { justify-content: stretch; }
  .hud__actions .btn { flex: 1; padding: 0 10px; font-size: 13px; }
  .hint { top: 64px; font-size: 12px; }
  .card { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; transform: none; z-index: 11; max-height: 60dvh; overflow: auto; }
  @keyframes cardIn { from { opacity: 0; transform: translateY(20px); } }
  .drawer { right: 12px; left: 12px; width: auto; bottom: 170px; }
  .tip { display: none; }
}

/* =========================================================
   Tasarım dili v2 — sade, düz, tutarlı
   (önceki parlama/cam/hap stillerinin üstüne yazar)
   ========================================================= */

:root {
  --bone: #e6dec8;
  --bone-hi: #f1ead7;
  --bone-ink: #1a1813;
  --panel: rgba(14, 15, 24, 0.94);
  --panel-line: #2a2b3a;
  --panel-line-hi: #44455a;
  --r: 8px;
}

/* ikon */
.i {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* butonlar */
.btn {
  height: 40px; padding: 0 14px; gap: 8px;
  border-radius: var(--r); border: 1px solid transparent;
  font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: 0;
  box-shadow: none; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:active { transform: none; filter: brightness(.95); }
.btn--sm { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn--sm .i { width: 14px; height: 14px; }

/* Ana ve ikincil buton aynı dış hatta biter: gölge yok, kenarlık dolguyla aynı renk. */
.btn--primary {
  background: var(--bone); color: var(--bone-ink); border-color: var(--bone);
  box-shadow: none;
}
.btn--primary:hover { background: var(--bone-hi); border-color: var(--bone-hi); }

.btn--secondary {
  background: var(--panel); color: var(--ink); border-color: #3a3b4e;
}
.btn--secondary:hover { border-color: var(--panel-line-hi); background: rgba(22,23,34,.96); }

.btn--quiet { background: transparent; color: var(--ink-soft); border-color: transparent; }
.btn--quiet:hover { color: var(--ink); background: rgba(255,255,255,.05); }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r);
  border: 1px solid var(--panel-line); background: transparent; color: var(--ink-soft);
  display: inline-grid; place-items: center; font-size: 0;
}
.icon-btn:hover { color: var(--ink); border-color: var(--panel-line-hi); background: rgba(255,255,255,.04); }

/* arama alanı: giriş ve buton tek parça */
.search { gap: 0; max-width: 540px; }
.field {
  height: 52px; padding: 0 4px 0 16px;
  border-radius: var(--r) 0 0 var(--r); border: 1px solid #3a3b4d; border-right: 0;
  background: rgba(10,11,20,.88); box-shadow: none;
}
.field:focus-within { border-color: var(--bone); box-shadow: none; }
.field:focus-within + .btn--attached { border-color: var(--bone); }
.btn--attached { height: 52px; padding: 0 18px; border-radius: 0 var(--r) var(--r) 0; font-size: 15px; }
.field__prefix { color: #8f8aa3; }

/* dil seçici ve süre seçimi: alt çizgili metin */
.lang { padding: 0; gap: 2px; border: 0; background: transparent; }
.lang button {
  padding: 6px 8px; border-radius: 0; font-size: 12.5px; letter-spacing: .08em; color: var(--ink-mute);
  border-bottom: 1px solid transparent;
}
.lang button[aria-pressed="true"] { background: transparent; color: var(--ink); border-bottom-color: var(--bone); }

.seg button {
  padding: 4px 6px; border-radius: 0; border: 0; border-bottom: 1px solid transparent; font-size: 14px;
}
.seg button[aria-checked="true"] { background: transparent; border-color: transparent; border-bottom-color: var(--bone); color: var(--ink); }
.check__box { border-radius: 3px; border-color: #6b6780; }
.check input:checked + .check__box { background: var(--bone); border-color: var(--bone); }
.check input:checked + .check__box::after { border-color: var(--bone-ink); }

/* paneller: cam yerine düz yüzey */
.glass {
  background: var(--panel); border: 1px solid var(--panel-line);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.75);
}
.ledger--hud { border-radius: 10px; }
.card, .drawer { border-radius: 10px; }
.card__rip { color: var(--ink-mute); letter-spacing: .28em; font-size: 12px; }
.card__close { top: 12px; right: 12px; }
.drawer li a { border-radius: var(--r); border-color: var(--panel-line); }
.drawer li a:hover { border-color: var(--panel-line-hi); background: rgba(255,255,255,.03); }
.pulse { width: 7px; height: 7px; }

.hud__actions .btn--secondary { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ipucu: hap değil, sade yazı */
.hint {
  padding: 0; border: 0; background: transparent; border-radius: 0;
  font-size: 13px; color: var(--ink-soft); letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 12px rgba(0,0,0,.8);
}

.tip { border-radius: 6px; background: var(--panel); border-color: var(--panel-line); font-size: 16px; }

/* yükleme */
.loader { border-radius: var(--r); background: var(--panel); border-color: var(--panel-line); font-size: 16px; }
.loader__bar i { background: var(--bone); }

/* poster penceresi */
.poster { border-radius: 12px; background: #10111b; border-color: var(--panel-line); }
.poster__head { padding: 18px 20px 4px; }
.poster__head h2 { font-size: 26px; }
.poster__tabs { gap: 18px; padding: 6px 20px 0; border-bottom: 1px solid var(--panel-line); margin: 0 20px 16px; padding-left: 0; }
.poster__tabs button {
  padding: 10px 0; border: 0; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-size: 14px; color: var(--ink-mute);
}
.poster__tabs button[aria-selected="true"] { background: transparent; color: var(--ink); border-bottom-color: var(--bone); }
.poster__preview { border-radius: var(--r); border: 1px solid var(--panel-line); }
.poster__actions { gap: 8px; }

@media (max-width: 560px) {
  .search { flex-direction: column; gap: 8px; }
  .field { border-radius: var(--r); border-right: 1px solid #3a3b4d; }
  .btn--attached { border-radius: var(--r); width: 100%; }
}
@media (max-width: 760px) {
  .hud__actions .btn { height: 40px; }
  .hud__actions .btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

.noscript { position: relative; z-index: 5; max-width: 620px; margin: 40px auto; padding: 0 16px; color: var(--ink-soft); line-height: 1.6; }
.noscript h2 { font-family: var(--serif); color: var(--ink); }
