/* Loodos Street: renkler loodos.com (teal #1AB0BA, ink #0A0A0A, Red Hat ailesi) ve playground katalog token'larından. */
:root {
  --bg: #eef3f4;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, .86);
  --ink: #0a0a0a;
  --ink-2: #3a4648;
  --muted: #5f6b6e;
  --line: #e2e6e6;
  --line-2: #cfd6d6;
  --teal: #1ab0ba;
  --teal-ink: #0b7c83;
  --mint: #c4ebe1;
  --mint-2: #e6f6f1;
  --violet: #5446fc;
  --violet-tint: #eeedff;
  --amber: #a35f00;
  --amber-tint: #fff3df;
  --ok: #2e9e6a;
  --ok-tint: #e3f5ec;
  --f-display: "Red Hat Display", "Segoe UI", Helvetica, sans-serif;
  --f-body: "Red Hat Text", "Segoe UI", Helvetica, sans-serif;
  --f-mono: "Red Hat Mono", ui-monospace, Menlo, monospace;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 20px;
  --shadow: 0 1px 2px rgba(16, 40, 44, .06), 0 8px 24px rgba(16, 40, 44, .08);
  --shadow-lg: 0 2px 6px rgba(16, 40, 44, .06), 0 18px 48px rgba(16, 40, 44, .14);
  --gutter: 16px;
  --glass-border: rgba(255, 255, 255, .9);
  --panel: rgba(255, 255, 255, .94);
  --field: #f5f8f8;
  --chip: #f1f5f5;
  --hover: #f3f7f7;
  --pin-bg: #ffffff;
  --logo-filter: brightness(0);
  --on-ink: #ffffff;
  --ok-ink: #1d7a50;
  --violet-ink: #2e24b8;
  --violet-line: #d7d3ff;
  --violet-text: #2b2a4a;
  --mono-bg: #3a4648;
  --shot-bg: linear-gradient(160deg, var(--mint-2), #f3f6ff);
  color-scheme: light;
}
/* Gece: sahne lambaları yanarken arayüz de koyulaşır (js/main.js data-theme'i saate ya da seçime göre ayarlar). */
:root[data-theme="dark"] {
  --bg: #0c1419;
  --surface: #141e24;
  --glass: rgba(18, 28, 34, .84);
  --glass-border: rgba(255, 255, 255, .07);
  --panel: rgba(16, 25, 30, .95);
  --ink: #eef4f5;
  --ink-2: #b9c6c9;
  --muted: #8a9a9e;
  --line: #24343b;
  --line-2: #33464e;
  --teal-ink: #4fd0d8;
  --mint: #1d4a46;
  --mint-2: #12302f;
  --violet: #7b70ff;
  --violet-tint: #1f1d47;
  --violet-ink: #c2bdff;
  --violet-line: #35307a;
  --violet-text: #d6d3ff;
  --amber: #f2b134;
  --amber-tint: #3a2a0c;
  --ok: #3fc485;
  --ok-tint: #0f2e21;
  --ok-ink: #6fdca6;
  --field: #18242b;
  --chip: #1d2a31;
  --hover: #1b2930;
  --pin-bg: #141e24;
  --logo-filter: brightness(0) invert(1);
  --on-ink: #0a0a0a;
  --mono-bg: #4a5a5e;
  --shot-bg: linear-gradient(160deg, #12302f, #1a1f3d);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color .6s;
}
.topbar, .kpi, .panel, .journey, .mapctl, .menu, .results, .presenter, .pin-card, .dist-lbl { transition: background-color .6s, border-color .6s, color .6s; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
.ico, .icon-btn svg, .caret { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.app { position: fixed; inset: 0; }
.stage { position: absolute; inset: 0; z-index: 0; }
.stage canvas { display: block; outline: none; }
.stage.grabbing { cursor: grabbing; }
.stage.pointing canvas { cursor: pointer; }

/* ---------- Üst bar ---------- */
.topbar {
  position: absolute; top: 14px; left: var(--gutter); right: var(--gutter); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 10px 0 16px;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--glass-border); border-radius: var(--r-l); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; display: inline-block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font: 700 19px/1 var(--f-display); letter-spacing: -.02em; }
.brand-name b { font-weight: 500; color: var(--teal-ink); margin-left: 3px; }

.search { position: relative; flex: 1 1 320px; max-width: 460px; margin-left: 18px; display: flex; align-items: center; }
.search .ico { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 40px 0 38px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--field);
  font: 14px var(--f-body); color: var(--ink); outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--teal); background: var(--surface); box-shadow: 0 0 0 4px rgba(26, 176, 186, .14); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute; right: 10px; font: 500 11px var(--f-mono); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; background: var(--surface);
}
.results {
  position: absolute; top: 48px; left: 0; right: 0; max-height: 60vh; overflow: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-lg);
}
.results .grp { font: 600 11px var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.results button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 10px; text-align: left;
}
.results button:hover, .results button.on { background: var(--mint-2); }
.results small { color: var(--muted); display: block; font-size: 12px; }
.results .empty { padding: 14px 10px; color: var(--muted); }

.district { position: relative; margin-left: auto; }
.district-btn {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 6px; min-width: 250px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left;
}
.district-btn:hover { border-color: var(--line-2); }
.chip-sq {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--c, var(--ink)); color: #fff; font: 700 10px var(--f-display); letter-spacing: .02em;
}
.district-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.district-txt b { font: 600 13.5px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.district-txt small { color: var(--muted); font-size: 11.5px; }
.caret { width: 16px; height: 16px; color: var(--muted); }

.menu {
  position: absolute; top: 52px; right: 0; z-index: 30; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-lg);
}
.district-menu { width: 340px; max-height: 70vh; overflow: auto; }
.district-menu button {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 4px 12px; align-items: center;
  width: 100%; padding: 8px; border: 0; background: none; border-radius: 10px; text-align: left;
}
.district-menu button:hover, .district-menu button.on { background: var(--hover); }
.district-menu .chip-sq { grid-row: span 2; }
.district-menu b { font: 600 13.5px var(--f-display); }
.district-menu small { color: var(--muted); font-size: 11.5px; grid-column: 2; }
.district-menu .pct { font: 600 12px var(--f-display); color: var(--ink-2); }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; grid-column: 2 / 4; }
.bar i { display: block; height: 100%; background: var(--c, var(--teal)); border-radius: inherit; }

.live {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; flex: none;
  background: var(--ok-tint); color: var(--ok-ink); font: 600 12.5px var(--f-display);
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(46, 158, 106, .5); animation: ping 1.8s infinite; }
.live time { font: 500 12px var(--f-mono); }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(46, 158, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 158, 106, 0); } }

.icon-btn {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--teal-ink); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; border: 2px solid var(--surface); }
.bell-wrap { position: relative; }
.feed { width: 340px; max-height: 60vh; overflow: auto; }
.feed h4 { margin: 6px 8px 8px; font: 600 13px var(--f-display); }
.feed button { display: flex; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 10px; text-align: left; }
.feed button:hover { background: var(--hover); }
.feed .ev-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--mint-2); color: var(--teal-ink); display: grid; place-items: center; flex: none; font: 700 10px var(--f-display); }
.feed small { display: block; color: var(--muted); font-size: 11.5px; }
.feed .empty { padding: 10px 8px 12px; color: var(--muted); }

.me { display: flex; align-items: center; gap: 10px; padding-left: 6px; flex: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 700 12px var(--f-display); }
.me-txt { display: flex; flex-direction: column; line-height: 1.2; }
.me-txt b { font: 600 13px var(--f-display); }
.me-txt small { color: var(--muted); font-size: 11.5px; }

/* ---------- KPI kartları ---------- */
.kpis { position: absolute; top: 88px; left: var(--gutter); z-index: 10; display: flex; gap: 10px; pointer-events: none; }
.kpi {
  pointer-events: auto; min-width: 196px; display: flex; gap: 12px; align-items: center; padding: 12px 16px 12px 12px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--r-m); box-shadow: var(--shadow);
  animation: rise .35s ease both;
}
.kpi:nth-child(2) { animation-delay: .05s; }
.kpi:nth-child(3) { animation-delay: .1s; }
.kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--mint-2); color: var(--teal-ink); flex: none; }
.kpi-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi small { display: block; color: var(--muted); font-size: 12px; }
.kpi b { font: 700 22px/1.15 var(--f-display); letter-spacing: -.02em; }
.kpi em { font-style: normal; font: 600 11px var(--f-display); color: var(--ok); margin-left: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Sağ panel ---------- */
.panel {
  position: absolute; top: 88px; right: var(--gutter); bottom: 120px; z-index: 15; width: 400px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--r-l); box-shadow: var(--shadow-lg);
  animation: slide .3s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.p-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.p-logo {
  width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; padding: 7px;
  background: #fff; border: 1px solid var(--line);
}
.p-logo img { max-width: 100%; max-height: 100%; }
.p-logo.txt { background: var(--c); color: #fff; font: 800 15px var(--f-display); border: 0; }
.p-title { flex: 1; min-width: 0; }
.p-kicker { font: 600 10.5px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-title h2 { margin: 1px 0 0; font: 700 19px/1.2 var(--f-display); letter-spacing: -.01em; }
.p-title p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.p-actions { display: flex; gap: 6px; align-self: flex-start; }
.p-actions .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.p-actions .icon-btn svg { width: 15px; height: 15px; }
.p-body { overflow: auto; padding: 14px 16px 18px; flex: 1; scrollbar-width: thin; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font: 600 11.5px var(--f-display); background: var(--chip); color: var(--ink-2); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--teal)); }
.pill.ok { background: var(--ok-tint); color: var(--ok-ink); }
.pill.warn { background: var(--amber-tint); color: var(--amber); }
.pill.vio { background: var(--violet-tint); color: var(--violet); }

.tabs { display: flex; gap: 4px; padding: 4px; margin: 12px 0 2px; background: var(--chip); border-radius: 12px; }
.tabs button { flex: 1; height: 32px; border: 0; border-radius: 9px; background: none; font: 600 12.5px var(--f-display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.lead { margin: 12px 0 0; font: 500 14.5px/1.5 var(--f-display); color: var(--ink); }
.shot { margin: 14px 0 0; border-radius: var(--r-m); background: var(--shot-bg); overflow: hidden; aspect-ratio: 820 / 702; }
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.metric { padding: 10px 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); }
.metric b { display: block; font: 700 20px/1.1 var(--f-display); color: var(--teal-ink); letter-spacing: -.02em; }
.metric small { color: var(--muted); font-size: 11.5px; line-height: 1.3; display: block; margin-top: 3px; }

.sec { margin-top: 18px; }
.sec h3 { margin: 0 0 6px; font: 700 11px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sec p { margin: 0; color: var(--ink-2); }
.feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feat li { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.feat b { display: block; font: 600 13.5px var(--f-display); margin-bottom: 2px; }
.feat span { color: var(--ink-2); font-size: 13px; }
.tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech span { font: 500 12px var(--f-mono); padding: 3px 8px; border-radius: 7px; background: var(--chip); color: var(--ink-2); }
.prod { border-radius: 14px; padding: 12px; background: var(--violet-tint); border: 1px solid var(--violet-line); margin-bottom: 8px; }
.prod-h { display: flex; align-items: center; gap: 8px; font: 700 14px var(--f-display); color: var(--violet-ink); }
.mono { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--violet); color: #fff; font: 700 11px var(--f-display); flex: none; }
.prod ul { margin: 8px 0 0; padding-left: 18px; color: var(--violet-text); font-size: 13px; }
.prod .tech { margin-top: 8px; }
.prod .tech span { background: var(--surface); }
.custom { padding: 10px 12px; border-radius: 12px; background: var(--field); color: var(--ink-2); font-size: 13px; }
.cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--ink); color: var(--on-ink); text-decoration: none; font: 600 13px var(--f-display); border: 0; }
.cta:hover { background: var(--teal-ink); color: var(--on-ink); }
.cta.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); margin-left: 6px; }
.cta.ghost:hover { border-color: var(--teal); color: var(--teal-ink); }

/* Araç paneli */
.rows { display: grid; gap: 0; margin-top: 14px; border-top: 1px solid var(--line); }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font: 600 13px var(--f-display); text-align: right; }
.prog { margin-top: 14px; }
.prog-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.prog .bar { height: 6px; }
.prog .bar i { background: var(--ok); transition: width .3s linear; }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--mint); display: grid; gap: 10px; }
.tl li { position: relative; }
.tl li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--teal); }
.tl b { font: 700 13px var(--f-display); color: var(--teal-ink); margin-right: 6px; }
.prod-list { display: grid; gap: 6px; }
.prod-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.prod-list button:hover { border-color: var(--violet); }
.prod-list small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Harita kontrolleri ---------- */
.mapctl {
  position: absolute; right: calc(var(--gutter) + 416px); bottom: 236px; z-index: 12;
  display: flex; flex-direction: column; gap: 6px; padding: 6px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: var(--shadow);
  transition: right .3s ease, background-color .6s, border-color .6s;
}
.app:not(.has-panel) .mapctl { right: var(--gutter); }
.mapctl .sep { height: 1px; background: var(--line); margin: 0 4px; }
.mapctl .icon-btn { width: 34px; height: 34px; border-radius: 10px; }

/* ---------- Alt yolculuk barı ---------- */
.journey {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14px; z-index: 12;
  display: flex; align-items: center; gap: 18px; padding: 12px 16px;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--glass-border); border-radius: var(--r-l); box-shadow: var(--shadow);
}
.journey-head { width: 210px; flex: none; }
.journey-head b { display: block; font: 700 14px var(--f-display); }
.journey-head small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.journey-track { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; position: relative; min-width: 0; }
.journey-track::before { content: ""; position: absolute; left: 6%; right: 6%; top: 15px; height: 2px; background: var(--line-2); }
.stage-col { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.stage-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); font: 700 11px var(--f-mono); color: var(--muted); position: relative; z-index: 1; transition: all .2s; }
.stage-col.lit .stage-dot { border-color: var(--teal); color: #fff; background: var(--teal); box-shadow: 0 0 0 5px rgba(26, 176, 186, .18); }
.stage-name { font: 600 10.5px var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stage-prods { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.pchip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 3px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); font: 600 11.5px var(--f-display); white-space: nowrap; transition: all .15s;
}
.pchip .mono { width: 18px; height: 18px; border-radius: 6px; font-size: 9px; background: var(--mono-bg); }
.pchip sup { font: 600 9.5px var(--f-mono); color: var(--muted); }
.pchip:hover { border-color: var(--violet); }
.pchip.on, .pchip.used { border-color: var(--violet); background: var(--violet-tint); color: var(--violet-ink); }
.pchip.on .mono, .pchip.used .mono { background: var(--violet); }
.journey.focus .pchip:not(.used):not(.on) { opacity: .4; }

.hint { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 5; margin: 0; padding: 6px 12px; border-radius: 99px; background: rgba(10, 10, 10, .72); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.hint.gone { opacity: 0; }

/* ---------- 3D sahnedeki etiketler (CSS2D) ---------- */
.lbl { width: 0; height: 0; }
.pin {
  position: absolute; left: 0; bottom: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; border: 0; background: none; padding: 0; pointer-events: auto;
  transition: opacity .25s, transform .25s; --c: var(--teal);
}
.pin-card {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 5px; border-radius: 11px;
  background: var(--pin-bg); box-shadow: 0 2px 10px rgba(10, 30, 35, .16); border: 1px solid rgba(127, 127, 127, .08); white-space: nowrap;
}
.pin-logo { height: 24px; min-width: 24px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, var(--pin-bg)); }
.pin-logo img { height: 13px; width: auto; filter: var(--logo-filter); }
.pin-logo img.raw { filter: none; }
.pin-logo:has(img.raw) { background: #fff; }
.pin-logo.txt { background: var(--c); color: #fff; font: 800 11px var(--f-display); letter-spacing: -.01em; padding: 0 8px; }
.pin-logo.txt + .pin-name { display: none; }
.pin-name { font: 600 12px var(--f-display); color: var(--ink); }
.pin-name small { font: 500 10.5px var(--f-body); color: var(--muted); margin-left: 4px; }
.pin-stem { width: 2px; height: 16px; background: linear-gradient(var(--c), transparent); }
.pin:hover { transform: translateX(-50%) translateY(-3px); }
.pin:hover .pin-card, .pin.on .pin-card { box-shadow: 0 0 0 2px var(--c), 0 6px 18px rgba(10, 30, 35, .2); }
.pin.on { z-index: 2; }
.pin.dim { opacity: .28; }
.pin.glow .pin-card { box-shadow: 0 0 0 2px var(--violet), 0 6px 18px rgba(84, 70, 252, .35); }
.stage.far .pin-name { display: none; }
.stage.far .pin-card { padding-right: 5px; height: 30px; }
.stage.far .pin:hover .pin-name, .stage.far .pin.on .pin-name { display: inline; }

/* Hotfix ekibinin terminali */
.term {
  position: absolute; left: 0; bottom: 0; transform: translateX(-50%); width: 250px; pointer-events: none;
  padding: 22px 10px 8px; border-radius: 9px; background: rgba(10, 13, 17, .94); box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  font: 500 10.5px/1.5 var(--f-mono); color: #d7dee3;
  background-image: radial-gradient(circle at 12px 10px, #ff5f57 3.5px, transparent 4px), radial-gradient(circle at 24px 10px, #febc2e 3.5px, transparent 4px), radial-gradient(circle at 36px 10px, #28c840 3.5px, transparent 4px);
  background-repeat: no-repeat;
}
.term .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term .cmd { color: #7fdcff; }
.term .ok { color: #7dff9b; }
.term .add { color: #7dff9b; background: rgba(125, 255, 155, .08); }
.term .del { color: #ff8a8a; background: rgba(255, 138, 138, .08); }
.term .cur { display: inline-block; width: 6px; height: 11px; margin-left: 2px; vertical-align: -1px; background: #d7dee3; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stage.far .term { display: none; }

/* Çalışanların konuşma balonları */
.bubble {
  position: absolute; left: 0; bottom: 0; transform: translate(-50%, 4px); width: max-content; max-width: 200px; pointer-events: none;
  padding: 6px 10px; border-radius: 12px; background: var(--pin-bg); color: var(--ink); box-shadow: 0 3px 12px rgba(10, 30, 35, .2);
  font: 600 11px/1.35 var(--f-display); white-space: normal; opacity: 0; transition: opacity .3s, transform .3s;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--pin-bg); }
.bubble.show { opacity: 1; transform: translate(-50%, 0); }
.bubble.news { background: #fff4c2; color: #3a2a00; border: 1px solid #f2c94c; font-weight: 700; }
.bubble.news::after { border-top-color: #fff4c2; }
.stage.far .bubble { display: none; }

/* Sokakta yürüme */
.walk-btn {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 10px; flex: none;
  border: 0; border-radius: 11px; background: var(--teal); color: #fff; font: 700 13px var(--f-display);
}
.walk-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.walk-btn:hover { background: var(--teal-ink); }
.app.walking .walk-btn { background: var(--ink); color: var(--on-ink); }
.app.walking .hint, .app.flat .walk-btn { display: none; }
.me-tag.speaker { background: #0b1d2a; }
.bubble.talk { max-width: 240px; background: #0b1d2a; color: #fff; }
.bubble.talk::after { border-top-color: #0b1d2a; }
.me-tag { position: absolute; left: 0; bottom: 0; transform: translateX(-50%); white-space: nowrap; pointer-events: none; padding: 2px 9px; border-radius: 99px; background: var(--teal); color: #fff; font: 700 11px var(--f-display); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.walk-hud {
  position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 14; display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow); font: 600 12.5px var(--f-display); white-space: nowrap;
}
.walk-hud .cta { margin: 0; height: 32px; }
.walk-hud .me-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(26, 176, 186, .2); }
.app.has-panel .walk-hud { left: calc((100vw - 416px) / 2); }
.dpad { position: absolute; left: var(--gutter); bottom: 130px; z-index: 26; display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(2, 48px); gap: 6px; }
.dpad button { border: 1px solid var(--line); border-radius: 12px; background: var(--glass); color: var(--ink); font-size: 16px; touch-action: none; user-select: none; -webkit-user-select: none; }
.dpad [data-k="w"] { grid-column: 2; grid-row: 1; }
.dpad [data-k="a"] { grid-column: 1; grid-row: 2; }
.dpad [data-k="s"] { grid-column: 2; grid-row: 2; }
.dpad [data-k="d"] { grid-column: 3; grid-row: 2; }
.modal { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--gutter); background: rgba(8, 14, 18, .45); }
.modal-card { width: min(400px, 100%); padding: 22px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-card h2 { margin: 0 0 14px; font: 800 20px var(--f-display); }
.modal-card label { display: block; margin-bottom: 6px; color: var(--muted); font: 600 12.5px var(--f-display); }
.modal-card input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); font: 600 15px var(--f-body); outline: none; }
.modal-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(26, 176, 186, .14); }
.modal-card p { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
@media (max-width: 860px) {
  .walk-btn span { display: none; }
  .walk-btn { padding: 0 10px; }
  .walk-hud { bottom: auto; top: 74px; left: var(--gutter); right: var(--gutter); transform: none; white-space: normal; }
  .app.walking .kpis { display: none; }
}

/* "Bu dükkân sizin olabilir" seçimleri */
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: 600 12px var(--f-display); color: var(--ink-2); }
.choice button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--teal)); }
.choice button .mono { width: 20px; height: 20px; border-radius: 6px; font-size: 9px; background: var(--mono-bg); }
.choice button:hover { border-color: var(--teal); }
.choice button.on { border-color: var(--teal); background: var(--mint-2); color: var(--teal-ink); }
.choice button.on .mono { background: var(--violet); }

/* Vaka kupaları */
.trophy-tag {
  position: absolute; left: 0; bottom: 0; transform: translateX(-50%); pointer-events: auto; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border: 0; border-radius: 99px;
  background: linear-gradient(135deg, #f7d66b, #d4a72c); color: #3a2a00; font: 600 11px var(--f-display); box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.trophy-tag b { padding: 1px 7px; border-radius: 99px; background: #3a2a00; color: #ffe08a; font: 800 11px var(--f-display); }
.stage.far .trophy-tag { display: none; }

/* Mégane'ın plaka etiketi: gerçek TR plakası görünümünde */
.plate-tag {
  position: absolute; left: 0; bottom: 0; transform: translateX(-50%); pointer-events: auto; cursor: pointer;
  display: flex; align-items: stretch; height: 22px; padding: 0; border: 2px solid #111; border-radius: 4px;
  background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); overflow: hidden; white-space: nowrap;
}
.plate-tag .tr { display: grid; place-items: end center; width: 13px; padding-bottom: 1px; background: #1f4fbf; color: #fff; font: 700 7px var(--f-display); }
.plate-tag .no { display: grid; place-items: center; padding: 0 7px; color: #111; font: 800 13px/1 var(--f-display); letter-spacing: .06em; }
.plate-tag:hover { transform: translateX(-50%) translateY(-2px); }
.stage.far .plate-tag { display: none; }

.dist-lbl {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: auto;
  display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 7px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 2px 8px rgba(10, 30, 35, .1);
  font: 600 11.5px var(--f-display); color: var(--ink-2); cursor: pointer;
}
.dist-lbl i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.dist-lbl:hover { color: var(--ink); }

.veh-tag {
  position: absolute; left: 0; bottom: 0; transform: translateX(-50%); white-space: nowrap; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 99px; border: 0;
  background: #0a0a0a; color: #fff; font: 600 11px var(--f-display); box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  opacity: 0; transition: opacity .25s;
}
.veh-tag b { font: 600 10px var(--f-mono); padding: 1px 6px; border-radius: 99px; background: var(--teal); }
.veh-tag.unload b { background: #f2b134; color: var(--ink); }
.veh-tag .vt-p { font: 700 9px var(--f-display); width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: var(--violet); color: #fff; flex: none; }
.stage.near .veh-tag, .veh-tag.on, .veh-tag.glow { opacity: 1; }
.veh-tag.on { background: #0b7c83; }
.veh-tag.amb { opacity: 1; background: #e5484d; }
.veh-tag.amb b { background: #ffffff; color: #c62a2f; }
.veh-tag.amb.on { background: #b3261e; }
.veh-tag.glow { box-shadow: 0 0 0 2px #7b70ff, 0 4px 14px rgba(84, 70, 252, .45); }

/* ---------- Yükleniyor ---------- */
.loader { position: absolute; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); font: 600 14px var(--f-display); color: var(--ink-2); transition: opacity .5s; }
.loader .brand-mark { width: 44px; height: 44px; }
.spin { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(8deg); } }
.loader.done { opacity: 0; pointer-events: none; }

/* ---------- Dar ekranlar ---------- */
/* ---------- Dil, tema ve sunum ---------- */
.lang-btn { font: 700 12px var(--f-display); letter-spacing: .02em; }
.theme-wrap { position: relative; }
.icon-btn .i-moon, :root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }
.theme-menu { width: 270px; }
.theme-menu h4 { margin: 6px 8px 6px; font: 600 11px var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 10px; text-align: left; }
.theme-menu button:hover { background: var(--hover); }
.theme-menu button.on { background: var(--mint-2); }
.theme-menu .t-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--chip); color: var(--teal-ink); }
.theme-menu .t-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-menu b { display: block; font: 600 13px var(--f-display); }
.theme-menu small { display: block; color: var(--muted); font-size: 11.5px; }
.live.sim time { color: var(--violet-ink); }
.wx:empty { display: none; }
.wx svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-menu .sep-h { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.theme-menu { max-height: calc(100vh - 100px); overflow: auto; }

.sound-btn .mute, .sound-btn.muted .wave { display: none; }
.sound-btn.muted .mute { display: block; }
.pill.bug { background: #fde8e8; color: #b3261e; }
:root[data-theme="dark"] .pill.bug { background: #3a1416; color: #ff8a84; }
.pill.sev-P1 { background: #e5484d; color: #fff; }
.pill.sev-P2 { background: var(--amber-tint); color: var(--amber); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.steps span { display: flex; flex-direction: column; gap: 6px; font: 600 11px/1.25 var(--f-display); color: var(--muted); }
.steps i { height: 4px; border-radius: 4px; background: var(--line); }
.steps .done { color: var(--ink-2); }
.steps .done i { background: var(--ok); }
.steps .now { color: #e5484d; }
.steps .now i { background: #e5484d; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.labels-btn.on, .present-btn.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.presenter {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 14;
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 14px; min-width: 380px; max-width: calc(100vw - 2 * var(--gutter));
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: rise .3s ease both;
}
.app.has-panel .presenter { left: calc((100vw - 416px) / 2); }
.pr-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pr-badge { font: 700 10px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--teal); padding: 3px 7px; border-radius: 6px; }
.pr-info b { font: 600 13.5px var(--f-display); overflow: hidden; text-overflow: ellipsis; }
.pr-info small { font: 500 11.5px var(--f-mono); color: var(--muted); }
.pr-ctl { display: flex; gap: 4px; }
.pr-ctl .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.pr-ctl .icon-btn svg { width: 15px; height: 15px; }
#prToggle .i-play, .presenter.paused #prToggle .i-pause { display: none; }
.presenter.paused #prToggle .i-play { display: block; }
.pr-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.pr-bar i { display: block; height: 100%; width: 0; background: var(--teal); }
.app.presenting .hint { display: none; }

@media (max-width: 1180px) {
  .me-txt, .journey-head { display: none; }
  .district-btn { min-width: 0; }
  .district-txt small { display: none; }
}
@media (max-width: 860px) {
  :root { --gutter: 10px; }
  .topbar { top: 10px; height: 54px; gap: 8px; padding: 0 8px 0 10px; }
  .brand-name, .me, .live, .search kbd { display: none; }
  .search { margin-left: 0; flex: 1 1 auto; }
  .district-txt { display: none; }
  .district-btn { padding: 0 6px; gap: 4px; }
  .district-menu, .feed { width: min(340px, calc(100vw - 20px)); }
  .kpis { top: 74px; right: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .kpi { min-width: 160px; padding: 8px 12px 8px 8px; }
  .kpi b { font-size: 18px; }
  .panel { top: auto; left: var(--gutter); right: var(--gutter); bottom: 10px; width: auto; max-height: 62vh; z-index: 25; }
  .mapctl, .app:not(.has-panel) .mapctl { right: var(--gutter); bottom: 120px; }
  .journey { padding: 10px; }
  .journey-track { overflow-x: auto; grid-template-columns: repeat(8, minmax(84px, 1fr)); scrollbar-width: none; }
  .hint { display: none; }
  .presenter, .app.has-panel .presenter { left: var(--gutter); right: var(--gutter); transform: none; top: 74px; bottom: auto; min-width: 0; }
  .app.presenting .kpis { display: none; }
}
.pin-n { font: 600 10px var(--f-mono); color: var(--muted); margin-left: -2px; }

/* ---------- Liste görünümü (WebGL yoksa) ---------- */
.app.flat .mapctl, .app.flat .hint { display: none; }
.fallback { position: absolute; inset: 0; overflow: auto; padding: 160px var(--gutter) 140px; }
.app.has-panel .fallback { padding-right: calc(var(--gutter) + 420px); }
.fb-note { margin: 0 0 16px; color: var(--muted); }
.fallback section { margin-bottom: 22px; }
.fallback h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 13px var(--f-display); }
.fallback h3 i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.fb-grid button { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.fb-grid button:hover { border-color: var(--teal); }
.fb-grid .p-logo { width: 44px; height: 44px; border-radius: 12px; }
.fb-grid small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .fallback, .app.has-panel .fallback { padding: 150px var(--gutter) 130px; } }

/* Playground: telefonda düzen (≤ 860 px). Üst bar ekrana sığar, harita kontrolleri yolculuk şeridinin üstünde kalır,
   panel açıkken yürüme bilgisi ekrandan taşmaz, yürürken panel küçülür ve yön tuşları onun üstünde durur. */
@media (max-width: 860px) {
  .topbar { gap: 6px; padding: 0 6px 0 8px; }
  .topbar .icon-btn, .walk-btn { width: 34px; height: 34px; padding: 0; justify-content: center; flex: none; }
  .search { min-width: 0; }
  .search input { min-width: 0; width: 100%; }
  .mapctl, .app:not(.has-panel) .mapctl { bottom: 146px; }
  .app.has-panel .walk-hud { left: var(--gutter); }
  .app.walking .panel { max-height: 34vh; }
  .app.walking.has-panel .dpad { bottom: calc(34vh + 20px); }
}
@media (max-width: 860px) and (max-height: 720px) {
  .mapctl { gap: 3px; padding: 4px; }
  .mapctl .icon-btn { width: 30px; height: 30px; }
}
