/* =========================================================
   A2: insancıl bulmacalar, görsel belgeler (kroki, portre).
   stil.css'ten SONRA yüklenir.
   ========================================================= */

/* ---------- bulmaca: Görev kutusu ---------- */
.bl-gorev { margin: 0 0 16px; padding: 12px 14px 12px 16px; background: #f8f0cf; border: 1px solid rgba(35, 32, 28, .22); border-left: 5px solid var(--stamp, #a3271f); box-shadow: 0 3px 8px -5px rgba(0, 0, 0, .4); }
.bl-gorev-ust { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.bl-gorev-ust b { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--stamp, #a3271f); }
.bl-sayac-chip { padding: 2px 10px; border: 1.5px solid var(--ink, #23201c); border-radius: 999px; background: #fffbe9; font-size: 12.5px; font-weight: 700; }
.bl-sayac-chip:empty { display: none; }
.bl-gorev-ne { margin: 0 0 6px; font-size: 15.5px; line-height: 1.5; font-weight: 700; }
.bl-gorev-nasil { margin: 6px 0 0; font-size: 12.8px; line-height: 1.55; color: var(--ink-soft, #5d574d); }
.bl-aranan { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 5px; }
.bl-aranan li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 14px; line-height: 1.4; }
.bl-kutu { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1.8px solid var(--ink, #23201c); background: #fffbe9; font-weight: 700; font-size: 14px; color: #2f5d3a; }
.bl-aranan li.tamam { color: #2f5d3a; }
.bl-aranan li.tamam .bl-kutu { border-color: #2f5d3a; background: #e1f0dc; }
.bl-nereden { margin: 8px 0 0; font-size: 12.8px; line-height: 2; }
.bl-nereden > span { color: var(--ink-soft, #5d574d); }
.bl-baglanti { margin: 0 2px; padding: 3px 9px; cursor: pointer; border: 1px solid rgba(35, 32, 28, .45); border-radius: 2px; background: #fffbe9; color: var(--ink, #23201c); font-family: var(--type); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.bl-baglanti:hover { background: #fff1b8; }
.bl-etiket { display: inline-block; margin-right: 6px; padding: 0 6px; border: 1px solid rgba(35, 32, 28, .4); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; vertical-align: 1px; color: var(--ink-soft, #5d574d); }
.bl-aciklama { font-size: 13.5px; color: #3a352d; }
.bl-durum { min-height: 1.6em; line-height: 1.5; }
.bl-durum.not { color: #2c3a66; }
.bl-dugmeler { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bl-dugmeler .bl-dugme { margin-top: 0; min-height: 42px; }
.bl-dugme { min-height: 42px; padding: 9px 18px; }
.bl-dugme.ikinci { background: #fffbe9; color: var(--ink, #23201c); }
.bl-dugme.ikinci:hover { background: #fff1b8; }
.bl-dugme[disabled] { opacity: .45; cursor: default; }
.bl-hak span { opacity: .8; }

/* ---------- şifre çarkı ---------- */
.bl-cark button { width: 44px; height: 44px; flex: none; }
.bl-alfabe { display: grid; gap: 3px; padding: 6px 4px; overflow: hidden; }
.bl-alfabe .bl-ust, .bl-alfabe .bl-alt { display: grid; grid-template-columns: repeat(29, minmax(0, 1fr)); text-align: center; font-size: clamp(9px, 2.4vw, 14px); line-height: 1.5; }
.bl-alfabe .bl-alt { color: var(--stamp, #a3271f); font-weight: 700; border-top: 1px dashed rgba(35, 32, 28, .25); padding-top: 2px; }
.bl-kaydirma { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; font-size: 13px; font-weight: 700; }
.bl-kaydirma label { white-space: nowrap; }
.bl-kaydirici { flex: 1; min-width: 0; height: 34px; accent-color: var(--stamp, #a3271f); }
.bl-satir input { min-height: 44px; }

/* ---------- sıralama ---------- */
.bl-uc { margin: 6px 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft, #5d574d); }
.bl-kart { cursor: pointer; position: relative; grid-template-columns: 26px minmax(0, 1fr) auto auto; transition: transform .12s, box-shadow .12s, background .12s; }
.bl-kart.secili { background: #fff1b8; outline: 2px solid var(--stamp, #a3271f); transform: translateX(4px); }
.bl-kart.yerinde { border-color: #2f5d3a; background: #eef6e8; }
.bl-yerinde { color: #2f5d3a; font-weight: 700; font-size: 18px; }
.bl-ok button { width: 44px; height: 40px; font-size: 14px; }

/* ---------- eşleştirme ---------- */
.bl-es-kol { min-width: 0; }
.bl-es-satir { display: flex; gap: 4px; margin-bottom: 6px; }
.bl-eslestir .bl-es-satir > button.bl-es-sol { flex: 1; margin-bottom: 0; min-width: 0; }
.bl-eslestir button.bl-es-sol, .bl-eslestir button.bl-es-sag { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 8px 10px; }
.bl-es-metin { flex: 1; min-width: 0; line-height: 1.4; }
.bl-eslestir button small { margin-top: 2px; }
.bl-rozet { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--rozet, #5d6b78); color: #fff; font-size: 12px; font-weight: 700; font-family: var(--ui); }
.bl-eslestir .bl-es-sol.bagli { border-left: 5px solid var(--rozet, #2c3a66); }
.bl-eslestir .bl-es-sag.bagli { background: #f2f6ee; }
.bl-eslestir button.bl-es-coz { width: 40px; flex: none; margin: 0 0 6px; padding: 0; text-align: center; font-size: 18px; display: block; }
.bl-eslestir .secili { outline: 2.5px solid var(--stamp, #a3271f); background: #fff1e6; }

/* ---------- işaretleme ---------- */
.bl-nokta.bulundu .bl-nokta-ic { stroke: #2f5d3a; }
.bl-soz { padding: 3px 1px; text-decoration: underline dotted rgba(35, 32, 28, .35); text-underline-offset: 3px; }
.bl-metin { line-height: 2.05; }
.bl-sol-foto { cursor: help; }
.bl-bulunanlar { list-style: none; padding-left: 0; }
.bl-bulunanlar li { margin: 4px 0; padding: 4px 8px; background: #e8f1e2; border-left: 3px solid #2f5d3a; }
.bl-foto { touch-action: none; }
.bl-plan svg { touch-action: manipulation; }

/* ---------- ızgara ---------- */
.bl-izgara td.v1 button { color: #77746c; background: #ece7da; }
.bl-izgara td.v2 button { color: #2f5d3a; background: #e1f0dc; }
.bl-izgara td button { width: 44px; height: 44px; }

/* ---------- tarama (karalama) ---------- */
.bl-tarama canvas { max-width: 100%; touch-action: none; }
.bl-ilerleme { height: 8px; margin: 10px 0 0; background: rgba(35, 32, 28, .16); border-radius: 4px; overflow: hidden; }
.bl-ilerleme i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #77746c, #2b2a27); transition: width .15s; }
.bl-tarama-bitti { margin: 6px 0 12px; }
.bl-gecis { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.bl-gecis .bl-dugme { margin-top: 0; }
.bl-tarama-bitti[data-gorunum="karali"] [data-gecis="karali"], .bl-tarama-bitti[data-gorunum="normal"] [data-gecis="normal"] { display: none; }
.bl-tarama-bitti[data-gorunum="karali"] .bl-sayfa-duz, .bl-tarama-bitti[data-gorunum="normal"] .bl-sayfa-karali { display: none; }
.bl-sayfa-normal { min-height: 220px; padding: 20px 28px 28px 44px; background: #f3efe2; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, rgba(110, 140, 180, .3) 33px, rgba(110, 140, 180, .3) 34px); background-position: 0 14px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); border-left: 2px solid rgba(170, 80, 70, .4); }
.bl-sayfa-normal p { margin: 0; line-height: 34px; font-size: 22px; color: #2a2824; }
.el-yazisi { font-family: var(--hand, "Kalam", cursive); }
.bl-cozum.el-yazisi p { font-size: 17px; }
.bl-sayfa img { display: block; width: 100%; height: auto; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); }

@media (max-width: 620px) {
  .bl-gorev-ne { font-size: 15px; }
  .bl-kart { grid-template-columns: 22px minmax(0, 1fr) auto auto; padding: 8px; }
  .bl-es-kol + .bl-es-kol { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .bl-kart, .bl-ilerleme i { transition: none; } }

/* =========================================================
   Olay yeri krokisi
   ========================================================= */
.gr-kroki { position: relative; }
.gr-kroki .gr-yer { margin-top: 2px; font-size: 13px; color: var(--ink-soft, #5d574d); }
.gr-sahne { margin: 6px 0 0; border: 1px solid rgba(35, 32, 28, .3); background: #f6f1e3; box-shadow: inset 0 0 40px rgba(120, 100, 60, .12); }
.gr-kroki-svg { display: block; width: 100%; height: auto; }
.gr-isaret { cursor: pointer; }
.gr-isaret:hover .gr-isaret-ic, .gr-isaret:focus .gr-isaret-ic { fill: #f3d9d2; }
.gr-isaret.secili .gr-isaret-ic { fill: #8f2a22; }
.gr-isaret.secili text { fill: #fff; }
.gr-isaret:focus-visible { outline: none; }
.gr-isaret:focus-visible .gr-isaret-ic { stroke-width: 4; }
.gr-ipucu { margin: 10px 0 8px; font-size: 13px; color: var(--ink-soft, #5d574d); }
.gr-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.gr-satir { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 10px; text-align: left; cursor: pointer; border: 1px solid rgba(35, 32, 28, .25); background: #fbf8ef; color: var(--ink, #23201c); font-family: var(--type); font-size: 13.5px; }
.gr-satir:hover { background: #fff1b8; }
.gr-satir.secili { background: #fff1b8; border-color: #8f2a22; }
.gr-no { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #8f2a22; color: #8f2a22; font-family: var(--ui); font-weight: 700; font-size: 13px; background: #fff8f0; }
.gr-satir.secili .gr-no { background: #8f2a22; color: #fff; }
.gr-detay { margin-top: 12px; padding: 12px 14px; background: #f8f0cf; border-left: 4px solid #8f2a22; min-height: 64px; font-size: 14.5px; line-height: 1.55; }
.gr-detay h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 15.5px; }
.gr-detay-bos { color: var(--ink-soft, #5d574d); font-size: 13.5px; }
.gr-belge-btn { margin-top: 10px; }
.gr-damga { position: absolute; right: 26px; top: 20px; padding: 2px 12px; border: 3px solid rgba(143, 42, 34, .65); border-radius: 3px; color: rgba(143, 42, 34, .75); font-weight: 700; font-size: 19px; letter-spacing: .14em; text-transform: uppercase; transform: rotate(6deg); pointer-events: none; font-family: var(--type); }

/* =========================================================
   Şüpheli vesikalığı (dönem tarzı)
   ========================================================= */
.paper.sorgu { position: relative; }
.gr-portre { position: absolute; top: 16px; right: 20px; width: 78px; margin: 0; z-index: 1; transform: rotate(2deg); }
.paper.sorgu:has(.gr-portre) .p-head { padding-right: 98px; min-height: 108px; }
.gr-p-svg { display: block; width: 100%; height: auto; }
.gr-portre figcaption { margin-top: 3px; font-size: 9.5px; line-height: 1.2; letter-spacing: .04em; text-align: center; color: var(--ink-soft, #5d574d); font-family: var(--type); }
/* ~1975 öncesi: siyah-beyaz, grenli, beyaz kenarlı baskı */
.gr-e-eski { padding: 5px 5px 4px; background: #f2f0ea; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); clip-path: polygon(0 1%, 3% 0, 97% 1%, 100% 0, 99% 97%, 100% 100%, 4% 99%, 0 100%); }
/* 1975–1995: sepya, soluk, yuvarlak köşeli kâğıt baskı */
.gr-e-orta { padding: 5px 5px 4px; background: #efe4c9; border-radius: 3px; box-shadow: 0 2px 5px rgba(60, 40, 10, .35); transform: rotate(-1.8deg); }
.gr-e-orta::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(135deg, rgba(255, 255, 255, .25), transparent 40%, rgba(120, 80, 20, .12)); pointer-events: none; }
/* 1995–2010: renkli vesikalık, parlak kâğıt */
.gr-e-yakin { padding: 3px 3px 2px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); border-radius: 1px; transform: rotate(1deg); }
/* 2010 sonrası: modern kimlik kartı fotoğrafı */
.gr-e-modern { padding: 0; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); border: 1px solid #c9d0d8; transform: none; }
.gr-e-modern figcaption { padding: 2px 0 3px; background: #eef1f4; color: #4a5565; font-family: var(--ui); }
.gr-e-eski figcaption, .gr-e-orta figcaption { font-style: italic; }
@media (max-width: 520px) {
  .gr-portre { width: 62px; right: 12px; top: 12px; }
  .paper.sorgu:has(.gr-portre) .p-head { padding-right: 78px; min-height: 90px; }
  .gr-liste { grid-template-columns: 1fr; }
  .gr-damga { font-size: 15px; right: 14px; }
}

/* G1: kroki iyileştirme */
.gr-sahne { background: #f3ecd8; border-color: rgba(70, 55, 30, .45); box-shadow: inset 0 0 30px rgba(120, 90, 40, .18), 0 1px 3px rgba(0, 0, 0, .2); }
.gr-isaret-g { transform-box: fill-box; }
.gr-isaret.secili .gr-isaret-g { transform: scale(1.12); }
.gr-damga { border-style: double; border-width: 4px; background: rgba(255, 248, 240, .35); }
.gr-kay { display: none; margin: 6px 0 0; font-size: 12px; color: var(--ink-soft, #5d574d); }
@media (max-width: 600px) {
  .gr-sahne { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .gr-kroki-svg { width: 680px; max-width: none; }
  .gr-kay { display: block; }
}
