/* =====================================================================
   GK · 02 文本批量分割 · 独立母题「文本裁切台」
   色板：青绿 + 琥珀，刻度尺 + 虚线裁切；只作用于 .gk-tsp 容器。
   ===================================================================== */
.gk-tsp {
    --tsp-brand:#0d9488; --tsp-brand2:#f59e0b;
    --tsp-ink:#142b28; --tsp-sub:#4f6b65; --tsp-mute:#89a29c;
    --tsp-line:#dbe9e5; --tsp-soft:#f0f7f4; --tsp-paper:#fff; --tsp-accent:#fef3c7;
}
html[data-theme="dark"] .gk-tsp {
    --tsp-ink:#e4f2ee; --tsp-sub:#a9c4bd; --tsp-mute:#7e9a93;
    --tsp-line:#26453e; --tsp-soft:#182c28; --tsp-paper:#162623; --tsp-accent:#3a3218;
}

.gk-tsp .gk-hero { position:relative; overflow:hidden; }
.gk-tsp .gk-hero::after {
    content:""; position:absolute; right:30px; top:26px; width:150px; height:90px;
    background:repeating-linear-gradient(90deg,transparent 0 22px,var(--tsp-brand) 22px 24px);
    opacity:.14; pointer-events:none;
}
.gk-tsp .gk-hero h1 em { color:var(--tsp-brand); }

.tsp-workbench { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; align-items:start; margin-top:24px; }
.tsp-panel { background:var(--tsp-paper); border:1px solid var(--tsp-line); border-radius:14px; padding:22px; box-shadow:0 1px 2px rgba(10,60,50,.04),0 10px 30px rgba(10,60,50,.06); }
.tsp-panel-hd { display:flex; align-items:center; gap:12px; padding-bottom:14px; margin-bottom:16px; border-bottom:2px dashed var(--tsp-line); }
.tsp-step { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; font-family:var(--gk-mono,monospace); font-size:13px; font-weight:800; color:#fff; background:var(--tsp-brand); border-radius:8px; }
.tsp-panel-hd h2 { margin:0; font-size:17px; font-weight:800; color:var(--tsp-ink); }
.tsp-panel-hd p { margin:2px 0 0; font-size:12px; color:var(--tsp-mute); }
.tsp-badge { margin-left:auto; flex:0 0 auto; padding:5px 11px; font-family:var(--gk-mono,monospace); font-size:11.5px; font-weight:700; color:var(--tsp-brand); background:var(--tsp-soft); border-radius:999px; }
.tsp-badge.alt { color:#a16207; background:var(--tsp-accent); }

.tsp-editor-wrap { border:1px solid var(--tsp-line); border-radius:11px; overflow:hidden; background:var(--tsp-soft); }
.tsp-editor { display:block; width:100%; min-height:172px; padding:15px; border:0; outline:0; resize:vertical; background:transparent; color:var(--tsp-ink); font-size:14.5px; line-height:1.85; font-family:inherit; }
.tsp-editor::placeholder { color:var(--tsp-mute); }
.tsp-editor-bar { display:flex; justify-content:space-between; align-items:center; padding:8px 14px; border-top:1px solid var(--tsp-line); background:var(--tsp-paper); font-family:var(--gk-mono,monospace); font-size:11.5px; color:var(--tsp-mute); }
.tsp-clear { border:0; background:transparent; color:var(--tsp-brand); font-size:12px; font-weight:700; cursor:pointer; }

.tsp-mode-label { margin:18px 0 9px; font-size:12.5px; font-weight:700; color:var(--tsp-sub); }
.tsp-modes { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.tsp-mode { display:flex; flex-direction:column; gap:3px; padding:12px 8px; text-align:center; background:var(--tsp-soft); border:1px solid var(--tsp-line); border-radius:10px; cursor:pointer; transition:all .15s; }
.tsp-mode b { font-size:13px; color:var(--tsp-sub); }
.tsp-mode small { font-size:11px; color:var(--tsp-mute); }
.tsp-mode:hover { border-color:var(--tsp-brand); }
.tsp-mode.on { background:var(--tsp-brand); border-color:var(--tsp-brand); box-shadow:0 3px 10px rgba(13,148,136,.25); }
.tsp-mode.on b,.tsp-mode.on small { color:#fff; }

.tsp-config { margin-top:14px; }
.tsp-field label { display:block; margin-bottom:7px; font-size:12.5px; font-weight:700; color:var(--tsp-sub); }
.tsp-stepper { display:flex; gap:6px; }
.tsp-stepper button { width:38px; flex:0 0 auto; font-size:18px; color:var(--tsp-brand); background:var(--tsp-soft); border:1px solid var(--tsp-line); border-radius:8px; cursor:pointer; }
.tsp-stepper input { flex:1; min-width:0; padding:9px 12px; font-family:var(--gk-mono,monospace); font-size:14px; color:var(--tsp-ink); background:var(--tsp-soft); border:1px solid var(--tsp-line); border-radius:8px; outline:0; }
.tsp-input { width:100%; padding:10px 12px; font-family:var(--gk-mono,monospace); font-size:13.5px; color:var(--tsp-ink); background:var(--tsp-soft); border:1px solid var(--tsp-line); border-radius:8px; outline:0; }
.tsp-input:focus,.tsp-stepper input:focus { border-color:var(--tsp-brand); }

.tsp-switches { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.tsp-switch { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--tsp-sub); cursor:pointer; }
.tsp-switch input { width:15px; height:15px; accent-color:var(--tsp-brand); }

.tsp-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:14px; }
.tsp-summary > div { padding:11px 12px; background:var(--tsp-soft); border:1px solid var(--tsp-line); border-radius:9px; }
.tsp-summary span { display:block; font-size:11px; color:var(--tsp-mute); }
.tsp-summary b { display:block; margin-top:3px; font-family:var(--gk-mono,monospace); font-size:18px; color:var(--tsp-brand); }

.tsp-segments { max-height:380px; overflow:auto; display:grid; gap:9px; padding-right:4px; }
.tsp-empty { padding:44px 20px; text-align:center; font-size:14px; color:var(--tsp-sub); line-height:1.8; border:1px dashed var(--tsp-line); border-radius:11px; }
.tsp-empty small { font-size:12px; color:var(--tsp-mute); }
.tsp-seg { position:relative; padding:12px 14px 12px 44px; background:var(--tsp-soft); border:1px solid var(--tsp-line); border-left:3px solid var(--tsp-brand); border-radius:9px; font-size:13.5px; color:var(--tsp-ink); line-height:1.7; word-break:break-word; white-space:pre-wrap; }
.tsp-seg::before { content:attr(data-no); position:absolute; left:12px; top:12px; font-family:var(--gk-mono,monospace); font-size:11px; font-weight:800; color:var(--tsp-brand); }
.tsp-seg::after { content:""; position:absolute; left:0; right:0; bottom:-6px; border-bottom:1px dashed var(--tsp-line2,var(--tsp-line)); }

.tsp-guide .tsp-rule-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.tsp-rule-grid > div { padding:15px 17px; background:var(--tsp-soft); border:1px solid var(--tsp-line); border-top:3px solid var(--tsp-brand2); border-radius:11px; }
.tsp-rule-grid b { font-size:14px; color:var(--tsp-ink); }
.tsp-rule-grid p { margin:6px 0 0; font-size:12.5px; color:var(--tsp-sub); line-height:1.75; }

@media (max-width:860px){
    .tsp-workbench { grid-template-columns:1fr; }
    .gk-tsp .gk-hero::after { display:none; }
    .tsp-switches { grid-template-columns:1fr; }
}
