/* ══════════════════════════════════════════════════════════════════
   v5.12 — TEK ÖLÇÜ: düğme ve yazı boyutlarını eşitler (EN SON yüklenir)

   Ölçüm (390px telefon): zoom düğmeleri 32px, sohbet/menü 40px, kalem
   36px, renkler 38px (seçili renk 45px'e büyüyordu), pencere kapatma
   düğmeleri 40px, İlk Adımlar kapatma 40px (masaüstünde 18px). Menüde
   sağ sütun ekrandan taşıyordu (grid 1fr 1fr + uzun yazı = 209px sütun).
   Artık katmanlar ayrı ayrı büyütüp küçültmüyor; ölçü buradan gelir.
   ══════════════════════════════════════════════════════════════════ */

:root{
  --pf-hud-btn: 36px;   /* masaüstü harita düğmeleri (pixelplanet ölçüsü) */
  --pf-close:   28px;   /* pencere kapatma düğmeleri */
}

/* Menü ızgarası: uzun yazı sütunu genişletip ekrandan taşırmasın */
html#pp#pp body .tb-sheet-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)) !important; }
html#pp#pp body .tb-sheet-item{ min-width:0 !important; }
html#pp#pp body .tb-sheet-item-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html#pp#pp body .tb-sheet-item-desc{ white-space:normal !important; overflow-wrap:anywhere; line-height:1.25 !important; }
/* Profil başlık şeridi kapatma düğmesini içine alsın (düğme taşıyordu) */
html#pp#pp body #profile-card .pc-header{
  align-items:center !important; min-height:calc(var(--pf-close) + 6px) !important;
  padding-top:3px !important; padding-bottom:3px !important; box-sizing:border-box !important;
}

/* Kapatma düğmeleri her pencerede aynı boy */
html#pp#pp body .pc-close,
html#pp#pp body .tb-sheet-close,
html#pp#pp body #onb-card .onb-x{
  width:var(--pf-close) !important; height:var(--pf-close) !important;
  min-width:var(--pf-close) !important; min-height:var(--pf-close) !important;
  padding:0 !important; font-size:14px !important; line-height:1 !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
}

/* Seçili renk büyüyüp komşusunun üstüne binmesin — çerçeveyle belli olsun */
html#pp#pp body #ptoolbar .psw.sel{ transform:none !important; }

/* Profil: istatistik sayıları ve sekmeler ölçülü */
html#pp#pp body #profile-modal .pc-stat-val{ font-size:1.15rem !important; }
html#pp#pp body #profile-modal .pc-tab{ font-size:13px !important; }

/* ── TELEFON (dik + yan çevrilmiş) ─────────────────────────────── */
@media (max-width:768px), (pointer:coarse) and (max-height:500px){
  :root{
    --pf-hud-btn: 34px;
    --pf-swatch:  32px;
    --pf-close:   32px;
  }
  /* Harita düğmeleri: zoom, sohbet, menü, kalem — hepsi aynı kare */
  html#pp#pp body #zbtn .zb,
  html#pp#pp body #chat-btn,
  html#pp#pp body #tb-hamburger,
  html#pp#pp body #ptoolbar #pen-toggle,
  html#pp#pp body .ctrl-custom-btn{
    width:var(--pf-hud-btn) !important; height:var(--pf-hud-btn) !important;
    min-width:var(--pf-hud-btn) !important; min-height:var(--pf-hud-btn) !important;
    font-size:15px !important; line-height:1 !important; padding:0 !important;
  }
  html#pp#pp body #zbtn{ gap:4px !important; }
  /* Renk paleti: tek boy kareler */
  html#pp#pp body #ptoolbar .psw,
  html#pp#pp body #ptoolbar .psw.sel{
    width:var(--pf-swatch) !important; height:var(--pf-swatch) !important;
    min-width:var(--pf-swatch) !important; min-height:var(--pf-swatch) !important;
  }
  html#pp#pp body #ptoolbar{ gap:4px !important; padding:4px !important; }
  /* Koordinat kutusu düğme sütunuyla aynı yazı boyu */
  html#pp#pp body #coord-box{ font-size:11px !important; }
  /* İlk Adımlar kartı: haritayı kaplamasın */
  html#pp#pp body #onb-card{ width:min(232px, calc(100vw - 110px)) !important; font-size:12px !important; }
  html#pp#pp body #onb-card .onb-step{ padding-top:5px !important; padding-bottom:5px !important; }
  html#pp#pp body #onb-card .onb-cta{ min-height:30px !important; font-size:12px !important; }
  /* Menü kartları */
  html#pp#pp body .tb-sheet-item-name{ font-size:13px !important; }
  html#pp#pp body .tb-sheet-item-desc{ font-size:11px !important; }
  /* Profil */
  html#pp#pp body #profile-modal .pc-stat-val{ font-size:1.05rem !important; }
  html#pp#pp body #profile-modal .pc-tab{ font-size:12px !important; padding-left:8px !important; padding-right:8px !important; }
}

/* ── v5.16: profil başlığı (kendi profilim) ──────────────────────────
   VIP'te sağdaki düğmeler (Hikaye, Banner, Kartı kaydet, sil) isim
   sütununu ~90px'e sıkıştırıyordu: ad, fraksiyon etiketi, OWNER, ünvan ve
   Lv/seri/Bits hapları TEK TEK alt alta düşüyordu. Düğmeler artık kendi
   satırında, isim sütunu genişliği korunuyor. */
@media (min-width:769px){
  html#pp#pp body #profile-modal .pc-hero-row{ flex-wrap:wrap !important; row-gap:10px !important; }
  html#pp#pp body #profile-modal .pc-head-col{ flex:1 1 240px !important; min-width:0 !important; }
  html#pp#pp body #profile-modal .pc-hero-actions{
    flex:1 0 100% !important; display:flex !important; flex-direction:row !important;
    flex-wrap:wrap !important; justify-content:flex-start !important; align-items:center !important;
    gap:6px !important; padding-bottom:0 !important; margin:0 !important;
  }
}
html#pp#pp body #profile-modal #pc-username-display{
  display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:6px !important;
}
html#pp#pp body #profile-modal #pc-username-display > *,
html#pp#pp body #profile-modal #pc-head-chips > *{ flex:0 0 auto !important; }
html#pp#pp body #profile-modal #pc-head-chips{ display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; gap:6px !important; }
/* Avatar kare, ilerleme çerçevesi de kare: köşeler aynı hizada */
html#pp#pp body #profile-modal .pc-avatar-ring,
html#pp#pp body #profile-modal .pc-av-ringwrap{ border-radius:0 !important; }
html#pp#pp body #profile-modal .pc-xp-ring{ transform:none !important; }

/* ── v5.17: TEK YAZI TİPİ (pixelplanet gibi: Montserrat) ─────────────
   Pixelify Sans, Chakra Petch, Exo 2, Inter, JetBrains Mono, Space
   Grotesk, Plus Jakarta Sans karışık kullanılıyordu. pixelplanet her
   yerde Montserrat kullanır (tuş etiketi <kbd> Arial). SVG ikonlara
   dokunulmaz. Değişkenler de aynı fonta bağlanır ki satır içi stiller
   ve JS'in ürettiği HTML de uysun. */
:root{
  --font-display:'Montserrat', Arial, sans-serif;
  --font-ui:'Montserrat', Arial, sans-serif;
  --font-mono:'Montserrat', Arial, sans-serif;
}
html#pp#pp body,
html#pp#pp body *:not(svg):not(svg *){
  font-family:'Montserrat', Arial, sans-serif !important;
  letter-spacing:normal;
}
html#pp#pp body kbd{ font-family:Arial, Helvetica, sans-serif !important; }

/* ── v5.18: istatistik kutuları KARE ve büyük (fraksiyon/devlet) ──────
   Telefonda 4 kutu yan yana sıkışıyordu: rakam ve "Pixels on territory"
   gibi etiketler dar, uzun dikdörtgenlerde alt alta kırılıyordu. Kutular
   artık kare; rakam ortada büyük, etiket altında ortalı. Telefonda 2×2. */
html#pp#pp body .wp-tiles,
html#pp#pp body .fc-readout{
  display:grid !important; grid-template-columns:repeat(4, minmax(0,150px)) !important;
  justify-content:start !important;
  gap:8px !important; margin:12px 0 !important; border:0 !important; background:none !important;
}
html#pp#pp body .wp-tile,
html#pp#pp body .fc-ro{
  aspect-ratio:1 / 1; min-width:0 !important; box-sizing:border-box !important;
  display:flex !important; flex-direction:column !important;
  align-items:center !important; justify-content:center !important; text-align:center !important;
  gap:6px !important; padding:8px !important; border:2px solid var(--pp-line, #000) !important;
}
html#pp#pp body .wp-tile b,
html#pp#pp body .fc-ro b{
  display:block !important; font-size:clamp(20px, 6vw, 30px) !important; line-height:1.05 !important;
  font-weight:700 !important; white-space:nowrap !important; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}
html#pp#pp body .wp-tile span,
html#pp#pp body .fc-ro span{
  display:flex !important; flex-direction:column !important; align-items:center !important;
  gap:3px !important; font-size:12px !important; line-height:1.2 !important;
  white-space:normal !important; text-align:center !important;
}
html#pp#pp body .wp-tile span svg{ width:14px !important; height:14px !important; }
@media (max-width:768px), (pointer:coarse) and (max-height:500px){
  html#pp#pp body .wp-tiles,
  html#pp#pp body .fc-readout{ grid-template-columns:repeat(2, minmax(0,1fr)) !important; justify-content:stretch !important; }
  html#pp#pp body .wp-tile b,
  html#pp#pp body .fc-ro b{ font-size:30px !important; }
  html#pp#pp body .wp-tile span,
  html#pp#pp body .fc-ro span{ font-size:13px !important; }
}

/* ── v5.24: [hidden] HER ZAMAN gizler ───────────────────────────────
   .tb-btn / .tb-sheet-item kurallarındaki display:…!important, hidden
   özniteliğini eziyordu: Modtools düğmesi NORMAL OYUNCULARA görünüyordu
   (modtools.js düğmeyi hidden ile gizliyor). Menü ve pencerelerdeki
   hidden öğeler artık kesin gizli. */
html#pp#pp body [hidden],
html#pp#pp body .tb-btn[hidden],
html#pp#pp body .tb-sheet-item[hidden],
html#pp#pp body #mt-menu-btn[hidden],
html#pp#pp body #ts-mtbtn[hidden]{ display:none !important; }

/* ── v5.25: çakışma onarımı (tests/overlap-check.py) ─────────────────
   1) Sohbet başlığı: sekmeler (Genel/Fraksiyon/DM) daralmıyordu; 320px
      pencerede "+" yarım, kapatma düğmesi tamamen dışarıda kalıyordu.
      Sekmeler artık daralır/kayar, iki düğme her zaman tam görünür.
   2) Masaüstünde sohbet penceresi (left:16px) sol alttaki zoom/ses/
      koordinat sütununun (left:12px, ~148px genişlik) üstüne biniyordu;
      düğmelerin kenarları pencerenin yanından taşıyordu. Pencere sütunun
      sağına alındı.
   3) Dar telefonda (≤360px) menü başlıkları "Oyun Hakk…" diye kesiliyordu;
      artık alt satıra kırılır. */
html#pp#pp body #chat-header{ gap:4px !important; padding-left:8px !important; padding-right:8px !important; min-width:0 !important; }
html#pp#pp body #chat-tabs{
  flex:1 1 auto !important; min-width:0 !important;
  overflow-x:auto !important; overflow-y:hidden !important; scrollbar-width:none;
}
html#pp#pp body #chat-tabs::-webkit-scrollbar{ display:none; }
html#pp#pp body #chat-tabs .ch-tab{ flex:0 0 auto !important; padding-left:6px !important; padding-right:6px !important; white-space:nowrap !important; font-size:13px !important; }
html#pp#pp body #chat-tabs .ch-tab span{ font-size:13px !important; }
html#pp#pp body #chat-header #chat-expand,
html#pp#pp body #chat-header .ch-close{ flex:0 0 auto !important; margin:0 !important; }
@media (hover:hover) and (pointer:fine) and (min-width:769px){
  html#pp#pp body #chat-panel:not(.chat-wide){ left:172px !important; }
}
html#pp#pp body .tb-sheet-item-name{ white-space:normal !important; overflow-wrap:break-word; text-overflow:clip !important; }
/* Ekran Kontrol Paneli: "Koordinat linki kop…" kesiliyordu (controls.js satır içi stil) */
html#pp#pp body .ctrl-row-label{ white-space:normal !important; text-overflow:clip !important; overflow-wrap:break-word; min-width:0 !important; line-height:1.25 !important; }
/* Giriş/kayıt kutusu SAYDAMDI: arkadaki İlk Adımlar kartı, zoom düğmeleri ve
   renk şeridi formun yazılarıyla iç içe görünüyordu. Kutu artık opak pencere. */
html#pp#pp body #login .lbox{
  background:var(--pp-win, #fcfcfc) !important; border:1px solid var(--pp-line, #000) !important;
}
/* Telefonda kısa bildirim (#popup, bottom:72px) İlk Adımlar kartının ve
   koordinat kutusunun üstüne biniyordu (yeni oyuncu ikisini aynı anda görür).
   pixelplanet gibi üst ortaya, sayaç (.cooldownbox) ve .notifybox'ın altına. */
@media (max-width:768px), (pointer:coarse) and (max-height:500px){
  html#pp#pp body #popup{ top:96px !important; bottom:auto !important; }
}

/* ── v5.26: telefonda sohbet (dikey ekran) ───────────────────────────
   1) Büyütülmüş sohbet telefonda üstte yatay kanal şeridine dönmeliydi
      (27-chat.css mobil bloğu), ama '#chat-panel.chat-wide.open' kuralı
      daha özgül olduğu için sol sütun düzeni kalıyordu: kanal çubuğu
      ekranın ~%40'ını yiyor, "Yeni" düğmesi ekran dışında kalıyordu.
   2) Sekmeler 30px, büyüt düğmesi 26px yüksekti — parmak için küçük.
   3) Klavye açıkken panel yine %60 yükseklikte kalıyordu; mesaj alanı
      ~75px'e iniyordu. chat-rich.js yazarken paneli görünür alanın
      tamamına yayar (.chat-typing). */
@media (max-width:768px){
  html#pp#pp body #chat-panel.chat-wide.open{
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:auto auto minmax(0,1fr) auto !important;
    grid-template-areas:"baslik" "yan" "mesajlar" "altlik" !important;
  }
  html#pp#pp body #chat-panel.chat-wide #chat-side{
    width:auto !important; min-width:0 !important; max-width:100% !important;
    flex-direction:row !important; align-items:center !important;
    overflow-x:auto !important; overflow-y:hidden !important;
    border-right:0 !important; border-bottom:1px solid var(--pp-line, #000) !important;
    padding:4px 6px !important; gap:4px !important;
  }
  html#pp#pp body #chat-panel.chat-wide #chat-side > *{ flex:0 0 auto !important; }
  html#pp#pp body #chat-panel.chat-wide .chs-label{ display:none !important; }
  html#pp#pp body #chat-panel.chat-wide .chs-item{ min-height:34px !important; }
  html#pp#pp body #chat-panel.chat-wide .chs-bos{ display:none !important; }   /* "Henüz yok" şeritte boşa yer kaplıyordu */
}
@media (max-width:768px), (pointer:coarse) and (max-height:500px){
  html#pp#pp body #chat-tabs .ch-tab{ min-height:34px !important; }
  html#pp#pp body #chat-header #chat-expand,
  html#pp#pp body #chat-header .ch-close{
    width:34px !important; height:34px !important; min-width:34px !important; min-height:34px !important;
  }
  html#pp#pp body #chat-panel.open.chat-typing{
    top:var(--pf-vv-top, 0px) !important; bottom:auto !important;
    height:var(--pf-vv-h, 100%) !important; max-height:none !important;
  }
}

/* ── v5.28: sezon aşaması şeridi + Modtools > Sezon ─────────────────── */
html#pp#pp body #pf-season-banner{
  position:fixed; top:76px; left:50%; transform:translateX(-50%);
  max-width:min(560px, calc(100vw - 32px)); box-sizing:border-box;
  padding:8px 14px; z-index:60; pointer-events:none;
  background:var(--pp-wait-bg, #fff6d5); color:var(--pp-wait-txt, #000);
  border:1px solid var(--pp-line, #000);
  font:600 13px/1.4 'Montserrat', Arial, sans-serif; text-align:center;
}
@media (max-width:960px){ html#pp#pp body #pf-season-banner{ top:100px; font-size:12px; } }
html#pp#pp body #ppf-modtools .sz-row{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:6px 0; }
html#pp#pp body #ppf-modtools .sz-on{ background:#c9e9c4 !important; font-weight:700 !important; }
html#pp#pp body #ppf-modtools .sz-start{ border-color:#b00 !important; color:#b00 !important; font-weight:700 !important; }
html#pp#pp body #ppf-modtools .sz-cost input{ width:72px; }
html#pp#pp body #ppf-modtools .sz-list{ list-style:none; padding:0; margin:6px 0; }
html#pp#pp body #ppf-modtools .sz-list li{ display:flex; justify-content:space-between; align-items:center; gap:8px; padding:4px 0; border-top:1px solid var(--pp-sep, #ccc); }
/* v5.29 Modtools > Liderler (leaders.js) */
html#pp#pp body #ppf-modtools .ld-table td{ vertical-align:middle; }
html#pp#pp body #ppf-modtools .ld-st{ white-space:nowrap; }
html#pp#pp body #ppf-modtools .ld-flag{ width:22px; height:auto; vertical-align:middle; border:1px solid var(--pp-sep, #ccc); }
html#pp#pp body #ppf-modtools .ld-none{ color:var(--pp-muted, #888); font-style:italic; }
html#pp#pp body #ppf-modtools .ld-act{ display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
html#pp#pp body #ppf-modtools .ld-act input{ width:140px; min-height:32px; box-sizing:border-box; }
html#pp#pp body #ppf-modtools .ld-act .mt-submit{ min-height:32px; }
html#pp#pp body #ppf-modtools #ld-filter{ width:180px; min-height:32px; box-sizing:border-box; }
html#pp#pp body #ppf-modtools .ld-count{ font-weight:700; }
@media (max-width:600px){
  html#pp#pp body #ppf-modtools .ld-table th:nth-child(3),
  html#pp#pp body #ppf-modtools .ld-table td:nth-child(3){ display:none; }
  html#pp#pp body #ppf-modtools .ld-table th{ white-space:nowrap; }
  html#pp#pp body #ppf-modtools .ld-st{ white-space:normal; }
  html#pp#pp body #ppf-modtools .ld-cur{ white-space:nowrap; }
  html#pp#pp body #ppf-modtools .ld-act input{ width:110px; }
}

/* ── v5.30 Fraksiyon penceresi YATAY (kullanıcı: "dikey değil yatay yap,
   arama kısmı yok"). Pencere 420px dardı; sekme şeridi 720px olup
   nowrap'la kırpılıyordu → Sohbet/Diplomasi/İstatistik/Ara sekmeleri
   hiç görünmüyordu. Geniş ekranda iki sütun: solda devlet künyesi +
   sayılar, sağda bütün sekmeler (sarar) ve içerik. ── */
html#pp#pp body #faction-modal .fc-tabs{ flex-wrap:wrap !important; overflow:visible !important; }
html#pp#pp body #faction-modal .fc-tab{ flex:0 1 auto !important; white-space:nowrap; }
@media (min-width:900px){
  html#pp#pp body #faction-modal #faction-card:has(.fc-side), html#pp#pp body #faction-modal #faction-card:has(.fc-dossier){
    width:min(1120px, calc(100vw - 48px)) !important; max-width:min(1120px, calc(100vw - 48px)) !important;
    max-height:calc(100vh - 48px) !important;
  }
  html#pp#pp body #faction-modal #fc-body:has(> .fc-side){
    display:grid !important; grid-template-columns:320px minmax(0, 1fr); grid-template-rows:auto 1fr;
    column-gap:18px; row-gap:12px; align-items:start;
  }
  html#pp#pp body #faction-modal #fc-body > .fc-side{
    grid-column:1; grid-row:1 / span 2; position:sticky; top:0;
    display:flex; flex-direction:column; gap:12px;
  }
  html#pp#pp body #faction-modal .fc-side > .fc-standard{ margin:0 !important; }
  html#pp#pp body #faction-modal .fc-side > .fc-readout{ margin:0 !important; grid-template-columns:repeat(4, minmax(0, 1fr)) !important; gap:6px !important; }
  html#pp#pp body #faction-modal .fc-side .fc-ro{ padding:4px !important; }
  html#pp#pp body #faction-modal .fc-side .fc-ro b{ font-size:22px !important; }
  html#pp#pp body #faction-modal .fc-side .fc-ro span{ font-size:11px !important; }
  html#pp#pp body #faction-modal #fc-body > .fc-tabs{ grid-column:2; grid-row:1; margin:0 !important; }
  html#pp#pp body #faction-modal #fc-body > .fc-panel{ grid-column:2; grid-row:2; min-width:0; margin:0 !important; }
  /* Arama listesi geniş pencerede daha çok satır göstersin */
  html#pp#pp body #faction-modal #fc-browse-home-list{ max-height:min(60vh, 560px) !important; }
}
html#pp#pp body #faction-modal #fc-browse-home-search{ padding-left:34px !important; }
@media (max-width:899px){
  html#pp#pp body #faction-modal .fc-side > .fc-readout{ grid-template-columns:repeat(4, minmax(0, 1fr)) !important; gap:6px !important; }
  html#pp#pp body #faction-modal .fc-side .fc-ro{ padding:4px !important; }
  html#pp#pp body #faction-modal .fc-side .fc-ro b{ font-size:22px !important; }
  html#pp#pp body #faction-modal .fc-side .fc-ro span{ font-size:11px !important; }
}

/* ── v5.31 Diplomasi: "dışişleri defteri" (faction.js _renderDiploRows) ──
   Duruş grupları tek vurgu: her grubun renkli başlık çizgisi + sayısı.
   Satır sakin: devlet rengi yalnız sol şerit, ad okunur mürekkeple. */
html#pp#pp body #faction-modal{
  --dl-war:#d8443c; --dl-ally:#2c9d6b; --dl-nap:#3b82c4; --dl-neutral:var(--wp-muted, #6b7587);
}
html#pp#pp body #faction-modal .fc-dl-search{ position:relative; display:block; margin:0 0 10px; }
html#pp#pp body #faction-modal .fc-dl-search-ic{
  position:absolute; left:12px; top:50%; transform:translateY(-50%); display:flex; pointer-events:none; color:var(--wp-muted);
}
html#pp#pp body #faction-modal .fc-dl-search-ic svg{ width:16px; height:16px; }
html#pp#pp body #faction-modal .fc-dl-search input{ width:100%; padding-left:38px !important; min-height:40px; box-sizing:border-box; }
html#pp#pp body #faction-modal .fc-dl-list{
  display:flex; flex-direction:column; gap:14px; max-height:min(58vh, 540px); overflow-y:auto;
  padding:2px 4px 2px 0; overscroll-behavior:contain;
}
html#pp#pp body #faction-modal .fc-dl-group{ display:flex; flex-direction:column; gap:4px; flex-shrink:0; }
html#pp#pp body #faction-modal .fc-dl-head{
  --g:var(--dl-neutral);
  display:flex; align-items:center; gap:8px; margin:0 0 4px; padding:0 0 6px;
  border-bottom:3px solid var(--g); color:var(--wp-title);
  font-size:14px; font-weight:700; letter-spacing:0; text-transform:none;
}
html#pp#pp body #faction-modal .fc-dl-group.is-war  .fc-dl-head{ --g:var(--dl-war); }
html#pp#pp body #faction-modal .fc-dl-group.is-ally .fc-dl-head{ --g:var(--dl-ally); }
html#pp#pp body #faction-modal .fc-dl-group.is-nap  .fc-dl-head{ --g:var(--dl-nap); }
html#pp#pp body #faction-modal .fc-dl-head svg{ width:16px; height:16px; color:var(--g); }
html#pp#pp body #faction-modal .fc-dl-head b{
  margin-left:auto; min-width:26px; padding:1px 7px; text-align:center;
  background:var(--g); color:#fff; font-size:12px; font-weight:700;
}
html#pp#pp body #faction-modal .fc-dl-row{
  all:unset; box-sizing:border-box; flex-shrink:0;
  display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:12px;
  min-height:58px; padding:8px 10px 8px 14px; cursor:pointer; position:relative;
  background:var(--wp-base) !important; border:2px solid var(--wp-base3) !important;
  color:var(--wp-text) !important; font-family:inherit; box-shadow:none !important; border-radius:0 !important;
  text-align:left !important; width:100%; margin:0 !important; filter:none !important; opacity:1 !important;
}
html#pp#pp body #faction-modal .fc-dl-row::before{
  content:""; position:absolute; left:-2px; top:-2px; bottom:-2px; width:5px; background:var(--dl-c);
}
html#pp#pp body #faction-modal .fc-dl-row:hover{ background:var(--wp-base2) !important; border-color:var(--wp-ink) !important; }
html#pp#pp body #faction-modal .fc-dl-row:focus-visible{ outline:3px solid var(--dl-nap); outline-offset:1px; }
html#pp#pp body #faction-modal .fc-dl-row:active{ transform:translate(1px,1px); }
html#pp#pp body #faction-modal .fc-dl-flag{ display:flex; width:42px; height:28px; flex-shrink:0; }
html#pp#pp body #faction-modal .fc-dl-flag img{
  width:42px !important; height:28px !important; object-fit:cover; border-radius:0 !important;
  box-shadow:0 0 0 2px var(--wp-ink) !important; image-rendering:auto;
}
html#pp#pp body #faction-modal .fc-dl-emoji{ font-size:22px; line-height:28px; }
html#pp#pp body #faction-modal .fc-dl-main{ display:flex; flex-direction:column; gap:3px; min-width:0; }
html#pp#pp body #faction-modal .fc-dl-name{
  color:var(--wp-title); font-size:15px; font-weight:700; line-height:1.2;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
html#pp#pp body #faction-modal .fc-dl-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; color:var(--wp-muted); font-size:12px; line-height:1.2;
}
html#pp#pp body #faction-modal .fc-dl-meta > span{ display:inline-flex; align-items:center; gap:4px; }
html#pp#pp body #faction-modal .fc-dl-meta svg{ width:12px; height:12px; }
html#pp#pp body #faction-modal .fc-dl-tag{
  padding:0 5px; border:1px solid var(--wp-base3); background:var(--wp-base2);
  color:var(--wp-text); font-weight:700; font-size:11px;
}
html#pp#pp body #faction-modal .fc-dl-lead{ color:var(--wp-text); }
html#pp#pp body #faction-modal .fc-dl-chip{
  --g:var(--dl-neutral);
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px; white-space:nowrap;
  border:2px solid var(--g); color:var(--wp-title); font-size:12px; font-weight:700;
  background:color-mix(in srgb, var(--g) 14%, transparent);
}
html#pp#pp body #faction-modal .fc-dl-chip.is-neutral{ border-style:dashed; color:var(--wp-muted); background:transparent; font-weight:600; }
html#pp#pp body #faction-modal .fc-dl-chip.is-war { --g:var(--dl-war); }
html#pp#pp body #faction-modal .fc-dl-chip.is-ally{ --g:var(--dl-ally); }
html#pp#pp body #faction-modal .fc-dl-chip.is-nap { --g:var(--dl-nap); }
html#pp#pp body #faction-modal .fc-dl-chip svg{ width:14px; height:14px; color:var(--g); }
html#pp#pp body #faction-modal .fc-dl-row.is-war { background:color-mix(in srgb, var(--dl-war) 8%, var(--wp-base)) !important; }
html#pp#pp body #faction-modal .fc-dl-row.is-ally{ background:color-mix(in srgb, var(--dl-ally) 8%, var(--wp-base)) !important; }
html#pp#pp body #faction-modal .fc-dl-row.is-nap { background:color-mix(in srgb, var(--dl-nap) 8%, var(--wp-base)) !important; }
html#pp#pp body #faction-modal .fc-dl-chev{ color:var(--wp-muted); font-size:22px; line-height:1; padding:0 2px; }
html#pp#pp body #faction-modal .fc-dl-row:hover .fc-dl-chev{ color:var(--wp-title); }
html#pp#pp body #faction-modal .fc-dl-hint{ text-align:center; font-size:12px; color:var(--wp-muted); padding-top:10px; }
@media (max-width:600px){
  html#pp#pp body #faction-modal .fc-dl-row{ grid-template-columns:auto minmax(0,1fr) auto; gap:10px; padding:8px 8px 8px 12px; }
  html#pp#pp body #faction-modal .fc-dl-chev{ display:none; }
  html#pp#pp body #faction-modal .fc-dl-chip{ padding:3px 7px; }
  html#pp#pp body #faction-modal .fc-dl-chip.is-neutral span{ display:none; }
  html#pp#pp body #faction-modal .fc-dl-chip.is-neutral::after{ content:"–"; }
}
@media (prefers-reduced-motion:reduce){ html#pp#pp body #faction-modal .fc-dl-row:active{ transform:none; } }

/* ══ v5.32 DEVLET BERATI (faction.js .fc-dossier) ═══════════════════════
   Tek cesur öğe: devletin bayrağı, haritadaki gibi kare kare piksel
   sancak (küçük tuval + pixelated). Ad, 1914 matbaa harfiyle (Old
   Standard TT; Türkçe + Kiril) sancağa binen isim plakasında. Geri kalan
   sakin: sayılar tek sicil şeridi, sekmeler dosya sekmesi gibi panele
   bağlı. Renk = devletin rengi (--fac), yalnız kenar/şerit/vurgu. */
html#pp#pp body #faction-modal .fc-dossier{
  --dos-ink:var(--wp-ink, #1b2a44);
  position:relative; margin:0 0 14px; border:2px solid var(--dos-ink); background:var(--wp-base);
  box-shadow:4px 4px 0 var(--wp-shadow, rgba(0,0,0,.25));
}
html#pp#pp body #faction-modal .fc-dos-banner{
  position:relative; height:132px; overflow:hidden; border-bottom:2px solid var(--dos-ink);
  background:var(--fac, #888);
}
html#pp#pp body #faction-modal .fc-dos-flag{
  display:block; width:100%; height:100%; image-rendering:pixelated;
}
html#pp#pp body #faction-modal .fc-dos-plate{
  position:relative; display:flex; align-items:flex-end; gap:16px;
  padding:0 18px 12px; margin-top:-46px;
}
html#pp#pp body #faction-modal .fc-dos-crest{
  flex:0 0 auto; width:108px; height:72px; display:flex; align-items:center; justify-content:center;
  background:var(--wp-base); border:2px solid var(--dos-ink); box-shadow:3px 3px 0 var(--dos-ink);
  overflow:hidden; position:relative; cursor:default; border-radius:0 !important;
}
html#pp#pp body #faction-modal .fc-dos-crest img{ width:100% !important; height:100% !important; object-fit:cover; border-radius:0 !important; }
html#pp#pp body #faction-modal .fc-dos-crest .fc-logo-inner{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:34px; }
html#pp#pp body #faction-modal .fc-dos-id{
  min-width:0; flex:1; background:var(--wp-base); border:2px solid var(--dos-ink); padding:8px 14px 9px;
  border-left:8px solid var(--fac, var(--dos-ink));
}
html#pp#pp body #faction-modal .fc-dos-name{
  margin:0 0 6px !important; color:var(--wp-title) !important;
  font-family:'Old Standard TT', 'Times New Roman', serif !important;
  font-size:clamp(24px, 3.2vw, 34px) !important; font-weight:700 !important; line-height:1.25 !important;
  letter-spacing:.01em !important; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
html#pp#pp body #faction-modal .fc-dos-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; font-size:12px; color:var(--wp-muted); }
html#pp#pp body #faction-modal .fc-dos-meta > span{ display:inline-flex; align-items:center; gap:5px; line-height:1.2; }
html#pp#pp body #faction-modal .fc-dos-meta svg{ width:13px; height:13px; }
html#pp#pp body #faction-modal .fc-dos-tag{
  padding:2px 6px; background:var(--dos-ink); color:var(--wp-base) !important; font-weight:700; font-size:11px;
}
html#pp#pp body #faction-modal .fc-dos-role{ padding:1px 6px; border:2px solid var(--wp-base3); color:var(--wp-text); font-weight:700; }
html#pp#pp body #faction-modal .fc-dos-role.role-lead{ border-color:#c8961e; color:var(--wp-title); background:color-mix(in srgb, #e3b341 22%, transparent); }
html#pp#pp body #faction-modal .fc-dos-role.role-off{ border-color:#7d63d8; color:var(--wp-title); }
html#pp#pp body #faction-modal .fc-dos-lead{ color:var(--wp-text); font-weight:600; }
html#pp#pp body #faction-modal .fc-dos-rank{ color:var(--wp-title); font-weight:700; }
html#pp#pp body #faction-modal .fc-dos-rank[hidden]{ display:none !important; }

/* Sicil şeridi: kart yok, dikey çizgiyle ayrılmış rakamlar */
html#pp#pp body #faction-modal .fc-dos-ledger{
  display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); margin:0; padding:0;
  border-top:2px solid var(--dos-ink); background:var(--wp-base2);
}
html#pp#pp body #faction-modal .fc-dos-ledger > div{
  display:flex; flex-direction:column-reverse; justify-content:flex-end; gap:2px; padding:10px 14px 11px; min-width:0;
  border-left:1px solid var(--wp-base3);
}
html#pp#pp body #faction-modal .fc-dos-ledger > div:first-child{ border-left:0; }
html#pp#pp body #faction-modal .fc-dos-ledger dt{ margin:0; font-size:12px; color:var(--wp-muted); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html#pp#pp body #faction-modal .fc-dos-ledger dd{
  margin:0; color:var(--wp-title); font-size:24px; font-weight:700; line-height:1.1;
  font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
html#pp#pp body #faction-modal .fc-dos-ledger > div:first-child dd{
  box-shadow:inset 0 -4px 0 color-mix(in srgb, var(--fac, #888) 70%, transparent); align-self:flex-start; max-width:100%;
}
html#pp#pp body #faction-modal .fc-dos-diplo dd{ display:flex; gap:10px; font-size:18px !important; padding-top:3px; }
html#pp#pp body #faction-modal .fc-dos-diplo dd > span{ display:inline-flex; align-items:center; gap:4px; }
html#pp#pp body #faction-modal .fc-dos-diplo svg{ width:15px; height:15px; }
html#pp#pp body #faction-modal .fc-dos-diplo .is-ally svg{ color:var(--dl-ally); }
html#pp#pp body #faction-modal .fc-dos-diplo .is-nap  svg{ color:var(--dl-nap); }
html#pp#pp body #faction-modal .fc-dos-diplo .is-war  svg{ color:var(--dl-war); }

/* Dosya sekmeleri: etkin sekme panele bağlanır, üst kenarı devlet rengi */
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-tabs{
  display:flex !important; flex-wrap:wrap !important; gap:4px !important; padding:0 0 0 6px !important; margin:0 !important;
  background:none !important; border:0 !important; box-shadow:none !important; border-bottom:2px solid var(--wp-ink) !important;
  -webkit-mask-image:none !important; mask-image:none !important;
}
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-tabs .fc-tab{
  flex:0 0 auto !important; min-height:38px; padding:7px 14px !important; margin:0 0 -2px !important;
  border:2px solid transparent !important; border-bottom:0 !important; background:transparent !important; box-shadow:none !important;
  color:var(--wp-muted) !important; font-weight:600 !important;
}
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-tabs .fc-tab:hover{ color:var(--wp-title) !important; background:var(--wp-base2) !important; }
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-tabs .fc-tab.active{
  color:var(--wp-title) !important; background:var(--wp-base) !important;
  border-color:var(--wp-ink) !important; border-top:4px solid var(--fac, var(--wp-ink)) !important; padding-top:5px !important;
}
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-tabs .fc-tab:focus-visible{ outline:3px solid var(--dl-nap); outline-offset:-3px; }
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-panel.active{
  border:2px solid var(--wp-ink); border-top:0; padding:16px; background:var(--wp-base);
}
/* Eski kenar sütun / tekrar eden kapak bu düzende yok */
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier){ display:block !important; }
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) .wp-fchero{ display:none !important; }

@media (max-width:899px){
  html#pp#pp body #faction-modal .fc-dos-banner{ height:96px; }
  html#pp#pp body #faction-modal .fc-dos-plate{ padding:0 10px 10px; margin-top:-34px; gap:10px; }
  html#pp#pp body #faction-modal .fc-dos-crest{ width:72px; height:48px; }
  html#pp#pp body #faction-modal .fc-dos-id{ padding:6px 10px 7px; border-left-width:6px; }
  html#pp#pp body #faction-modal .fc-dos-name{ font-size:22px !important; white-space:normal; }
  html#pp#pp body #faction-modal .fc-dos-ledger{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  html#pp#pp body #faction-modal .fc-dos-ledger > div{ padding:8px 10px; border-top:1px solid var(--wp-base3); }
  html#pp#pp body #faction-modal .fc-dos-ledger > div:nth-child(3n+1){ border-left:0; }
  html#pp#pp body #faction-modal .fc-dos-ledger > div:nth-child(-n+3){ border-top:0; }
  html#pp#pp body #faction-modal .fc-dos-ledger dd{ font-size:19px; }
  html#pp#pp body #faction-modal .fc-dos-ledger dt{ font-size:11px; }
  html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-tabs .fc-tab{ padding:6px 10px !important; min-height:36px; }
  html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) > .fc-panel.active{ padding:12px 10px; }
}
/* v5.32 ince ayar: tekrar eden pencere başlığı, koyu temada etiket, bilgi kutuları */
html#pp#pp body #faction-modal .fc-header:has(+ #fc-body > .fc-dossier){ border-bottom:0 !important; margin:0 0 4px !important; padding-top:6px !important; padding-bottom:6px !important; }
html#pp#pp body #faction-modal .fc-header:has(+ #fc-body > .fc-dossier) #fc-title{ visibility:hidden; }
html#pp#pp body #faction-modal .fc-dos-tag{ background:var(--wp-title) !important; color:var(--wp-base) !important; }
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) .fc-standing,
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) .fc-st-row{
  border:0 !important; box-shadow:none !important; background:transparent !important;
}
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) .fc-standing{ border-top:1px solid var(--wp-base3) !important; }
html#pp#pp body #faction-modal #fc-body:has(> .fc-dossier) .fc-st-row{
  border-bottom:1px solid var(--wp-base3) !important; padding:9px 4px !important; font-size:14px !important; color:var(--wp-text) !important;
}
@media (max-width:899px){
  html#pp#pp body #faction-modal .fc-dos-diplo dd{ gap:6px; font-size:15px !important; }
  html#pp#pp body #faction-modal .fc-dos-diplo svg{ width:12px; height:12px; }
}
/* Kapat düğmesi sancağın sağ üst köşesine biner; boş başlık şeridi kalkar */
html#pp#pp body #faction-modal #faction-card:has(.fc-dossier){ position:relative; }
html#pp#pp body #faction-modal .fc-header:has(+ #fc-body > .fc-dossier){
  position:absolute !important; z-index:3; top:calc(1.75rem + 10px); right:calc(1.75rem + 10px);
  margin:0 !important; padding:0 !important; background:none !important; border:0 !important; width:auto !important;
}
html#pp#pp body #faction-modal .fc-header:has(+ #fc-body > .fc-dossier) #fc-title{ display:none !important; }
@media (max-width:899px){
  html#pp#pp body #faction-modal .fc-header:has(+ #fc-body > .fc-dossier){ top:calc(1.25rem + 8px); right:calc(1.25rem + 8px); }
}

/* v5.34 bot koruması: captcha penceresi (pfc-card üstüne) */
html#pp#pp body .pf-cap .pfc-card{ max-width:400px; }
html#pp#pp body .pf-cap-img{ display:block; width:100%; max-width:360px; aspect-ratio:180/56; height:auto; margin:0 auto .75rem; image-rendering:pixelated; border:2px solid var(--wp-line, rgba(0,0,0,.25)); border-radius:4px; background:#fbf8f0; }
html#pp#pp body .pf-cap-in{ width:100%; box-sizing:border-box; font-size:1.25rem; letter-spacing:.35em; text-align:center; text-transform:uppercase; padding:.55rem .6rem; border-radius:6px; border:2px solid var(--wp-line, rgba(0,0,0,.25)); background:var(--wp-bg, #fff); color:var(--wp-ink, #1d1f2a); }
html#pp#pp body .pf-cap-in:focus-visible{ outline:3px solid var(--accent, #3b82f6); outline-offset:1px; }
html#pp#pp body .pf-cap-msg{ min-height:1.2em; margin:.45rem 0 .7rem; font-size:.82rem; text-align:center; }
html#pp#pp body .pf-cap-msg.err{ color:#d23b3b; }
html#pp#pp body .pf-cap-shake{ animation:pfCapShake .32s; }
@keyframes pfCapShake{ 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
@media (prefers-reduced-motion:reduce){ html#pp#pp body .pf-cap-shake{ animation:none; } }

/* v5.35 imleç önizlemesi: "sway" animasyonu kareyi döndürüp %10 büyütüp
   küçültüyordu (şikâyet: "çok büyüyor"). Artık kare tam basılacak
   pikselin üstünde, sabit durur. */
html#pp#pp body #hover-preview{ animation:none !important; transform:translate(-50%,-50%) !important; box-shadow:0 0 0 1px rgba(0,0,0,.55) !important; }
