/* Kentin Patronu — modern arayüz: cam paneller, izometrik sahne, yatay öncelikli düzen */
:root {
  --bg: #12161c;
  --glass: rgba(33, 40, 52, .78);
  --glass-2: #2a3240;
  --glass-hi: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #eef2fb;
  --muted: #98a3b3;
  --accent: #ff7a59;
  --accent-2: #ffa07f;
  --accent-grad: linear-gradient(135deg, #ffa07f 0%, #ff7a59 100%);
  --cyan: #6fe3ff;
  --good: #4fd1a5;
  --warn: #ffd166;
  --bad: #ff6b7a;
  --crystal: #c4a3ff;
  --rep: #ffd76b;
  --radius: 18px;
  --panel-w: clamp(320px, 34vw, 430px);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0b0e12; color: var(--text); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

/* ============ Düzen ============ */
#app {
  height: 100dvh; width: 100vw; display: grid;
  grid-template-columns: 1fr var(--panel-w);
  grid-template-rows: auto 1fr;
  grid-template-areas: "hud hud" "stage panel";
  background: var(--bg);
}
#hud { grid-area: hud; }
#stage { grid-area: stage; position: relative; overflow: clip; min-height: 0; }
#panel { grid-area: panel; min-height: 0; display: flex; flex-direction: column; }

@media (orientation: portrait) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(240px, 46dvh) 1fr;
    grid-template-areas: "hud" "stage" "panel";
  }
  #panel { border-left: 0 !important; border-top: 1px solid var(--line); }
}

/* ============ Üst HUD ============ */
#hud {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right));
  background: #1a2029;
  border-bottom: 1px solid var(--line); z-index: 5; min-height: 52px;
}
.brand { display: flex; align-items: center; gap: 9px; cursor: pointer; min-width: 0; margin-right: 6px; }
.brand .logo { width: 30px; height: 30px; border-radius: 10px; flex: none; background: var(--accent-grad); box-shadow: 0 4px 14px rgba(255, 122, 61, .45), inset 0 0 0 1px rgba(255,255,255,.3); position: relative; }
.brand .logo::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.95); border-left-color: transparent; transform: rotate(-30deg); }
.brand .bt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 18vw; }
.brand small { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.res {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: var(--glass-2); border: 1px solid var(--line); font-weight: 750; font-size: .92rem; white-space: nowrap;
}
.res i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; color: #10131f; }
.res.credits { font-size: 1.02rem; }
.res.credits i { background: var(--accent-grad); }
.res.crystals i { background: linear-gradient(135deg, #e2d1ff, #9a6bff); }
.res.rep i { background: linear-gradient(135deg, #fff0b3, #ffc23d); }
.num { font-variant-numeric: tabular-nums; }
.pulse { animation: pulse .5s ease; }
@keyframes pulse { 50% { transform: scale(1.07); box-shadow: 0 0 18px rgba(255, 179, 107, .6); } }
.badge-speed { font-size: .7rem; background: var(--bad); color: #fff; border-radius: 6px; padding: 2px 6px; font-weight: 700; }
.hud-actions { margin-left: auto; display: flex; gap: 6px; }
.hbtn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--glass-2); font-size: 1.1rem; display: grid; place-items: center; transition: transform .1s, background .15s;
}
.hbtn:hover { background: rgba(255,255,255,.1); }
.hbtn:active { transform: scale(.94); }
.hbtn.ready, .hbtn.alert { border-color: rgba(255, 122, 89, .7); }
.hbtn .dot { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent-grad); color: #1a0d03; font-size: .66rem; font-weight: 800; display: grid; place-items: center; }

@media (max-width: 720px) {
  .brand .bt { display: none; }
  .res { padding: 4px 9px 4px 4px; font-size: .82rem; }
  .res.credits { font-size: .9rem; }
  .hbtn { width: 36px; height: 36px; }
  #hud { gap: 6px; }
}
@media (max-width: 420px) { .res.rep { display: none; } }

/* ============ Sahne ============ */
#sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 520px at 50% 115%, color-mix(in srgb, var(--glow, #8fb0ff) 28%, transparent), transparent 70%),
    radial-gradient(800px 400px at 85% -10%, rgba(255, 140, 90, .12), transparent 70%),
    linear-gradient(180deg, var(--sky1, #070b1a) 0%, var(--sky2, #18234a) 100%);
  transition: background .6s;
}
#sky::before, #sky::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 62%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 46% 12%, #fff, transparent), radial-gradient(1px 1px at 63% 33%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 8%, #fff, transparent), radial-gradient(1px 1px at 88% 48%, #fff, transparent),
    radial-gradient(1px 1px at 6% 72%, #fff, transparent), radial-gradient(1.3px 1.3px at 35% 30%, #fff, transparent),
    radial-gradient(1px 1px at 57% 54%, #fff, transparent), radial-gradient(1px 1px at 94% 22%, #fff, transparent);
  opacity: .55;
}
#sky::after { transform: translate(3%, 7%) scale(1.3); opacity: .35; animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .1; } }

#scene { position: absolute; inset: 0; background: #1c2128; }
#sky { display: none; }
.scene { display: block; width: 100%; height: 100%; overflow: visible; touch-action: manipulation; user-select: none; }
.scene .plate { fill: #2b303c; stroke: rgba(255, 255, 255, .08); }
.scene .lane { stroke: rgba(255, 214, 120, .55); stroke-width: 1.2; stroke-dasharray: 6 7; }
.scene .cell { cursor: pointer; }
.scene .cell .tile .top { transition: filter .2s; }
.scene .cell:hover .tile .top { filter: brightness(1.08); }
.scene .tile .top-line { stroke: rgba(255, 255, 255, .45); stroke-width: 1; stroke-dasharray: 3 5; }
.scene .tile.sel .top { filter: brightness(1.12) drop-shadow(0 0 10px var(--accent)); }
.scene .tile.sel .top-line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: none; }
.scene .tile.hq-tile .top-line { stroke: rgba(255, 179, 107, .7); stroke-dasharray: none; }
.scene .cell.locked { cursor: default; }
.scene .cell.locked .tile { filter: grayscale(.8) brightness(.55); }
.scene text { pointer-events: none; }
.scene .lock { font-size: 18px; text-anchor: middle; }
.scene .label rect { fill: rgba(8, 12, 28, .68); stroke: rgba(255, 255, 255, .12); }
.scene .label text { fill: #e6ecff; font-size: 10.5px; font-weight: 650; text-anchor: middle; letter-spacing: .01em; }
.scene .label { cursor: pointer; }
.scene .label.on rect { fill: var(--accent); stroke: none; }
.scene .label.on text { fill: #1a0d03; }
.scene .scaffold polyline, .scene .scaffold line { fill: none; stroke: #ffd27a; stroke-width: 1; stroke-dasharray: 3 3; opacity: .8; }
.scene .plus circle { fill: rgba(255, 255, 255, .14); stroke: rgba(255, 255, 255, .7); stroke-width: 1.4; stroke-dasharray: 4 3; }
.scene .plus path { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.scene .plus { animation: breathe 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene .plus.nofree { opacity: .35; animation: none; }
@keyframes breathe { 50% { transform: scale(1.12); } }
.scene .hint-ring { fill: none; stroke: var(--accent); stroke-width: 3; animation: ring 1.3s ease-in-out infinite; }
@keyframes ring { 50% { stroke-width: 7; stroke-opacity: .4; } }
.scene .badge rect:first-child { fill: rgba(10, 14, 30, .86); stroke: rgba(255, 255, 255, .18); }
.scene .badge text { fill: #fff; font-size: 11px; font-weight: 750; text-anchor: middle; font-variant-numeric: tabular-nums; }
.scene .badge .track { fill: rgba(255, 255, 255, .15); }
.scene .badge .fill { fill: var(--accent-2); }
.scene .badge.sell .fill { fill: var(--good); }
.scene .badge.asset .fill { fill: var(--cyan); }
.scene .badge { animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-3px); } }
.scene .count circle { fill: var(--accent); }
.scene .count text { fill: #1a0d03; font-size: 10px; font-weight: 800; text-anchor: middle; }
.scene .drone { filter: drop-shadow(0 0 3px #7ff0ff); }

#bodies {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
}
#bodies::-webkit-scrollbar { display: none; }
.body-chip {
  flex: none; display: flex; align-items: center; gap: 7px; padding: 7px 13px 7px 8px; border-radius: 999px;
  background: rgba(10, 14, 30, .55); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: .82rem; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s;
}
.body-chip:hover { background: rgba(255,255,255,.08); }
.body-chip.on { border-color: rgba(255, 179, 107, .8); background: rgba(255, 122, 89, .18); }
.body-chip.locked { color: var(--muted); }
.planet-dot { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, var(--c) 35%, #0008 100%); box-shadow: 0 0 10px var(--c); }

#tutorial { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; display: flex; justify-content: center; pointer-events: none; }
#tutorial:empty { display: none; }
.kaska-bubble {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 560px; width: 100%;
  padding: 10px 12px; border-radius: 16px; background: rgba(12, 16, 34, .82); border: 1px solid rgba(255, 122, 89, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: up .3s ease;
}
.kaska-bubble .kaska { font-size: 1.6rem; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--glass-2); flex: none; }
.kaska-bubble .txt { flex: 1; font-size: .88rem; line-height: 1.38; }
.kaska-bubble .txt b:first-child { display: block; color: var(--accent-2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.kaska-bubble .skip { background: none; border: 0; color: var(--muted); font-size: .75rem; text-decoration: underline; }

/* ============ Panel ============ */
#panel {
  background: #1a2029;
  border-left: 1px solid var(--line);
  padding-right: env(safe-area-inset-right);
}
#ptabs { display: flex; gap: 4px; padding: 10px 10px 0; flex: none; }
#ptabs button {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font-size: .72rem; font-weight: 650; transition: background .15s, color .15s;
}
#ptabs button .ico { font-size: 1.15rem; filter: grayscale(.5); }
#ptabs button:hover { background: rgba(255,255,255,.04); }
#ptabs button.on { background: var(--glass-2); color: var(--text); border-color: var(--line); }
#ptabs button.on .ico { filter: none; }
#ptabs .dot { position: absolute; top: 3px; right: 14%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent-grad); color: #1a0d03; font-size: .62rem; font-weight: 800; display: grid; place-items: center; }

#screen { flex: 1; overflow-y: auto; padding: 12px 14px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.loading { color: var(--muted); text-align: center; }
.panel-head { margin: 2px 2px 12px; }
.panel-head h2 { margin: 0 0 2px; }
h2 { font-size: 1.15rem; margin: 6px 2px 8px; font-weight: 750; letter-spacing: -.01em; }
h2 small { font-weight: 500; font-size: .8rem; }
h3 { margin: 0 0 6px; font-size: .98rem; font-weight: 700; }
h3.sec { margin: 18px 2px 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
p { line-height: 1.45; }

.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; box-shadow: inset 0 1px 0 var(--glass-hi);
}
.card.highlight { border-color: rgba(255, 122, 89, .55); box-shadow: 0 0 0 3px rgba(255, 122, 89, .12); }
.card.dashed { border-style: dashed; background: transparent; text-align: center; color: var(--muted); }
.card.goal .num { white-space: nowrap; }
.card.goal { cursor: pointer; display: grid; gap: 8px; margin-top: 16px; }
.card.goal:hover { border-color: var(--line-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--glass-2); font-weight: 700; transition: transform .08s, filter .15s, background .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #1c0d02; box-shadow: 0 6px 18px rgba(255, 110, 60, .3); }
.btn.primary:disabled { background: var(--glass-2); color: var(--muted); box-shadow: none; border-color: var(--line); opacity: 1; font-weight: 600; }
.btn.crystal { background: linear-gradient(135deg, #3a2a6e, #2a1f52); border-color: rgba(196, 163, 255, .6); color: #eadfff; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 107, 122, .6); color: var(--bad); background: transparent; }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: .8rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 1.15rem; }
.btn.glow, .hbtn.glow { animation: glow 1.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(255, 122, 89, .3), 0 0 26px rgba(255, 122, 89, .7); } }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-2); color: var(--muted); flex: none; }
.link-btn { background: none; border: 0; color: var(--accent-2); font-size: .82rem; font-weight: 600; padding: 8px 2px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.back { color: var(--muted); padding-top: 0; }

.bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--accent-grad); transition: width .5s; }
.bar.sell > i { background: linear-gradient(90deg, #1fb984, var(--good)); }
.bar.cap > i { background: linear-gradient(90deg, #4f7bd9, #8fb0ff); }
.bar.paused > i { background: repeating-linear-gradient(45deg, #666 0 6px, #444 6px 12px); }

.seg { display: flex; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 13px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px 4px; font-size: .8rem; color: var(--muted); }
.seg button.on { background: var(--glass-2); color: var(--text); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255, 122, 89, .7); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-2); font-size: .82rem; }
.chip.on { background: var(--accent); color: #1a0d03; }

/* --- İnşa paneli --- */
.hint-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); border: 1px dashed var(--line-2); background: rgba(255,255,255,.02); }
.hint-card .big { font-size: 1.8rem; animation: tap 1.6s ease-in-out infinite; }
@keyframes tap { 50% { transform: translateY(-4px); } }
.ratings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.ratings > div { background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 5px; font-size: .74rem; color: var(--muted); }
.pips { display: flex; gap: 3px; }
.pips i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); }
.pips i.on { background: var(--accent-grad); }
.ratings > div:nth-child(2) .pips i.on { background: linear-gradient(90deg, #1fb984, var(--good)); }
.ratings > div:nth-child(3) .pips i.on { background: linear-gradient(90deg, #ff9a6b, var(--bad)); }
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tchip { padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: .8rem; font-weight: 600; }
.tchip.on { border-color: rgba(255, 122, 89, .8); background: rgba(255, 122, 89, .16); }
.tchip.locked { color: var(--muted); border-style: dashed; cursor: default; }
.opts { display: grid; gap: 10px; }
.opt-card {
  position: relative; padding: 12px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line);
  display: grid; gap: 10px; transition: border-color .15s, transform .15s;
}
.opt-card:hover { border-color: var(--line-2); }
.opt-card.rec { border-color: rgba(255, 122, 89, .55); background: linear-gradient(180deg, rgba(255, 122, 89, .1), var(--glass)); }
.opt-card .rec-tag { position: absolute; top: -9px; right: 12px; background: var(--accent-grad); color: #1a0d03; font-size: .66rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .03em; }
.oc-head { display: flex; align-items: center; gap: 10px; }
.oc-head b { display: block; font-size: 1rem; }
.oc-head small { font-size: .76rem; }
.oc-head .art { width: 104px; height: 83px; flex: none; border-radius: 10px; }
.oc-head { align-items: flex-start !important; }
.oc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.oc-stats > div { background: rgba(0,0,0,.2); border-radius: 10px; padding: 6px 8px; display: grid; gap: 1px; }
.oc-stats small { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.oc-stats b { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.mini-site { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; padding: 10px 12px; margin-bottom: 6px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); font-size: .84rem; cursor: pointer; }
.mini-site:hover { border-color: var(--line-2); }
.mini-site .bar { grid-column: 1 / -1; height: 6px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: .85rem; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; }
.kv .total { font-weight: 750; border-top: 1px solid var(--line); padding-top: 6px; }
.kv s { color: var(--muted); }

.body-locked { text-align: center; padding: 20px 6px; }
.body-locked .planet { width: 120px; height: 120px; border-radius: 50%; margin: 6px auto 16px; background: radial-gradient(circle at 34% 30%, #fff 0%, var(--c) 30%, #05060c 100%); box-shadow: 0 0 50px color-mix(in srgb, var(--c) 45%, transparent), inset -16px -14px 30px #000a; animation: spin 18s linear infinite; }
@keyframes spin { to { filter: hue-rotate(10deg); } }
.body-locked .actions { display: grid; gap: 8px; margin-top: 14px; }

/* --- Tasarım --- */
.ctrl { margin: 12px 0; }
.ctrl > label { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.ctrl > label b { color: var(--text); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.25); }
.stepper button { width: 40px; height: 38px; border: 0; background: var(--glass-2); font-size: 1.15rem; font-weight: 700; }
.stepper span { min-width: 40px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.mix { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; font-size: .85rem; }
.mix .unitname small { display: block; color: var(--muted); font-size: .7rem; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 30px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle { border: 1px solid var(--line); background: rgba(0,0,0,.2); border-radius: 11px; padding: 7px 10px; font-size: .78rem; color: var(--muted); }
.toggle.on { border-color: var(--good); color: var(--text); background: rgba(63, 224, 160, .12); }
.toggle small { display: block; font-size: .68rem; opacity: .8; }
.msg { font-size: .8rem; padding: 7px 10px; border-radius: 10px; margin: 6px 0; }
.msg.err { background: rgba(255, 107, 122, .14); color: #ffc0c7; }
.msg.wrn { background: rgba(255, 209, 102, .12); color: #ffe3a3; }
.profit-big { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.risk-Düşük { color: var(--good); } .risk-Orta { color: var(--warn); } .risk-Yüksek { color: var(--bad); }

/* --- Projeler --- */
.site .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.site .head h3 { font-size: .92rem; margin: 0; }
.tag { font-size: .68rem; padding: 3px 8px; border-radius: 999px; background: var(--glass-2); color: var(--muted); white-space: nowrap; font-weight: 650; }
.tag.build { background: rgba(255, 122, 89, .18); color: var(--accent-2); }
.tag.sell { background: rgba(63, 224, 160, .15); color: var(--good); }
.history-row { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; padding: 7px 0; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }

/* --- Ofis --- */
.card.upgrade { display: grid; gap: 10px; background: linear-gradient(160deg, rgba(255, 122, 89, .14), var(--glass) 60%); border-color: rgba(255, 122, 89, .35); }
.unlocks { margin: 0; padding-left: 18px; font-size: .8rem; color: var(--muted); display: grid; gap: 2px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.stats-grid > div { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.stats-grid small { font-size: .7rem; color: var(--muted); }
.stats-grid b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
details.fold summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
details.fold[open] summary::after { transform: rotate(180deg); }
details.fold[open] summary { margin-bottom: 8px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.ach .i { font-size: 1.2rem; filter: grayscale(1); opacity: .45; }
.ach.done .i { filter: none; opacity: 1; }
.quick { display: none; }

/* ============ Modal ============ */
#modal-root:empty { display: none; }
#modal-root {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 12px;
  background: rgba(3, 5, 12, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s;
}
.modal {
  width: 100%; max-width: 460px; max-height: calc(100dvh - 24px); overflow-y: auto;
  background: #1f2630; border: 1px solid var(--line-2);
  border-radius: 22px; padding: 18px 18px 18px; box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08); animation: pop .25s ease;
}
#modal-root.noanim, #modal-root.noanim .modal { animation: none; }
.modal h2 { margin: 0 0 8px; font-size: 1.25rem; text-align: center; }
.modal .close { float: right; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.modal .actions { display: grid; gap: 8px; margin-top: 14px; }
.opt { text-align: left; display: block; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); margin-bottom: 8px; transition: border-color .15s; }
.opt b { display: block; }
.opt small { color: var(--muted); }
.opt:hover { border-color: var(--accent); }
.welcome-cash { text-align: center; font-size: 2rem; font-weight: 800; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.emoji-hero { font-size: 3rem; text-align: center; margin: 2px 0 6px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.4)); }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-height: 480px) {
  #scene { inset: 0; }
  .body-chip { padding: 5px 10px 5px 6px; font-size: .76rem; }
  #hud { min-height: 46px; padding-top: max(5px, env(safe-area-inset-top)); padding-bottom: 5px; }
  .modal { padding: 12px 16px; }
  .emoji-hero { font-size: 2rem; margin: 0; }
  .wheel-wrap { width: 200px !important; height: 200px !important; }
}

/* VIP */
.haggle { position: relative; height: 46px; border-radius: 14px; overflow: hidden; display: flex; margin: 16px 0 8px; border: 1px solid var(--line-2); }
.haggle > div { height: 100%; }
.haggle .z-red { background: #b9455a; } .haggle .z-yellow { background: #c9a43a; } .haggle .z-green { background: #22b07d; }
.haggle .cursor { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: #fff; box-shadow: 0 0 12px #fff; border-radius: 3px; }
.timer { height: 4px; background: var(--accent-grad); border-radius: 2px; transition: width .1s linear; }

/* Çark */
.wheel-wrap { position: relative; width: 270px; height: 270px; margin: 8px auto; }
.wheel-wrap svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.wheel-wrap .rot { transform-origin: 150px 150px; transition: transform 3.2s cubic-bezier(.17,.84,.25,1); }
.wheel-wrap .pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--accent); filter: drop-shadow(0 2px 3px #000); z-index: 1; }
.wheel-wrap .slice { cursor: pointer; stroke: #0b1328; stroke-width: 2; }
.wheel-wrap .slice.locked { opacity: .3; }
.wheel-wrap text { fill: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }

/* Toast */
#toasts { position: fixed; left: 12px; top: 104px; z-index: 30; width: min(400px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
@media (orientation: portrait) { #toasts { top: 64px; bottom: auto; left: 50%; transform: translateX(-50%); } }
.toast { background: rgba(12, 16, 34, .92); border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 12px; padding: 9px 12px; font-size: .84rem; animation: up .25s; box-shadow: 0 10px 30px rgba(0,0,0,.4); backdrop-filter: blur(10px); }
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
.toast.gold { border-left-color: var(--rep); }
.float-cash { position: fixed; z-index: 40; pointer-events: none; color: var(--good); font-weight: 800; animation: floatup 1.1s ease-out forwards; text-shadow: 0 2px 6px #000; }
@keyframes floatup { to { transform: translateY(-36px); opacity: 0; } }

/* ============ Şehir teması (v0.3) ============ */
.cal { font-size: .78rem; font-weight: 650; padding: 6px 11px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
@media (max-width: 720px) { .cal { display: none; } }
.card.cash { display: grid; gap: 6px; background: linear-gradient(160deg, rgba(255, 179, 107, .12), var(--glass) 55%); }
.cash-big { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
.cash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cash-row > div { background: rgba(0,0,0,.2); border-radius: 10px; padding: 6px 8px; display: grid; gap: 1px; }
.cash-row small { font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cash-row b { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
details.flow summary { cursor: pointer; font-size: .78rem; color: var(--muted); margin-top: 4px; }
details.flow .kv { margin-top: 8px; }
.plot-card { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.plot-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.plot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.plot-grid > div { display: grid; gap: 1px; }
.plot-grid small { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.plot-grid b { font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1000px) { .plot-grid { grid-template-columns: repeat(2, 1fr); } }
.tag.gold { background: rgba(255, 209, 102, .18); color: var(--warn); }
.tag.good { background: rgba(63, 224, 160, .15); color: var(--good); }
.oc-head small { display: block; line-height: 1.3; }

/* ============ Şehir haritası (v0.4) ============ */
.citymap { display: block; width: 100%; height: 100%; min-width: 780px; min-height: 555px; user-select: none; }
#scene { overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
#scene::-webkit-scrollbar { display: none; }
.citymap .ground { fill: #232a33; }
.citymap .road { fill: none; stroke: #3a414c; stroke-linecap: round; }
.citymap .lane { fill: none; stroke: #596270; stroke-width: 1.5; stroke-dasharray: 10 10; }
.citymap .block { rx: 8; }
.citymap .water { fill: #2b4a63; }
.citymap .shore { fill: none; stroke: #3d6587; stroke-width: 3; }
.citymap .wave { fill: none; stroke: #4f7da3; stroke-width: 1.5; stroke-linecap: round; }
.citymap .bridge { fill: #4b5462; stroke: #6b7686; stroke-width: 1.5; }
.citymap .hill { fill: #27332c; }
.citymap .park { fill: #3f7d58; }
.citymap .tree { fill: #4f9a6a; }
.citymap .park-label { fill: #cfe9d8; font-size: 10px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.citymap .roof .shadow { fill: rgba(0, 0, 0, .25); }
.citymap .roof .top { fill: #3a4352; }
.citymap .roof .edge { fill: none; stroke: rgba(255, 255, 255, .08); }
.citymap .roof .ac { fill: rgba(255, 255, 255, .14); }
.citymap .roof.mine .top { fill: #4fd1a5; }
.citymap .roof.mine .edge { stroke: rgba(255, 255, 255, .45); }
.citymap .roof.mine.past .top { fill: #2f9c7a; }
.citymap .roof.asset.mall .top { fill: #b48cf2; }
.citymap .roof.asset.hotel .top { fill: #5fb8f5; }
.citymap .hqroof .top { fill: #ffa07f; }
.citymap .hq { cursor: pointer; }
.citymap .hq-t { fill: #2a0f05; font-size: 9px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.citymap .asset-ico { font-size: 12px; text-anchor: middle; pointer-events: none; }
.citymap .parcel { cursor: pointer; }
.citymap .lot { stroke-width: 1.5; }
.citymap .lot.forsale { fill: rgba(255, 122, 89, .1); stroke: #ff7a59; stroke-dasharray: 5 4; transition: fill .15s; }
.citymap .parcel:hover .lot.forsale { fill: rgba(255, 122, 89, .22); }
.citymap .lot.site { fill: #3b3428; stroke: #ffc66b; }
.citymap .lot.owned { fill: rgba(79, 209, 165, .12); stroke: #4fd1a5; }
.citymap .lot.sel { stroke-width: 3.5; stroke-dasharray: none; filter: drop-shadow(0 0 8px rgba(255, 122, 89, .8)); }
.citymap .lot.locked { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .15); stroke-dasharray: 4 4; }
.citymap .slab { fill: rgba(255, 198, 107, .45); }
.citymap .crane circle { fill: #ffc66b; }
.citymap .crane line { stroke: #ffc66b; stroke-width: 2.5; stroke-linecap: round; }
.citymap .hint-ring { fill: none; stroke: #ff7a59; stroke-width: 3; animation: ring 1.3s ease-in-out infinite; }
.citymap .count { fill: #ff7a59; }
.citymap .count-t { fill: #2a0f05; font-size: 10px; font-weight: 800; text-anchor: middle; }
.citymap .plabel { cursor: pointer; }
.citymap .price { fill: #12161c; stroke: #ff7a59; }
.citymap .price.on { fill: #ff7a59; }
.citymap .price-t { fill: #ffb49d; font-size: 11px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.citymap .price-t.on { fill: #2a0f05; }
.citymap .pname { fill: #e6ebf2; font-size: 11.5px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #1c2128; stroke-width: 3px; pointer-events: none; }
.citymap .pname.on { fill: #ffa07f; }
.citymap .badge rect:first-child { fill: rgba(18, 22, 28, .92); stroke: rgba(255, 255, 255, .2); }
.citymap .badge.build rect:first-child { stroke: #ffc66b; }
.citymap .badge.sell rect:first-child, .citymap .badge.past rect:first-child { stroke: #4fd1a5; }
.citymap .badge text { fill: #fff; font-size: 11px; font-weight: 750; text-anchor: middle; font-variant-numeric: tabular-nums; pointer-events: none; }
.citymap .badge .track { fill: rgba(255, 255, 255, .15); }
.citymap .badge .fill { fill: #ffc66b; }
.citymap .badge.sell .fill, .citymap .badge.past .fill { fill: #4fd1a5; }
.citymap .badge.asset .fill { fill: #6cb8ff; }
.citymap .street { fill: #8f99a8; font-size: 11px; font-weight: 600; text-anchor: middle; pointer-events: none; }
.citymap .water-t { fill: #8fb7d8; font-size: 11px; font-style: italic; font-weight: 600; text-anchor: middle; pointer-events: none; }
.citymap .veil { fill: rgba(12, 15, 20, .55); }
.citymap .veil-t { fill: #e6ebf2; font-size: 20px; font-weight: 800; text-anchor: middle; }
.lotplan { display: block; width: 100%; height: auto; border-radius: 10px; }
.body-chip { background: rgba(18, 22, 28, .85); }
.body-chip.on { border-color: rgba(255, 122, 89, .9); background: rgba(255, 122, 89, .16); }
.kaska-bubble { background: rgba(26, 32, 41, .94); border-color: rgba(255, 122, 89, .55); }
