/* SPDX-License-Identifier: GPL-3.0-or-later — Copyright (C) 2026 pandakingpunc — MAKAM */
/* MAKAM — koyu devlet paneli teması */
:root {
  --bg: #0a0f1c;
  --bg2: #0d1426;
  --panel: #121a2e;
  --panel2: #172138;
  --panel3: #1d2944;
  --line: #24304d;
  --line2: #2f3d60;
  --text: #e6e9f2;
  --muted: #8a93ad;
  --dim: #5d6683;
  --gold: #d4a84b;
  --gold2: #f0c96a;
  --good: #3fbf7f;
  --bad: #e0565b;
  --warn: #e8b04a;
  --info: #5b8def;
  --paper: #efe6d2;
  --ink: #1d1a14;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #16213d 0%, transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; font-size: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- butonlar ---------- */
.btn {
  background: var(--panel3);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  text-align: left;
}
.btn:hover:not(:disabled) { background: #24335a; border-color: #3d4f7c; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.gold {
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: #241a05; border-color: #a8812f; font-weight: 700;
}
.btn.gold:hover:not(:disabled) { background: linear-gradient(180deg, #ffd981, #deb456); }
.btn.danger { border-color: #7a2f36; background: #3a1a22; }
.btn.danger:hover:not(:disabled) { background: #4d1f29; }
.btn.small { padding: 5px 9px; font-size: 12px; }
.btn.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }

/* ---------- başlangıç ekranı ---------- */
#start {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.start-card {
  width: min(980px, 100%);
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.start-hero {
  padding: 32px 32px 20px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(500px 200px at 20% 0%, rgba(212, 168, 75, .15), transparent 70%);
}
.logo { font-family: var(--serif); font-size: 56px; letter-spacing: 10px; color: var(--gold2); margin: 0; line-height: 1; }
.tagline { color: var(--muted); margin-top: 8px; font-size: 15px; }
.start-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 24px 32px 32px; }
.field { margin-bottom: 14px; }
.field label, .lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font-size: 15px; font-family: inherit;
}
.field input:focus { outline: none; border-color: var(--gold); }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick {
  border: 1px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 10px 12px; cursor: pointer; text-align: left;
}
.pick:hover { border-color: #3d4f7c; }
.pick.sel { border-color: var(--gold); background: #1f2232; box-shadow: inset 0 0 0 1px var(--gold); }
.pick b { display: block; font-size: 14px; }
.pick span { font-size: 12px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.sw.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.flag-preview { display: flex; justify-content: center; padding: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.flag-preview svg { border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.start-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.start-actions .btn { padding: 12px 18px; font-size: 15px; }

/* ---------- üst bar ---------- */
#game { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(10, 15, 28, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand svg { flex: none; border-radius: 3px; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.brand .cn { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.brand .ld { font-size: 12px; color: var(--muted); white-space: nowrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.chip {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; line-height: 1.2;
}
.chip small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.chip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.chip.election b { color: var(--gold2); }
.chip.election.hot { border-color: var(--gold); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 75, .4); } 50% { box-shadow: 0 0 0 6px rgba(212, 168, 75, 0); } }
#endTurn { padding: 10px 18px; font-size: 15px; }
.iconbtn { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 16px; }
.iconbtn:hover { background: var(--panel3); }

/* ---------- yerleşim ---------- */
.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 16px;
  max-width: 1680px;
  margin: 0 auto;
}
.panel {
  background: linear-gradient(180deg, var(--panel), #101729);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.panel + .panel { margin-top: 12px; }
.ptitle { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ptitle .tag { text-transform: none; letter-spacing: 0; }
h2.sec { font-family: var(--serif); font-size: 22px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 13px; }

/* sol panel: göstergeler */
.gauge { text-align: center; }
.gauge svg { display: block; margin: 0 auto; }
.gauge .gv { font-size: 34px; font-weight: 800; margin-top: -48px; font-variant-numeric: tabular-nums; }
.gauge .gl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; position: relative; overflow: hidden; }
.kpi .kl { font-size: 11px; color: var(--muted); }
.kpi .kv { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .kd { font-size: 11px; font-variant-numeric: tabular-nums; }
.kpi .spark { position: absolute; right: 6px; bottom: 6px; opacity: .8; }
.meter { margin-bottom: 12px; }
.meter .mh { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.meter .mh b { font-variant-numeric: tabular-nums; }
.bar { height: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; transition: width .4s; }
.bar .zone { position: absolute; top: 0; bottom: 0; left: 0; background: repeating-linear-gradient(45deg, rgba(224, 86, 91, .25) 0 4px, transparent 4px 8px); }
.bar .mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; }
.mhint { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* sekmeler */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: thin; }
.tab {
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; cursor: pointer; white-space: nowrap; color: var(--muted);
}
.tab:hover { color: var(--text); background: var(--panel); }
.tab.active { color: var(--text); background: var(--panel2); border-color: var(--line2); }
.tab .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; margin-left: 4px; }
.tab.locked { opacity: .6; }

/* gazete */
.paper {
  background: var(--paper); color: var(--ink); border-radius: 6px; padding: 16px 20px 18px;
  box-shadow: var(--shadow); position: relative;
  background-image: radial-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px);
  background-size: 3px 3px;
}
.paper .mast { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double var(--ink); padding-bottom: 6px; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.paper .mast b { font-family: var(--serif); font-size: 22px; letter-spacing: .04em; }
.paper .mast span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.paper h3 { font-family: var(--serif); font-size: 28px; line-height: 1.15; margin: 4px 0 6px; }
.paper p { margin: 0; font-family: Georgia, serif; font-size: 14px; }
.paper .older { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(0, 0, 0, .25); font-size: 12px; display: grid; gap: 3px; }
.paper .older div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.layout > *, .grid2 > *, .diplo > *, .kpis > * { min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* danışman */
.tips { display: grid; gap: 6px; }
.tip { border-left: 3px solid var(--info); background: var(--bg2); padding: 8px 10px; border-radius: 0 8px 8px 0; font-size: 13px; }
.tip.danger { border-color: var(--bad); background: rgba(224, 86, 91, .08); }
.tip.warn { border-color: var(--warn); }
.tip.good { border-color: var(--good); }

/* grafikler */
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

/* gruplar */
.gbars { display: grid; gap: 8px; }
.gbar { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.gbar .bar { height: 12px; }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.gcard .gh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gcard .gi { font-size: 26px; }
.gcard .gn { font-weight: 700; }
.gcard .gs { font-size: 12px; color: var(--muted); }
.gcard .gv { margin-left: auto; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.factors { font-size: 12px; display: grid; gap: 2px; margin-top: 8px; }
.factors div { display: flex; justify-content: space-between; }
.wants { font-size: 12px; color: var(--muted); margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }

/* ekonomi */
.slider { margin-bottom: 12px; }
.slider .sh { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 2px; gap: 6px; }
.slider .sh b { font-variant-numeric: tabular-nums; }
.slider .sd { font-size: 11px; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.btable { width: 100%; border-collapse: collapse; font-size: 13px; }
.btable td { padding: 4px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.btable td:last-child { text-align: right; }
.btable tr.total td { font-weight: 700; border-bottom: none; border-top: 1px solid var(--line2); padding-top: 6px; }
.trend-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.trend-strip div { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px; text-align: center; font-size: 11px; }
.trend-strip b { display: block; font-size: 15px; }

/* eylem butonları */
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.act { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.act .an { font-weight: 600; }
.act .ad { font-size: 11px; color: var(--muted); }
.act .ac { font-size: 11px; color: var(--gold2); }
.act .ar { font-size: 11px; color: var(--bad); }

/* kanunlar */
.laws { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.law { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.law.active { border-color: var(--gold); background: linear-gradient(180deg, rgba(212, 168, 75, .1), var(--bg2)); }
.law .lh { display: flex; gap: 10px; align-items: center; }
.law .li { font-size: 24px; }
.law .ln { font-weight: 700; }
.law .ls { font-size: 11px; color: var(--gold2); }
.law .ldesc { font-size: 12px; color: var(--muted); }
.law .btn { margin-top: auto; text-align: center; }
.fx { display: flex; flex-wrap: wrap; gap: 4px; }
.fxc { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: var(--panel3); border: 1px solid var(--line2); white-space: nowrap; }
.fxc.g { color: #7fe0ae; border-color: rgba(63, 191, 127, .4); background: rgba(63, 191, 127, .1); }
.fxc.b { color: #f08a8e; border-color: rgba(224, 86, 91, .4); background: rgba(224, 86, 91, .1); }
.fxc.n { color: var(--gold2); border-color: rgba(212, 168, 75, .4); }

/* diplomasi */
.diplo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.map { background: #0b1324; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.map svg { width: 100%; height: auto; display: block; }
.map .land { stroke: #0b1324; stroke-width: 2.5; cursor: pointer; transition: filter .15s; }
.map .land:hover { filter: brightness(1.25); }
.map .land.sel { stroke: var(--gold2); stroke-width: 3; }
.map .land.war { animation: warblink 1.2s infinite; }
@keyframes warblink { 50% { stroke: #ff4b55; stroke-width: 4; } }
.map text { pointer-events: none; font-family: var(--sans); }
.ccard { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ccard h3 { margin: 0; font-family: var(--serif); font-size: 20px; }
.ccard .cl { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.relbar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #8e2f37, #6b5a2c 50%, #2f7a55); position: relative; margin: 6px 0 2px; }
.relbar .mark { position: absolute; top: -3px; width: 4px; height: 18px; background: #fff; border-radius: 2px; transform: translateX(-2px); box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); }
.status { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.st { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--panel3); border: 1px solid var(--line2); }
.st.on { border-color: var(--good); color: #7fe0ae; }
.st.bad { border-color: var(--bad); color: #f08a8e; }
.vs { display: grid; gap: 6px; margin: 8px 0; font-size: 12px; }
.vs .row { display: grid; grid-template-columns: 90px 1fr 50px; gap: 8px; align-items: center; }
.vs .row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* savaş */
.warbox { border: 1px solid #7a2f36; background: linear-gradient(180deg, rgba(224, 86, 91, .12), var(--panel)); }
.front { height: 22px; border-radius: 6px; position: relative; overflow: hidden; border: 1px solid var(--line2); margin: 8px 0 4px; }
.front .me { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #2c6a8f, #3f8fbf); transition: width .5s; }
.front .them { position: absolute; right: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #a03a44, #6f2530); }
.front .lab { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 700; }

/* ajans akışı */
.feed { display: grid; gap: 2px; max-height: calc(100vh - 160px); overflow-y: auto; scrollbar-width: thin; }
.feed .fturn { font-size: 11px; color: var(--gold2); text-transform: uppercase; letter-spacing: .1em; margin: 10px 0 4px; }
.feed .fturn:first-child { margin-top: 0; }
.feed .fi { font-size: 12.5px; padding: 4px 0 4px 12px; position: relative; color: #c9cee0; }
.feed .fi::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--info); }
.feed .fi.good::before { background: var(--good); }
.feed .fi.bad::before { background: var(--bad); }
.feed .fi.warn::before { background: var(--warn); }
.feed .fi.event::before { background: var(--gold); }
.feed .fi.action::before { background: #9a7ff0; }

/* ---------- modal ---------- */
#modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 7, 15, .78);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.mcard {
  width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.mcard.wide { width: min(900px, 100%); }
.mhead { padding: 18px 20px 10px; display: flex; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.mhead .mi { font-size: 40px; line-height: 1; }
.mhead .mc { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold2); }
.mhead h2 { font-family: var(--serif); margin: 2px 0 0; font-size: 26px; line-height: 1.15; }
.mbody { padding: 14px 20px 20px; }
.mtext { white-space: pre-line; font-size: 15px; color: #d7dbe8; margin-bottom: 16px; }
.choices { display: grid; gap: 8px; }
.choice { width: 100%; padding: 12px 14px; }
.choice .ct { font-weight: 600; font-size: 14.5px; }
.choice .ch { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.choice .roll { font-size: 11px; color: var(--gold2); margin: 6px 0 3px; }
.choice .req { font-size: 11px; color: var(--bad); margin-top: 4px; }
.mfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.result-msg { font-size: 15px; margin-bottom: 8px; }
.result-msg.ok { color: #9ae6be; }
.result-msg.fail { color: #f4a2a6; }
.changes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cat-afet { --cat: #e07a3f; } .cat-ekonomi { --cat: #3fbf7f; } .cat-siyaset { --cat: #5b8def; }
.cat-ordu { --cat: #9aa36a; } .cat-diplomasi { --cat: #4bb6c9; } .cat-toplum { --cat: #c97fd8; } .cat-tuhaf { --cat: #f0c96a; }
.mcard[class*=cat-] { border-top: 4px solid var(--cat); }

/* ---------- seçim gecesi ---------- */
.election { text-align: center; }
.election .big { font-family: var(--serif); font-size: 44px; color: var(--gold2); margin: 6px 0; letter-spacing: .04em; }
.ebars { display: grid; gap: 14px; margin: 20px 0; text-align: left; }
.ebar .eh { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 4px; font-size: 15px; }
.ebar .eh b { font-variant-numeric: tabular-nums; font-size: 22px; }
.ebar .track { height: 26px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 6px; position: relative; overflow: hidden; }
.ebar .track .f { position: absolute; left: 0; top: 0; bottom: 0; transition: width .25s linear; }
.ebar .track .half { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, .7); }
.counted { color: var(--muted); font-size: 13px; }
.runoff-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; text-align: left; }
.endstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; text-align: left; }
.endstats div { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.endstats small { display: block; color: var(--muted); font-size: 11px; }
.endstats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.score { font-size: 48px; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.ending-title { font-family: var(--serif); font-size: 30px; margin: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- bildirimler ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 150; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast {
  background: var(--panel2); border: 1px solid var(--line2); border-left: 4px solid var(--info); border-radius: 8px;
  padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px; animation: slidein .25s;
}
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }

.locked-box { text-align: center; padding: 30px 10px; color: var(--muted); }
.locked-box .big { font-size: 46px; }
select {
  background: var(--bg2); color: var(--text); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; font-family: inherit;
}

/* ---------- duyarlı ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 270px minmax(0, 1fr); }
  .rightcol { grid-column: 1 / -1; }
  .feed { max-height: 360px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .start-body { grid-template-columns: 1fr; padding: 20px 16px; }
  .start-hero { padding: 24px 16px 16px; }
  .logo { font-size: 42px; }
  .diplo, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .trend-strip { grid-template-columns: repeat(3, 1fr); }
  .chips { margin-left: 0; }
  .runoff-opts { grid-template-columns: 1fr; }
  .topbar { position: static; backdrop-filter: none; }
  #endTurn { position: fixed; right: 16px; bottom: 16px; z-index: 30; box-shadow: 0 8px 24px rgba(0, 0, 0, .55); }
  #toasts { bottom: 76px; }
  main { padding-bottom: 60px; }
}
@media (max-width: 520px) {
  .row3 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .gbar { grid-template-columns: 90px 1fr 38px; }
  .paper h3 { font-size: 22px; }
  .chip { padding: 4px 8px; }
  .chip b { font-size: 13px; }
}
