/* Tur oyunu motoru — ortak stiller. Renkler oyun verisindeki renk.acik/renk.koyu ile ezilir. */
/* Layout: tek sütunlu "saray ekseni" — oyuncu Bâb-ı Hümâyûn'dan Dördüncü Avlu'ya doğru içeri yürür; rehber maskotu her durakta konuşur; sonuç bir tayin beratı. */
:root{
  --ground:#F8F2EA; --surface:#FFFCF8; --ink:#1F2340; --muted:#6A5F5A;
  --cobalt:#1E3D9B; --turq:#2A8C82; --bole:#C2412D; --line:#E8DCCD;
  --cobalt-soft:#FBE6DC;
  --f-display:"Cormorant Garamond","Iowan Old Style","Palatino Linotype",Georgia,serif;
  --f-body:"Alegreya Sans","Segoe UI",system-ui,sans-serif;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --ground:#1B1720; --surface:#262029; --ink:#F1E9E0; --muted:#B9ADA4;
  --cobalt:#9DB0F0; --turq:#6CC9BE; --bole:#EE7A64; --line:#3A3038; --cobalt-soft:#3A2523; color-scheme:dark}}
:root[data-theme="dark"]{
  --ground:#1B1720; --surface:#262029; --ink:#F1E9E0; --muted:#B9ADA4;
  --cobalt:#9DB0F0; --turq:#6CC9BE; --bole:#EE7A64; --line:#3A3038; --cobalt-soft:#3A2523; color-scheme:dark}

*{box-sizing:border-box}
html,body{background:var(--ground);color:var(--ink)}
body{font-family:var(--f-body);font-size:17px;line-height:1.5;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:0 40px}
.band{height:44px;margin-inline:calc(-1 * max(16px,env(safe-area-inset-left,0px)));
  background-color:var(--bole);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.55' stroke-width='1.2'%3E%3Crect x='12' y='12' width='20' height='20'/%3E%3Crect x='12' y='12' width='20' height='20' transform='rotate(45 22 22)'/%3E%3Ccircle cx='22' cy='22' r='3.5'/%3E%3Cpath d='M0 0L8 8M44 0L36 8M0 44L8 36M44 44L36 36'/%3E%3C/g%3E%3C/svg%3E");
  border-bottom:3px solid var(--cobalt)}
main{max-width:620px;margin:0 auto;padding-top:18px}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;min-height:36px}
.lang{display:inline-flex;border:1.5px solid var(--line);border-radius:999px;overflow:hidden}
.lang button{font:inherit;font-size:13px;font-weight:700;letter-spacing:.06em;border:0;background:transparent;color:var(--muted);padding:6px 12px;cursor:pointer}
.lang button[aria-pressed="true"]{background:var(--bole);color:var(--surface)}
.linkbtn{font:inherit;font-size:14px;background:none;border:0;color:var(--muted);cursor:pointer;text-decoration:underline;text-underline-offset:3px;padding:6px 0}
h1,h2,.display{font-family:var(--f-display);font-weight:700;letter-spacing:.005em;text-wrap:balance;margin:0}
.eyebrow{font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:var(--turq);font-weight:700}

/* rehber maskotu */
.guide{display:flex;gap:12px;align-items:flex-end;margin-bottom:20px}
.guide img{width:66px;height:88px;object-fit:contain;object-position:bottom;flex:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.18))}
.guide.big img{width:105px;height:140px}
.bubble{position:relative;background:var(--surface);border:1.5px solid var(--line);border-radius:14px 14px 14px 4px;padding:10px 14px;font-size:15.5px;line-height:1.45;min-width:0}
.bubble b{display:block;font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--bole);margin-bottom:2px}

/* giriş */
.intro h1{font-size:clamp(40px,10vw,64px);line-height:1;margin:8px 0 14px}
.intro h1 em{font-style:italic;color:var(--bole)}
.intro p.lead{font-size:19px;color:var(--muted);max-width:52ch;margin:0 0 22px}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}
.field label{font-size:14px;font-weight:700;color:var(--muted)}
.field input{font:inherit;padding:12px 14px;border:1.5px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink)}
.field input:focus{outline:2px solid var(--cobalt);outline-offset:1px}
.btn{font:inherit;font-weight:700;border:0;border-radius:6px;padding:14px 22px;cursor:pointer;background:var(--bole);color:var(--surface);text-decoration:none;display:inline-block}
.btn:focus-visible,.opt:focus-visible,.lang button:focus-visible,.linkbtn:focus-visible,.tally button:focus-visible{outline:3px solid var(--bole);outline-offset:2px}
.btn.ghost{background:transparent;color:var(--cobalt);border:1.5px solid var(--cobalt)}
.route{margin-top:30px;display:grid;grid-template-columns:repeat(7,1fr);gap:4px;font-size:11.5px;color:var(--muted);text-align:center}
.route span{border-top:2px solid var(--line);padding-top:6px;line-height:1.2}

/* soru */
.prog{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.prog i{flex:1;height:4px;border-radius:2px;background:var(--line)}
.prog i.on{background:var(--cobalt)}
.prog i.now{background:var(--bole)}
.station{font-size:14px;color:var(--muted);margin-bottom:16px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.station b{color:var(--turq);font-weight:700}
.q h2{font-size:clamp(28px,7vw,38px);line-height:1.1;margin-bottom:20px}
.opts{display:grid;gap:10px}
.opt{font:inherit;text-align:left;padding:14px 16px;border:1.5px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer;display:flex;gap:12px;align-items:baseline;transition:border-color .15s,background .15s}
.opt:hover{border-color:var(--cobalt);background:var(--cobalt-soft)}
.opt .k{font-family:var(--f-display);font-weight:700;color:var(--bole);min-width:1.1em}
.back{margin-top:18px;background:none;border:0;color:var(--muted);font:inherit;cursor:pointer;padding:6px 0}

/* yükleme */
.loading{text-align:center;padding:50px 0}
.loading img{width:150px;height:200px;object-fit:contain;animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.05)}}
.loading p{font-family:var(--f-display);font-size:24px;font-style:italic;color:var(--muted);min-height:1.5em;margin:18px 0 0}

/* berat */
.berat{background:var(--surface);border:1.5px solid var(--line);border-radius:4px;position:relative;overflow:hidden}
.berat::before{content:"";position:absolute;inset:8px;border:1px solid var(--line);pointer-events:none}
.berat-head{padding:26px 24px 18px;text-align:center;border-bottom:1px solid var(--line)}
.seal{width:64px;height:64px;margin:0 auto 10px;display:block}
.date{font-family:var(--f-display);font-style:italic;font-weight:600;font-size:17px;color:var(--bole);margin:4px 0 0;text-wrap:balance}
.to{font-size:15px;color:var(--muted);margin:6px 0 2px}
.unvan{font-size:clamp(32px,8.5vw,46px);line-height:1.05;color:var(--cobalt);margin:4px 0 8px}
.tanim{color:var(--muted);max-width:44ch;margin:0 auto}
.facts{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line);margin:0}
.facts div{padding:14px 20px;min-width:0}
.facts div+div{border-left:1px solid var(--line)}
.facts dt{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--turq);font-weight:700;margin-bottom:3px}
.facts dd{margin:0;font-weight:500}
.sec{padding:18px 24px;border-bottom:1px solid var(--line)}
.sec:last-child{border-bottom:0}
.sec h3{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--turq);margin:0 0 8px}
.story{font-family:var(--f-display);font-size:21px;line-height:1.4;margin:0}
.know{background:var(--cobalt-soft)}
.know p{margin:0}
.rivals{display:grid;gap:8px}
.rival{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;font-size:15px}
.rival .bar{grid-column:1/-1;height:6px;border-radius:3px;background:var(--line);overflow:hidden}
.rival .bar i{display:block;height:100%;background:var(--bole)}
.rival b{font-variant-numeric:tabular-nums;color:var(--muted);font-weight:500}
.tour{font-size:15px;color:var(--muted)}
.tour strong{color:var(--ink)}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.toast{font-size:14px;color:var(--turq);min-height:1.4em;margin-top:8px}
.insta{margin-top:22px;display:flex;gap:14px;align-items:center;padding:16px;border:1.5px solid var(--line);border-radius:8px;background:var(--surface)}
.insta img{width:54px;height:72px;object-fit:contain;flex:none}
.insta div{min-width:0;flex:1}
.insta p{margin:0;font-size:15px;color:var(--muted)}
.insta a{font-weight:700;color:var(--bole);text-decoration:none;font-size:17px}
.insta a:hover{text-decoration:underline}

/* grup sayımı */
.tally{display:grid;gap:8px;margin:18px 0}
.trow{display:grid;grid-template-columns:1fr auto auto auto;gap:10px;align-items:center;padding:10px 12px;background:var(--surface);border:1.5px solid var(--line);border-radius:6px}
.trow .nm{min-width:0}
.trow .nm span{display:block;font-weight:700}
.trow .nm i{display:block;height:5px;border-radius:3px;background:var(--line);margin-top:6px;overflow:hidden;font-style:normal}
.trow .nm i u{display:block;height:100%;background:var(--bole);text-decoration:none;transition:width .2s}
.tally button{font:inherit;font-weight:700;width:40px;height:40px;border-radius:50%;border:1.5px solid var(--cobalt);background:transparent;color:var(--cobalt);cursor:pointer}
.tally button.plus{background:var(--cobalt);color:var(--surface)}
.trow output{font-family:var(--f-display);font-size:28px;font-weight:700;min-width:1.6em;text-align:center;font-variant-numeric:tabular-nums}
.tsum{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;font-size:15px;color:var(--muted)}
.tsum strong{font-family:var(--f-display);font-size:24px;color:var(--ink)}
.confirm{display:flex;gap:10px;flex-wrap:wrap;align-items:center;font-size:15px}

.cardsec{margin-top:26px}
.cardsec h3{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--turq);margin:0 0 10px}
.fmt{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:440px;margin-bottom:14px}
.fmt button{position:relative;display:flex;align-items:center;gap:12px;min-width:0;padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.fmt button:hover{border-color:var(--bole)}
.fmt button[aria-pressed="true"]{border-color:var(--bole);box-shadow:inset 0 0 0 1.5px var(--bole);background:var(--cobalt-soft)}
.fmt button[aria-pressed="true"]::after{content:"✓";position:absolute;top:6px;right:10px;font-weight:700;font-size:14px;color:var(--bole)}
.fmt .shape{flex:none;border:2px solid var(--muted);border-radius:4px;background:var(--ground)}
.fmt .shape.feed{width:26px;height:32px}
.fmt .shape.story{width:20px;height:36px}
.fmt button[aria-pressed="true"] .shape{border-color:var(--bole);background:var(--surface)}
.fmt .ft{min-width:0}
.fmt .ft b{display:block;font-size:15.5px;line-height:1.2}
.fmt .ft small{display:block;font-size:12.5px;color:var(--muted);line-height:1.3;margin-top:2px}
.fmt button:focus-visible,#ig:focus-visible{outline:3px solid var(--bole);outline-offset:2px}
.igguide{margin-top:14px;padding:14px 16px;border:1.5px solid var(--bole);border-radius:8px;background:var(--surface);max-width:440px}
.igguide b{display:block;margin-bottom:6px;color:var(--bole)}
.igguide ol{margin:0 0 12px;padding-left:20px;display:grid;gap:6px;font-size:15px}
.cardsec img.story{max-width:300px}
.cardsec img{display:block;width:100%;max-width:440px;height:auto;border-radius:6px;border:1.5px solid var(--line);background:var(--surface);box-shadow:0 6px 24px rgba(20,33,61,.12)}
.cardsec p{font-size:14px;color:var(--muted);margin:10px 0 0;max-width:440px}
.share{max-width:440px;display:grid;gap:10px;margin-top:16px}
.btn-ig{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:15px 18px;font-size:17px;border-radius:10px}
.btn-ig svg{width:20px;height:20px}
.srow{display:flex;gap:8px}
.sbtn{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px 4px;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:13px;font-weight:700;text-decoration:none;cursor:pointer;transition:border-color .15s,background .15s}
.sbtn svg{width:22px;height:22px;color:var(--turq)}
.sbtn:hover{border-color:var(--bole);background:var(--cobalt-soft)}
.sbtn:focus-visible,.btn-ig:focus-visible,.again:focus-visible{outline:3px solid var(--bole);outline-offset:2px}
.sbtn span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.share .toast{margin:0;min-height:0}
.share .toast:empty{display:none}
.share .hint{margin:0;font-size:13.5px;color:var(--muted)}
.again{display:block;margin:22px auto 0}
.foot{margin-top:30px;font-size:13px;color:var(--muted);text-align:center}
@media (max-width:440px){.facts{grid-template-columns:1fr}.facts div+div{border-left:0;border-top:1px solid var(--line)}.route{font-size:10px}.guide img{width:57px;height:76px}.guide.big img{width:84px;height:112px}}
@media (prefers-reduced-motion:reduce){.loading img{animation:none}}

/* ---- motor 2.1: sonuç eşyası ---- */
.esya{display:flex;gap:14px;align-items:center;padding:14px 20px;border-bottom:1px solid var(--line)}
.esya svg{width:52px;height:52px;flex:none;color:var(--cobalt);border:1.5px solid var(--line);border-radius:50%;padding:7px;background:var(--ground)}
.esya div{min-width:0}
.esya span{display:block;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--turq);font-weight:700;margin-bottom:3px}
.esya b{font-family:var(--f-display);font-size:22px;line-height:1.2}

/* ---- motor 2.2: mühür, eşya çekmecesi, ebru murakka ---- */
.seal.muhur{width:132px;height:132px;margin:-6px auto 6px;transform:rotate(-8deg);opacity:.92}
.seal.muhur.bas{animation:muhurBas .6s cubic-bezier(.2,1.5,.35,1) .15s both}
@keyframes muhurBas{0%{opacity:0;transform:scale(1.9) rotate(-22deg)}55%{opacity:.95}100%{opacity:.92;transform:scale(1) rotate(-8deg)}}
.murakka{border-radius:6px;background:var(--line) center/cover no-repeat;transition:padding .3s}
.murakka.ebrulu{padding:14px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.murakka.ebrulu .berat{box-shadow:0 2px 10px rgba(0,0,0,.18)}
.cekmece{display:grid;grid-template-columns:repeat(4,56px);gap:10px;justify-content:center;margin:22px auto 0}
.ces{width:56px;height:56px;border-radius:50%;border:1.5px solid var(--line);background:var(--surface);color:var(--muted);display:grid;place-items:center;transition:transform .12s,background .12s,border-color .12s,color .12s}
.ces svg{width:34px;height:34px}
.ces.on{border-color:var(--bole);background:var(--cobalt-soft);color:var(--bole);transform:scale(1.12)}
.ces.kazanan{border-width:2.5px;color:var(--cobalt);border-color:var(--cobalt);animation:kazan .5s cubic-bezier(.2,1.6,.4,1)}
@keyframes kazan{0%{transform:scale(1.12)}40%{transform:scale(1.42)}100%{transform:scale(1.22)}}
.cekmece-ad{font-family:var(--f-display);font-weight:700;font-size:24px;color:var(--cobalt);min-height:1.4em;margin:14px 0 0;opacity:0;transition:opacity .3s}
.cekmece-ad.acik{opacity:1}
.loading p#loadtxt{margin-top:14px}
@media (max-width:440px){.cekmece{grid-template-columns:repeat(4,52px);gap:8px}.ces{width:52px;height:52px}.seal.muhur{width:116px;height:116px}}
@media (prefers-reduced-motion:reduce){.seal.muhur.bas,.ces.kazanan{animation:none}.ces{transition:none}}

/* ---- motor 2.3: tarihte ne oldu kartı ---- */
.olay{margin-top:4px;padding:18px 18px 16px;border:1.5px solid var(--bole);border-left-width:6px;border-radius:6px;background:var(--surface);animation:olayGel .35s ease-out both}
.olay b{display:block;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--bole);margin-bottom:6px}
.olay p{margin:0 0 14px;font-family:var(--f-display);font-size:20px;line-height:1.4}
@keyframes olayGel{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.olay{animation:none}}

/* ---- motor 2.4: çoklu seçim, defter ---- */
.sec-bilgi{margin:-8px 0 12px;font-size:14px;font-weight:700;color:var(--bole);letter-spacing:.02em}
.opt.coklu{align-items:center}
.opt.coklu .k{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:50%;border:1.5px solid var(--line);background:var(--ground);color:var(--muted)}
.opt.coklu .k svg{width:26px;height:26px}
.opt.coklu[aria-pressed="true"]{border-color:var(--bole);background:var(--cobalt-soft);box-shadow:inset 0 0 0 1.5px var(--bole)}
.opt.coklu[aria-pressed="true"] .k{border-color:var(--bole);color:var(--bole);background:var(--surface)}
.opt.coklu:disabled{opacity:.45;cursor:not-allowed}
.sec-ok{margin-top:14px;width:100%}
.sec-ok:disabled{opacity:.4;cursor:not-allowed}
.ces.alinan{border-color:var(--muted);border-style:dashed}
.sec.defter ol{list-style:none;margin:0;padding:0 0 0 18px;border-left:2px solid color-mix(in srgb,var(--bole) 45%,transparent);display:grid;gap:12px}
.sec.defter li b{display:block;font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--bole);font-weight:700}
.sec.defter li span{font-family:var(--f-display);font-style:italic;font-size:19px;line-height:1.4}
.opt.coklu>span:last-child{white-space:pre-line;line-height:1.35}
.opt.coklu>span:last-child::first-line{font-weight:700}

/* ---- motor 2.5: bulut — "senin gibi kaç kişi" satırı ---- */
.toplu{margin:14px 0 0;padding:12px 16px;border:1.5px dashed var(--line);border-radius:8px;background:var(--surface);font-size:15.5px;color:var(--ink);text-align:center}
/* motor 2.7: sonuçta bir kez oynayan Lottie katmanı */
#murakka{position:relative}
.lottie-kat{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
