:root {
  --bg: #EEF3FF;
  --bg2: #DDE7FF;
  --card: #FFFFFF;
  --ink: #1B2559;
  --muted: #5F6B94;
  --line: #D6DEF5;
  --brand: #3B5BFD;
  --brand2: #7B5BFF;
  --good: #22B35E;
  --bad: #F0445A;
  --warn: #FFB020;
  --blank: #F4F6FC;
  --stroke: #FFFFFF;
  --sea: #CFE3FF;
  --shadow: 0 10px 30px -12px rgba(27, 37, 89, .28);
  --radius: 20px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1633; --bg2: #18214A; --card: #1C2654; --ink: #EEF1FF; --muted: #A5AED6; --line: #2C3870;
    --blank: #2A3466; --stroke: #0F1633; --sea: #142050; --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1633; --bg2: #18214A; --card: #1C2654; --ink: #EEF1FF; --muted: #A5AED6; --line: #2C3870;
  --blank: #2A3466; --stroke: #0F1633; --sea: #142050; --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, var(--bg2), transparent 60%), var(--bg);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
.hidden { display: none !important; }
#app { height: 100dvh; position: relative; overflow: hidden; overflow: clip; }
#game { overflow: clip; }
.atlas-chips { position: relative; }

.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: flex; flex-direction: column; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- ana menü */
#home { overflow-y: auto; }
.home-inner {
  width: 100%; max-width: 980px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.brand { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.brand-logo {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 32px;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); box-shadow: var(--shadow);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-4px) rotate(-6deg); } }
.brand h1 { font-family: var(--display); font-size: clamp(28px, 6vw, 40px); line-height: 1; margin: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand2), #FF5C8A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.brand .icon-btn { margin-left: auto; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px;
  background: var(--card); box-shadow: var(--shadow); flex: none; transition: transform .15s;
}
.icon-btn:active { transform: scale(.92); }

.map-picker { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.map-tab { padding: 10px 16px; border-radius: 999px; background: var(--card); font-weight: 800; box-shadow: var(--shadow); display: flex; gap: 6px; align-items: center; }
.map-tab.active { background: var(--brand); color: #fff; }
.map-tab:disabled { opacity: .55; }
.map-tab small { font-size: 11px; background: var(--warn); color: #3a2600; padding: 1px 7px; border-radius: 999px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: 16px; padding: 12px 10px; box-shadow: var(--shadow); text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: clamp(16px, 4.2vw, 22px); }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; }

.section-title { font-family: var(--display); font-size: 20px; margin: 18px 0 10px; }
.section-title small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 600; }

.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.mode-card {
  display: flex; align-items: center; gap: 14px; padding: 14px; text-align: left; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); position: relative; transition: transform .15s, box-shadow .15s;
}
.mode-card:hover { transform: translateY(-2px); }
.mode-card:active { transform: scale(.97); }
.mode-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; flex: none;
  background: color-mix(in srgb, var(--mc) 20%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mc) 45%, transparent); }
.mode-text b { display: block; font-family: var(--display); font-size: 19px; line-height: 1.1; }
.mode-text small { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.mode-best { position: absolute; top: 10px; right: 12px; font-size: 12px; font-weight: 800; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 13px; border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; box-shadow: 0 2px 0 var(--line); display: inline-flex; align-items: center; gap: 6px; }
.chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chip.active { background: var(--ink); color: var(--card); }
.chips.small .chip { padding: 6px 11px; font-size: 13px; background: var(--bg); }
.chips.center { justify-content: center; }

.round-row, .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; font-weight: 800; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--card); padding: 4px; border-radius: 14px; box-shadow: var(--shadow); }
.seg button { padding: 8px 14px; border-radius: 10px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg button.active { background: var(--brand); color: #fff; }

.install-btn { width: 100%; margin-top: 22px; padding: 14px; border-radius: 16px; font-weight: 800; background: linear-gradient(90deg, var(--brand), var(--brand2)); color: #fff; box-shadow: var(--shadow); }
.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; }

/* ---------------------------------------------------------------- oyun ekranı */
#game { padding-top: env(safe-area-inset-top); }
.hud { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; }
.hud-title { font-family: var(--display); font-weight: 800; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.hud-stats { display: flex; gap: 6px; }
.pill { background: var(--card); padding: 7px 11px; border-radius: 999px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap; }
.pill.danger { background: var(--bad); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

.prompt { margin: 4px 12px 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 8px; min-height: 60px; }
.prompt-text { flex: 1; font-size: clamp(17px, 4.6vw, 24px); font-weight: 700; line-height: 1.2; min-width: 0; }
.prompt-text b { font-family: var(--display); font-size: 1.2em; color: var(--brand); }
.prompt-text small { color: var(--muted); font-size: .65em; font-weight: 700; }
.prompt-text.pop { animation: pop .35s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.85); opacity: .3; } }
.prompt-actions { display: flex; gap: 6px; flex: none; }
.small-btn { padding: 8px 11px; border-radius: 12px; background: var(--bg); font-weight: 800; font-size: 14px; white-space: nowrap; }
.small-btn:active { transform: scale(.94); }
.progress-bar { height: 6px; margin: 8px 20px 0; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--good), #9BE15D); border-radius: 99px; transition: width .4s ease; }

.plate { display: inline-block; font-family: var(--display); font-weight: 800; background: #fff; color: #10204a; border: 2px solid #10204a; border-left: 10px solid #1E4FD8; border-radius: 6px; padding: 0 8px; font-size: .8em; line-height: 1.35; vertical-align: middle; }
.plate.big { font-size: 1.1em; }

.map-wrap { flex: 1; position: relative; min-height: 0; margin: 6px 0 0; }
#map { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
#map.dragging { cursor: grabbing; }

.shape {
  fill: color-mix(in srgb, var(--c) 34%, var(--blank));
  stroke: var(--stroke); stroke-width: 1.1px; vector-effect: non-scaling-stroke; stroke-linejoin: round;
  transition: fill .35s, opacity .3s, filter .2s;
  cursor: pointer;
}
@media (hover: hover) { .shape:hover { filter: brightness(1.08) saturate(1.15); stroke-width: 2px; } }
.shape.found { fill: var(--c); }
[data-mode="explore"] .shape { fill: color-mix(in srgb, var(--c) 55%, var(--blank)); }
[data-mode="explore"] .shape.found { fill: var(--c); }
[data-level="hard"]:not([data-mode="explore"]) .shape:not(.found) { fill: color-mix(in srgb, var(--ink) 12%, var(--blank)); }
.shape.off { opacity: .22; pointer-events: none; }
.shape.selected { stroke: var(--ink); stroke-width: 3px; }
.shape.correct { animation: correct .9s ease; }
@keyframes correct { 0% { filter: brightness(1.6) drop-shadow(0 0 0 var(--good)); } 40% { filter: brightness(1.3) drop-shadow(0 0 8px var(--good)); stroke: var(--good); stroke-width: 4px; } }
.shape.wrong { fill: var(--bad) !important; animation: shake .45s ease; }
@keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.shape.peek { stroke: var(--brand); stroke-width: 3.5px; }
.shape.region-hint { stroke: var(--warn); stroke-width: 2.4px; }
.shape.hint, .shape.target { stroke: #FFD400; stroke-width: 4px; animation: glow 1s ease-in-out infinite; }
.shape.target:not(.found) { fill: #FFD400; }
.shape.center { fill: var(--ink); stroke: #FFD400; stroke-width: 3px; }
@keyframes glow { 50% { filter: drop-shadow(0 0 7px #FFD400) brightness(1.15); stroke-width: 6px; } }

.labels text {
  font-family: var(--display); font-weight: 800; fill: #10204a; text-anchor: middle; dominant-baseline: central;
  paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: calc(3px / var(--s, 1)); stroke-linejoin: round;
  pointer-events: none;
  font-size: calc(min(max(var(--lr) * .5, 10.5 / var(--s, 1)), 15 / var(--s, 1)) * 1px);
  opacity: clamp(0, calc((var(--lr) * var(--s, 1) - 6) / 4), 1);
}
[data-labels="code"] .labels text { font-size: calc(min(max(var(--lr) * .7, 11 / var(--s, 1)), 17 / var(--s, 1)) * 1px); opacity: clamp(0, calc((var(--lr) * var(--s, 1) - 4) / 3), 1); }

.zoom-ctl { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom-ctl button { width: 42px; height: 42px; border-radius: 13px; background: var(--card); box-shadow: var(--shadow); font-size: 20px; font-weight: 800; }
.zoom-ctl #zLabels { font-size: 15px; font-family: var(--display); }
.legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; max-width: calc(100% - 90px); font-size: 12px; font-weight: 700; color: var(--muted); pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

.tooltip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--ink); color: var(--card); padding: 5px 10px; border-radius: 10px; font-weight: 800; font-size: 14px; white-space: nowrap; }

.feedback {
  position: absolute; left: 50%; top: 10px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--card); padding: 10px 16px; border-radius: 16px; box-shadow: var(--shadow); font-weight: 700; font-size: 15px;
  width: max-content; max-width: calc(100% - 24px); text-align: center; transition: .25s cubic-bezier(.2, 1.4, .5, 1); z-index: 5;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
}
.feedback.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.feedback.good { border: 2px solid var(--good); }
.feedback.bad { border: 2px solid var(--bad); }
.feedback.info { border: 2px solid var(--brand); }
.feedback small { color: var(--muted); display: block; width: 100%; }
.feedback .fire { color: #FF6B00; }
.fb-info { background: var(--bg); padding: 4px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
.choice { padding: 16px 10px; border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--line), var(--shadow); font-family: var(--display); font-weight: 800; font-size: 19px; transition: transform .12s; }
.choice:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.choice.ok { background: var(--good); color: #fff; }
.choice.no { background: var(--bad); color: #fff; opacity: .7; }

/* ---------------------------------------------------------------- bilgi kartı */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 72%; overflow-y: auto; z-index: 10;
  background: var(--card); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px -10px rgba(10, 20, 60, .35);
  padding: 8px 18px max(20px, env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .38s cubic-bezier(.2, .9, .3, 1);
  overscroll-behavior: contain;
}
.sheet.open { transform: none; }
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; font-size: 16px; box-shadow: none; background: var(--bg); }
.info-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; margin-bottom: 14px; }
.info-head h3 { font-family: var(--display); font-size: 30px; margin: 0; line-height: 1; }
.info-head .plate { font-size: 22px; }
.info-head .small-btn { margin-left: auto; }
.chip.region { padding: 3px 10px; font-size: 13px; box-shadow: none; background: var(--bg); margin-top: 4px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.fact-tile { background: var(--bg); border-radius: 14px; padding: 10px 8px; text-align: center; }
.fact-tile span { font-size: 20px; }
.fact-tile b { display: block; font-family: var(--display); font-size: 17px; }
.fact-tile small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.info-row { margin: 10px 0; }
.info-row h4 { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.info-row p { margin: 0; font-weight: 600; line-height: 1.45; }
.did-you-know { background: color-mix(in srgb, var(--warn) 18%, transparent); border-radius: 14px; padding: 12px 14px; }
.did-you-know h4 { color: inherit; }
.primary-btn { padding: 13px 20px; border-radius: 14px; background: linear-gradient(90deg, var(--brand), var(--brand2)); color: #fff; font-weight: 800; box-shadow: var(--shadow); }
.primary-btn.wide { width: 100%; margin-top: 10px; }
.ghost-btn { padding: 13px 18px; border-radius: 14px; background: var(--bg); font-weight: 800; }

/* ---------------------------------------------------------------- modallar */
.modal { border: 0; padding: 0; border-radius: 26px; background: var(--card); color: var(--ink); width: min(440px, calc(100% - 32px)); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); max-height: calc(100dvh - 40px); }
.modal::backdrop { background: rgba(12, 20, 55, .55); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .35s cubic-bezier(.2, 1.3, .5, 1); }
@keyframes modalIn { from { transform: scale(.85); opacity: 0; } }
.modal-body { padding: 22px; text-align: center; }
.modal-body h2 { font-family: var(--display); margin: 4px 0 10px; font-size: 28px; }
#settings .modal-body { text-align: left; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 700; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle input { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: .2s; cursor: pointer; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle input:checked { background: var(--good); }
.toggle input:checked::after { left: 21px; }
.toggle input:disabled { opacity: .4; }
.hint-text { color: var(--muted); font-size: 13px; font-weight: 600; margin: 4px 0 0; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.modal-actions > * { flex: 1; }

.result-stars { font-size: 56px; letter-spacing: 6px; line-height: 1; }
.result-stars span { color: var(--line); display: inline-block; }
.result-stars span.on { color: #FFC21A; animation: starIn .6s var(--d) cubic-bezier(.2, 1.8, .5, 1) both; text-shadow: 0 4px 12px rgba(255, 170, 0, .5); }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.record { color: #E08A00; font-weight: 800; margin: 0 0 8px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.result-grid div { background: var(--bg); border-radius: 14px; padding: 10px; }
.result-grid b { display: block; font-family: var(--display); font-size: 22px; }
.result-grid small { color: var(--muted); font-weight: 700; font-size: 12px; }
.earned { font-weight: 800; color: #E08A00; }
#resultBody h4 { margin: 14px 0 8px; }

/* ---------------------------------------------------------------- konfeti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }

/* ---------------------------------------------------------------- geniş ekran düzeni */
@media (min-width: 960px) {
  /* Esnek dikey düzen: gizlenen satırlar (ilerleme çubuğu, seçenekler, atlas) haritanın yerini kaydırmaz */
  .hud, .prompt, .progress-bar, .choices { width: 100%; max-width: 1100px; margin-left: auto; margin-right: auto; }
  .prompt { width: calc(100% - 24px); }
  .sheet { left: auto; top: 12px; right: 12px; bottom: 12px; width: 380px; max-height: none; border-radius: 26px; transform: translateX(110%); }
  .sheet.open { transform: none; }
  .sheet-handle { display: none; }
  .choices { grid-template-columns: repeat(4, 1fr); padding-bottom: 20px; }
}
/* yatay telefon */
@media (max-height: 520px) and (orientation: landscape) {
  .hud { padding-top: 4px; padding-bottom: 2px; }
  .prompt { min-height: 46px; padding: 6px 8px 6px 14px; }
  .progress-bar { margin-top: 4px; }
  .choices { grid-template-columns: repeat(4, 1fr); padding-top: 6px; }
  .choice { padding: 10px 6px; font-size: 16px; }
  .sheet { left: auto; top: 8px; right: 8px; bottom: 8px; width: min(380px, 55%); max-height: none; border-radius: 22px; transform: translateX(110%); }
  .sheet.open { transform: none; }
}
@media (max-width: 420px) {
  .hud-title { font-size: 16px; }
  .pill { padding: 6px 9px; font-size: 13px; }
  .prompt-actions .small-btn { padding: 8px 9px; }
  #btnHint { font-size: 0; } #btnHint::before { content: '💡'; font-size: 14px; }
  .info-head h3 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 600px) {
  #regionChips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; }
  #regionChips::-webkit-scrollbar { display: none; }
  #regionChips .chip { flex: none; }
  .round-row { margin-top: 12px; }
}

/* ---------------------------------------------------------------- coğrafi katmanlar */
:root { --water: #3E9BF5; --water-fill: #7CC2FF; --peak: #8B5E3C; }
.layer { display: none; }
#map.show-mountain .layer-mountain, #map.show-lake .layer-lake,
#map.show-river .layer-river, #map.show-sea .layer-sea { display: inline; }
#map.layers-passive .layers { pointer-events: none; }
.feature { cursor: pointer; }

.lake-shape { fill: var(--water-fill); stroke: var(--water); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.river-line { fill: none; stroke: var(--water); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.river-hit { fill: none; stroke: transparent; stroke-width: 14px; vector-effect: non-scaling-stroke; }
.pin { transform: scale(calc(clamp(.5, var(--s, 1) * 1.3, 1) / var(--s, 1))); }
.pin-hit { fill: transparent; }
.peak-body { fill: var(--peak); stroke: #fff; stroke-width: 1.5px; stroke-linejoin: round; }
.peak-snow { fill: #fff; }
.strait-dot { fill: var(--water); stroke: #fff; stroke-width: 2px; }

.flabel {
  font-family: var(--display); font-weight: 800; fill: #0B4F9C; text-anchor: middle; dominant-baseline: central; pointer-events: none;
  paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-linejoin: round;
}
.lake .flabel, .river .flabel { font-size: calc(11px / var(--s, 1)); stroke-width: calc(3px / var(--s, 1)); }
.lake .flabel { opacity: clamp(0, calc((var(--lr) * var(--s, 1) - 16) / 6), 1); }
.river .flabel { font-style: italic; opacity: clamp(0, calc((var(--s, 1) - 1.3) * 3), 1); }
.pin .flabel { font-size: 11px; stroke-width: 3px; opacity: clamp(0, calc((var(--s, 1) * var(--lr) / 10 - .62) * 4), 1); }
.mountain .flabel { fill: #5A3A1E; }
.sea-label {
  font-family: var(--display); font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: 3px; fill: #2F78C8; opacity: .85;
  text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: var(--bg); stroke-width: 3px;
}
.strait .flabel { fill: #0B4F9C; opacity: clamp(0, calc((var(--s, 1) - .8) * 3), 1); }
#map.hide-flabels .flabel { display: none; }

/* seçili / sorulan özellik */
.feature.selected .lake-shape, .feature.target .lake-shape { fill: #FFD400; stroke: #E0A800; stroke-width: 2.5px; animation: glow 1s ease-in-out infinite; }
.feature.selected .river-line, .feature.target .river-line { stroke: #FFB800; stroke-width: 5px; animation: glowLine 1s ease-in-out infinite; }
.feature.selected .peak-body, .feature.target .peak-body { fill: #FFB800; }
.feature.selected .pin, .feature.target .pin { transform: scale(calc(1.5 / var(--s, 1))); }
.feature.target .pin-hit, .feature.selected .pin-hit { fill: rgba(255, 212, 0, .35); animation: pulse 1s infinite; }
.feature.target .flabel, .feature.selected .flabel { opacity: 1; }
@keyframes glowLine { 50% { stroke-width: 8px; filter: drop-shadow(0 0 5px #FFD400); } }
.feature.target .river-line { stroke-dasharray: none; }

.layer-menu {
  position: absolute; right: 64px; bottom: 12px; z-index: 6; background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
  padding: 12px 16px; min-width: 230px; animation: modalIn .2s ease;
}
.layer-menu b { font-family: var(--display); font-size: 17px; }
.layer-menu .toggle { padding: 8px 0; font-size: 14.5px; }
.layer-menu .toggle:last-of-type { border-bottom: 0; }
.layer-menu small { color: var(--muted); font-weight: 600; font-size: 12px; }

.feature-head .feature-icon { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--bg); flex: none; }
.info-grid + .info-grid { margin-top: -4px; }
[data-mode="nature"] .shape { fill: color-mix(in srgb, var(--c) 55%, var(--blank)); }
@media (max-height: 520px) and (orientation: landscape) { .zoom-ctl button { width: 36px; height: 36px; font-size: 17px; } }

/* ---------------------------------------------------------------- zenginlikler atlası */
[data-mode="atlas"] .shape, [data-mode="resources"] .shape { fill: color-mix(in srgb, var(--c) 30%, var(--blank)); }
.shape.painted { fill: var(--hl) !important; }
#map.atlas-focus .shape:not(.painted):not(.target):not(.hint) { opacity: .5; }
.marker { font-size: calc(17px / var(--s, 1)); text-anchor: middle; dominant-baseline: central; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }

.atlas { padding: 8px 12px max(10px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px -14px rgba(10,20,60,.35); }
.atlas-tabs, .atlas-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px; }
.atlas-tabs::-webkit-scrollbar, .atlas-chips::-webkit-scrollbar { display: none; }
.atlas-tabs button { flex: none; padding: 7px 12px; border-radius: 12px; font-weight: 800; font-size: 14px; color: var(--muted); background: var(--bg); }
.atlas-tabs button.active { background: var(--ink); color: var(--card); }
.atlas-chips .chip { flex: none; background: var(--bg); box-shadow: inset 0 0 0 2px transparent; }
.atlas-chips .chip.active { background: color-mix(in srgb, var(--cc) 22%, var(--card)); box-shadow: inset 0 0 0 2px var(--cc); color: var(--ink); }
.atlas-info { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; line-height: 1.4; min-height: 20px; }
.atlas-info p { margin: 0; flex: 1; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.atlas-info .small-btn { flex: none; }
.veg-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.veg-legend button { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; padding: 3px 0; }
.veg-legend i { width: 14px; height: 14px; border-radius: 4px; }

.eco .eco-line { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px dashed var(--line); }
.eco .eco-line:first-of-type { border-top: 0; }
.eco .eco-line > span { font-weight: 800; font-size: 13.5px; padding-top: 5px; }
.eco .eco-line p { margin: 4px 0 0; font-size: 14px; }
.eco .eco-line p.note, .note { grid-column: 2; color: var(--muted); font-size: 13px; font-weight: 600; margin: 4px 0 0; }
.notes { margin: 0; padding-left: 18px; font-weight: 600; line-height: 1.5; }
button.chip.region { cursor: pointer; }
@media (max-width: 420px) { .eco .eco-line { grid-template-columns: 1fr; gap: 4px; } .eco .eco-line p.note { grid-column: 1; } }
@media (min-width: 960px) { .atlas { width: 100%; max-width: 1100px; margin: 0 auto; border-radius: 22px 22px 0 0; } }
@media (max-height: 520px) and (orientation: landscape) { .atlas { gap: 5px; padding-top: 6px; } .atlas-info p { -webkit-line-clamp: 2; } }
#map.atlas-focus .layers { opacity: .45; }
