:root{font-family:system-ui,sans-serif;color:#162e2a;background:#f4f6f3;--green:#0e4c41;--line:#dce5df;--muted:#4b625b}*{box-sizing:border-box}body{margin:0}header{min-height:77px;background:#102e29;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:12px clamp(15px,3vw,43px);gap:12px}header a{color:#ddede4;font-size:.9rem}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.3rem}.brand em{font:italic 1.35rem Georgia,serif;color:#e6c87b}.brand small{display:block;margin-top:4px;font-size:.65rem;letter-spacing:.16em;color:#b8d1c6}.brand-icon{background:#e6c87b;color:#102e29;border-radius:12px;padding:6px 10px;font-size:1.55rem}main{display:grid;grid-template-columns:minmax(325px,365px) 1fr;min-height:720px;height:calc(100dvh - 77px)}aside{background:white;padding:24px;overflow:auto;border-right:1px solid var(--line)}.eyebrow{font-weight:750;color:#3a6a5d;letter-spacing:.15em;font-size:.75rem}h1{font:600 2.1rem Georgia,serif;margin:8px 0}h2{font-size:1.05rem;margin:0 0 8px}p{color:var(--muted);line-height:1.45;margin:8px 0 14px}.pair,.filters{display:grid;grid-template-columns:1fr 1fr;gap:10px}label{display:grid;gap:5px;min-width:0;font-weight:650;font-size:.875rem}input,select,button{font:inherit}input:not([type=file]),select{width:100%;border:1px solid #becfc5;border-radius:8px;padding:9px;background:#fff;color:inherit}input[type=file]{max-width:100%;font-size:.875rem}button{cursor:pointer;border:1px solid var(--line);background:white;color:var(--green);border-radius:8px;padding:9px 12px;font-weight:700}.primary{background:var(--green);color:white;width:100%;margin:10px 0 13px;border:0}details{border-top:1px solid var(--line);padding:12px 0}summary{cursor:pointer;font-weight:700}.filters,.results{border-top:1px solid var(--line);padding-top:14px}.results{margin-top:16px}.results p,details p{font-size:.875rem}ul{margin:0;padding:0;list-style:none}li{border-top:1px solid var(--line);padding:8px 0}li button{text-align:left;width:100%;background:#f5f8f5}li small{display:block;color:var(--muted);margin-top:3px}a{color:var(--green)}#error{color:#982b2b}.canvas{position:relative;min-width:0}#map{height:100%;background:#dce9ed}.map-view-controls,.legend{position:absolute;z-index:500;background:#fff;box-shadow:0 2px 12px #102e292c}.map-view-controls{right:16px;top:16px}.legend{bottom:27px;right:16px;padding:9px 12px;border-radius:8px;display:grid;gap:6px;font-size:.8rem}.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px}.history{background:#a65914}.boundary{background:#008779}.geology{background:#7352a4}footer{padding:20px clamp(15px,3vw,43px)}footer nav{display:flex;gap:16px;flex-wrap:wrap}:focus-visible{outline:3px solid #b27826;outline-offset:2px}@media(max-width:720px){main{height:auto;display:flex;flex-direction:column}.canvas{order:-1;height:48vh;min-height:300px}aside{border:0;padding:18px}.legend{font-size:.72rem;right:9px}.map-view-controls{right:9px}}

#parcel-query{border-top:1px solid var(--line);padding-top:14px}#parcel-query label,#parcel-query .pair,summary~label{margin-top:8px}#parcel-source{font-size:.875rem;margin-top:0}

#locate{width:100%}#location-status:empty{display:none}.history-limit{display:flex;align-items:center;margin-top:12px}

.metals{background:#bf3038}

.other-metals{background:#3d607b}
.rare-stones{background:#6443aa}
.natural-cave{background:#376196}

.leaflet-popup-content small{display:block;margin-bottom:.5rem;color:var(--muted)}.leaflet-popup-content details{padding:.5rem 0}.leaflet-popup-content details p{margin:.4rem 0}

.history-area{background:#64539a}#historical-area-status:empty{display:none}

#civilization-legend{display:grid;gap:5px;max-height:24vh;overflow:auto}#civilization-legend:empty{display:none}.history-area-label{padding:0!important;white-space:normal!important}.history-area-label.leaflet-interactive{cursor:pointer}.history-area-label span{display:block;max-width:145px;padding:3px 7px;border-left:4px solid var(--civilization-color);line-height:1.2;color:#172723}.history-area-label strong,.history-area-label small{display:block}.history-area-label small{font-size:.72rem}

#coordinate-parcel{padding:.55rem 0}#coordinate-parcel p{margin:0 0 .45rem}#coordinate-parcel a{display:block;margin-top:.45rem}#coordinate-parcel-status:empty{display:none}

.exploration-controls{margin-top:.65rem}#exploration-status{color:#39554d;margin:.5rem 0 0}#exploration-status:empty{display:none}

#exploration-atlas{margin:.4rem 0 0}#exploration-atlas:empty{display:none}.ancient-road-label{color:#783f22;border-color:#b98c6d}.ancient-settlement-label{color:#533f25;font-weight:700}.ancient-road-label,.ancient-settlement-label{font-size:.76rem}

#exploration-atlas span{display:block}#exploration-atlas-choice:not([hidden]){margin-top:.5rem}#explore-all-periods:not([hidden]){margin-top:.45rem}
[hidden]{display:none!important}
#refresh-map{position:fixed;z-index:1200;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100% - 32px);min-height:44px;background:#f8e7b2;border-color:#b48635;box-shadow:0 3px 14px #102e2940;color:#102e29}

#exploration-atlas a{display:block;margin-bottom:.25rem}

.point-summary-record{display:block;width:100%;text-align:left;margin:0 0 .35rem;padding:.35rem .55rem}
.nearby-tracking{margin:0 0 .85rem}
.nearby-tracking button{width:100%;min-height:44px}
#scan-nearby-history{background:#e5f1e9;border-color:#bbd7c7}
#nearby-history-live{margin:.45rem 0 0;padding:.35rem .55rem;border-left:3px solid #36835f;color:#24573f}
.nearby-new{display:inline-block;margin-right:.4rem;padding:.1rem .35rem;border-radius:4px;background:#d9efe1;color:#184d36;font-size:.75em}

header nav{display:flex;gap:1rem;align-items:center}
.mobile-map-actions,.mobile-map-back{display:none}

#map-tile-status{position:absolute;top:55px;left:50%;transform:translateX(-50%);width:max-content;max-width:75%;z-index:500;background:#fff;color:#794317;border-radius:8px;padding:8px 12px;pointer-events:none;font-size:.85rem}

@media (pointer: coarse) {
  .location-summary-popup .leaflet-popup-content { font-size: .95rem; }
  .location-summary-popup summary, .location-summary-popup .point-summary-record { min-height: 44px; padding: .6rem .35rem; }
}

.history-record-popup .leaflet-popup-content,
.location-summary-popup .leaflet-popup-content {
  margin: 0;
  max-width: calc(100vw - 50px);
  max-height: min(15rem, 38vh);
  max-height: min(15rem, 38dvh);
  overflow-y: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.history-record-popup .leaflet-popup-content-wrapper,
.location-summary-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 15px;
  background: #fffdf8;
  overflow: hidden;
}

.history-record-popup .leaflet-popup-tip,
.location-summary-popup .leaflet-popup-tip { background: #fffdf8; }

.leaflet-container :is(.history-record-popup, .location-summary-popup) a.leaflet-popup-close-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  right: 6px;
  top: 6px;
  border-radius: 50%;
  background: #f0f3eb;
  color: #21483d;
}

.map-card {
  border-top: 4px solid #b48a43;
  padding: .8rem 1rem .65rem;
  color: #18382e;
  font: 500 .9rem/1.45 system-ui, sans-serif;
}

.map-card-title {
  display: block;
  padding-right: 2.2rem;
  margin-bottom: .6rem;
  color: #123c30;
  font: 700 1.28rem/1.16 Georgia, serif;
}

.history-card-facts {
  margin: 0;
  padding: .2rem .65rem;
  border-left: 2px solid #b48a43;
  border-radius: 0 8px 8px 0;
  background: #f2f3e9;
}

.history-card-facts > div { padding: .38rem 0; }
.history-card-facts > div + div { border-top: 1px solid #dde3d5; }
.history-card-facts dt {
  color: #435c4b;
  font-size: .72rem;
  font-weight: 700;
}
.history-card-facts dd { margin: 0; font-weight: 650; }

.map-card .map-card-intro { margin: .65rem 0; color: #435c4b; }
.history-card-highlight {
  margin: .65rem 0;
  padding: .6rem .7rem;
  background: #f7f1e3;
  border-left: 3px solid #9a6b2f;
  border-radius: 0 .45rem .45rem 0;
}
.history-card-highlight strong { color: #60471e; font-size: .78rem; }
.history-card-highlight p { margin: .25rem 0 0; color: #373327; }

.map-card button.map-card-action,
.leaflet-container .map-card a.map-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  min-height: 40px;
  margin-bottom: .55rem;
  padding: .35rem .65rem;
  border: 1px solid #1b5041;
  border-radius: 8px;
  background: #1b5041;
  color: #fff;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.map-card .map-card-action::after { content: '→'; font-size: 1.1rem; }
.map-card .map-card-action:hover { filter: brightness(1.12); }

.map-card details { border-color: #dbe4d8; padding: 0; }
.map-card details > summary { padding: .55rem 0; color: #21483d; }
.map-card details[open] { padding-bottom: .45rem; }
.map-card details p { margin: .15rem 0 .55rem; font-size: .875rem; }
.map-card details li { border-color: #e1e6dd; }
.map-card-sources a { display: inline-block; padding: .1rem 0; }
.map-card .point-summary-record { background: #f2f5ee; }

.location-card .location-card-coordinates {
  margin: -.2rem 0 .6rem;
  font-size: .79rem;
  font-variant-numeric: tabular-nums;
}

.location-card > .point-summary-record { margin-top: .45rem; }
.location-landform > .map-card > .map-card-title { display: none; }
.location-landform > .map-card { padding: .25rem 0 .35rem .55rem; border-left: 2px solid #91acc6; }

#history-area-dialog {
  width: min(26rem, calc(100% - 2rem));
  max-height: min(28rem, 70vh);
  max-height: min(28rem, 70dvh);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fffdf8;
  box-shadow: 0 14px 48px #0d28274d;
  color: inherit;
  overflow: hidden;
}
#history-area-dialog[open] {
  display: flex;
  flex-direction: column;
}
#history-area-dialog::backdrop { background: #102e2966; }
.history-area-card-heading {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .85rem .65rem 1rem;
  background: #163e34;
  color: #fffdf8;
}
.history-area-card-heading h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font: 700 1.2rem/1.2 Georgia, serif;
}
.history-area-card-heading button {
  min-height: 44px;
  background: #245447;
  border-color: #6c9182;
  color: #fff;
}
.history-area-card-heading button:hover { background: #2f6456; }
#history-area-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  overflow-wrap: anywhere;
}
#history-area-content .map-card-title { display: none; }
#history-area-content:focus-visible { outline-offset: -4px; }

@media (pointer: coarse) {
  .map-card details > summary,
  .map-card button.map-card-action,
  .leaflet-container .map-card a.map-card-action { min-height: 44px; }
}

#sources { padding: 0; }
#sources summary { padding: .75rem 0; }
#sources .source-groups { margin-left: 1rem; }
#sources .source-groups details { padding: 0; }
#sources li { border-top: 0; padding: .35rem 0 .35rem 1rem; }
#sources a { overflow-wrap: anywhere; }

.usage-counts{max-width:36rem;padding:12px 16px;margin-top:12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.usage-counts dl{display:flex;flex-wrap:wrap;gap:12px 36px;margin:0}
.usage-counts dt{font-size:.875rem;color:var(--muted)}
.usage-counts dd{margin:2px 0 0;color:var(--green);font-size:1.45rem;font-weight:750;font-variant-numeric:tabular-nums}
.usage-counts p{margin:8px 0 0}
.usage-counts p:empty{display:none}

.road-controls { margin-top: .65rem; }
.road-controls button + button { margin-top: .4rem; }
#road-status { color: #435c4b; margin: .4rem 0 0; }
#road-status:empty { display: none; }
.map-view-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 56px); background: none; box-shadow: none; }
.map-view-controls button { width: auto; background: #fff; box-shadow: 0 2px 12px #102e292c; }
#modern-basemap-toggle[aria-pressed="true"] { background: #e2eee7; border-color: #587565; }
#road-legends:not([hidden]) { display: flex; flex-wrap: wrap; gap: .25rem .7rem; }
.legend i.road-line { width: 14px; height: 0; border-radius: 0; background: none; border-top: 2px solid #4b625b; }
.legend i.road-line.roman { border-top-color: #963518; }
.legend i.road-line.medieval { border-top-color: #473599; }
.legend i.road-line.ottoman { border-top-color: #236253; }
.legend i.geography-line { width: 14px; height: 0; border-radius: 0; border-top: 3px dashed #2365a0; }
.legend .geography-point i.geography-line { width: 10px; height: 10px; border: 2px solid #1b4f81; border-radius: 50%; background: #76b6e3; }
.historical-geography .point-summary-record { margin: .5rem 0; }
#shoreline-control { margin-top: .6rem; }
#shoreline-control .pair { margin-top: .55rem; }
#shoreline-status { margin-bottom: 0; }
.shoreline-card-control { margin: .25rem 0 .75rem; }
#geography-legend-source { font-weight: 700; }
.legend i.road-line.estimated { border-top-style: dashed; }
.legend i.road-line.hypothetical { border-top-style: dotted; }

@media (max-width: 720px), (max-height: 540px) and (pointer: coarse) {
  :root {
    --phone-left: max(.75rem, env(safe-area-inset-left));
    --phone-right: max(.75rem, env(safe-area-inset-right));
    --map-nav-height: 3.5rem;
  }

  header {
    min-height: 68px;
    padding: calc(.7rem + env(safe-area-inset-top)) var(--phone-right) .7rem var(--phone-left);
  }
  .brand { flex-shrink: 0; gap: .5rem; font-size: 1.125rem; }
  .brand em { font-size: 1.125rem; }
  .brand-icon { padding: .25rem .45rem; }
  header nav { gap: .2rem .65rem; flex-wrap: wrap; justify-content: flex-end; }
  header nav a { display: inline-grid; place-items: center; min-height: 44px; text-align: center; }

  main { display: flex; flex-direction: column; min-height: 0; height: auto; }
  aside {
    border: 0;
    padding: 1.125rem var(--phone-right) 1.125rem var(--phone-left);
  }
  footer {
    padding-inline: var(--phone-left) var(--phone-right);
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
  button, input:not([type=file]):not([type=checkbox]), select { min-height: 44px; font-size: 1rem; }
  .history-limit { gap: .55rem; min-height: 44px; margin-top: .25rem; }
  .history-limit input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--green); }

  .canvas {
    order: -1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) var(--map-nav-height);
    height: clamp(19rem, 68vh, 38rem);
    height: clamp(19rem, 68dvh, 38rem);
    min-height: 0;
  }
  #map { min-height: 0; }
  .mobile-map-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    padding: .375rem var(--phone-right) .375rem var(--phone-left);
    border-top: 1px solid var(--line);
    background: #f4f6f3;
  }
  .mobile-map-actions a, .mobile-map-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .35rem .65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--green);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
  }
  .mobile-map-actions a:first-child { background: var(--green); border-color: var(--green); color: #fff; }
  .mobile-map-back { margin-bottom: .5rem; }

  .map-view-controls {
    top: .625rem;
    right: var(--phone-right);
    max-width: calc(100% - var(--phone-right) - var(--phone-left) - 3.25rem);
  }
  .map-view-controls button { font-size: .875rem; padding: .4rem .6rem; }
  .leaflet-left .leaflet-control { margin-left: var(--phone-left); }
  .leaflet-right .leaflet-control { margin-right: var(--phone-right); }
  .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
  .legend {
    right: var(--phone-right);
    bottom: calc(var(--map-nav-height) + 1.25rem);
    width: min(48%, 13rem);
    max-height: min(8rem, 26vh);
    max-height: min(8rem, 26dvh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: .45rem .55rem;
    gap: .25rem;
    font-size: .75rem;
    line-height: 1.25;
  }
  #civilization-legend { max-height: none; }
  .canvas:has(:is(.history-record-popup, .location-summary-popup)) :is(.map-view-controls, .legend, .leaflet-control-zoom) {
    visibility: hidden;
  }

  .leaflet-container :is(.history-record-popup, .location-summary-popup) .leaflet-popup-content {
    max-width: calc(100vw - var(--phone-left) - var(--phone-right) - 1.25rem);
    max-height: min(16rem, 40vh);
    max-height: min(16rem, 40dvh);
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
  .leaflet-container :is(.history-record-popup, .location-summary-popup) a.leaflet-popup-close-button {
    width: 44px;
    height: 44px;
  }
  .map-card, .map-card details p { font-size: .9375rem; }
  .map-card { padding: .7rem .8rem .8rem; }
  .map-card-title { padding-right: 2.75rem; }
  .map-card details > summary, .point-summary-record,
  .map-card-sources a { min-height: 44px; }
  .map-card-sources a { display: inline-flex; align-items: center; }
  .map-card :is(summary, button, a):focus-visible, .leaflet-popup-close-button:focus-visible {
    outline-offset: -3px;
  }

  #history-area-dialog[open] {
    position: fixed;
    inset: auto var(--phone-right) max(.5rem, env(safe-area-inset-bottom)) var(--phone-left);
    width: auto;
    max-width: none;
    max-height: min(30rem, 75vh);
    max-height: min(30rem, 75dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem));
    margin: 0;
  }
  #history-area-content {
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 420px) {
  header { flex-wrap: wrap; gap: .25rem; }
  header nav { width: 100%; justify-content: space-between; }
}

@media (max-height: 540px) and (orientation: landscape) and (pointer: coarse) {
  .canvas { height: clamp(14rem, 86dvh, 24rem); }
  .legend { max-height: 24dvh; }
  #history-area-dialog[open] { max-width: 38rem; margin-inline: auto; }
}
/* Sade panel: ana işlem üstte, diğer aramalar açılır bölümlerde. */
#locate{background:var(--green);color:#fff;border:0;padding:13px 12px;font-size:1.02rem}
#scan-nearby-history{width:100%;margin-top:8px}
.nearby-tracking{margin-bottom:6px}
.panel-more{border-top:1px solid var(--line);padding:0}
.panel-more>summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:13px 2px;min-height:44px;color:var(--green)}
.panel-more>summary::-webkit-details-marker{display:none}
.panel-more>summary::after{content:"+";font-size:1.25rem;font-weight:600;line-height:1}
.panel-more[open]>summary::after{content:"−"}
.panel-more[open]{padding-bottom:12px}
.panel-more #parcel-query,.panel-more .filters{border-top:0;padding-top:0}
#coordinates .panel-more{margin-top:12px}
header #usage-help{display:none}

/* ---- Modern görünüm (yalnızca stil; veri ve metinler değişmedi) ---- */
:root{--green:#0d5446;--green-2:#13715d;--gold:#e6c87b;--card:#fff;--shadow:0 6px 24px #0f2f2814,0 1px 3px #0f2f281a;--radius:14px;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,system-ui,sans-serif;background:#eef2ee}
header{background:linear-gradient(120deg,#0c2722 0%,#123a32 55%,#17463b 100%);box-shadow:0 2px 14px #0b221e40;position:relative;z-index:900}
header nav{display:flex;gap:6px}
header nav a{text-decoration:none;padding:7px 12px;border-radius:999px;background:#ffffff12;border:1px solid #ffffff1f;transition:background .15s}
header nav a:hover{background:#ffffff26}
.brand-icon{box-shadow:0 3px 10px #e6c87b40}
aside{background:linear-gradient(180deg,#fff 0%,#fbfcfa 100%)}
.intro h1{letter-spacing:-.01em}
button{border-radius:10px;transition:background .15s,box-shadow .15s,transform .08s}
button:active:not(:disabled){transform:scale(.98)}
button:disabled{opacity:.55;cursor:default}
input:not([type=file]),select{border-radius:10px;transition:border-color .15s,box-shadow .15s}
input:not([type=file]):focus,select:focus{outline:none;border-color:var(--green-2);box-shadow:0 0 0 3px #13715d26}
.primary,#locate{background:linear-gradient(135deg,var(--green) 0%,var(--green-2) 100%);box-shadow:0 4px 14px #0d544633}
.primary:hover:not(:disabled),#locate:hover:not(:disabled){box-shadow:0 6px 18px #0d544647}
#locate{border-radius:12px}
#scan-nearby-history{border-radius:12px}
.panel-more{border-top:0;margin-top:8px;background:#f5f8f5;border:1px solid #e3ebe5;border-radius:12px;padding:0 12px}
.panel-more[open]{background:#fff;box-shadow:var(--shadow)}
#coordinates .panel-more{margin-top:10px}
.results li button,.point-summary-record{border-radius:10px}
/* Harita üstü kontroller: yuvarlak, hafif buzlu cam */
.map-view-controls button,.map-locate,.legend,.leaflet-bar{backdrop-filter:saturate(1.4) blur(8px);-webkit-backdrop-filter:saturate(1.4) blur(8px)}
.map-view-controls button{background:#ffffffe6;border-radius:999px;box-shadow:var(--shadow)}
.leaflet-bar{border:0!important;border-radius:12px!important;box-shadow:var(--shadow)!important;overflow:hidden}
.leaflet-bar a{background:#ffffffe6!important}
.legend{background:#ffffffeb;border-radius:var(--radius);box-shadow:var(--shadow)}
.legend-toggle{justify-self:start;padding:3px 0;border:0;background:none;box-shadow:none;font-size:.8rem;color:var(--green)}
.legend-toggle::after{content:" ▾";font-size:.75em}
.legend.collapsed{padding:6px 12px;gap:0}
.legend.collapsed>:not(.legend-toggle){display:none!important}
.legend.collapsed .legend-toggle::after{content:" ▸"}
.map-locate{position:absolute;z-index:600;left:12px;bottom:34px;display:flex;align-items:center;gap:6px;padding:10px 14px;border:0;border-radius:999px;background:#ffffffeb;color:var(--green);box-shadow:var(--shadow);font-weight:700}
.map-locate span{font-size:1.15rem;line-height:1;color:#2367cf}
/* Buradasın işareti */
.you-are-here span{position:absolute;inset:3px;border-radius:50%;background:#2367cf;border:3px solid #fff;box-shadow:0 1px 6px #0003}
.you-are-here::before{content:"";position:absolute;inset:0;border-radius:50%;background:#2367cf55;animation:you-pulse 2s ease-out infinite}
@keyframes you-pulse{0%{transform:scale(.6);opacity:1}100%{transform:scale(2.6);opacity:0}}
@media (prefers-reduced-motion:reduce){.you-are-here::before{animation:none}button{transition:none}}
@media (max-width:720px){
  header nav a{padding:6px 10px;font-size:.82rem}
  .map-locate{left:var(--phone-left,9px);bottom:calc(var(--map-nav-height,0px) + 1.25rem);padding:9px 12px}
  .legend.collapsed{width:auto}
}
.canvas:has(:is(.history-record-popup,.location-summary-popup)) .map-locate{display:none}

/* ==== 2026-12 yeni tasarım: tam ekran harita · yüzen panel · altın vurgu ==== */
:root{--ink:#0b201c;--gold:#e9c46a;--gold-2:#f4d58d;--glass:#ffffffeb}
body{background:var(--ink)}
header{min-height:64px;padding-block:8px;background:linear-gradient(100deg,#08181500 0%,#0b201c 0%,#0f2e28 60%,#123a31 100%);border-bottom:1px solid #e9c46a33}
.brand-icon{background:linear-gradient(135deg,var(--gold-2),var(--gold));border-radius:14px}
header nav a{background:#e9c46a14;border-color:#e9c46a40;color:#f6ecd0}
header nav a:hover{background:#e9c46a2e}
/* Harita altlığı biraz sakin: işaretler öne çıkar */
.leaflet-tile-pane{filter:saturate(.72) contrast(1.04) brightness(1.02)}
/* Panel başı: koyu kahraman kartı */
.intro{margin:-6px -6px 14px;padding:20px 18px 18px;border-radius:20px;background:radial-gradient(120% 140% at 100% 0%,#1d5a4b 0%,#0f2e28 55%,#0b201c 100%);color:#f6f1e3;box-shadow:0 10px 30px #0b201c40;position:relative;overflow:hidden}
.intro::after{content:"◈";position:absolute;right:-8px;top:-22px;font-size:7.5rem;color:#e9c46a1f;line-height:1;pointer-events:none}
.intro .eyebrow{color:var(--gold)}
.intro h1{color:#fff;font-size:2.2rem;margin:6px 0 8px}
.intro p{color:#d6e4dd;margin:0}
/* Ana düğme altın */
#locate{background:linear-gradient(135deg,var(--gold-2) 0%,var(--gold) 100%);color:#16231f;font-size:1.08rem;padding:15px 12px;border-radius:14px;box-shadow:0 8px 22px #e9c46a55;letter-spacing:.01em}
#locate:hover:not(:disabled){box-shadow:0 10px 26px #e9c46a77}
#locate::before{content:"◎  "}
#scan-nearby-history{background:#0f2e28;color:#f6ecd0;border:1px solid #0f2e28;border-radius:14px;min-height:48px}
#scan-nearby-history::before{content:"⌁  "}
#location-status{padding:9px 12px;border-radius:12px;background:#eaf3ee;color:#1d4a3d;font-size:.88rem}
.panel-more{border-radius:14px}
.panel-more>summary{font-size:.98rem}
.results h2{font:600 1.35rem Georgia,serif;color:var(--ink)}
.results li{border:0;padding:4px 0}
.results li button{background:#fff;border:1px solid #e3ebe5;border-radius:14px;padding:11px 13px;box-shadow:0 2px 8px #0b201c0d}
.results li button:hover{border-color:#bcd6c8;box-shadow:0 6px 18px #0b201c1a}
.map-locate{background:var(--ink);color:#f6ecd0}
.map-locate span{color:var(--gold)}

/* Geniş ekran: harita tam ekran, panel üstünde yüzen kart */
@media (min-width:1100px){
  main{position:relative;display:block;height:calc(100dvh - 64px);min-height:620px}
  .canvas{position:absolute;inset:0}
  aside{position:absolute;z-index:800;top:18px;left:18px;bottom:18px;width:392px;padding:18px;border:0;border-radius:24px;background:var(--glass);backdrop-filter:saturate(1.5) blur(14px);-webkit-backdrop-filter:saturate(1.5) blur(14px);box-shadow:0 24px 60px #0b201c40,0 2px 6px #0b201c26}
  .canvas .leaflet-top.leaflet-left{left:420px}
  .canvas .leaflet-bottom.leaflet-left{left:420px}
  .map-locate{left:432px;bottom:40px}
  footer{background:#f3f6f3}
}

/* Telefon: büyük harita, panel alttan açılan sayfa */
@media (max-width:720px),(max-height:540px) and (pointer:coarse){
  :root{--map-nav-height:4.5rem}
  header{min-height:58px}
  .canvas{grid-template-rows:minmax(0,1fr);height:clamp(22rem,72vh,44rem);height:clamp(22rem,72dvh,44rem)}
  .mobile-map-actions{position:absolute;z-index:700;left:50%;bottom:calc(1.6rem + 6px);transform:translateX(-50%);width:min(19rem,calc(100% - 2*var(--phone-left)));padding:5px;gap:5px;border:0;border-radius:999px;background:#0b201ce6;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 10px 28px #0b201c55}
  .mobile-map-actions a{border:0;border-radius:999px;background:transparent;color:#f6ecd0;min-height:42px}
  .mobile-map-actions a:first-child{background:linear-gradient(135deg,var(--gold-2),var(--gold));color:#16231f}
  aside{position:relative;z-index:750;margin-top:-26px;border-radius:26px 26px 0 0;box-shadow:0 -10px 30px #0b201c26;padding-top:26px}
  aside::before{content:"";position:absolute;top:10px;left:50%;width:44px;height:5px;margin-left:-22px;border-radius:9px;background:#cfd9d3}
  .intro{margin:0 0 14px}
  .intro h1{font-size:1.9rem}
  .map-locate{bottom:calc(var(--map-nav-height) + 1.6rem)}
  .legend{bottom:calc(var(--map-nav-height) + 1.6rem)}
  .leaflet-bottom .leaflet-control-scale,.leaflet-bottom .leaflet-control-attribution{margin-bottom:26px}
  .canvas:has(:is(.history-record-popup,.location-summary-popup)) .mobile-map-actions{visibility:hidden}
}
.legend.collapsed{background:var(--ink);border-radius:999px;padding:4px 14px;width:auto!important;max-height:none!important;overflow:visible!important}
.legend.collapsed .legend-toggle{color:#f6ecd0}
/* Açık konum/tarih kartı sağ üstteki harita düğmelerinin altında kalmasın */
.canvas:has(:is(.history-record-popup,.location-summary-popup)) .map-view-controls{opacity:0;pointer-events:none;transition:opacity .15s}

/* Soldaki çerçeveli bölümler: her biri kendi rengiyle */
#coordinate-entry{--c:#2367cf}
#parcel-entry{--c:#e07a1f}
#more-options{--c:#7b4fc4}
#area-results{--c:#64539a}
#geography-results{--c:#1f7fbf}
#find-results{--c:#a65914}
#cave-results{--c:#2f8f6b}
#material-results{--c:#c2333b}
#road-results{--c:#963518}
.panel-more,#query-results>details{border:1px solid color-mix(in srgb,var(--c) 30%,#fff)!important;border-left:6px solid var(--c)!important;border-radius:14px;background:color-mix(in srgb,var(--c) 9%,#fff)!important;padding:0 12px;margin-top:10px}
.panel-more[open],#query-results>details[open]{background:color-mix(in srgb,var(--c) 5%,#fff)!important;box-shadow:0 6px 20px color-mix(in srgb,var(--c) 22%,transparent)}
.panel-more>summary,#query-results>details>summary{color:var(--c);font-weight:800}
.panel-more>summary::after{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--c);color:#fff;font-size:1.05rem}
#query-results>details>summary{padding:12px 2px}
#query-results>details li button{border-left:4px solid var(--c)}
#results li button{border-left:4px solid #d4a017}
#location-status{border-left:6px solid #13917a;background:#e3f5ef;color:#0f5e4f}
#parcel-entry .primary{background:linear-gradient(135deg,#f08c2e,#d96c14);box-shadow:0 4px 14px #e07a1f44}
#coordinate-entry .primary{background:linear-gradient(135deg,#3b82f6,#2367cf);box-shadow:0 4px 14px #2367cf44}
/* Haritadaki konum kartı bölümleri de renkli (sırayla dönen palet) */
.location-card>details:nth-of-type(6n+1){--c:#b7791f}
.location-card>details:nth-of-type(6n+2){--c:#963518}
.location-card>details:nth-of-type(6n+3){--c:#c2333b}
.location-card>details:nth-of-type(6n+4){--c:#2367cf}
.location-card>details:nth-of-type(6n+5){--c:#7b4fc4}
.location-card>details:nth-of-type(6n+6){--c:#2f8f6b}
.location-card>details{border:1px solid color-mix(in srgb,var(--c) 28%,#fff)!important;border-left:5px solid var(--c)!important;border-radius:12px;background:color-mix(in srgb,var(--c) 8%,#fff)!important;padding:0 10px!important;margin:6px 0}
.location-card>details>summary{color:var(--c)!important;font-weight:800}
.location-card>details .point-summary-record{border-left:3px solid var(--c)}

/* ---- Tarihî yol navigasyonu ---- */
#start-road-nav{width:100%;min-height:48px;margin-top:8px;border:0;border-radius:14px;color:#fff;font-weight:800;background:linear-gradient(135deg,#b4541f 0%,#963518 55%,#6e2410 100%);box-shadow:0 6px 18px #96351844}
#start-road-nav::before{content:"🧭  "}
#start-road-nav.active{background:linear-gradient(135deg,#c2333b,#8f1d24)}
#start-road-nav.active::before{content:"■  "}
.road-nav{position:absolute;z-index:820;top:12px;left:50%;transform:translateX(-50%);width:min(30rem,calc(100% - 24px));padding:12px 14px;border-radius:18px;background:#0b201cf2;color:#f6ecd0;box-shadow:0 14px 40px #0b201c66;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.road-nav-head{display:flex;align-items:center;gap:10px}
.road-nav-head>div{flex:1;min-width:0}
.road-nav-icon{font-size:1.6rem}
#road-nav-title{display:block;font-size:1.02rem;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#road-nav-meta{display:block;color:#e9c46a;font-size:.78rem;margin-top:2px}
#stop-road-nav{background:#ffffff1a;color:#fff;border:1px solid #ffffff33;border-radius:999px;padding:6px 14px}
.road-nav-bar{height:8px;margin:10px 0 6px;border-radius:9px;background:#ffffff22;overflow:hidden}
#road-nav-progress{display:block;height:100%;width:0;border-radius:9px;background:linear-gradient(90deg,#f4d58d,#e9c46a);transition:width .4s}
#road-nav-stats{margin:0;color:#f6ecd0;font-size:.86rem}
#road-nav-alert{margin:8px 0 0;padding:7px 10px;border-radius:10px;background:#13917a33;color:#c9f1e4;font-size:.86rem}
#road-nav-alert:empty{display:none}
.road-nav-warning{background:#5c1015f2;animation:nav-flash 1s ease-in-out 3}
.road-nav-warning #road-nav-alert{background:#ffffff26;color:#fff;font-weight:700}
@keyframes nav-flash{50%{box-shadow:0 0 0 6px #c2333b88,0 14px 40px #0b201c66}}
.canvas:has(.road-nav:not([hidden])) .map-view-controls{opacity:0;pointer-events:none}
@media (min-width:1100px){.road-nav{left:calc(50% + 205px)}}
@media (max-width:720px),(max-height:540px) and (pointer:coarse){.road-nav{top:8px;width:calc(100% - 16px)}}

/* ---- Sonuç bölümü düzeni ---- */
#query-results{--c:#0f2e28}
#status,#geoStatus{display:inline-flex;align-items:center;gap:6px;margin:6px 0;padding:8px 12px;border-radius:999px;background:#0f2e280f;border:1px solid #0f2e2822;color:#0f2e28;font-weight:700;font-size:.85rem}
#status::before{content:"🏛"}
#geoStatus::before{content:"⛏"}
#geoStatus:empty,#status:empty{display:none}
#results:empty{display:none}
#query-geology>details{--c:#8a5a2b;border:1px solid color-mix(in srgb,var(--c) 30%,#fff);border-left:6px solid var(--c);border-radius:14px;background:color-mix(in srgb,var(--c) 6%,#fff);padding:0 12px 10px;margin-top:10px}
#query-geology>details>summary{color:var(--c);font-weight:800;padding:12px 2px}
#query-geology>details>p{margin:6px 0;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid #eadfd3;color:#3d3128;font-size:.86rem}
#query-geology>details>p:nth-of-type(2){border-left:4px solid #8a5a2b;font-weight:700;color:#2b2119}
#query-geology details details{border:1px dashed #d8c8b6;border-radius:10px;padding:6px 10px;margin:6px 0;background:#fffaf4}
#query-geology a{display:inline-block;margin-top:6px;font-weight:700}
@media (max-width:720px),(max-height:540px) and (pointer:coarse){.canvas:has(.road-nav:not([hidden])) .leaflet-control-zoom{display:none}}
