/* Çözüm Tahtası ve kamp sunumunun ORTAK araç çubuğu + ölçü araçları görünümü (tahta.blade.php'den ayrıldı, 2 Ara 2026).
   Sayfaya özel kurallar (sekmeler, sayfa numarası, sayaç, arşiv paneli…) ilgili sayfada kalır. */
    /* Araç çubuğu (18 Eki 2026, yenilendi): gruplar beyaz "kart", ikonlar tek çizgi ailesi, üstüne gelince
       hemen açılan ipucu (#balon, kısayoluyla). Sığmazsa alt satıra iner; --cubuk JS'te (ResizeObserver) eşitlenir. */
    #ust { position:fixed; left:0; right:0; top:var(--bosluk); z-index:4; min-height:44px; display:flex; flex-wrap:wrap; align-items:center; gap:5px 6px; padding:0 8px 6px; background:#f3f0e8; border-bottom:1px solid var(--cizgi); box-shadow:0 2px 10px -6px rgba(22,35,61,.35); user-select:none; }
    body.tam:not(.alt)::before { content:''; position:fixed; left:0; right:0; top:0; height:var(--bosluk); background:#f3f0e8; z-index:4; }
    body.alt #ust { top:auto; bottom:0; border-bottom:0; border-top:1px solid var(--cizgi); padding:6px 8px 6px; }
    #ust button { border:0; background:transparent; font:inherit; font-size:13px; font-weight:700; color:var(--murekkep); height:34px; min-width:34px; padding:0 8px; border-radius:9px; cursor:pointer; white-space:nowrap; flex:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; line-height:1; transition:background .12s, color .12s; }
    #ust button svg { width:19px; height:19px; flex:none; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
    #ust button:hover { background:#efebe1; }
    #ust button:active { transform:translateY(.5px); }
    #ust button.secili { background:var(--murekkep); color:#fff; }
    #ust button:disabled { opacity:.35; cursor:default; background:transparent; }
    /* Gruplar bölünmez: çubuk satır atlarken grubun ortasından değil arasından kırılır. */
    #ust .grup { display:flex; align-items:center; gap:2px; flex:none; padding:3px; background:#fff; border:1px solid #e6e1d4; border-radius:12px; box-shadow:0 1px 2px rgba(22,35,61,.06); }
    #ust .ince-ayrac { width:1px; height:22px; background:#e6e1d4; margin:0 3px; flex:none; }
    #ust .arac { width:34px; padding:0; }
    #ust .arac.yazi { font-family:'Fraunces',Georgia,serif; font-size:18px; font-weight:900; }
    #ust .ikon { width:34px; padding:0; font-size:16px; }
    #ust .ana { background:var(--murekkep); color:#fff; padding:0 12px; }
    #ust .ana:hover { background:#24365a; }
    #ust .kalinlik { width:28px; min-width:28px; padding:0; }
    #ust .kalinlik i { display:block; border-radius:50%; background:currentColor; }
    #ust .renk { width:26px; min-width:26px; height:26px; border-radius:50%; padding:0; margin:0 1px; border:0; box-shadow:inset 0 0 0 2px rgba(255,255,255,.5); }
    #ust .renk:hover { background:inherit; transform:scale(1.1); }
    #ust .renk.beyaz { box-shadow:inset 0 0 0 1.5px #c9c3b4; }
    #ust .renk.secili { box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--murekkep); background:inherit; }
    #ust .etiket { font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:#8a8577; padding:0 4px; }
    #ust .grup.sag { margin-left:auto; }
    #cetvel { position:absolute; z-index:3; transform-origin:0 0; display:none; background:rgba(252,250,243,.86); border:1px solid rgba(22,35,61,.35); border-top:2px solid #16233d; border-radius:0 0 6px 6px; box-shadow:0 6px 18px -8px rgba(0,0,0,.45); cursor:move; touch-action:none; user-select:none; }
    #cetvel .uc { position:absolute; right:0; top:0; height:100%; cursor:ew-resize; background:repeating-linear-gradient(90deg, transparent 0 4px, rgba(22,35,61,.22) 4px 6px); border-radius:0 0 6px 0; }
    #cetvel .dondur { position:absolute; border-radius:50%; background:#16233d; color:#fff; display:grid; place-items:center; cursor:grab; box-shadow:0 2px 6px rgba(0,0,0,.3); }
    #cetvel .kontrol { position:absolute; left:50%; bottom:8%; transform:translateX(-50%); display:flex; align-items:center; gap:.35em; font-family:'Karla',system-ui,sans-serif; font-weight:800; color:#16233d; white-space:nowrap; }
    #cetvel .kontrol button { font:inherit; border:0; border-radius:.3em; background:#16233d; color:#fff; padding:0 .45em; line-height:1.35; cursor:pointer; }
    #cetvel .aci { position:absolute; left:0; top:-1.6em; display:none; background:#16233d; color:#fff; font-weight:800; padding:0 .4em; border-radius:.3em; font-family:'Karla',system-ui,sans-serif; }
    /* açıölçer + pergel (1 Ara 2026): gövde tıklamayı geçirir, yalnız tutamaklar yakalar */
    #aciolcer, #pergel { position:absolute; z-index:3; width:0; height:0; transform-origin:0 0; display:none; pointer-events:none; touch-action:none; user-select:none; }
    #aciolcer svg, #pergel svg { pointer-events:none; }
    #aciolcer text.ic { fill:#c1352b; font-size:.78em; }
    #aciolcer .tut { position:absolute; border-radius:50%; background:#16233d; color:#fff; display:grid; place-items:center; pointer-events:auto; box-shadow:0 2px 6px rgba(0,0,0,.3); }
    #aciolcer .tasi { cursor:move; } #aciolcer .dondur { cursor:grab; }
    #aciolcer .kontrol { position:absolute; left:0; transform:translateX(-50%); display:flex; align-items:center; gap:.35em; pointer-events:auto; font-family:'Karla',system-ui,sans-serif; font-weight:800; color:#16233d; white-space:nowrap; background:rgba(252,250,243,.9); border-radius:.4em; padding:.15em .3em; }
    #aciolcer .kontrol button { font:inherit; border:0; border-radius:.3em; background:#16233d; color:#fff; padding:0 .45em; line-height:1.35; cursor:pointer; }
    #pergel .tut { pointer-events:all; }
    #pergel .tasi { cursor:move; } #pergel .uzat { cursor:ew-resize; } #pergel .dondur { cursor:grab; } #pergel .kapat { cursor:pointer; }
    #kalemImlec { position:fixed; left:0; top:0; z-index:8; pointer-events:none; display:none; will-change:transform; }
    /* Sağda yüzen araç kutusu (1 Ara 2026) — varsayılan yerleşim; ▲/▼ ile üste/alta alınabilir.
       Sahne kutunun solunda biter (sayfa kutunun altında kalmaz); dar ekranda pano.js üst çubuğa döner. */
    :root { --yan:212px; }
    body.yan #ust { left:auto; right:10px; top:calc(var(--bosluk) + 10px); bottom:auto; width:var(--yan); max-height:calc(100vh - var(--bosluk) - 20px);
        overflow-y:auto; overflow-x:hidden; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:6px; padding:8px;
        border:1px solid #e0dbcd; border-radius:18px; box-shadow:0 14px 34px -14px rgba(22,35,61,.55); scrollbar-width:thin; }
    body.yan #ust .grup { flex-wrap:wrap; justify-content:center; gap:2px; }
    body.yan #ust .grup.sag { margin-left:0; }
    body.yan #ust .ince-ayrac { width:100%; height:1px; margin:2px 0; }
    body.yan #ust .kalinlik { width:26px; min-width:26px; }
    body.yan #ust .etiket { flex:1; text-align:center; }
    body.yan #sahne-kap { top:var(--bosluk); right:calc(var(--yan) + 20px); }
    body.yan #bildirim { top:calc(var(--bosluk) + 14px); left:calc(50% - var(--yan) / 2); }
    /* Sol kutu: sağ kutunun aynası */
    body.yan.sol #ust { right:auto; left:10px; }
    body.yan.sol #sahne-kap { right:0; left:calc(var(--yan) + 20px); }
    body.yan.sol #bildirim { left:calc(50% + var(--yan) / 2); }
    /* Üst / alt çubuk TEK SATIR: küçük tuşlar, yazılar yalnız ipucunda, hizalama grubu gizli (Alt+ok tuşları çalışır);
       yine sığmazsa satır yana kayar, alta inmez. */
    body:not(.yan) #ust { display:grid; grid-auto-flow:column; grid-auto-columns:max-content; grid-template-rows:auto auto; align-items:center;
        column-gap:0; row-gap:5px; overflow-x:auto; overflow-y:hidden; padding-left:6px; padding-right:6px; scrollbar-width:thin; }
    body:not(.yan) #ust > .grup { grid-row:2; margin-right:4px; }
    body.alt #ust { grid-template-rows:auto; } body.alt #ust > .grup { grid-row:1; }
    body:not(.yan) #ust button:not(.renk):not(.kalinlik) { height:30px; min-width:30px; width:30px; padding:0; }
    body:not(.yan) #ust .araclar button { width:32px; min-width:32px; height:32px; }
    body:not(.yan) #ust button svg { width:17px; height:17px; }
    body:not(.yan) #ust button svg.renkli { width:21px; height:21px; }
    body:not(.yan) #yakinOran { width:auto !important; padding:0 6px !important; }
    body:not(.yan) #ust .etiket, body:not(.yan) #ust .grup.hiza { display:none; }
    body:not(.yan) #ust .renk { width:22px; min-width:22px; height:22px; }
    body:not(.yan) #ust .kalinlik { width:22px; min-width:22px; height:30px; }
    body:not(.yan) #ust .ince-ayrac { margin:0 1px; }
    /* Renkli, kabartmalı tuşlar (1 Ara 2026): ikonlar çok renkli resim, tuş üç boyutlu; seçili tuş içe basık + mavi halka */
    #ust button:not(.renk):not(.kalinlik) { background:linear-gradient(#ffffff, #f0ece2); border:1px solid #ddd6c5; box-shadow:0 2px 0 #cbc3b0, inset 0 1px 0 #fff; }
    #ust button:not(.renk):not(.kalinlik):hover { background:linear-gradient(#ffffff, #f7f4ec); }
    #ust button:not(.renk):not(.kalinlik):active { transform:translateY(2px); box-shadow:0 0 0 #cbc3b0; }
    #ust button:not(.renk):not(.kalinlik).secili { background:linear-gradient(#cfe0ff, #e3edff); color:#16233d; border-color:#1d4ed8; transform:translateY(1px); box-shadow:inset 0 2px 4px rgba(29,78,216,.3), 0 0 0 1px #1d4ed8; }
    #ust button.ana:not(.renk):not(.kalinlik), #ust button.ana:not(.renk):not(.kalinlik):hover { background:linear-gradient(#2b4068, #16233d); color:#fff; border-color:#0e1830; box-shadow:0 2px 0 #0a1224, inset 0 1px 0 rgba(255,255,255,.18); }
    #ust button:disabled { box-shadow:none !important; }
    #ust .grup { gap:4px; }
    #ust button svg.renkli { width:25px; height:25px; fill:none; stroke:none; overflow:visible; filter:drop-shadow(0 1px .5px rgba(0,0,0,.18)); }
    #ust .araclar button { width:38px; height:38px; min-width:38px; }
    #geri, #ileriAl { color:#1d4ed8 !important; } #temizle, #pdfKaydet { color:#c1352b !important; }
    #indir, #bosEkle { color:#2f7d5c !important; } #sayacDugme { color:#6b4fd8 !important; }
body:not(.yan) #temizle { font-size:0; gap:0; }   /* üst/alt çubukta yalnız simge */
@media (max-width:1620px) {
        body:not(.yan) #ust button:not(.renk):not(.kalinlik), body:not(.yan) #ust .araclar button { width:27px; min-width:27px; height:27px; }
        body:not(.yan) #ust button svg.renkli { width:19px; height:19px; }
        body:not(.yan) #ust .renk { width:19px; min-width:19px; height:19px; margin:0; }
        body:not(.yan) #ust .kalinlik { width:17px; min-width:17px; }
        body:not(.yan) #ust .grup { padding:2px; gap:2px; border-radius:10px; }
        body:not(.yan) #boslukAyar { display:none !important; }
}
