[hidden] { display: none !important; }
:root {
  --bg: #f7f7f8; --surface: #ffffff; --text: #18181b; --muted: #71717a; --line: #e4e4e7; --soft: #f4f4f5;
  --accent: #18181b; --q: #2563eb; --q-bg: rgba(37,99,235,.06); --off: #a1a1aa; --g: #d97706; --x: #7c3aed; --bad: #dc2626;
  --r: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 13.5px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h2 { font-size: 17px; margin: 0 0 6px; } h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.muted { color: var(--muted); } .hint { color: var(--muted); font-size: 11.5px; margin: 8px 0 0; }

.topbar { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); }
.logo { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; }
.docname { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }

button { font: inherit; color: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: #3f3f46; }
.btn.wide { width: 100%; margin-top: 14px; height: 38px; }
.icon { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; font-size: 16px; line-height: 1; color: var(--muted); }
.icon:hover { background: var(--soft); color: var(--text); }
.icon.wide { width: auto; padding: 0 8px; font-size: 12.5px; }
.link { border: 0; background: none; color: var(--q); font-size: 12.5px; font-weight: 500; padding: 0; }
.link:hover { text-decoration: underline; }

/* segmented control */
.seg { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
.seg.full { display: flex; } .seg.full button { flex: 1; padding: 5px 6px; }

main { flex: 1; display: flex; min-height: 0; }
aside { width: 340px; flex-shrink: 0; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); }
.block { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.block-head h3 { margin: 0; }

input, select { font: inherit; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; outline: none; }
input:focus, select:focus { border-color: #a1a1aa; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.field-row { display: flex; gap: 6px; margin-bottom: 8px; }
.field-row input { flex: 1; min-width: 0; } .field-row select { max-width: 45%; }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; }
.setting > span { color: #3f3f46; }
.setting.col { flex-direction: column; align-items: stretch; gap: 6px; }
.setting.col input { width: 100%; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; height: 32px; overflow: hidden; }
.stepper button { width: 28px; height: 100%; border: 0; background: var(--soft); font-size: 15px; color: var(--muted); }
.stepper button:hover { color: var(--text); background: #e4e4e7; }
.stepper input { width: 42px; height: 100%; border: 0; border-radius: 0; text-align: center; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper em { font-style: normal; color: var(--muted); font-size: 11.5px; padding: 0 8px 0 2px; }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #d4d4d8; border-radius: 20px; cursor: pointer; transition: background .15s; }
.switch i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }

.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; padding: 28px 12px; border: 1.5px dashed #d4d4d8; border-radius: var(--r); cursor: pointer; text-align: center; transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--soft); }

.alert { margin: 12px 18px 0; padding: 10px 12px; border-radius: 8px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-size: 12.5px; }
.alert b { font-weight: 600; }

/* testler & çipler */
.test + .test { margin-top: 14px; }
.test-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.test-head input { flex: 1; min-width: 0; height: 28px; font-weight: 600; border-color: transparent; padding: 0 6px; margin-left: -6px; }
.test-head input:hover { border-color: var(--line); }
.test-head .n { color: var(--muted); font-size: 12px; white-space: nowrap; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 30px; z-index: 30; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.1); padding: 4px; }
.menu-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; color: #1f2937; cursor: pointer; }
.menu-list button:hover { background: var(--soft); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; }
.chip { height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--q-bg); color: var(--q); border: 1px solid rgba(37,99,235,.25); font-weight: 600; font-size: 12.5px; cursor: pointer; user-select: none; position: relative; transition: transform .08s; }
.chip:hover { border-color: var(--q); }
.chip.off { background: var(--soft); color: var(--off); border-color: var(--line); text-decoration: line-through; }
.chip.linked::after { content: ""; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--g); }
.chip.dup { background: #fef2f2; color: var(--bad); border-color: #fca5a5; }
.chip.sel { box-shadow: 0 0 0 2px var(--accent); }
.chip.drag-over { transform: scale(1.12); border-color: var(--accent); }

/* seçili */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.kv input[type=number] { width: 72px; }
.kv select { max-width: 60%; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.actions .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.danger { color: var(--bad); }
.qpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; margin: 8px 0; }
.qpick label { display: flex; align-items: center; justify-content: center; gap: 3px; height: 28px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; cursor: pointer; }
.qpick input { display: none; }
.qpick label:has(input:checked) { background: #fff7ed; border-color: var(--g); color: #9a3412; font-weight: 600; }

.gitem { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; margin-bottom: 6px; }
.gitem:hover { background: var(--soft); }
.gitem.sel { border-color: var(--g); background: #fffbeb; }
.gitem .nums { color: var(--muted); font-size: 12px; }

/* görüntüleyici */
#viewer { flex: 1; overflow: auto; position: relative; }
.pager { position: sticky; top: 12px; z-index: 20; margin: 12px auto 0; width: max-content; display: flex; align-items: center; gap: 4px; padding: 4px 6px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.06); font-size: 12.5px; }
.pager input { width: 40px; height: 26px; text-align: center; padding: 0; }
.pager .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
#zval { min-width: 40px; text-align: center; color: var(--muted); }
#pages { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 16px 24px 40px; }
.page { position: relative; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 18px rgba(0,0,0,.06); border-radius: 2px; }
.page img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.page .pno { position: absolute; right: calc(100% + 10px); top: 0; color: var(--muted); font-size: 11.5px; }
.drawing .page { cursor: crosshair; }

.box { position: absolute; border: 1.5px solid var(--q); background: var(--q-bg); cursor: move; border-radius: 2px; }
.box.off { border-color: var(--off); border-style: dashed; background: rgba(0,0,0,.025); }
.box.group { border-color: var(--g); background: rgba(217,119,6,.06); }
.box.extra { border-color: var(--x); background: rgba(124,58,237,.05); border-style: dotted; }
.box.dup { border-color: var(--bad); background: rgba(220,38,38,.06); }
.box.sel { box-shadow: 0 0 0 3px rgba(24,24,27,.18); z-index: 5; }
.box.hl { background: rgba(217,119,6,.12); }
.box .tag { position: absolute; left: -1.5px; bottom: 100%; background: var(--q); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px 4px 0 0; white-space: nowrap; pointer-events: none; max-width: calc(100% + 3px); overflow: hidden; text-overflow: ellipsis; }
.box.off .tag { background: var(--off); } .box.group .tag { background: var(--g); } .box.extra .tag { background: var(--x); } .box.dup .tag { background: var(--bad); }
.handle { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--accent); border-radius: 2px; }
.handle.nw { left: -5px; top: -5px; cursor: nwse-resize; } .handle.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.handle.sw { left: -5px; bottom: -5px; cursor: nesw-resize; } .handle.se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.ghost { position: absolute; border: 1.5px dashed var(--accent); background: rgba(24,24,27,.05); pointer-events: none; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 13px; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.15); }

@media (max-width: 820px) {
  main { flex-direction: column; } aside { width: 100%; max-height: 45vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 16px; } .docname { display: none; }
}

/* gizlilik uyarısı */
.notice { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: #f0fdf4; color: #14532d; border-bottom: 1px solid #bbf7d0; font-size: 12.5px; }
.notice svg { flex-shrink: 0; }
.notice span { flex: 1; }
.notice b { font-weight: 600; }
.notice .icon { color: #166534; }

.hist { display: flex; gap: 2px; }
.feat { margin: 16px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.8; }
.row-btns { display: flex; gap: 10px; }

/* özet */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { background: var(--soft); border-radius: 8px; padding: 8px 6px; text-align: center; }
.stat b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.stat span { font-size: 11px; color: var(--muted); }

/* ünite ağacı */
.unit { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--surface); }
.unit-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer; border-radius: 10px; }
.unit-head:hover { background: var(--soft); }
.unit-head .caret { width: 16px; color: var(--muted); font-size: 11px; transition: transform .12s; }
.unit.open .unit-head .caret { transform: rotate(90deg); }
.unit-head { align-items: flex-start; }
.unit-head .caret { margin-top: 6px; }
.uh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.uh-main b { font-weight: 600; padding: 3px 4px 0; }
.unit-head textarea { font: inherit; font-weight: 600; line-height: 1.35; color: inherit; resize: none; overflow: hidden; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 3px 4px; outline: none; }
.unit-head textarea:hover, .unit-head textarea:focus { border-color: var(--line); background: var(--surface); }
.unit-head .n { color: var(--muted); font-size: 11.5px; padding: 0 4px 2px; }
.unit-body { padding: 4px 10px 10px; border-top: 1px solid var(--line); }
.unit.sel { border-color: var(--x); }
.test { padding-top: 8px; }
.test + .test { margin-top: 4px; border-top: 1px dashed var(--line); }

/* sayfadaki ünite işareti */
.unitbar { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--x); z-index: 4; cursor: pointer; }
.unitbar span { position: absolute; right: 0; top: -1px; transform: translateY(-100%); background: var(--x); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px 4px 0 0; white-space: nowrap; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
.unitbar.sel { border-top-width: 3px; }
.page.answer::after { content: "Cevap anahtarı — atlandı"; position: absolute; top: 12px; left: 12px; background: var(--soft); color: var(--muted); font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); }

/* ilerleme ekranı */
.overlay { position: fixed; inset: 0; background: rgba(250,250,250,.75); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; }
.ov-card { width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.12); }
.ov-card h3 { font-size: 15px; margin-bottom: 14px; }
.bar { height: 8px; background: var(--soft); border-radius: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 8px; transition: width .25s; }
.ov-card p { margin: 10px 0 0; font-size: 12.5px; }
.pager .icon.wide { white-space: nowrap; }

/* numara rozeti (etiket içinde) ve çoklu seçim */
.box .tag { display: flex; align-items: center; gap: 7px; padding: 2px 8px 2px 2px; }
.box .tag .tno { min-width: 20px; height: 18px; padding: 0 5px; display: grid; place-items: center; background: #fff; color: var(--q); font-size: 12px; font-weight: 800; border-radius: 4px; }
.box.off .tag .tno { color: var(--off); }
.box.dup .tag .tno { color: var(--bad); }
.box.extra .tag .tno { color: var(--x); }
.box .tag .tno.changed { background: #ffedd5; color: #c2410c; }
.box .tag .tt { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.box.group .tag { padding-left: 8px; }
.box.msel { box-shadow: 0 0 0 3px rgba(37,99,235,.45); background: rgba(37,99,235,.14); }
.ghost.marquee { border-color: var(--q); background: rgba(37,99,235,.08); }

/* bağlantı okları */
.links { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; overflow: visible; }
.links text { font: 600 11px Inter, system-ui, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.box.group, .box { z-index: 2; }
.box.sel { z-index: 5; }
.pager .icon.wide.on { background: var(--soft); color: var(--text); }

.links .halo { fill: none; stroke: #fff; stroke-width: 5.5; stroke-linejoin: miter; opacity: .9; }
.links .ln { fill: none; stroke-width: 2.2; stroke-linejoin: miter; stroke-linecap: butt; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.18)); }
.links { animation: linksIn .18s ease-out; }
@keyframes linksIn { from { opacity: 0; } to { opacity: 1; } }

/* giriş ekranı */
#landing { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: 48px 20px 64px; }
.land { width: min(720px, 100%); }
.land h1 { font-size: 30px; letter-spacing: -.02em; margin: 0 0 8px; text-align: center; }
.land .lead { color: var(--muted); text-align: center; margin: 0 auto 28px; max-width: 560px; font-size: 14.5px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 24px; background: var(--surface); border: 2px dashed #d4d4d8; border-radius: 18px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.dropzone:hover { border-color: #a1a1aa; }
.dropzone.over { border-color: var(--q); background: #eff6ff; transform: scale(1.01); }
.dropzone strong { font-size: 17px; }
.dropzone .btn { pointer-events: none; height: 38px; padding: 0 18px; }
.dropzone small { max-width: 420px; line-height: 1.5; }
.dz-icon { width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; background: var(--soft); color: var(--accent); margin-bottom: 4px; }
.dropzone.over .dz-icon { background: #dbeafe; color: var(--q); }
.privacy { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.privacy svg { flex-shrink: 0; margin-top: 1px; color: #16a34a; }
.recent { margin-top: 24px; }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.recent-head h3 { margin: 0; font-size: 14px; }
.ritem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.ritem .ricon { width: 36px; height: 36px; border-radius: 9px; background: #fef2f2; color: #dc2626; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.ritem .rinfo { flex: 1; min-width: 0; }
.ritem .rname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem .rmeta { color: var(--muted); font-size: 12px; }
.ritem .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }
.land .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.land .feat li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #52525b; }
.menu-list button.danger { color: var(--bad); }
@media (max-width: 600px) { .land .feat { grid-template-columns: 1fr; } .ritem { flex-wrap: wrap; } }

/* öğretici */
.icon.help { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; font-size: 14px; font-weight: 700; color: var(--text); background: var(--surface); }
.icon.help:hover { background: var(--soft); }
#tour { position: fixed; inset: 0; z-index: 200; }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(15, 15, 20, .62), 0 0 0 3px #fff, 0 0 24px 6px rgba(255,255,255,.55); transition: all .28s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 16px)); background: var(--surface); border-radius: 14px; padding: 18px 18px 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); transition: left .28s cubic-bezier(.2,.8,.2,1), top .28s cubic-bezier(.2,.8,.2,1); }
.tour-step { font-size: 11.5px; font-weight: 600; color: var(--q); margin-bottom: 4px; }
.tour-card h3 { margin: 0 0 6px; font-size: 15px; }
.tour-card p { margin: 0; font-size: 13px; line-height: 1.55; color: #3f3f46; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tour-never { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.tour-btns { display: flex; gap: 6px; }
.tour-btns .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }
.tour-btns .btn:disabled { opacity: .4; cursor: default; }
.tour-x { position: absolute; top: 8px; right: 8px; }

/* uygulama içi pencere */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(15,15,20,.45); backdrop-filter: blur(2px); animation: mIn .15s ease-out; }
.modal-card { width: min(420px, calc(100vw - 32px)); background: var(--surface); border-radius: 14px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal-card h3 { margin: 0 0 8px; font-size: 16px; }
.modal-card p { margin: 0 0 14px; color: #3f3f46; font-size: 13.5px; line-height: 1.55; }
#modal .modal-card input { width: 100%; height: 38px; margin-bottom: 16px; font-size: 14px; }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
@keyframes mIn { from { opacity: 0; } to { opacity: 1; } }

/* kredili sürüm: indirme maliyeti */
.cost { border: 1px solid var(--line, #e4e4e7); border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; background: #fafafa; font-size: 13px; display: grid; gap: 4px; }
.cost-line { display: flex; justify-content: space-between; gap: 10px; }
.cost-line.muted { color: #71717a; }
.cost-line.total { font-size: 14px; padding-top: 4px; border-top: 1px dashed #e4e4e7; margin-top: 2px; }
.cost-line.total b { color: #17a673; }
.cost.short .cost-line.total b { color: #dc2626; }
.cost-buy { display: block; text-align: center; padding: 7px; border-radius: 8px; background: #fef2f2; color: #dc2626; font-weight: 600; text-decoration: none; }
.cost small { color: #a1a1aa; font-size: 11.5px; line-height: 1.4; }

/* dışa aktarma penceresi */
.xcard { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; padding: 0; }
.xhead { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.xhead h3 { margin: 0; } .xhead .muted { font-size: 12.5px; } .xhead .icon { margin-left: auto; font-size: 20px; }
.xbody { padding: 14px 20px 18px; overflow-y: auto; }
.xbody .setting { padding: 7px 0; }
#open-export { gap: 6px; }
.cost-gift { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 4px; }
.cost-gift small { display: block; color: #047857; font-size: 11.5px; margin-top: 3px; }
.cost-short { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 4px; }
.buy-box { display: grid; gap: 10px; margin-top: 6px; }
.bb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bb-pk { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 4px; cursor: pointer; font-size: 12px; background: #fff; }
.bb-pk input { position: absolute; opacity: 0; } .bb-pk:has(input:checked) { border-color: #182a4e; box-shadow: 0 0 0 2px #182a4e; }
.bb-pk span { font-weight: 800; color: #182a4e; font-size: 13.5px; } .bb-pk em { font-style: normal; color: var(--muted); }
.bb-pk.unl { background: #182a4e; color: #fff; } .bb-pk.unl span { color: #2acf8b; } .bb-pk.unl em { color: #b9c3d8; }
.bb-agree { display: flex; gap: 8px; font-size: 12px; align-items: flex-start; } .bb-agree a { color: #17a673; }
.bb-done { font-size: 13px; display: grid; gap: 6px; } .bb-done p { margin: 0; }
.bb-code { font: 700 20px ui-monospace, Menlo, monospace; background: #fffbeb; color: #92400e; text-align: center; border-radius: 8px; padding: 8px; letter-spacing: .06em; }
.bb-acc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--soft); border-radius: 8px; padding: 8px 10px; }
.bb-acc span { font-weight: 600; } .bb-acc code { font-size: 13px; }
#export:disabled { opacity: .55; cursor: not-allowed; }
.bb-agree input, .bb-pk input { width: auto; height: auto; margin: 2px 0 0; flex-shrink: 0; }
#name-preset { width: 100%; height: 36px; }
#name-custom { display: grid; gap: 6px; }
#name-custom[hidden] { display: none; }
#name-tpl { width: 100%; height: 36px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.name-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.name-chips button { border: 1px solid var(--line); background: var(--soft); border-radius: 99px; padding: 3px 10px; font: 600 12px Inter, sans-serif; cursor: pointer; }
.name-chips button:hover { border-color: #182a4e; color: #182a4e; }
.name-ex { font-size: 12.5px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 6px 10px; color: #14532d; word-break: break-all; }

/* yüzer ayar çubuğu (seçili kutunun altında/üstünde) */
#ftb { position: fixed; z-index: 25; display: flex; align-items: center; gap: 4px; padding: 4px; max-width: calc(100vw - 16px); flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06); font-size: 12px; }
#ftb button, #ftb select, #ftb input { height: 30px; font-size: 12px; border-radius: 6px; }
#ftb button { border: 1px solid var(--line); background: var(--surface); padding: 0 9px; font-weight: 500; white-space: nowrap; }
#ftb button:hover { background: var(--soft); }
#ftb button.on { background: var(--q-bg); border-color: var(--q); color: var(--q); }
#ftb button.danger { color: var(--bad); }
#ftb select { padding: 0 6px; max-width: 150px; }
#ftb .ftb-num { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); padding-left: 4px; }
#ftb .ftb-num input { width: 54px; padding: 0 6px; }
#ftb .ftb-t { color: var(--muted); padding: 0 6px; white-space: nowrap; }
body.boxdrag #ftb { display: none; }
/* test aç/kapat */
.tcaret { flex: none; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; transition: transform .15s; }
.test.shut .tcaret { transform: rotate(-90deg); }
.test.shut .chips { display: none; }
.test.shut .test-head { margin-bottom: 0; }
