/* Kesit — arayüz. İki tema: Grafit (koyu, varsayılan) ve Kağıt (açık). Renkler yalnızca değişkenlerden. */
:root, :root[data-theme="dark"] {
  --bg: #0C0E11; --panel: #14171C; --panel2: #1A1E24; --line: #232831; --line2: #2E343E; --hov: #20252D;
  --text: #E8ECF1; --muted: #8E98A6; --dim: #6A7382;
  --accent: #6CB4FF; --accent2: #9CCBFF; --onaccent: #06182E; --accBg: rgba(108,180,255,.10); --accLine: rgba(108,180,255,.38);
  --stage: #0A0B0D; --swoff: #39404B; --logo: #1A3A66;
  --ok: #4CC38A; --warn: #F0B54A; --err: #FF7A7A; --errBg: #3A1D1D; --errLine: #7A3434; --okBg: #13261C; --okLine: #2F6B4B;
  --shadow: 0 10px 34px rgba(0,0,0,.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F5F8; --panel: #FFFFFF; --panel2: #F7F8FA; --line: #DCE1E8; --line2: #CBD2DC; --hov: #EEF1F5;
  --text: #151A21; --muted: #556070; --dim: #6F7987;
  --accent: #1F5FBF; --accent2: #2C6FD6; --onaccent: #FFFFFF; --accBg: rgba(31,95,191,.08); --accLine: rgba(31,95,191,.35);
  --stage: #E4E8ED; --swoff: #BCC4CF; --logo: #1F5FBF;
  --ok: #1B7F4E; --warn: #A86500; --err: #B42318; --errBg: #FDECEA; --errLine: #F2B8B5; --okBg: #E8F6EE; --okLine: #A6D8BC;
  --shadow: 0 10px 30px rgba(20,30,50,.14);
  color-scheme: light;
}
:root {
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --sans: "Geist", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 12.5px/1.4 var(--sans); overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
#app { display: grid; grid-template-rows: 46px 1fr auto auto; height: 100dvh; }
.status { height: 26px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.grow { flex: 1; }

/* Araç çubuğu */
.toolbar { contain: layout paint style; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; letter-spacing: -.01em; margin-right: 4px; white-space: nowrap; }
.brand svg { width: 22px; height: 22px; flex: none; }
.group { display: flex; align-items: center; gap: 2px; padding: 0 4px; border-left: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line); background: var(--panel2); border-radius: 6px; cursor: pointer; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--hov); border-color: var(--line2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .sw:focus-visible, .pill:focus-visible, .seg button:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.icon { width: 30px; padding: 0; justify-content: center; border-color: transparent; background: transparent; color: var(--muted); }
.btn.icon:hover { background: var(--hov); color: var(--text); }
.btn.icon.on { color: var(--accent); background: var(--accBg); border-color: var(--accLine); }
.btn.sm { width: 24px; height: 24px; font-size: 16px; }
.btn.primary { background: var(--accent); color: var(--onaccent); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent2); }
.pill { height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--accLine); background: var(--accBg); color: var(--accent); font-weight: 500; cursor: pointer; white-space: nowrap; }
.pill svg { width: 15px; height: 15px; }
.pill.off { border-color: var(--line); background: transparent; color: var(--muted); }
.pill[aria-pressed="false"] { opacity: .8; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; padding: 2px; gap: 2px; background: var(--bg); }
.seg button { height: 24px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.file-meta { display: flex; align-items: baseline; gap: 10px; min-width: 0; overflow: hidden; margin-left: 4px; flex: 0 1 auto; }
.fname { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; min-width: 60px; flex: 0 1 auto; }
.meta { color: var(--muted); font: 11.5px var(--mono); white-space: nowrap; }
.badge { font: 500 10px var(--mono); padding: 2px 6px; border-radius: 4px; background: var(--accBg); color: var(--accent); letter-spacing: .04em; }
.zoom { contain: layout paint; display: inline-block; min-width: 62px; text-align: center; font: 12px var(--mono); color: var(--text); cursor: pointer; }
#page-input { width: 46px; background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 1px 4px; font: 12px var(--mono); }
.perf-chip { contain: layout paint; font: 11px var(--mono); color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 12px; min-width: 60px; text-align: center; }
.perf-chip.good { color: var(--ok); border-color: var(--okLine); }
.perf-chip.warn { color: var(--warn); border-color: var(--line2); }

/* Gövde: sol panel · görüntü · sağ iyileştirme paneli */
.body { --railw: 46px; --sidew: 252px; --enhw: 316px; display: grid; grid-template-columns: var(--railw) var(--sidew) minmax(0, 1fr) var(--enhw); min-height: 0; position: relative; }
#app.noside .body { --sidew: 0px; }
#app.noenh .body { --enhw: 0px; }
#app.noside .side, #app.noenh .enh { visibility: hidden; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; padding: 0 4px; }
.tab { flex: 1; padding: 10px 2px 8px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.pane { display: none; padding: 12px; overflow: auto; min-height: 0; flex: 1; }
.pane.active { display: block; }
.pane h4, .lbl { margin: 16px 0 8px; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 11.5px; word-break: break-word; }
.kv.small dd { font-size: 11px; }
.kv-box { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11.5px; }
.kv-box b { font: 500 11.5px var(--mono); color: var(--text); }
.thumb { height: 96px; border: 1px solid var(--line); border-radius: 6px; background: var(--stage); display: grid; place-items: center; color: var(--dim); margin-bottom: 10px; overflow: hidden; }
.thumb canvas { max-width: 100%; max-height: 100%; }
.diag { margin-top: 12px; padding: 8px 10px; border: 1px solid var(--accLine); background: var(--accBg); border-radius: 6px; }
.diag h4 { margin: 0 0 6px; color: var(--accent); }
.diag ul { margin: 0; padding-left: 16px; font-size: 12px; }
.diag li { margin: 3px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; font-size: 12px; }
.row > span { color: var(--muted); }
.row select, .row input[type=range] { max-width: 150px; }
.row select, .fld { background: var(--bg); border: 1px solid var(--line2); border-radius: 5px; padding: 3px 6px; height: 28px; }
.row.chk { justify-content: flex-start; }
.hint { color: var(--dim); font-size: 11.5px; margin: 8px 0; }
.pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pages li { padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 12px; background: var(--panel2); }
.pages li:hover { border-color: var(--line2); }
.pages li.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pages li small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: 2px; }
.pages li .pthumb { height: 30px; border-radius: 3px; margin-bottom: 6px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.pages li .pthumb canvas { width: 100%; height: 100%; object-fit: cover; }
pre.bench { white-space: pre-wrap; font: 11px var(--mono); background: var(--stage); border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 360px; overflow: auto; user-select: text; }

/* Sağ panel: görüntü iyileştirme */
.enh { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.enh-head { padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 10px; flex: none; }
.enh-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.enh-title b { font-weight: 600; font-size: 13px; }
.enh-title span { font-size: 10.5px; }
.enh-master { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 10px 11px; border-radius: 8px; background: var(--accBg); border: 1px solid var(--accLine); }
.enh-master b { font-weight: 600; }
.enh-master small { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.enh-master .sw { grid-row: 1 / span 2; grid-column: 2; }
.enh-body { flex: 1; min-height: 0; overflow: auto; padding-bottom: 8px; }
.enh-body .lbl { padding: 0 12px; margin: 14px 0 6px; }
.fxrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.fxrow b { font-weight: 500; display: flex; align-items: center; gap: 7px; }
.fxrow small { grid-column: 1; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.fxrow .sw { grid-row: 1 / span 2; grid-column: 2; }
.tag { font: 500 10px var(--mono); letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: var(--accBg); color: var(--accent); }
.tag[hidden] { display: none; }
.sw { width: 36px; height: 20px; border-radius: 10px; border: 0; padding: 0; background: var(--swoff); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.35); transition: left .15s; }
.sw.on { background: var(--accent); }
.sw.on::after { left: 18px; }
.manual { margin: 12px; padding: 4px 10px 10px; border: 1px solid var(--line); border-radius: 8px; }
.manual .lbl { padding: 0; }
.manual label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 7px 0; }
.manual label span { display: flex; align-items: center; gap: 6px; }
.manual input[type=range] { width: 120px; accent-color: var(--accent); }
.manual output { font: 11px var(--mono); width: 34px; text-align: right; color: var(--muted); }
.enh-foot { flex: none; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }

/* Görüntüleme alanı */
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--stage); }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#view.panning { cursor: grabbing; }
#view.boxmode, #view.cropmode { cursor: crosshair; }
.btn.float { position: absolute; left: 12px; top: 12px; background: var(--panel); box-shadow: var(--shadow); font-size: 12px; }
.btn.float.on { color: var(--accent); border-color: var(--accLine); }
.drop { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.drop.hidden { display: none; }
.drop-card { pointer-events: auto; text-align: center; padding: 36px 48px; border: 1.5px dashed var(--line2); border-radius: 14px; background: var(--panel); max-width: 460px; box-shadow: var(--shadow); }
.drop.over .drop-card { border-color: var(--accent); background: var(--accBg); }
.drop-card svg { width: 44px; height: 44px; color: var(--accent); }
.drop-card h2 { font-size: 17px; margin: 10px 0 4px; font-weight: 600; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.progress { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: min(520px, 90%); background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); }
.p-phase { font-size: 12.5px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.p-phase b { font-family: var(--mono); font-weight: 500; color: var(--accent); }
.p-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.p-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.p-bar.indet i { width: 30%; animation: indet 1.1s infinite ease-in-out; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.p-steps { margin-top: 6px; font: 11px var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.p-steps .done { color: var(--ok); }
.p-steps .cur { color: var(--accent); }
.zbox { position: absolute; border: 1.5px solid var(--accent); background: var(--accBg); pointer-events: none; }
.zbox.crop { border-style: dashed; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.toast { position: fixed; z-index: 100; bottom: 40px; left: 50%; transform: translateX(-50%); background: var(--errBg); border: 1px solid var(--errLine); color: var(--text); padding: 8px 14px; border-radius: 8px; max-width: 80%; font-size: 12.5px; box-shadow: var(--shadow); }
.toast.info { background: var(--okBg); border-color: var(--okLine); }
.nav-dock { position: absolute; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.nav-dock.h { left: 12px; right: 12px; bottom: 12px; height: 64px; }
.nav-dock.v { top: 12px; bottom: 12px; right: 12px; width: 72px; }
.nav-dock.s { right: 12px; bottom: 12px; width: 220px; height: 160px; }
.nav-canvas { display: block; cursor: pointer; touch-action: none; position: absolute; left: 0; top: 0; }
.nav-bg { pointer-events: none; }
.nav-hit { inset: 0; width: 100%; height: 100%; }
.nav-rect { position: absolute; left: 0; top: 0; border: 2px solid var(--accent); background: var(--accBg); box-shadow: 0 0 0 1px rgba(0,0,0,.5); will-change: transform; pointer-events: none; border-radius: 2px; }

/* Durum çubuğu */
.status { contain: strict; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: var(--panel); border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 10px; padding: 16px 20px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog h3 { margin: 0 0 10px; font-size: 14px; }
dialog td { padding: 3px 12px 3px 0; font-size: 12.5px; }
dialog td:first-child { font-family: var(--mono); color: var(--accent); white-space: nowrap; }
dialog form { margin-top: 12px; text-align: right; }

@media (max-width: 1600px) {
  #m-size, #m-dims { display: none; }
}
@media (max-width: 1280px) {
  .meta, .perf-chip { display: none; }
  .fname { max-width: 18vw; }
}

/* Kalıcı pencereler (kırp/işaretle, sayfaları böl) */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; padding: 18px; }
.mbox { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; max-width: 1680px; margin: 0 auto; }
.mhead { height: 44px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); }
.mhead h2 { margin: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.micon { width: 17px; height: 17px; color: var(--accent); flex: none; }
.minfo { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; padding: 0; flex: none; }
.tb svg { width: 18px; height: 18px; }
.tb:hover { background: var(--hov); color: var(--text); }
.tb.on { color: var(--accent); background: var(--accBg); border-color: var(--accLine); }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; flex: none; }
.an-tools, .an-text { flex: none; display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.an-text { background: var(--panel2); gap: 4px; }
.an-text .lbl { margin: 0 6px 0 0; }
.csws { display: flex; gap: 5px; align-items: center; }
.csw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line2); cursor: pointer; padding: 0; }
.csw.on { box-shadow: 0 0 0 2px var(--accent); }
.ilbl { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.fld { background: var(--bg); color: var(--text); border: 1px solid var(--line2); border-radius: 5px; padding: 0 6px; height: 28px; font-size: 12px; }
.rt { height: 28px; min-width: 28px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); border-radius: 5px; cursor: pointer; padding: 0 7px; font-size: 12px; }
.rt.on { background: var(--accBg); border-color: var(--accLine); color: var(--accent); }
.an-main { flex: 1; min-height: 0; display: flex; }
.an-stage { flex: 1; min-width: 0; position: relative; background: var(--stage); overflow: hidden; }
#an-canvas { position: absolute; inset: 0; width: 100%; height: 100%; outline: none; touch-action: none; }
#an-edit { position: absolute; resize: none; border: 1px dashed var(--accent); outline: none; overflow: hidden; margin: 0; box-sizing: border-box; white-space: pre-wrap; }
.an-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 16px; box-shadow: var(--shadow); }
.an-hint { position: absolute; left: 10px; bottom: 8px; font-size: 10.5px; color: var(--dim); pointer-events: none; }
.an-save { flex: 0 0 330px; border-left: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.an-save .lbl { margin: 0; }
.fmts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.fmt { height: 50px; border: 1px solid var(--line2); border-radius: 7px; background: var(--panel2); color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 600; font-size: 13px; }
.fmt span { font: 400 10px var(--mono); color: var(--muted); }
.fmt.on { border-color: var(--accent); background: var(--accBg); color: var(--accent); }
.col { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.chks { display: flex; flex-direction: column; gap: 7px; }
.chks label { display: flex; gap: 8px; align-items: center; }
.chks input { accent-color: var(--accent); }
.est { border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.est .warn { color: var(--warn); }
.prog { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); }
.btns { display: flex; gap: 8px; }
.btns .btn { flex: 1; justify-content: center; }
body.modal-open #app { filter: none; }
.an-text.inactive { opacity: .45; }

.sp-main { flex: 1; min-height: 0; display: flex; }
.sp-side { flex: 0 0 310px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sp-sec { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.sp-sec .lbl { margin: 0; }
.grow-sec { flex: 1; min-height: 0; border-bottom: 0; }
.sp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper b { min-width: 34px; text-align: center; font-size: 13px; color: var(--text); }
.sp-papers { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.btn.sm2 { height: 26px; padding: 0 9px; font-size: 12px; }
.sp-lhead { display: flex; align-items: center; gap: 5px; }
.sp-lines { flex: 1; min-height: 60px; overflow: auto; }
.sp-lines table { width: 100%; border-collapse: collapse; font: 11.5px var(--mono); }
.sp-lines th { text-align: left; font-weight: 500; color: var(--dim); padding: 4px 0; }
.sp-lines td { border-top: 1px solid var(--line); padding: 4px 0; }
.sp-lines td:last-child { text-align: right; }
.fld.sm { width: 92px; height: 24px; font-family: var(--mono); font-size: 11.5px; }
.chkrow { display: flex; gap: 8px; align-items: center; }
.chkrow input { accent-color: var(--accent); }
.sp-right { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--stage); }
.sp-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.sp-bar .lbl { margin: 0; }
.sp-prev { flex: 0 1 46%; min-height: 160px; overflow: auto; padding: 10px 12px; }
#sp-canvas { width: 100%; display: block; cursor: pointer; }
.sp-pages { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; align-content: start; }
.pg { border: 1px solid var(--line2); border-radius: 7px; background: var(--panel); padding: 5px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--text); opacity: .55; }
.pg.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); opacity: 1; }
.pg canvas { width: 100%; height: 60px; border-radius: 3px; background: var(--stage); }
.pg span { display: flex; justify-content: space-between; font-size: 12px; }
.pg em { font: normal 10.5px var(--mono); color: var(--muted); }
.pg.on em { color: var(--accent); }
.sp-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sp-est { font-size: 11px; }
.sp-prog { min-width: 200px; }
.pages li.vpart { padding: 6px 9px; margin-left: 10px; }

/* ======================= LongSheet: araç rayı, denetçi, ölçüm, cetvel ======================= */
.brand b { color: var(--accent); font-weight: 700; }
.rail { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; min-height: 0; }
.rb { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.rb svg { width: 19px; height: 19px; }
.rb:hover { background: var(--hov); color: var(--text); }
.rb.on { background: var(--accBg); color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.rb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#btn-rulers[aria-pressed="true"] { color: var(--accent); }
#ovl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#view.measuremode { cursor: crosshair; }
.itabs { flex: none; display: flex; border-bottom: 1px solid var(--line); padding: 0 6px; }
.itab { flex: 1; height: 38px; border: 0; background: transparent; color: var(--muted); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; font-size: 12.5px; }
.itab.on { color: var(--text); border-bottom-color: var(--accent); }
.itab.close-x { flex: 0 0 38px; display: none; }
.ipane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ipane[hidden] { display: none !important; }
.mpad { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.seg2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; background: var(--bg); }
.seg2 button { height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 500; cursor: pointer; }
.seg2 button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.mcal { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.mcalrow { display: grid; grid-template-columns: 1fr 70px 56px auto; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.mlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mlist:empty { display: none; }
.mlist li { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line2); font-size: 12px; }
.mlist li:first-child { border-top: 0; }
.mlist li b { font: 500 12px var(--mono); }
.mlist li i { width: 10px; height: 10px; border-radius: 2px; background: #E8590C; }
.mlist li.area i { background: transparent; border: 2px solid #E8590C; }
.mlist li button { width: 26px; height: 26px; border: 0; background: transparent; color: var(--dim); cursor: pointer; border-radius: 5px; }
.mlist li button:hover { background: var(--hov); color: var(--text); }
.btns.wrap { flex-wrap: wrap; }
.mpad .btns { flex-wrap: wrap; }
.mpad .btns .btn { flex: 1 1 auto; }
#btn-more { display: none; }
.tabbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 30; }
.more { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--line2); border-radius: 18px 18px 0 0; box-shadow: var(--shadow); padding: 0 12px calc(14px + env(safe-area-inset-bottom)); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.more-grid button { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--text); font-size: 12px; cursor: pointer; }
.more-grid svg { width: 20px; height: 20px; color: var(--accent); }
.sheet-handle { display: none; width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 8px auto 6px; flex: none; }
.more .sheet-handle { display: block; }

/* Dokunmatik: büyük hedefler */
@media (pointer: coarse) {
  .btn.icon, .rb { width: 42px; height: 42px; }
  .btn { height: 38px; }
  .sw { width: 42px; height: 24px; border-radius: 12px; }
  .sw::after { width: 20px; height: 20px; border-radius: 10px; }
  .sw.on::after { left: 20px; }
  .fxrow { padding: 11px 14px; }
  .tab, .itab { height: 44px; }
}

/* ---------- Tablet: 768–1279 px — paneller kayan çekmece ---------- */
@media (max-width: 1279px) {
  .body { --sidew: 0px !important; --enhw: 0px !important; }
  .side, .enh { position: absolute; top: 0; bottom: 0; z-index: 35; box-shadow: var(--shadow); visibility: hidden; transition: transform .18s ease, visibility .18s; }
  .side { left: var(--railw); width: 300px; transform: translateX(-110%); }
  .enh { right: 0; width: 340px; transform: translateX(110%); }
  #app.showside .side { visibility: visible; transform: none; }
  #app.showenh .enh { visibility: visible; transform: none; }
  .itab.close-x { display: block; }
  .meta, .perf-chip, #btn-box, #btn-crop, #btn-split, #btn-100 { display: none; }
  .group:has(#btn-crop) { display: none; }
  .fname { max-width: 22vw; }
}
@media (max-width: 1023px) {
  .seg { display: none; }
  #btn-fitw, #btn-fith, #btn-inv { display: none; }
}

/* ---------- Telefon: < 768 px — üst çubuk + alt sekme çubuğu + alt sayfa ---------- */
@media (max-width: 767px) {
  #app { grid-template-rows: 52px 1fr auto auto; }
  .status, .rail { display: none; }
  .body { --railw: 0px; }
  .toolbar { gap: 4px; padding: 0 6px 0 10px; }
  .toolbar > *:not(.brand):not(.file-meta):not(#btn-more):not(#btn-open):not(.grow) { display: none !important; }
  .brand span { display: none; }
  #btn-open span { display: none; }
  #btn-open { width: 40px; padding: 0; justify-content: center; }
  #btn-more { display: inline-flex; }
  .file-meta { flex: 1 1 auto; }
  .fname { max-width: none; font-size: 13px; }
  .tabbar { display: flex; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--panel); border-top: 1px solid var(--line); z-index: 20; }
  .tabbar button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; cursor: pointer; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar button.on { color: var(--accent); }
  .side { left: 0; top: 0; bottom: 0; width: min(88vw, 340px); }
  .enh { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: min(68vh, 560px); border-radius: 18px 18px 0 0; border-left: 0; border-top: 1px solid var(--line2); transform: translateY(105%); }
  #app.showenh .enh { transform: none; }
  .enh .sheet-handle { display: block; }
  .btn.float { top: 8px; left: 8px; font-size: 11.5px; height: 32px; }
  .nav-dock.h { left: 8px; right: 8px; bottom: 8px; height: 50px; }
  .nav-dock.s { width: 140px; height: 100px; right: 8px; bottom: 8px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 92%; }
  .progress { top: 8px; width: calc(100% - 16px); }
  .drop-card { padding: 26px 20px; margin: 0 14px; }
  /* Kalıcı pencereler tam ekran */
  .modal { padding: 0; }
  .mbox { border-radius: 0; border: 0; }
  .mhead { height: 52px; }
  .minfo { display: none; }
  .an-tools, .an-text { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .an-main { flex-direction: column; }
  .an-stage { flex: 1 1 55%; min-height: 220px; }
  .an-save { flex: 0 1 45%; border-left: 0; border-top: 1px solid var(--line); overflow: auto; }
  .an-hint { display: none; }
  .fmts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sp-main { flex-direction: column; overflow: auto; }
  .sp-side { flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .grow-sec { max-height: 220px; }
  .sp-right { flex: none; min-height: 70vh; }
  .sp-foot { gap: 8px; }
  .sp-foot .ilbl { margin-left: 0; }
  .sp-est { width: 100%; order: 10; }
}
.stage.rulers-on .btn.float { top: 30px; left: 30px; }
.stage.rulers-on .nav-dock.v { top: 30px; }
.stage.rulers-on .progress { top: 30px; }
@media (max-width: 767px) { .enh.compact { height: min(40vh, 340px); } }
@media (min-width: 768px) and (max-width: 1279px) { .enh.compact { bottom: auto; max-height: 70%; border-radius: 0 0 0 14px; } }
/* Izgara yerleşimi açık: kayan (absolute) paneller sütun kaydırmasın */
/* (kayan paneller absolute iken ızgara alanı atanmaz; aksi halde kapsayıcıları 0 genişlikli sütun olur) */
.body > .rail { grid-column: 1; grid-row: 1; }
.body > .stage { grid-column: 3; grid-row: 1; }
@media (min-width: 1280px) { .body > .side { grid-column: 2; grid-row: 1; } .body > .enh { grid-column: 4; grid-row: 1; } }
@media (max-width: 767px) { .btn.float { display: none; } }
.mpad > * { flex-shrink: 0; }
/* Kırp, böl ve alan-zoom araç rayında; üst çubukta tekrar edilmez */
.group:has(#btn-crop), #btn-box { display: none; }
/* ---------- Sayfaları böl: yakınlaştırılabilir önizleme ---------- */
.sp-vbar { flex: none; display: flex; align-items: center; gap: 4px; padding: 5px 10px 5px 12px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.sp-vbar .sp-help { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sp-vbar b { color: var(--text); font-weight: 500; }
.sp-mini { flex: none; height: 46px; padding: 6px 12px; background: var(--panel2); border-bottom: 1px solid var(--line); cursor: pointer; }
#sp-minicv { width: 100%; height: 100%; display: block; }
.sp-prev { flex: 1 1 auto; min-height: 220px; position: relative; overflow: hidden; padding: 0; background: var(--stage); }
#sp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; }
#sp-canvas.grabbing { cursor: grabbing; }
#sp-canvas.col { cursor: col-resize; }
#sp-canvas.row { cursor: row-resize; }
#sp-canvas.cell { cursor: pointer; }
.sp-tip { position: absolute; pointer-events: none; background: var(--accent); color: var(--onaccent); font-size: 11.5px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; box-shadow: var(--shadow); }
.sp-load { position: absolute; right: 12px; bottom: 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; color: var(--muted); }
.sp-pages { flex: none; height: 116px; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 10px 12px; grid-template-columns: none; align-content: stretch; }
.sp-pages .pg { flex: 0 0 132px; }
.sp-pages .pg canvas { height: 56px; }
.sp-lines tr.on td { background: var(--accBg); }
@media (max-width: 767px) { .sp-help { display: none; } .sp-prev { min-height: 50vh; } }
@media (max-width: 767px) {
  .sp-right { min-height: 0; }
  .sp-prev { flex: none; height: 52vh; min-height: 260px; }
  .sp-vbar { flex-wrap: wrap; }
  .sp-foot { max-height: 30vh; overflow: auto; }
  .sp-foot .btn { height: 40px; }
}

/* Ölçüm: yakalama seçenekleri */
.msnap { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lbl2 { font: 500 10.5px var(--mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 4px; }
.chip2 { height: 28px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.chip2 svg { width: 14px; height: 14px; }
.chip2.on { background: rgba(18,184,134,.13); border-color: rgba(18,184,134,.55); color: #12B886; }
.hint .kb { font: 10.5px var(--mono, ui-monospace, monospace); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; white-space: nowrap; }
#m-undo { display: inline-flex; align-items: center; gap: 6px; }
#m-undo:disabled { opacity: .45; cursor: default; }
@media (max-width: 1279px) { .chip2 { height: 36px; padding: 0 11px; } }

/* Ölçüm: tuval üstü araç çubuğu (dokunmatikte Ctrl+Z / Esc yerine) */
.mbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.rulers-on .mbar { top: 34px; }
.mbar[hidden] { display: none; }
.mb-ttl { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 8px; font-size: 12px; font-weight: 600; border-right: 1px solid var(--line); margin-right: 2px; height: 22px; }
.mb-ttl .dot { width: 8px; height: 8px; border-radius: 50%; background: #E8590C; }
.mbar button { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.mbar button:hover:not(:disabled) { background: var(--bg); }
.mbar button:disabled { opacity: .4; cursor: default; }
.mbar svg { width: 15px; height: 15px; }
.mbar kbd { font: 10px var(--mono, ui-monospace, monospace); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
@media (max-width: 1279px) { .mbar button { height: 38px; padding: 0 12px; } .mbar kbd { display: none; } }
@media (max-width: 767px) { .mb-ttl { display: none; } }
/* Tablet: denetçi çekmecesi açıkken araç çubuğu görünen tuval alanının ortasına kayar */
@media (min-width: 768px) and (max-width: 1279px) { #app.showenh .mbar { left: calc((100% - 340px) / 2); } }

/* Yakalama: ana anahtar + modlar */
.msnap { display: flex; flex-direction: column; gap: 8px; }
.msnap-head { display: flex; align-items: center; justify-content: space-between; }
.msnap .chips { flex-wrap: wrap; }
.snap-sub.off { opacity: .45; pointer-events: none; }
.sw { width: 36px; height: 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); position: relative; cursor: pointer; padding: 0; flex: none; }
.sw .knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.sw.on { background: #12B886; border-color: #12B886; }
.sw.on .knob { transform: translateX(16px); background: #fff; }
.mbar .mb-snap { color: var(--muted); }
.mbar .mb-snap.on { color: #12B886; background: rgba(18,184,134,.12); }
.msnap { align-items: stretch; }
.mbar button { white-space: nowrap; }
/* Ölçüm: ölçek + kâğıt boyutu */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mgrid .col { min-width: 0; }
.mcustom { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.mcustom[hidden] { display: none; }
.mcustom span { flex: none; }
.mcustom b { font: 500 12px var(--mono, ui-monospace, monospace); color: var(--text); }
.mcustom input { flex: 1; min-width: 0; }
.fld.bad { border-color: #E03131; }
.mlist li b small { display: block; font: 400 10.5px var(--mono, ui-monospace, monospace); color: var(--muted); text-align: right; }

/* Ölçüm paneli: kartlar, birim, kalibrasyon */
.mcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--panel) 92%, var(--bg)); }
.mcard > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { font: 500 10.5px var(--mono, ui-monospace, monospace); padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.on, .pill.cal { color: #7C5CFF; border-color: rgba(124,92,255,.5); background: rgba(124,92,255,.1); }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.seg4 { display: flex; border: 1px solid var(--line); border-radius: 7px; padding: 2px; gap: 2px; background: var(--bg); }
.seg4 button { height: 24px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.seg4 button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.minfo { margin: 0; font-size: 11px; line-height: 1.45; }
.seg2 button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg2 button svg { width: 15px; height: 15px; }
.mcal-card .hint { margin: 0; }
.mcalrow { display: grid; grid-template-columns: 1fr 64px auto auto; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.mcalrow > span { grid-column: 1 / -1; color: #7C5CFF; font-weight: 600; }
.mcalrow[hidden] { display: none; }
.fld.bad { border-color: #E03131 !important; }
.reflist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.reflist:empty { display: none; }
.reflist li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 7px; background: var(--bg); font-size: 12px; }
.reflist i { font: 600 10.5px var(--mono, ui-monospace, monospace); font-style: normal; color: #fff; background: #7C5CFF; border-radius: 4px; padding: 1px 5px; }
.reflist span { display: flex; flex-direction: column; min-width: 0; font-family: var(--mono, ui-monospace, monospace); }
.reflist small { color: var(--muted); font-size: 10.5px; font-family: inherit; }
.reflist b { font: 500 11px var(--mono, ui-monospace, monospace); color: #12B886; }
.reflist b.bad { color: #E8590C; }
.reflist button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.calres { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.calres[hidden] { display: none; }
.calres div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.calres b { font: 500 12px var(--mono, ui-monospace, monospace); color: var(--text); }
.calres .warn, .calres .tip { margin: 2px 0 0; font-size: 11.5px; line-height: 1.45; padding: 7px 9px; border-radius: 7px; }
.calres .warn { background: rgba(232,89,12,.1); color: #E8590C; }
.calres .tip { background: rgba(124,92,255,.08); color: var(--muted); }
#m-calpick.on { border-color: #7C5CFF; color: #7C5CFF; background: rgba(124,92,255,.1); }
#m-calpick { display: inline-flex; align-items: center; gap: 6px; }
#m-aniso.on { background: rgba(124,92,255,.12); border-color: rgba(124,92,255,.5); color: #7C5CFF; }
.mcard .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mcard .btns .chip2 { height: 32px; }
.mlist small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; }
/* tuval üstü çubuk: uzunluk / alan */
.mb-seg { display: inline-flex; gap: 2px; padding-right: 4px; margin-right: 2px; border-right: 1px solid var(--line); }
.mbar .mb-seg button.on { background: rgba(232,89,12,.14); color: #E8590C; }
.mbar .mb-seg svg { width: 16px; height: 16px; }
@media (max-width: 767px) { .mbar button span { display: none; } .mbar button { padding: 0 10px; } }
.calres b.bad { color: #E8590C; }

/* ölçüm adı: listede yerinde düzenlenir */
.mlist .mname { min-width: 0; width: 100%; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 12px; padding: 3px 5px; border-radius: 5px; }
.mlist .mname::placeholder { color: var(--text); opacity: 1; }
.mlist .mname:hover { border-color: var(--line); }
.mlist .mname:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.mlist .mname:focus::placeholder { color: var(--muted); }

/* kat izi temizleme gücü */
.fxrow .seg3 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); margin-top: 6px; }
.fxrow .seg3 button { height: 26px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.fxrow .seg3 button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.fxrow .seg3.off { opacity: .5; }
.fxrow .foldinfo { grid-column: 1 / -1; color: var(--accent); font-size: 11px; }
.fxrow .foldinfo:empty { display: none; }

/* son açılanlar */
.recent { margin-top: 16px; text-align: left; width: min(460px, 100%); }
.recent-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.recent ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.recent li { display: flex; align-items: center; gap: 4px; }
.recent .rec { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.recent .rec:hover { border-color: var(--accent); }
.recent .rec b { font-weight: 500; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .rec small { font-size: 11px; color: var(--muted); }
.recent .rec-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; }
