/* Metro Mimarı — arayüz
   Yön: metro tabelası. Lacivert bant, sinyal sarısı vurgu, kâğıt beyazı paneller. */
/* v4.19: bayrak emojileri Windows'ta "TR", "ES" gibi harf olarak görünüyordu; yalnızca bayrak karakterleri için
   Twemoji bayrak yazı tipi (web/vendor/flags.woff2, MIT + CC-BY 4.0, country-flag-emoji-polyfill). */
@font-face { font-family: "LineoFlags"; src: url("../vendor/flags.woff2") format("woff2"); unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F; font-display: swap; }
:root {
  --ink: #14213d;
  --ink-2: #22315a;
  --ink-3: #3a4a75;
  --paper: #f6f3ec;
  --card: #ffffff;
  --rule: #ddd6c6;
  --signal: #f2b134;
  --text: #1c2233;
  --muted: #5a6074;
  --good: #1b8a4a;
  --warn: #c77a0a;
  --bad: #c8352e;
  --font: "LineoFlags", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-cond: "LineoFlags", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, "Segoe UI", system-ui, sans-serif;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --hud-h: 54px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--text); font: 14px/1.4 var(--font); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
[role="button"]:focus-visible, #pBody:focus-visible, a:focus-visible, select:focus-visible, .city:focus-visible, .bud:focus-visible, .gt:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.hidden { display: none !important; }
#app { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; }
#basemap { position: absolute; inset: 0; background: #efefeb; }
#basemap .maplibregl-ctrl-attrib { font-size: 10px; }
#mapBg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; background: transparent; }

/* ------------------------------------------------------------- üst bar */
#hud {
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--hud-h) + var(--safe-t));
  padding: var(--safe-t) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l));
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #1a2a4c, var(--ink)); color: #fff; border-bottom: 3px solid var(--signal); z-index: 20;
  box-shadow: 0 2px 10px rgba(10,16,32,.35);
}
.hgrp { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hleft { flex: 0 1 auto; }
.hbtn { width: 38px; height: 38px; border-radius: 9px; font-size: 20px; flex: none; }
.hbtn:hover { background: var(--ink-2); }
.hcity { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; flex: 0 1 auto; }
.hcity b { font: 700 17px/1.05 var(--font-cond); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcity span { font-size: 11.5px; color: #b9c2dc; white-space: nowrap; font-variant-numeric: tabular-nums; }
.speed { display: flex; background: var(--ink-2); border-radius: 9px; padding: 2px; flex: none; }
.speed button { min-width: 34px; height: 32px; border-radius: 7px; font-size: 11px; letter-spacing: -2px; color: #c9d0e6; }
.speed button.on { background: var(--signal); color: var(--ink); }
.hstats { gap: 5px; flex: none; }
.pill { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 40px; padding: 0 11px; border-radius: 9px; background: var(--ink-2); line-height: 1.1; border: 1px solid transparent; }
.pill:hover, .pill.on { border-color: var(--signal); }
.pill i { font: 600 9.5px var(--font-cond); letter-spacing: .08em; color: #9ea9c8; font-style: normal; }
.pill b { font: 700 16px var(--font-cond); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill.neg b { color: #ff8d86; }
.pill.good b { color: #8fe0ad; }
.hnav { flex: 1; justify-content: center; gap: 3px; }
.hnav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 44px; min-width: 62px; padding: 0 8px; border-radius: 9px;
  font: 700 10.5px/1 var(--font-cond); letter-spacing: .06em; text-transform: uppercase; color: #dfe4f2; white-space: nowrap;
}
.hnav button:hover { background: var(--ink-2); }
.hnav button.on { background: var(--signal); color: var(--ink); }
.ni { font-size: 17px; line-height: 1; font-family: var(--font); letter-spacing: 0; }
.caret { position: absolute; right: 4px; top: 5px; font-size: 9px; opacity: .8; }
.badge { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 11px/18px var(--font); font-style: normal; letter-spacing: 0; border: 2px solid var(--ink); }
.planbtn { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 9px; border: 2px solid #56648c; font: 700 13px var(--font-cond); letter-spacing: .1em; color: #c9d0e6; flex: none; }
.planbtn .pdot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
.planbtn.on { border-color: var(--signal); color: var(--signal); }
.planbtn.on .pdot { background: var(--signal); }

/* ------------------------------------------------------------- araç rayı */
#tools {
  position: absolute; left: calc(8px + var(--safe-l)); top: calc(var(--hud-h) + var(--safe-t) + 12px);
  display: flex; flex-direction: column; gap: 6px; z-index: 15;
}
#tools button {
  width: 62px; height: 54px; border-radius: 10px; background: var(--card); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 1px 0 var(--rule), 0 2px 8px rgba(20,33,61,.18);
}
#tools button.on { background: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--signal), 0 2px 8px rgba(20,33,61,.3); }
.ti { font-size: 18px; line-height: 1; height: 20px; display: flex; align-items: center; justify-content: center; }
.tl { font: 600 11px var(--font-cond); letter-spacing: .04em; text-transform: uppercase; }
.ti-line { width: 26px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #e2312f 0 50%, #1f6fd1 50%); margin: 7px 0; }
.ti-st { width: 16px; height: 16px; border-radius: 50%; border: 3px solid currentColor; background: #fff; margin: 2px 0; }
#tools button.on .ti-st { background: var(--ink); }
.ti-dp { font: 800 13px var(--font-cond); width: 26px; height: 18px; border-radius: 4px; background: #3a4560; color: #fff; }

/* ------------------------------------------------------------- lejant (haritanın sağ altında) */
#legend {
  position: absolute; right: calc(10px + var(--safe-r)); bottom: calc(10px + var(--safe-b)); z-index: 14;
  background: rgba(255,255,255,.95); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; width: 170px;
  box-shadow: 0 2px 8px rgba(20,33,61,.18);
}
.lg .bar { height: 9px; border-radius: 5px; margin: 4px 0 2px; }
.lg .ends { display: flex; justify-content: space-between; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg .li { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.lg .sw { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; background: #fff; flex: none; }

/* görünüm penceresi */
.vgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.vbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; border-radius: 10px; background: var(--card); border: 2px solid #ebe5d8; text-align: left; }
.vbtn b { font: 700 14px var(--font-cond); letter-spacing: .03em; text-transform: uppercase; }
.vbtn small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.vbtn.on { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--signal); }
.seg3 { display: flex; background: #ebe6da; border-radius: 10px; padding: 3px; gap: 3px; }
.seg3 button { flex: 1; height: 34px; border-radius: 8px; font: 700 12.5px var(--font-cond); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.seg3 button.on { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------- araç bağlam çubuğu */
#ctx {
  position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--hud-h) + var(--safe-t) + 10px);
  z-index: 16; background: var(--card); border-radius: 12px; padding: 8px 10px; max-width: min(640px, calc(100vw - 190px));
  box-shadow: 0 4px 16px rgba(20,33,61,.25); display: flex; flex-direction: column; gap: 6px;
}
#ctx .hint { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
#ctx .hint b { color: var(--text); }
#ctx .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border-radius: 8px;
  background: #f1eee6; font: 700 13px var(--font-cond); letter-spacing: .03em; border: 2px solid transparent;
}
.chip.on { border-color: var(--ink); background: #fff; }
.roundel-s { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 6px; color: #fff; font: 800 12.5px var(--font-cond); letter-spacing: .02em; }

/* ------------------------------------------------------------- düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px;
  background: #ece8de; color: var(--ink); font: 700 13px var(--font-cond); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.btn:hover { background: #e2ddd0; }
.btn.pri { background: var(--ink); color: #fff; }
.btn.pri:hover { background: var(--ink-2); }
.btn.sig { background: var(--signal); color: var(--ink); }
.btn.dng { background: #fbe3e1; color: var(--bad); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .amt { font-variant-numeric: tabular-nums; opacity: .85; text-transform: none; }
.step { display: inline-flex; align-items: center; background: #f1eee6; border-radius: 8px; }
.step button { width: 32px; height: 30px; font: 700 17px var(--font); color: var(--ink); }
.step span { min-width: 30px; text-align: center; font: 700 15px var(--font-cond); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- açılır pencere (üst bardan veya haritadan) */
#panel {
  position: absolute; top: calc(var(--hud-h) + var(--safe-t) + 12px); right: calc(10px + var(--safe-r));
  width: min(400px, calc(100vw - 20px)); max-height: calc(100% - var(--hud-h) - var(--safe-t) - 22px - var(--safe-b));
  z-index: 22; background: var(--paper); border-radius: 14px; display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(10,16,32,.42), 0 0 0 1px rgba(20,33,61,.08); animation: pop .16s ease-out;
}
#panel.wide { width: min(460px, calc(100vw - 20px)); }
#panel .caretp { position: absolute; top: -7px; width: 14px; height: 14px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; display: none; }
#panel.anchored .caretp { display: block; }
#panel > .phead { border-radius: 14px 14px 0 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.phead { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; background: var(--ink); color: #fff; border-bottom: 3px solid var(--signal); }
.phead h2 { margin: 0; flex: 1; font: 700 17px/1.15 var(--font-cond); letter-spacing: .03em; text-transform: uppercase; min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
#pClose { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; flex: none; }
#pClose:hover { background: var(--ink-2); }
#pBody { overflow-y: auto; min-height: 0; border-radius: 0 0 14px 14px; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.sec { display: flex; flex-direction: column; gap: 7px; }
.sec > h3 { margin: 0; font: 700 11.5px var(--font-cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.tile { background: var(--card); border-radius: 10px; padding: 7px 9px; border: 1px solid #ebe5d8; }
.tile i { display: block; font: 600 10px var(--font-cond); letter-spacing: .08em; color: var(--muted); font-style: normal; text-transform: uppercase; }
.tile b { font: 700 18px/1.2 var(--font-cond); font-variant-numeric: tabular-nums; }
.tile small { display: block; font-size: 11px; color: var(--muted); }
.state { display: inline-block; padding: 1px 8px; border-radius: 10px; font: 700 11px/18px var(--font-cond); letter-spacing: .06em; text-transform: uppercase; }
.state.plan { background: #e6e2d8; color: #4a5068; }
.state.build { background: #fdf0d2; color: #8a5a00; }
.state.built, .state.ok { background: #dcf1e3; color: var(--good); }
.state.badst { background: #fbe3e1; color: var(--bad); }
.btns { display: flex; flex-wrap: wrap; gap: 6px; }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.note.warn { color: var(--warn); }
.note.bad { color: var(--bad); }
.meter { height: 8px; border-radius: 4px; background: #e8e3d7; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; background: var(--good); }
.meter.w > i { background: var(--warn); }
.meter.b > i { background: var(--bad); }
.list { display: flex; flex-direction: column; gap: 6px; }
.item { background: var(--card); border-radius: 10px; padding: 9px 10px; border: 1px solid #ebe5d8; display: flex; flex-direction: column; gap: 6px; }
.item.click { cursor: pointer; }
.item.click:hover { border-color: #c9c1ae; }
.item .top { display: flex; align-items: center; gap: 8px; }
.item .top .grow { flex: 1; min-width: 0; }
.item .t1 { font-weight: 700; line-height: 1.25; }
.item .t2 { font-size: 12px; color: var(--muted); }
.item.done { opacity: .62; }
.day-h { font: 700 12px var(--font-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.day-h.today { color: var(--bad); }
table.fin { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.fin th, table.fin td { padding: 4px 4px; text-align: right; border-bottom: 1px solid #ebe5d8; }
table.fin th:first-child, table.fin td:first-child { text-align: left; }
table.fin th { font: 600 11px var(--font-cond); letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
input[type=range] { width: 100%; accent-color: var(--ink); }
canvas.spark { width: 100%; height: 70px; display: block; background: var(--card); border-radius: 10px; border: 1px solid #ebe5d8; }

/* ------------------------------------------------------------- bildirimler */
/* sol alt köşe: üstte oyuncunun eylemlerine geri bildirim, altta akan bildirim kutusu (son 50) */
#corner { position: absolute; left: calc(84px + var(--safe-l)); bottom: calc(10px + var(--safe-b)); z-index: 21; width: min(420px, calc(100vw - 290px)); min-width: 240px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#toasts { display: flex; flex-direction: column-reverse; gap: 6px; }
.toast { background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; line-height: 1.35; box-shadow: 0 6px 18px rgba(10,16,32,.28); border-left: 5px solid #7d8db8; animation: tin .2s ease-out; pointer-events: auto; }
.toast.warn { border-left-color: var(--bad); }
.toast.goal, .toast.open { border-left-color: var(--signal); }
.toast.money { border-left-color: #2fae68; }
.toast.event { border-left-color: #e08a12; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .35s; }
#feed { pointer-events: auto; background: rgba(20,33,61,.93); color: #e9edf7; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.25); overflow: hidden; }
#feed header { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 11px; font: 700 11px var(--font-cond); letter-spacing: .1em; color: #b9c2dc; border-bottom: 1px solid rgba(255,255,255,.08); }
#feed header b { flex: 1; }
#feedN { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
#feedN:empty { display: none; }
#feedTog { width: 26px; height: 22px; border-radius: 6px; color: #c9d0e6; font-size: 12px; }
#feedTog:hover { background: rgba(255,255,255,.1); }
#feedList { max-height: 128px; overflow-y: auto; overscroll-behavior: contain; padding: 3px 0; }
#feed.collapsed #feedList { max-height: 30px; overflow: hidden; }
#feed.collapsed #feedTog { transform: rotate(180deg); }
.fi { padding: 4px 10px 4px 8px; margin: 1px 0; font-size: 12px; line-height: 1.32; border-left: 3px solid #7d8db8; }
.fi em { font-style: normal; color: #8f9abb; font-size: 10.5px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.fi.warn { border-left-color: #ff6b6b; } .fi.goal, .fi.open { border-left-color: var(--signal); }
.fi.money { border-left-color: #6fd29a; } .fi.event { border-left-color: #e08a12; } .fi.done { border-left-color: #8fb3ff; }
.fi.click { cursor: pointer; } .fi.click:hover { background: rgba(255,255,255,.07); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------- ana menü */
.screen { position: absolute; inset: 0; z-index: 40; overflow-y: auto; background: var(--ink); color: #fff; -webkit-overflow-scrolling: touch; }
.screen::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .08;
  background-image: radial-gradient(circle, #fff 1.2px, transparent 1.4px); background-size: 22px 22px; }
.mwrap { position: relative; max-width: 1100px; margin: 0 auto; padding: calc(22px + var(--safe-t)) calc(20px + var(--safe-r)) 30px calc(20px + var(--safe-l)); display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; align-items: center; gap: 16px; }
.roundel { width: 64px; height: 64px; border-radius: 16px; background: var(--signal); display: flex; align-items: center; justify-content: center; flex: none; position: relative; }
.roundel span { font: 900 40px/1 var(--font-cond); color: var(--ink); }
.roundel::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 7px; margin-top: 12px; background: var(--ink); border-top: 2px solid var(--signal); border-bottom: 2px solid var(--signal); opacity: 0; }
.brand h1 { margin: 0; font: 800 clamp(30px, 5vw, 46px)/1 var(--font-cond); letter-spacing: .01em; text-transform: uppercase; }
.brand p { margin: 4px 0 0; color: #b9c2dc; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--ink-2); color: #c9d0e6; font: 700 13px var(--font-cond); letter-spacing: .06em; text-transform: uppercase; }
.tabs button.on { background: var(--signal); color: var(--ink); }
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.city { background: var(--paper); color: var(--text); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; text-align: left; transition: transform .15s; padding: 0; }
.city:hover { transform: translateY(-2px); }
.city canvas { width: 100%; aspect-ratio: 3 / 2; display: block; image-rendering: auto; background: #9fc6de; }
.city .cb { padding: 9px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.city .cn { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.city h3 { margin: 0; font: 800 20px/1.1 var(--font-cond); text-transform: uppercase; letter-spacing: .02em; }
.city .stars { color: #d08a0a; letter-spacing: 1px; font-size: 12px; white-space: nowrap; }
.city .meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.city .nt { font-size: 12.5px; line-height: 1.35; }
.city .sv { font: 700 11px var(--font-cond); letter-spacing: .06em; color: var(--good); text-transform: uppercase; }
#continue .city { flex-direction: row; max-width: 520px; }
#continue .city canvas { width: 150px; aspect-ratio: 3 / 2; }
.fine { font-size: 11.5px; color: #8a96ba; margin: 0; }

/* ------------------------------------------------------------- modal */
#modal { position: absolute; inset: 0; z-index: 50; background: rgba(10,16,32,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mbox { background: var(--paper); border-radius: 16px; width: min(480px, 100%); max-height: calc(100% - 20px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.mbox .mh { background: var(--ink); color: #fff; padding: 14px 18px; border-bottom: 3px solid var(--signal); font: 800 19px/1.15 var(--font-cond); text-transform: uppercase; letter-spacing: .03em; }
.mbox .mb { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.45; }
.mbox .mb p { margin: 0; }
.mbox .mf { padding: 0 18px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mbox .steps { font: 700 11px var(--font-cond); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.mbox ul { margin: 0; padding-left: 18px; }
.mbox li { margin: 3px 0; }
.menulist { display: flex; flex-direction: column; gap: 6px; }
.menulist .btn { justify-content: flex-start; height: 42px; font-size: 14px; }

#loading { position: absolute; inset: 0; z-index: 60; background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--ink-2); border-top-color: var(--signal); animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- küçük ekranlar (telefon yatay) */
@media (max-width: 1100px) { .hnav .nl { display: none; } .hnav button { min-width: 44px; padding: 0 9px; } .ni { font-size: 19px; } }
@media (max-width: 900px) { #pRiders { display: none; } .hcity { display: none; } .speed button { min-width: 28px; } .hnav button { min-width: 40px; padding: 0 7px; } }
@media (max-height: 460px) {
  :root { --hud-h: 46px; }
  .pill, .hnav button { height: 38px; }
  .hbtn { width: 34px; height: 34px; }
  #tools { gap: 4px; top: calc(var(--hud-h) + var(--safe-t) + 8px); }
  #tools button { width: 54px; height: 46px; }
  .tl { font-size: 10px; }
  #panel { top: calc(var(--hud-h) + var(--safe-t) + 10px); }
  #corner { left: calc(72px + var(--safe-l)); } #feedList { max-height: 84px; }
  .toast { font-size: 11.5px; padding: 5px 9px; }
  #legend { width: 150px; padding: 6px 8px; font-size: 11px; }
}
@media (max-width: 760px) {
  .pill i { display: none; }
  .pill { padding: 0 8px; }
  .planbtn span:last-child { display: none; }
  .planbtn { padding: 0 9px; }
  .hnav { gap: 0; } .hnav button { padding: 0 7px; }
  .speed button { min-width: 28px; }
  #corner { width: auto; right: 8px; max-width: calc(100vw - 90px); min-width: 0; }
  #ctx { max-width: calc(100vw - 90px); left: calc(74px + var(--safe-l)); right: 8px; transform: none; }
}
@media (max-width: 560px) {
  .hcity { display: none; }
  #panel { left: 8px !important; right: 8px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* hat çizim modu seçici (bağlam çubuğunda) */
.seg3.mini { display: inline-flex; padding: 2px; gap: 2px; vertical-align: middle; border-radius: 9px; }
.seg3.mini button { flex: none; height: 30px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }

/* bütçe (zorluk) seçimi */
.budgets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.bud { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 2px solid #ebe5d8; text-align: left; }
.bud b { font: 700 15px var(--font-cond); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.bud em { font: 700 20px var(--font-cond); font-style: normal; color: #1b8a4a; font-variant-numeric: tabular-nums; }
.bud small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.bud .dx { font-size: 11.5px; color: var(--ink); line-height: 1.35; font-variant-numeric: tabular-nums; }
.bud .dx .pos { color: #1b8a4a; font-weight: 700; } .bud .dx .neg { color: #c0392b; font-weight: 700; }
.dtag { font: 600 11px var(--font); letter-spacing: .02em; text-transform: none; color: var(--muted); margin-left: 4px; }
.bud.dsum { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; cursor: default; }
.bud:hover, .bud.on { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--signal); }
@media (max-height: 460px) { .bud small, .budgets .dx { display: none; } .bud { padding: 7px 10px; } .bud em { font-size: 17px; } }

/* v3.6 · ihale ve tedarik teklifleri, ortaklar */
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer { background: var(--card); border: 2px solid #ebe5d8; border-radius: 12px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.offer:hover { border-color: #c9c1ae; }
.offer.on { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(242,177,46,.22); }
.offer .oh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.offer .oh .fl { font-size: 20px; line-height: 1; }
.offer .oh b { font: 700 15px/1.2 var(--font-cond); }
.offer .tag { font: 700 10px/16px var(--font-cond); letter-spacing: .06em; text-transform: uppercase; background: #dcf1e3; color: var(--good); border-radius: 8px; padding: 0 6px; }
.offer .tag.sp { background: #e3e9fb; color: #2d4fa8; }
.offer .og { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 4px 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.offer .og i { display: block; font: 600 10px var(--font-cond); letter-spacing: .08em; color: var(--muted); font-style: normal; text-transform: uppercase; }
.offer .og small { font-weight: 500; color: var(--muted); }
.offer .on2 { font-size: 12px; color: var(--muted); line-height: 1.35; }
.offer .finchk { font-size: 12.5px; display: flex; gap: 6px; align-items: flex-start; background: #f3efe5; border-radius: 8px; padding: 5px 7px; cursor: pointer; }
.offer .finchk input { margin-top: 2px; }
.stars { color: #d99a00; letter-spacing: 1px; }
.mbox { width: min(560px, 100%); }
/* v3.7 · tarife */
.sched { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.sched .srow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; background: var(--card); border: 1px solid #ebe5d8; border-radius: 10px; padding: 7px 9px; }
.sched .sl b, .sched .sv b { display: block; font: 700 14px/1.2 var(--font-cond); }
.sched .sl small, .sched .sv small { display: block; font-size: 11px; color: var(--muted); }
.sched .sv { text-align: right; font-variant-numeric: tabular-nums; }
.sched small.neg { color: var(--bad); } .sched small.pos { color: var(--good); } .sched small.warnc { color: #b7791f; }
.offer .tag.xp { background: #fff1d6; color: #9a5b00; text-transform: none; letter-spacing: 0; }
/* v3.7 · kariyer */
.rankcard { background: linear-gradient(135deg, #fff8e6, #f3efe5); border: 1px solid #ecd9a8; border-radius: 14px; padding: 10px 12px; }
.rkpath { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.rkpath i { color: var(--muted); font-style: normal; }
.rkpath .rk { display: inline-flex; flex-direction: column; align-items: center; font-size: 20px; line-height: 1; opacity: .35; padding: 3px 5px; border-radius: 8px; }
.rkpath .rk small { font: 600 10px var(--font-cond); letter-spacing: .04em; margin-top: 2px; }
.rkpath .rk.past { opacity: .75; }
.rkpath .rk.now { opacity: 1; background: #fff; box-shadow: 0 0 0 2px var(--signal); }
.rkreq { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.rkreq .rq { display: flex; justify-content: space-between; font-size: 12.5px; }
.rkreq .rq b { font-variant-numeric: tabular-nums; }
.item.locked { opacity: .7; }
/* v3.7.1 · sefer aralığı */
.sched .srow { display: flex; flex-direction: column; gap: 6px; }
.sched .sh { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sched .sc { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sched .sc label { display: flex; align-items: center; gap: 6px; font: 600 11px var(--font-cond); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sched .fix { font: 600 10.5px var(--font-cond); letter-spacing: .02em; color: #9a5b00; background: #fff1d6; border-radius: 6px; padding: 0 5px; text-transform: none; }
.sched .srow { align-items: stretch; }
.sched .sc label .step { text-transform: none; letter-spacing: 0; }
.sched .hwv { font: 700 13px var(--font-cond); color: var(--ink, #1b2540); text-transform: none; letter-spacing: 0; }

/* =================================================================== v4.0 · yükleme, ana sayfa, hikâye */
.screen .bg { position: fixed; inset: 0; background: radial-gradient(120% 90% at 70% 20%, #2a3d66 0%, #14213d 55%, #0b1326 100%); background-size: cover; background-position: center; }
.screen .bg::before { content: ""; position: absolute; inset: 0; background:
  repeating-linear-gradient(115deg, transparent 0 120px, rgba(242,177,52,.07) 120px 124px, transparent 124px 260px),
  linear-gradient(180deg, transparent 55%, rgba(242,177,52,.12) 56%, transparent 57%); }
.screen .bg.has::before { background: linear-gradient(180deg, rgba(8,14,30,.25) 0%, rgba(8,14,30,.15) 40%, rgba(8,14,30,.85) 100%); }
.bootscr, .homescr { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bootscr.fade { opacity: 0; transition: opacity .35s; }
.bootc, .homec { position: relative; z-index: 1; width: min(520px, 92vw); display: flex; flex-direction: column; gap: 16px; padding: calc(16px + var(--safe-t)) 0 calc(16px + var(--safe-b, 0px)); }
.bootc { align-items: center; text-align: center; margin-top: 28vh; }
.screen .logo { display: flex; align-items: center; gap: 14px; }
.bootc .logo { flex-direction: column; }
.screen .logo h1 { margin: 0; font: 900 clamp(32px, 6vw, 54px)/1 var(--font-cond); letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 3px 18px rgba(0,0,0,.5); }
.screen .logo p { margin: 4px 0 0; font: 700 14px var(--font-cond); letter-spacing: .3em; text-transform: uppercase; color: var(--signal); }
.roundel.big { width: 78px; height: 78px; border-radius: 20px; box-shadow: 0 8px 30px rgba(242,177,52,.35); }
.roundel.big span { font-size: 50px; }
.bootc .bar { width: min(360px, 80vw); height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.bootc .bar i { display: block; height: 100%; width: 0; background: var(--signal); border-radius: 3px; transition: width .1s linear; }
.bootc p { margin: 0; color: #c9d2e6; font-size: 14px; }
.bootc .tip { color: #fff; opacity: .85; font-size: 13px; max-width: 420px; }
.homescr { justify-content: flex-start; padding-left: max(5vw, var(--safe-l)); }
.homec { width: min(440px, 90vw); }
.hmenu { display: flex; flex-direction: column; gap: 8px; }
.hm { text-align: left; background: rgba(12,20,40,.72); color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 11px 16px; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .12s, border-color .12s, background .12s; }
.hm b { display: block; font: 800 18px/1.2 var(--font-cond); letter-spacing: .03em; text-transform: uppercase; }
.hm small { display: block; font-size: 12.5px; color: #b8c3da; margin-top: 2px; }
.hm:hover, .hm:focus-visible { transform: translateX(4px); border-color: var(--signal); background: rgba(20,33,61,.9); outline: none; }
.hm.pri { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.hm.pri small { color: #3b2d06; }
.homec .ver { margin: 4px 0 0; font-size: 11.5px; color: #9fb0d0; }
.brand .back { margin-right: 4px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
@media (max-height: 520px) { .homec { gap: 10px; } .hm { padding: 7px 12px; } .hm b { font-size: 15px; } .hm small { display: none; } .screen .logo h1 { font-size: 30px; } .roundel.big { width: 54px; height: 54px; } .roundel.big span { font-size: 34px; } .bootc { margin-top: 14vh; } }

/* olay penceresi (HOI tarzı) */
.mbox.evm { width: min(760px, 100%); overflow-x: hidden; }
.mbox.wide { width: min(720px, 100%); }
.evimg { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 46vh; overflow: hidden; background: #0e1830; border-bottom: 3px solid var(--signal); border-radius: 16px 16px 0 0; }
.evimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evimg.noimg { background:
  repeating-linear-gradient(115deg, transparent 0 60px, rgba(242,177,52,.10) 60px 63px, transparent 63px 130px),
  radial-gradient(90% 120% at 30% 10%, #31477a 0%, #182748 55%, #0b1326 100%); }
.evimg.noimg img { display: none; }
.evimg .ki { position: absolute; right: 18px; bottom: 10px; font-size: 64px; opacity: .55; filter: grayscale(.2); }
.evimg:not(.noimg) .ki { display: none; }
.evimg.noimg[data-kind="crisis"] { background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(220,60,50,.14) 60px 63px, transparent 63px 130px), radial-gradient(90% 120% at 30% 10%, #5a2b2b 0%, #2a1620 55%, #0b1326 100%); }
.mbox.evm .mh { border-radius: 0; }
.evmeta { display: flex; justify-content: space-between; font: 700 11px var(--font-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mbox.evm .mb { font-size: 15px; line-height: 1.55; }
.evq { margin: 4px 0 0; padding: 8px 12px; border-left: 3px solid var(--signal); background: #efe9dc; border-radius: 0 8px 8px 0; font-style: italic; color: #3a3a3a; }
.evq cite { display: block; margin-top: 4px; font-style: normal; font: 600 12px var(--font-cond); color: var(--muted); letter-spacing: .04em; }
.mbox.evm .mf { flex-direction: column; align-items: stretch; }
.btn.evopt { text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; }
.btn.evopt small { font: 500 11.5px var(--font); opacity: .75; text-transform: none; letter-spacing: 0; }
.btn.evopt:disabled { opacity: .45; }
/* arşiv ve ayarlar */
.cdx { display: flex; flex-wrap: wrap; gap: 6px; }
.cx { font: 600 12.5px var(--font-cond); border: 1px solid #ddd4c2; background: #fff; border-radius: 8px; padding: 5px 9px; cursor: pointer; text-align: left; }
.cx:hover { border-color: var(--signal); }
.cx.lk { opacity: .45; cursor: default; }
.mbox h3 small { font-weight: 500; color: var(--muted); }
.setl { display: flex; flex-direction: column; gap: 10px; }
.sw2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid #ebe5d8; border-radius: 10px; padding: 9px 11px; }
.sw2 b { display: block; font: 700 14px var(--font-cond); }
.sw2 small { display: block; font-size: 12px; color: var(--muted); }
.sw2 input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--signal); flex: none; }
.sw2 select { max-width: 45%; }
/* alçak ekran (yatay telefon): görsel solda, metin sağda */
@media (max-height: 560px) and (min-width: 600px) {
  .mbox.evm { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); grid-template-rows: auto 1fr auto; width: min(900px, 100%); }
  .mbox.evm .evimg { grid-column: 1; grid-row: 1 / span 3; aspect-ratio: auto; max-height: none; height: 100%; min-height: 220px; border-radius: 16px 0 0 16px; border-bottom: 0; border-right: 3px solid var(--signal); position: sticky; top: 0; }
  .mbox.evm .mh, .mbox.evm .mb, .mbox.evm .mf { grid-column: 2; }
  .mbox.evm .mh { border-radius: 0 16px 0 0; font-size: 17px; padding: 10px 14px; }
  .mbox.evm .mb { font-size: 13.5px; line-height: 1.45; padding: 10px 14px; }
  .mbox.evm .evimg .ki { font-size: 44px; }
}

/* =================================================================== v4.2 · masal kitabı teması
   Görsellerle aynı dil: krem kâğıt, yumuşak lacivert, bal sarısı, nane ve şeftali; yuvarlak, tombul, hafif gölgeli. */
:root {
  --paper: #fbf5e6;
  --card: #fffdf7;
  --rule: #eadfc4;
  --edge: #e6d7b3;
  --honey: #f2b134;
  --honey-d: #d9951c;
  --mint: #cfe9da;
  --mint-d: #3f9a6e;
  --peach: #f9dccb;
  --sky: #d6e4f0;
  --good: #237a50;
  --shadow: 0 2px 0 rgba(31, 41, 70, .06), 0 6px 16px rgba(31, 41, 70, .08);
  --paper-tex: radial-gradient(rgba(160, 130, 70, .06) 1px, transparent 1.4px) 0 0 / 9px 9px, radial-gradient(rgba(160, 130, 70, .04) 1px, transparent 1.4px) 4px 5px / 13px 13px;
}
/* pencereler ve paneller: kâğıt dokusu, yumuşak çerçeve */
.mbox, #panel { background: var(--paper-tex), var(--paper); border-radius: 22px; box-shadow: 0 0 0 3px #fffaf0, 0 0 0 5px rgba(242, 177, 52, .45), 0 24px 60px rgba(8, 14, 30, .45); }
.mbox .mh { border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #24365f, var(--ink)); border-bottom: 4px solid var(--honey); text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
#panel > .phead { border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #24365f, var(--ink)); border-bottom: 4px solid var(--honey); }
#pBody { border-radius: 0 0 22px 22px; }
.evimg { border-radius: 22px 22px 0 0; border-bottom-width: 4px; }
.sec > h3 { border-bottom: 2px dotted var(--edge); color: #7a7056; }

/* düğmeler: tombul, alttan gölgeli (basılınca iner) */
.btn { height: 36px; padding: 0 14px; border-radius: 13px; background: linear-gradient(180deg, #fffaf0, #f3ead6); border: 1.5px solid var(--edge); box-shadow: inset 0 -3px 0 rgba(150, 120, 60, .16), 0 1px 0 rgba(255, 255, 255, .8); transition: transform .08s, box-shadow .08s, filter .12s; }
.btn:hover { background: linear-gradient(180deg, #fffdf6, #efe3c9); filter: none; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(150, 120, 60, .16); }
.btn.pri { background: linear-gradient(180deg, #2b4070, var(--ink)); border-color: #13203c; color: #fff; box-shadow: inset 0 -3px 0 var(--honey), 0 2px 6px rgba(20, 33, 61, .25); }
.btn.pri:hover { background: linear-gradient(180deg, #344c82, #1c2c50); }
.btn.sig { background: linear-gradient(180deg, #ffd27a, var(--honey)); border-color: var(--honey-d); color: #2a1f05; box-shadow: inset 0 -3px 0 var(--honey-d); }
.btn.dng { background: linear-gradient(180deg, #fff0e8, var(--peach)); border-color: #efbfa6; color: #b83a2e; box-shadow: inset 0 -3px 0 rgba(200, 80, 60, .18); }
.btn.sm { height: 30px; padding: 0 10px; border-radius: 11px; }
.chip { border-radius: 12px; background: var(--card); border: 1.5px solid var(--edge); }
.chip.on { border-color: var(--honey); box-shadow: 0 0 0 2px rgba(242, 177, 52, .3); }
.step { background: var(--card); border: 1.5px solid var(--edge); border-radius: 12px; }

/* kartlar */
.item, .tile, .sw2, .offer, .bud, .sched .srow { background: var(--card); border: 1.5px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow); }
.item.click:hover, .offer:hover { border-color: var(--honey); }
.offer.on, .bud.on, .bud:hover { border-color: var(--honey); box-shadow: 0 0 0 3px rgba(242, 177, 52, .25), var(--shadow); }
.rankcard { border-radius: 18px; background: var(--paper-tex), linear-gradient(135deg, #fff6dc, #fbf1dc); border: 1.5px solid #f0d998; }
.evq { background: #f6eedb; border-radius: 0 14px 14px 0; }
.toast { border-radius: 14px; background: var(--card); }

/* açılır kutu (select) */
select, .sw2 select {
  -webkit-appearance: none; appearance: none; height: 38px; min-width: 150px; max-width: 55%; padding: 0 36px 0 14px; border-radius: 14px;
  font: 700 14px var(--font-cond); letter-spacing: .02em; color: var(--ink); cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M2 2l5 5 5-5' fill='none' stroke='%231f2f55' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 13px 9px, linear-gradient(180deg, #fffaf0, #f3ead6);
  border: 2px solid var(--edge); box-shadow: inset 0 -3px 0 rgba(150, 120, 60, .14);
}
select:hover { border-color: var(--honey); }
select:focus-visible { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(242, 177, 52, .3); }
select option { font: 600 14px var(--font); color: var(--ink); background: #fffaf0; }
#ctx select { height: 32px; min-width: 0; max-width: none; border-radius: 11px; font-size: 13px; }
/* onay kutusu: tombul bal sarısı */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; flex: none; margin: 0; cursor: pointer; border-radius: 9px;
  background: linear-gradient(180deg, #fffaf0, #f3ead6); border: 2px solid var(--edge); box-shadow: inset 0 -2px 0 rgba(150, 120, 60, .14); transition: background .12s, border-color .12s;
}
input[type=checkbox]:checked {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='14' viewBox='0 0 16 14'%3E%3Cpath d='M2 7.5l4 4L14 2.5' fill='none' stroke='%231f2f55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 15px 13px, linear-gradient(180deg, #ffd27a, var(--honey));
  border-color: var(--honey-d); box-shadow: inset 0 -2px 0 var(--honey-d);
}
.sw2 input[type=checkbox] { width: 28px; height: 28px; }
.offer .finchk input[type=checkbox] { width: 20px; height: 20px; border-radius: 7px; background-size: 11px 10px, auto; }
input[type=range] { accent-color: var(--honey); }
input.btn { background: var(--card); }

/* çubuklar */
.meter { height: 10px; border-radius: 6px; background: #efe5cf; box-shadow: inset 0 1px 2px rgba(120, 90, 30, .18); }
.meter > i { border-radius: 6px; background: linear-gradient(180deg, #7fd0a6, var(--mint-d)); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .1); }
.meter.w > i { background: linear-gradient(180deg, #ffd27a, var(--honey-d)); }
.meter.b > i { background: linear-gradient(180deg, #f6a08f, #d0503f); }
.bootc .bar { height: 12px; border-radius: 8px; background: rgba(255, 248, 230, .18); border: 2px solid rgba(255, 248, 230, .45); }
.bootc .bar i { border-radius: 6px; background: linear-gradient(180deg, #ffd27a, var(--honey)); }

/* ana sayfa menüsü: kâğıt kartlar */
.hm { background: var(--paper-tex), rgba(251, 245, 230, .94); color: var(--ink); border: 2px solid rgba(255, 255, 255, .7); border-radius: 18px; box-shadow: 0 4px 0 rgba(20, 33, 61, .25), 0 10px 24px rgba(8, 14, 30, .28); }
.hm small { color: #6f6650; }
.hm:hover, .hm:focus-visible { background: var(--paper-tex), #fffaf0; border-color: var(--honey); }
.hm.pri { background: linear-gradient(180deg, #ffd27a, var(--honey)); border-color: #ffe7b0; color: #23190a; box-shadow: 0 4px 0 var(--honey-d), 0 10px 24px rgba(8, 14, 30, .28); }
.hm.pri small { color: #5a4310; }
.roundel { border-radius: 20px; box-shadow: inset 0 -4px 0 var(--honey-d), 0 6px 20px rgba(242, 177, 52, .3); }
.brand .back { border-radius: 14px; }

/* ülke ve şehir seçimi */
#menu .bg { opacity: .35; }
#menu .mwrap { z-index: 1; }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ccard { position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; overflow: hidden; border-radius: 22px; background: var(--paper-tex), var(--paper); color: var(--ink);
  box-shadow: 0 0 0 3px #fffaf0, 0 6px 0 rgba(8, 14, 30, .35), 0 14px 30px rgba(8, 14, 30, .35); transition: transform .15s, box-shadow .15s; }
.ccard:hover, .ccard:focus-visible { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 0 0 3px var(--honey), 0 8px 0 rgba(8, 14, 30, .35), 0 18px 36px rgba(8, 14, 30, .4); outline: none; }
.ccard .cimg { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, var(--sky), var(--mint) 55%, var(--peach)); }
.ccard .cimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard .cimg.noimg img { display: none; }
.ccard .cimg .ki { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 84px; filter: drop-shadow(0 6px 10px rgba(20, 33, 61, .25)); }
.ccard .cimg:not(.noimg) .ki { display: none; }
.ccard .cc { padding: 11px 14px 14px; display: flex; flex-direction: column; gap: 2px; border-top: 4px solid var(--honey); }
.ccard .cc b { font: 800 21px/1.1 var(--font-cond); text-transform: uppercase; letter-spacing: .02em; }
.ccard .cc small { font-size: 12.5px; color: #6f6650; }
@media (max-height: 520px) { .countries { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .ccard .cimg { aspect-ratio: 4 / 3; } .ccard .cc b { font-size: 17px; } }
.city { border-radius: 20px; background: var(--paper-tex), var(--paper); box-shadow: 0 0 0 3px #fffaf0, 0 5px 0 rgba(8, 14, 30, .3), 0 12px 26px rgba(8, 14, 30, .3); }
.city canvas { border-bottom: 4px solid var(--honey); }

/* rütbe kilitleri */
.lockb { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; background: #efe6d2; color: #6f6650; font: 700 11.5px/18px var(--font-cond); letter-spacing: .03em; white-space: nowrap; }
.item.locked .t1 .lockb { margin-left: 6px; vertical-align: middle; }
button.item.locked { cursor: not-allowed; }
.unl { display: block; margin-bottom: 6px; padding: 7px 10px; border-radius: 12px; background: var(--mint); color: #23573f; font-weight: 600; }

/* galeri */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; }
.gt { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; padding: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--sky), var(--mint) 60%, var(--peach)); border: 2px solid #fffaf0; box-shadow: 0 0 0 1.5px var(--edge), var(--shadow); }
.gt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gt span { font-size: 30px; opacity: .8; }
.gt i { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font: 700 11px/1.2 var(--font-cond); font-style: normal; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(12, 20, 40, .82)); }
button.gt:hover { box-shadow: 0 0 0 2.5px var(--honey), var(--shadow); transform: translateY(-1px); }
.gt.lk { background: repeating-linear-gradient(135deg, #efe6d2 0 10px, #e8dcc2 10px 20px); }
.gt.lk span { font-size: 22px; opacity: .55; }
.gview { border-radius: 16px; overflow: hidden; background: #0e1830; box-shadow: var(--shadow); }
.gview img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.gview.none { padding: 30px 16px; text-align: center; background: linear-gradient(160deg, var(--sky), var(--mint) 60%, var(--peach)); color: var(--ink); }
.gview.none span { font-size: 54px; }

/* yapımcılar */
.cred { display: flex; flex-direction: column; gap: 12px; }
.crh { display: flex; align-items: center; gap: 12px; }
.crh .roundel { width: 54px; height: 54px; }
.crh .roundel span { font: 900 34px/1 var(--font-cond); color: var(--ink); }
.crh b { display: block; font: 800 22px/1.1 var(--font-cond); text-transform: uppercase; }
.crh small { color: var(--muted); }
.cred p { margin: 0; }
.cred a.btn { text-decoration: none; text-transform: none; }
.crc { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; background: var(--card); border: 1.5px solid var(--rule); border-radius: 12px; font-size: 13px; }
.crc b { font: 700 14px var(--font-cond); }
.crc small { color: var(--muted); font-size: 11.5px; }
.cred ul { padding-left: 18px; }

/* =================================================================== v4.3 · çizilmiş görseller ve telefon yerleşimi */
:root { --tex-navy: linear-gradient(180deg, #1a2a4c, #14213d); }
/* dokular (img/ui/*_texture; yoksa eski degrade) */
#hud { background: linear-gradient(180deg, rgba(40, 60, 104, .45), rgba(20, 33, 61, .2)), var(--tex-navy) 0 0 / 420px; }
.mbox .mh, #panel > .phead { background: linear-gradient(180deg, rgba(44, 66, 112, .5), rgba(20, 33, 61, .25)), var(--tex-navy) 0 0 / 420px; }
.mbox, #panel { background: var(--tex-paper, none) 0 0 / 420px, var(--paper-tex), var(--paper); }
.has-locked .gt.lk { background: var(--tex-locked) center / cover; }
.has-locked .gt.lk span { display: none; }
.has-rail .homec .hmenu { padding-top: 22px; background: var(--tex-rail) top center / min(100%, 380px) auto no-repeat; }
/* simgeler */
.ico { width: 1.3em; height: 1.3em; object-fit: contain; vertical-align: -.3em; flex: none; }
.ico.lk { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.hnav .ni .ico { width: 24px; height: 24px; vertical-align: 0; display: block; }
#tools .ti .ico { width: 34px; height: 30px; vertical-align: 0; }
#tools .ti:has(.ico) { height: 30px; }
.pill.wc { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 6px; align-content: center; justify-content: start; padding-left: 7px; }
.pill.wc .coin { grid-row: 1 / 3; width: 26px; height: 26px; vertical-align: 0; }
/* logo: yazısız amblem */
.screen .logo .emblem { width: 96px; height: 96px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .4)); }
.bootc .logo .emblem { width: 120px; height: 120px; }
/* ana sayfa düğmeleri: solda simge */
.hm.wi { display: flex; align-items: center; gap: 12px; padding-left: 10px; }
.hm.wi > span { display: flex; flex-direction: column; min-width: 0; }
.hmi { width: 44px; height: 44px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px rgba(20, 33, 61, .25)); }
.hm:not(.wi) { padding-left: 16px; }
/* galeri: usta portreleri sığdırılır */
.gt.pt { aspect-ratio: 4 / 5; }
.gt.pt img { object-fit: contain; object-position: center bottom; padding: 6px 6px 0; }

/* usta: alttan çıkan karakter */
#mentor { position: absolute; right: calc(12px + var(--safe-r)); bottom: calc(10px + var(--safe-b)); z-index: 24; display: flex; align-items: flex-end;
  max-width: min(440px, calc(100vw - 24px)); cursor: pointer; animation: mup .5s cubic-bezier(.2, 1.35, .4, 1); }
#mentor.hidden { display: none; }
#mentor img { width: 124px; height: auto; flex: none; margin-right: -18px; position: relative; z-index: 1; filter: drop-shadow(0 6px 12px rgba(8, 14, 30, .35)); }
#mentor .mb { position: relative; background: var(--tex-paper, none) 0 0 / 420px, var(--paper); color: var(--text); border-radius: 18px; padding: 10px 32px 12px 26px; margin-bottom: 14px;
  border: 2.5px solid var(--honey); box-shadow: 0 0 0 3px #fffaf0, 0 12px 30px rgba(8, 14, 30, .35); }
#mentor .mb b { display: block; font: 800 14px/1.1 var(--font-cond); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
#mentor .mb p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.38; }
#mentor .mx { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; z-index: 2; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
#mentor.m-tea .mb { border-color: var(--mint-d); }
#mentor.m-worried .mb { border-color: #e2836f; }
#mentor.out { animation: mdown .35s ease-in forwards; }
@keyframes mup { from { transform: translateY(130%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mdown { to { transform: translateY(130%); opacity: 0; } }

/* araçlar: küçük ekranda yalnızca simge */
@media (max-height: 520px), (max-width: 760px) {
  #tools { gap: 5px; }
  #tools button { width: 46px; height: 44px; border-radius: 12px; }
  #tools .tl { display: none; }
  #tools .ti .ico { width: 32px; height: 28px; }
  #corner { left: calc(62px + var(--safe-l)); }
  #ctx { left: calc(62px + var(--safe-l)); }
  #mentor img { width: 92px; margin-right: -14px; }
  #mentor .mb { padding: 8px 28px 10px 20px; margin-bottom: 10px; }
  #mentor .mb p { font-size: 12.5px; }
  .screen .logo .emblem { width: 64px; height: 64px; }
  .hmi { width: 34px; height: 34px; }
}
/* üst bar: tarih hep görünür; dar ekranda şehir adı gizlenir */
@media (max-width: 900px) {
  .hcity { display: flex; } .hcity b { display: none; } .hcity span { font: 700 13px var(--font-cond); color: #fff; }
  .hnav button { min-width: 36px; padding: 0 6px; }
  .speed button { min-width: 26px; }
  .pill { padding: 0 8px; }
}
/* telefon dikey: iki sıra (1: menü, tarih, hız, kasa, plan · 2: memnuniyet, erişim, menüler) */
@media (max-width: 600px) {
  :root { --hud-h: 92px; }
  #hud { flex-wrap: wrap; align-content: center; column-gap: 6px; row-gap: 5px; padding-top: calc(var(--safe-t) + 2px); }
  #hud::before { content: ""; flex-basis: 100%; height: 0; order: 55; }
  .hleft, .hstats { display: contents; }
  #btnMenu { order: 10; } .hcity { order: 20; flex: 1 1 auto; } .speed { order: 30; } #pCash { order: 40; } #btnPlan { order: 50; }
  #pSat { order: 60; } #pAcc { order: 70; } .hnav { order: 80; flex: 1 1 auto; justify-content: space-between; }
  .pill, .planbtn, .hbtn { height: 36px; }
  .hnav button { height: 38px; min-width: 34px; padding: 0 4px; }
  .speed button { min-width: 24px; height: 30px; }
  .pill b { font-size: 15px; }
  .hcity span { font-size: 12.5px; }
  #pRiders { display: none; }
}
#hDate .ds { display: none; }
@media (max-width: 900px) { #hDate .hrk, #hDate .dl { display: none; } #hDate .ds { display: inline; } }
@media (max-width: 400px) { .pill.wc .coin { display: none; } .pill.wc { padding-left: 8px; } .speed button { min-width: 22px; } #hud { column-gap: 5px; } }
@media (max-width: 600px) { #btnPlan { order: 75; } .hnav { gap: 0; } .hnav button { min-width: 32px; padding: 0 3px; } .hcity { flex: 0 1 auto; } #pCash { margin-left: auto; } }
.hmi.e { display: flex; align-items: center; justify-content: center; font-size: 26px; line-height: 1; }
@media (max-height: 520px) {
  .hmi { width: 30px; height: 30px; } .hmi.e { font-size: 20px; }
  .hm.wi { gap: 9px; padding-top: 6px; padding-bottom: 6px; }
  .has-rail .homec .hmenu { padding-top: 0; background: none; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .homec { width: min(720px, 94vw); }
  .hmenu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hm.pri { grid-column: 1 / -1; }
}
/* üst bar kademeleri: genişlik azaldıkça önce yazılar, sonra ikincil göstergeler gizlenir (hiçbiri üst üste binmez) */
@media (max-width: 1300px) { .hnav .nl { display: none; } .hnav button { min-width: 44px; padding: 0 8px; } .ni { font-size: 19px; } }
@media (max-width: 1100px) { #pRiders { display: none; } }
@media (max-width: 1060px) {
  .hcity b { display: none; } .hcity span { font: 700 13px var(--font-cond); color: #fff; }
  #hDate .hrk, #hDate .dl { display: none; } #hDate .ds { display: inline; }
  .pill i { display: none; } .pill { padding: 0 9px; }
  .planbtn span:last-child { display: none; } .planbtn { padding: 0 9px; }
  .hnav button { min-width: 38px; padding: 0 5px; }
}
@media (max-width: 760px) and (min-width: 601px) { #pSat { display: none; } #hud, .hgrp { gap: 5px; } .hnav button { min-width: 34px; padding: 0 4px; } }
@media (max-width: 680px) and (min-width: 601px) { .pill.wc .coin { display: none; } .pill.wc { padding-left: 8px; } }
@media (max-width: 760px) { .speed button { padding: 0 4px; font-size: 10px; min-width: 24px; } .hnav .ni { font-size: 17px; } .hnav .ni .ico { width: 22px; height: 22px; } }
@media (max-width: 400px) { .hnav button { min-width: 0; padding: 0 3px; } .speed button { padding: 0 3px; min-width: 22px; } }
.screen .logo h1 .wordmark { display: block; height: clamp(64px, 11vw, 110px); width: auto; max-width: 70vw; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .45)); }
@media (max-height: 520px) { .screen .logo h1 .wordmark { height: 52px; } }

/* v4.5 rastgele olaylar */
.toast.incident { border-left-color: #e03a3a; }
.fi.incident { border-left-color: #e03a3a; }

/* v4.6 enerji: santralin aylık üretim çubukları, finans tablosundaki bağlantı düğmesi */
.pseason { display: flex; gap: 3px; align-items: flex-end; height: 64px; margin-top: 8px; }
.pseason span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.pseason i { display: block; width: 100%; min-height: 2px; background: #9fc9a9; border-radius: 3px 3px 0 0; }
.pseason span.on i { background: var(--good, #2f7d4f); }
.pseason em { font-style: normal; font-size: 10px; opacity: .7; line-height: 1; }
button.lnk { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted; cursor: pointer; }

/* öğretici (v4.9): usta sağ altta kalır, adım adım anlatır; ilgili düğme parlar */
#mentor.tut { cursor: default; max-width: min(470px, calc(100vw - 24px)); z-index: 26; }
#mentor.tut .mb { padding: 10px 16px 12px 24px; }
#mentor .tuth { display: flex; align-items: baseline; gap: 10px; padding-right: 14px; }
#mentor .tuth span { margin-left: auto; font: 700 11.5px var(--font-cond); letter-spacing: .04em; color: var(--muted, #6b7280); white-space: nowrap; }
#mentor .mb h4 { margin: 4px 0 0; font: 800 16px/1.2 var(--font-cond); color: var(--ink); }
#mentor.tut .mb p { font-size: 13.5px; }
#mentor .mb p b { display: inline; font: inherit; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--ink); }
#mentor .tutw { margin-top: 7px; padding: 5px 9px; border-radius: 10px; background: rgba(242, 177, 52, .16); font-size: 12.5px; line-height: 1.3; }
#mentor .tutw.ok { background: rgba(80, 180, 120, .2); font-weight: 700; }
#mentor .tutf { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
#mentor .tutf .btn { min-height: 34px; padding: 5px 14px; font-size: 14px; }
#mentor .tut-go { animation: tutPulse 1.1s ease-in-out infinite; }
.tut-hl { outline: 3px solid var(--signal) !important; outline-offset: 2px; animation: tutPulse 1.1s ease-in-out infinite; position: relative; z-index: 3; }
@keyframes tutPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 177, 52, .85); } 50% { box-shadow: 0 0 0 8px rgba(242, 177, 52, 0); } }
.tutbook { display: flex; gap: 14px; align-items: flex-end; }
.tutbook img { width: 130px; flex: none; }
.tutbook p b { color: var(--ink); }
@media (max-height: 520px), (max-width: 760px) {
  #mentor.tut .mb { padding: 8px 12px 10px 18px; }
  #mentor .mb h4 { font-size: 14.5px; }
  #mentor.tut .mb p { font-size: 12.5px; line-height: 1.32; }
  #mentor .tutf { margin-top: 6px; }
  #mentor .tutf .btn { min-height: 30px; padding: 3px 12px; font-size: 13px; }
  .tutbook img { width: 86px; }
}
@media (max-width: 480px) { #mentor.tut img { width: 70px; margin-right: -12px; } }
#mentor .tuth, #mentor.tut img { cursor: pointer; }
#mentor.tut.mini .mb > :not(.tuth):not(h4) { display: none; }
#mentor.tut.mini img { width: 64px; margin-right: -10px; }
#mentor.tut.mini .mb { margin-bottom: 6px; }

/* v4.10: 7 araç düğmesi (Trafo eklendi) alçak yatay telefonda sığsın */
@media (max-height: 420px) {
  #tools { gap: 3px; top: calc(var(--hud-h) + var(--safe-t) + 4px); }
  #tools button { height: 39px; }
  #tools .ti .ico { height: 26px; }
}

/* v4.11 dil seçimi ve sağdan sola diller */
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.langs .lang { justify-content: flex-start; gap: 8px; }
.lflag { font-family: "LineoFlags", var(--emoji, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif); font-size: 1.2em; }
html.rtl #modal > *, html.rtl #panel, html.rtl #corner, html.rtl #mentor, html.rtl .tut { direction: rtl; text-align: right; }
html.rtl #homeMenu, html.rtl .screen .cards, html.rtl #toast, html.rtl #notifs { direction: rtl; text-align: right; }
.prem-on { color: #1f8a4c; font: 700 14px var(--font-cond); white-space: nowrap; }
/* v4.14 tanıtım filmi · v4.16: geçiş ve yakınlaşma voice.js kare döngüsünde (translate3d, GPU) */
#trailer { position: fixed; inset: 0; z-index: 9000; background: #000; overflow: hidden; opacity: 1; transition: opacity .6s; }
#trailer.out { opacity: 0; }
#trailer .tr-snd { position: absolute; top: 14px; right: 64px; z-index: 2; }
#trailer .tr-st, #trailer .tr-sc { position: absolute; inset: 0; }
#trailer .tr-sc { background: #0b1326; opacity: 0; will-change: opacity; overflow: hidden; }
#trailer .tr-sc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, 0, 0) scale(1.01); backface-visibility: hidden; will-change: transform; }
#trailer .tr-sc.title { background-color: #14213d; }
#trailer .tr-sc.title img { object-fit: contain; }
#trailer .tr-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 8% 6%; background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; text-align: center; will-change: opacity; }
#trailer .tr-cap p { margin: 0; color: #fff; font: 700 clamp(18px, 3.2vw, 44px)/1.25 var(--font-cond, sans-serif); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
#trailer .tr-cap.big { top: 0; background: none; display: flex; align-items: flex-end; justify-content: center; }
#trailer .tr-cap.big p { font-size: clamp(22px, 4.5vw, 60px); letter-spacing: .06em; }
#trailer .tr-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
/* v4.21 yasal ekran ve çerez bandı */
.lgtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lgdoc h4 { margin: 14px 0 4px; color: var(--ink); }
.lgdoc p { margin: 0 0 8px; line-height: 1.5; }
.lgdoc .lgdate, .lgmiss { color: var(--muted); font-size: 12.5px; }
.lgdoc a { color: #1d4fa3; text-decoration: underline; }
.lgbiz { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.lgbiz dd { margin: 0; }
.cookiebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 60; width: min(640px, calc(100% - 24px));
  background: #fffdf7; color: var(--text); border: 2px solid var(--honey, #f2b134); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(8, 14, 30, .35); }
.cookiebar p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; }
.cookiebar .cbb { display: flex; flex-wrap: wrap; gap: 8px; }
.cookiebar .cbb .btn:not(.sm) { flex: 1 1 120px; }

/* v4.23: şehir kartında şehir görseli, harita küçük köşede */
.city .ctop { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-bottom: 4px solid var(--honey); background: #9fc6de; }
.city .ctop canvas { width: 100%; height: 100%; aspect-ratio: auto; border-bottom: 0; }
.city .ctop .cphoto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.city .ctop.hasimg canvas { position: absolute; right: 8px; bottom: 8px; width: 36%; height: auto; aspect-ratio: 3 / 2; z-index: 1; border-radius: 8px; box-shadow: 0 0 0 2px #fffaf0, 0 3px 8px rgba(8, 14, 30, .4); }
#continue .city .ctop { width: 150px; flex: none; aspect-ratio: 3 / 2; border-bottom: 0; border-right: 4px solid var(--honey); }
#continue .city .ctop canvas { width: 100%; }
#continue .city .ctop.hasimg canvas { width: 42%; right: 5px; bottom: 5px; border-radius: 5px; }

/* ------------------------------------------------------------- v4.27 */
/* hat çizme kutusu küçük ekranda ortada ve daha küçük (önceden sola kayıp kesiliyordu) */
@media (max-height: 520px), (max-width: 760px) {
  #ctx { left: 50%; right: auto; transform: translateX(-50%); max-width: min(560px, calc(100vw - 150px)); padding: 6px 8px; gap: 4px; border-radius: 10px; }
  #ctx .hint { font-size: 11.5px; line-height: 1.25; }
  #ctx .chip { height: 26px; font-size: 12px; padding: 0 8px 0 3px; gap: 4px; }
  #ctx .btn { height: 28px; padding: 0 9px; font-size: 12px; }
  #ctx select { height: 28px; font-size: 12px; }
  #ctx .roundel-s { min-width: 22px; height: 19px; font-size: 11px; }
}
/* çıkış simgesi SVG */
.hmi.e.svg { color: #f2b134; }
.hmi.e.svg svg { display: block; }
/* Premium penceresi */
.premwin { display: flex; gap: 14px; align-items: center; }
.premwin .premi { width: 72px; height: 72px; flex: none; object-fit: contain; }
.premwin ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
@media (max-height: 520px) { .premwin .premi { width: 54px; height: 54px; } }
/* webde reklam engelleyici uyarısı: oyunun tamamını kapatır */
#adblockWall { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 18, 36, .94); color: #fff; }
#adblockWall .abw { max-width: 460px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#adblockWall h2 { margin: 0; font: 800 24px var(--font-cond); letter-spacing: .02em; }
#adblockWall p { margin: 0; line-height: 1.45; color: rgba(255, 255, 255, .86); }
/* v4.27.1: ana sayfa alçak yatay telefonda sığsın (Devam et + 9 düğme): 3 sütun, küçük logo; yine de taşarsa kaydırılır */
@media (max-height: 520px) {
  .homescr { align-items: flex-start; overflow-y: auto; }
  .homec { margin: auto 0; gap: 8px; padding-top: calc(8px + var(--safe-t)); padding-bottom: calc(8px + var(--safe-b, 0px)); }
  .screen .logo .emblem { width: 50px; height: 50px; }
  .screen .logo h1 .wordmark { height: 44px; }
  .screen .logo p { font-size: 11px; margin-top: 2px; }
  .hm.wi { padding-top: 5px; padding-bottom: 5px; gap: 8px; }
  .hmi { width: 28px; height: 28px; } .hmi.e { font-size: 18px; }
  .hm b { font-size: 14px; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .homec { width: min(860px, 94vw); }
  .hmenu { grid-template-columns: repeat(3, 1fr); gap: 7px; }
}
@media (max-height: 380px) {
  .screen .logo .emblem { width: 40px; height: 40px; }
  .screen .logo h1 .wordmark { height: 34px; }
  .screen .logo p { display: none; }
  .hm.wi { padding-top: 4px; padding-bottom: 4px; }
  .hmi { width: 24px; height: 24px; }
}
/* bütün ekranlarda: menü taşarsa kesilmez, kaydırılır; orta yükseklikte geniş ekranda 2 sütun; dikey telefonda alt yazılar gizli */
.homescr { align-items: flex-start; overflow-y: auto; }
.homec { margin: auto 0; }
@media (min-width: 600px) and (min-height: 521px) and (max-height: 860px) {
  .homec { width: min(760px, 92vw); }
  .hmenu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hm.pri { grid-column: 1 / -1; }
}
@media (max-width: 599px) and (max-height: 940px) {
  .hm small { display: none; }
  .hm.wi { padding-top: 6px; padding-bottom: 6px; }
  .hmi { width: 32px; height: 32px; }
  .homec { gap: 10px; }
}
/* hat kutusunun başlığında önceki / sonraki hat okları */
.phead h2 .grow { flex: 1; min-width: 0; }
.phead .lnav { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: 700 22px/1 var(--font-cond); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 0 2px; }
.phead .lnav:hover, .phead .lnav:focus-visible { background: var(--honey, #F2B134); color: var(--ink); }
.phead .lnavn { flex: none; font: 600 12px/1 var(--font-cond); opacity: .75; letter-spacing: 0; }
html.rtl .phead .lnav { transform: scaleX(-1); }
