/* Sebep ağacı — kanal paleti (kadro.js PALET): kiremit düğme, krem yazı, lacivert panel. Telefon önce; masaüstünde ortada dar sütun. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/font/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/font/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --kiremit: #c8553d; --kiremit-koyu: #9a3a2a; --lacivert: #2e3458; --gece: #0c1030; --krem: #f4e2a8; --yazi: #fbf4e4; --soluk: rgba(251,244,228,.72);
  --petrol: #2f7f8a; --murdum: #2a1a2c; --kagit: #f3ead3; --panel: rgba(24,28,62,.8); --cizgi: rgba(244,226,168,.22);
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif; --r: 20px; --gen: min(100vw, 460px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--gece); color: var(--yazi); font-family: var(--font); font-size: 17px; line-height: 1.45; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--krem); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

#tuval { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; -webkit-tap-highlight-color: transparent; }
#duragan { display: none; position: fixed; inset: 0; background: #0c1030 url(/duragan.jpg) center 70% / cover no-repeat; }
body.duragan #duragan { display: block; }

/* üst başlık */
#ust { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: var(--gen); padding: calc(14px + env(safe-area-inset-top)) 18px 10px; text-align: center; pointer-events: none; z-index: 5; }
#ust h1 { margin: 0; font-size: clamp(26px, 7.4vw, 34px); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; color: var(--yazi); text-shadow: 0 2px 16px rgba(5,7,25,.7), 0 1px 2px rgba(5,7,25,.6); }
#ust .alt { margin: 6px 0 0; font-size: 15px; color: var(--krem); text-shadow: 0 1px 8px rgba(5,7,25,.8); }
#ust .ust-dugmeler { pointer-events: auto; display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
body[data-ekran="giris"] #ust h1 { font-size: 18px; font-weight: 700; letter-spacing: .02em; color: var(--krem); }

/* alt panel */
#panel { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: var(--gen); max-height: 58vh; overflow-y: auto; padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--panel); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-radius: var(--r) var(--r) 0 0; border: 1px solid var(--cizgi); border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(5,7,25,.45); z-index: 6; }
#panel:empty { display: none; }
#panel h2 { margin: 2px 0 10px; font-size: 21px; font-weight: 750; color: var(--yazi); }
#panel h3 { margin: 16px 0 8px; font-size: 16px; color: var(--krem); font-weight: 700; }
label { display: block; font-weight: 700; margin: 10px 0 6px; color: var(--krem); }
.kucuk { font-size: 14px; color: var(--soluk); margin: 8px 0; }
.ortala { display: block; text-align: center; }
.bekle { text-align: center; padding: 18px 0; color: var(--krem); }
.durum { text-align: center; margin: 6px 0 12px; color: var(--krem); }
.giris, .ziyaretci { display: grid; gap: 10px; text-align: center; }
.sira { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; flex-wrap: wrap; }
.sira > .ana, .sira > .ikinci, .sira > .tehlike { flex: 1 1 auto; }

/* düğmeler: dokunma hedefi ≥ 44 px */
.ana, .ikinci, .tehlike, .dugmebag { min-height: 48px; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 16px; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ana { background: var(--kiremit); color: var(--yazi); box-shadow: 0 6px 18px rgba(154,58,42,.45), inset 0 -3px 0 rgba(0,0,0,.15); }
.ana:hover { background: #d4614a; }
.ana:active { transform: translateY(1px); }
.ikinci, .dugmebag { background: rgba(251,244,228,.08); color: var(--yazi); border: 1.5px solid var(--cizgi); }
.ikinci:hover { background: rgba(251,244,228,.14); }
.tehlike { background: transparent; color: #ff9d8a; border: 1.5px solid rgba(255,157,138,.5); width: 100%; margin-top: 8px; }
.buyuk { min-height: 58px; font-size: 18px; width: 100%; }
.kucuk.ikinci, .ikinci.kucuk, .ana.kucuk { min-height: 44px; padding: 8px 14px; font-size: 14.5px; }
button:disabled { opacity: .55; cursor: default; }
.bag { background: none; border: 0; color: var(--krem); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; padding: 10px 4px; display: inline-flex; align-items: center; font-weight: 600; }
.simge { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--cizgi); background: rgba(24,28,62,.6); color: var(--yazi); display: inline-grid; place-items: center; cursor: pointer; }
.story { min-height: 76px; }
.story > span { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.story b { font-size: 19px; } .story small { font-weight: 500; opacity: .88; font-size: 14px; }
.whatsapp { width: 100%; margin-top: 10px; background: #1f7a52; box-shadow: 0 6px 18px rgba(16,70,46,.45); }
.google { margin: 8px 0 4px; }

/* girdiler */
.metin { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--cizgi); background: rgba(10,12,38,.55); color: var(--yazi); font-size: 17px; }
.metin:focus { border-color: var(--krem); outline: none; }
.sira.baglanti { flex-wrap: nowrap; } .sira.baglanti > .metin { flex: 1 1 auto; min-width: 0; font-size: 14px; } .sira.baglanti > .ikinci { flex: 0 0 auto; }

/* ilerleme ve seçenekler */
.ilerleme { height: 6px; background: rgba(251,244,228,.12); border-radius: 6px; overflow: hidden; margin: 0 0 12px; }
.ilerleme i { display: block; height: 100%; background: linear-gradient(90deg, var(--kiremit), var(--krem)); border-radius: 6px; transition: width .35s; }
.secenekler { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.secenekler.dikey { grid-template-columns: 1fr; }
.secenek { min-height: 64px; text-align: left; padding: 11px 13px; border-radius: 16px; border: 1.5px solid var(--cizgi); background: rgba(10,12,38,.45); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.secenek b { font-size: 16px; } .secenek span { font-size: 13px; color: var(--soluk); line-height: 1.3; }
.secenek.secili { border-color: var(--krem); background: rgba(200,85,61,.28); box-shadow: inset 0 0 0 1px var(--krem); }
label.secenek { flex-direction: row; align-items: center; gap: 10px; min-height: 48px; margin: 0; color: var(--yazi); }
label.secenek input { width: 20px; height: 20px; accent-color: var(--kiremit); }
.sekmeler { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 4px 0 8px; scrollbar-width: none; }
.sekme { flex: 0 0 auto; min-height: 40px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--cizgi); background: transparent; cursor: pointer; font-size: 14px; font-weight: 650; }
.sekme.secili { background: var(--krem); color: var(--murdum); border-color: var(--krem); }

/* not kartı: el yazısı hissi = Bricolage italik + kâğıt dokusu (dış yazı tipi yok) */
.kart { background: var(--kagit) repeating-linear-gradient(transparent 0 33px, rgba(42,26,44,.07) 33px 34px); color: var(--murdum); border-radius: 16px; padding: 16px 18px; font-style: italic;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(42,26,44,.06); position: relative; }
.kart::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 80% at 10% 0%, rgba(255,255,255,.4), transparent 60%); }
.kart .sevgili { font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.kart .yazi, .kart p { font-size: 17px; line-height: 1.55; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.kart .kimden { text-align: right; font-weight: 650; margin-top: 10px; }
.kart.yazilir textarea { width: 100%; border: 0; background: transparent; resize: none; overflow: hidden; font-style: italic; font-size: 17px; line-height: 34px; color: var(--murdum); padding: 0; min-height: 136px; position: relative; z-index: 1; }
.kart.yazilir textarea:focus { outline: none; }
.kart.yazilir label { color: var(--kiremit-koyu); font-style: normal; }
.kart.yazilir .metin { background: rgba(255,255,255,.6); color: var(--murdum); border-color: rgba(42,26,44,.2); font-style: italic; position: relative; z-index: 1; }
.kart.yazilir .ikinci { color: var(--kiremit-koyu); border-color: rgba(154,58,42,.35); background: rgba(255,255,255,.5); font-style: normal; position: relative; z-index: 1; }
.kart .bilgi { color: rgba(42,26,44,.75); font-style: normal; font-size: 13.5px; position: relative; z-index: 1; }
.kart .sayac { font-style: normal; font-size: 13px; color: rgba(42,26,44,.65); }
.kart-alt { margin-top: 4px; position: relative; z-index: 1; }
.tebrikler { position: relative; z-index: 1; margin-top: 8px; font-style: normal; }
.tebrikler .sekme { border-color: rgba(42,26,44,.25); color: var(--murdum); }
.tebrikler .sekme.secili { background: var(--kiremit); color: var(--yazi); border-color: var(--kiremit); }
.tebrik-listesi { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow-y: auto; display: grid; gap: 6px; }
.tebrik-listesi button { width: 100%; text-align: left; border: 1px solid rgba(42,26,44,.15); background: rgba(255,255,255,.6); color: var(--murdum); border-radius: 12px; padding: 9px 11px; font-size: 14.5px; font-style: italic; cursor: pointer; min-height: 44px; }
.balkupu { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.desenler { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0; }
.desen { border: 2px solid transparent; background: rgba(10,12,38,.45); border-radius: 14px; padding: 4px; cursor: pointer; min-height: 56px; display: grid; place-items: center; }
.desen canvas { width: 100%; max-width: 44px; height: auto; }
.desen.secili { border-color: var(--krem); background: rgba(200,85,61,.3); }
.onizleme { display: flex; gap: 12px; align-items: flex-start; }
.onizleme .yum { flex: 0 0 auto; width: 34px; height: 44px; margin-top: 8px; }
.kucuk-kart { flex: 1; padding: 12px 14px; } .kucuk-kart p { font-size: 15px; line-height: 1.45; }
.kucuk-kart .kisa { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.onizleme + .kucuk + .hata + .ana { margin-top: 4px; }
.hata { color: #ffb4a3; min-height: 1.2em; margin: 6px 0 0; font-weight: 600; }

/* sahip */
.ust-sira { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.geri-sayim { text-align: center; padding: 10px 0 4px; } .geri-sayim small { display: block; color: var(--soluk); font-size: 14px; }
.geri-sayim b { display: block; font-size: 27px; font-weight: 800; color: var(--krem); letter-spacing: -.01em; }
.notlar { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notlar li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: rgba(10,12,38,.42); border: 1px solid var(--cizgi); }
.notlar li.gizli { opacity: .6; }
.notlar .bilgi { flex: 1; min-width: 0; } .notlar .bilgi b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notlar .bilgi small { color: var(--soluk); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notlar .eylem { display: flex; gap: 6px; } .notlar .eylem button { min-height: 40px; padding: 6px 11px; font-size: 13.5px; }
.yum { display: inline-block; width: 22px; height: 28px; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; background: radial-gradient(60% 50% at 35% 30%, rgba(255,255,255,.55), transparent 60%), var(--r); border: 2px solid var(--murdum); flex: 0 0 auto; }
.suzgec-kutu { margin-top: 14px; padding: 10px 12px; border-radius: 14px; border: 1px dashed rgba(255,180,163,.5); background: rgba(154,58,42,.12); }
.suzgec-kutu .sira { margin-top: 0; }
hr { border: 0; border-top: 1px solid var(--cizgi); margin: 16px 0 6px; }

/* pencere */
#pencere { position: fixed; inset: 0; z-index: 20; display: grid; place-items: end center; background: rgba(5,7,25,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#pencere .kutu { width: var(--gen); max-height: 90vh; overflow-y: auto; background: #1b2050; border: 1px solid var(--cizgi); border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.5); animation: yuksel .28s cubic-bezier(.2,.9,.3,1); }
#pencere h2 { margin: 0 0 8px; font-size: 22px; } #pencere h3 { color: var(--krem); margin: 16px 0 6px; font-size: 16px; }
#pencere .kutu > p { color: var(--soluk); }
#pencere .ana.buyuk, #pencere .story { width: 100%; margin-top: 8px; }
#pencere .ikinci:last-child { width: 100%; margin-top: 10px; }
#pencere .kutu > .ana, #pencere .kutu > .ikinci, #pencere .kutu > .tehlike { width: 100%; margin-top: 10px; }
#pencere .sira.baglanti > .ikinci { width: auto; margin-top: 0; }
.asildi { text-align: center; } .asildi h2 { font-size: 26px !important; }
@keyframes yuksel { from { transform: translateY(40px); opacity: 0; } }

/* sinematik giriş */
#sinema { position: fixed; inset: 0; z-index: 30; background: #05071a; display: grid; place-items: center; transition: opacity .7s ease; }
#sinema p { margin: 0 24px; font-size: clamp(26px, 7vw, 40px); font-weight: 750; text-align: center; color: var(--yazi); opacity: 0; transform: translateY(10px); transition: opacity 1.1s ease .2s, transform 1.4s ease .2s; letter-spacing: -.01em; }
#sinema.acil p { opacity: 1; transform: none; }
#sinema.bitti { opacity: 0; pointer-events: none; }
#sinema .atla { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--cizgi); background: transparent; color: var(--soluk); cursor: pointer; font-weight: 650; }

/* açılış kartları ve okuyucu */
#kartlar { position: fixed; inset: 0; z-index: 15; }
body.acilis #panel, body.acilis #ust .ust-dugmeler { opacity: 0; pointer-events: none; transition: opacity .4s; }
#kartlar.ucus { pointer-events: none; }
#kartlar:not(.ucus) { background: rgba(5,7,25,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); overflow-y: auto; }
.kart.uc { position: absolute; width: min(78vw, 340px); transform: translate(-50%,-50%); }
.deste { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 64px; height: 64px; border-radius: 16px; background: var(--kagit); color: var(--murdum); font-weight: 800; font-size: 24px; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.okuyucu { width: var(--gen); margin: 0 auto; min-height: 100%; padding: calc(18px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.okuyucu .kart.buyuk { min-height: 46vh; padding: 26px 22px; animation: yuksel .3s ease; }
.okuyucu .kart.buyuk .yazi { font-size: 20px; line-height: 1.6; }
.okuyucu .kart.buyuk small { position: absolute; left: 22px; bottom: 16px; color: rgba(42,26,44,.55); font-style: normal; }
.okuyucu .sayac { color: var(--krem); font-weight: 700; }
.not-listesi { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

/* bildirim */
#bildirim { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -160%); z-index: 40; max-width: min(92vw, 420px); background: var(--kagit); color: var(--murdum); padding: 11px 16px; border-radius: 14px; font-weight: 650; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .35s cubic-bezier(.2,.9,.3,1.2), visibility .35s; pointer-events: none; text-align: center; visibility: hidden; }
#bildirim.acik { transform: translate(-50%, 0); visibility: visible; }
.noscript { position: fixed; inset: auto 0 40% 0; text-align: center; }

@media (min-width: 760px) {
  #panel { bottom: 24px; border-radius: var(--r); border-bottom: 1px solid var(--cizgi); max-height: 70vh; }
  #pencere { place-items: center; } #pencere .kutu { border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body.gorsel #ust, body.gorsel #panel { display: none; }
