/* Scoped utility styles: no remote font or other third-party asset requests. */
.bth-tool-scope{--bth-paper:#f7f4ed;--bth-ink:#26372f;--bth-muted:#58655b;--bth-line:#d8ded1;--bth-accent:#426a56;color:var(--bth-ink);font-family:inherit;line-height:1.6;max-width:100%;margin:1.5rem 0;position:relative}
.bth-tool-scope *{box-sizing:border-box}
.bth-tool-scope .mono,.bth-tool-scope .tool-meta,.bth-tool-scope .bth-card-bottom{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;letter-spacing:.04em}
.bth-tool-scope .muted{color:var(--bth-muted)}
.bth-tool-scope .tool-app{border:1px solid var(--bth-line);border-radius:10px;background:#fff;overflow:hidden}
.bth-tool-scope .tool-app-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid var(--bth-line);background:var(--bth-paper)}
.bth-tool-scope .live-status{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:10px;letter-spacing:.06em;display:flex;align-items:center;gap:8px}
.bth-tool-scope .live-status:before{content:"";width:6px;height:6px;border-radius:50%;background:#527a5d}
.bth-tool-scope .tool-panels{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.bth-tool-scope .tool-panel{min-width:0;padding:26px;background:#fff}
.bth-tool-scope .tool-panel+.tool-panel{border-left:1px solid var(--bth-line);background:#fafbf7}
.bth-tool-scope .label-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;margin-bottom:14px}
.bth-tool-scope .label-row label,.bth-tool-scope .label-row strong{font-family:inherit;font-size:13px;font-weight:600}
.bth-tool-scope textarea{display:block;width:100%;min-height:230px;padding:16px;border:1px solid var(--bth-line);border-radius:5px;background:#fff;color:var(--bth-ink);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.8;resize:vertical;box-shadow:none}
.bth-tool-scope textarea::placeholder{color:#697267;opacity:1}
.bth-tool-scope textarea.bth-hash-text{min-height:125px}
.bth-tool-scope .tool-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;justify-content:space-between;margin-top:15px}
.bth-tool-scope select{color:var(--bth-ink);background:#fff;border:1px solid var(--bth-line);border-radius:4px;padding:10px 28px 10px 12px;max-width:100%;min-height:42px;font-family:inherit;font-size:12px}
.bth-tool-scope button{font-family:inherit;cursor:pointer;text-transform:none;letter-spacing:normal}
.bth-tool-scope button.btn{display:inline-flex;align-items:center;justify-content:center;padding:11px 15px;min-height:42px;color:#fff;background:var(--bth-accent);border:1px solid var(--bth-accent);border-radius:5px;font-size:12px;font-weight:600;box-shadow:none;text-decoration:none;line-height:1.4}
.bth-tool-scope button.btn:hover{background:#2f503f}
.bth-tool-scope .mini-btn{color:var(--bth-accent);background:transparent;border:0;padding:6px 0;min-height:32px;border-radius:0;font-size:11px;text-decoration:underline;text-underline-offset:3px;box-shadow:none}
.bth-tool-scope button:disabled{opacity:.55;cursor:wait}
.bth-tool-scope :is(button,select,textarea,input,a):focus-visible{outline:2px solid var(--bth-accent);outline-offset:3px}
.bth-tool-scope .error-text{color:#a12c20;font-size:12px;line-height:1.5;margin-top:12px;min-height:1.5em}
.bth-tool-scope .result-code{padding:16px;margin:0;min-height:230px;background:#eef2e9;border:1px solid var(--bth-line);border-radius:5px;color:var(--bth-ink);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:1.9;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.bth-tool-scope .tool-meta{padding:14px 22px;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;background:var(--bth-paper);border-top:1px solid var(--bth-line);color:var(--bth-muted);font-size:10px}
.bth-tool-scope .tool-help{display:grid;grid-template-columns:1fr 1fr;gap:38px;padding:30px 0}
.bth-tool-scope .tool-help h3{font-family:inherit;font-size:15px;color:var(--bth-ink);font-weight:600;line-height:1.4;margin:0 0 10px}
.bth-tool-scope .tool-help p{font-size:13px;color:var(--bth-muted);line-height:1.8;margin:0}
.bth-tool-scope .bth-file-row{margin-top:20px}
.bth-tool-scope input[type=file]{display:block;margin-top:12px;font-family:inherit;font-size:12px;max-width:100%;color:var(--bth-ink)}
.bth-tool-scope .bth-hash-info{font-size:11px;margin-top:15px;overflow-wrap:anywhere}
.bth-tool-scope .drop-zone{padding:30px 18px;border:1px dashed #96a48f;border-radius:5px;text-align:center;background:#f5f7f1;min-height:235px;transition:background .15s}
.bth-tool-scope .drop-zone.dragging{background:#e2ebd8;border-color:var(--bth-accent)}
.bth-tool-scope .bth-file-symbol{display:block;font-family:ui-monospace,monospace;font-size:32px;line-height:1.2;color:var(--bth-accent)}
.bth-tool-scope .drop-zone p{font-size:12px;color:var(--bth-muted);line-height:1.7;margin:12px 0}
.bth-tool-scope .drop-zone input{margin:14px auto}
.bth-tool-scope .drop-zone>.mono{font-size:10px;color:var(--bth-muted)}
.bth-tool-scope .bth-notice{position:fixed;z-index:9999;bottom:25px;left:50%;transform:translate(-50%,15px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s,transform .15s,visibility .15s;max-width:calc(100vw - 40px);padding:12px 20px;border-radius:6px;background:#26372f;color:#fff;font-size:12px;box-shadow:0 5px 20px #0002;text-align:center}
.bth-tool-scope .bth-notice.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.bth-tool-scope .bth-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.bth-tool-scope .bth-tool-card{display:flex;flex-direction:column;min-width:0;padding:26px;border:1px solid var(--bth-line);border-radius:8px;background:#fff;color:var(--bth-ink);text-decoration:none;box-shadow:none;transition:transform .15s,border-color .15s}
.bth-tool-scope .bth-tool-card:hover{transform:translateY(-3px);border-color:#94ab96}
.bth-tool-scope .bth-tool-card>.mono{color:var(--bth-muted)}
.bth-tool-scope .bth-tool-card h3{font-family:inherit;font-size:22px;color:var(--bth-ink);line-height:1.3;margin:18px 0 12px}
.bth-tool-scope .bth-tool-card p{font-size:13px;color:var(--bth-muted);line-height:1.8;margin:0 0 24px}
.bth-tool-scope .bth-card-bottom{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;border-top:1px solid var(--bth-line);padding-top:16px;margin-top:auto;font-size:9px;color:var(--bth-accent)}
.bth-tool-scope .bth-local-note{font-size:13px;color:var(--bth-muted);margin:22px 0 0;padding:16px 20px;background:#edf2e8;border-radius:5px;line-height:1.8}
@media(max-width:700px){.bth-tool-scope .tool-panels,.bth-tool-scope .tool-help{grid-template-columns:minmax(0,1fr)}.bth-tool-scope .tool-panel+.tool-panel{border-left:0;border-top:1px solid var(--bth-line)}.bth-tool-scope .tool-panel{padding:20px}.bth-tool-scope .tool-help{gap:24px}.bth-tool-scope .tool-app-bar,.bth-tool-scope .tool-meta{padding-left:20px;padding-right:20px}}
@media(max-width:520px){.bth-tool-scope .bth-tool-grid{grid-template-columns:minmax(0,1fr)}.bth-tool-scope .tool-controls{align-items:stretch;flex-direction:column}.bth-tool-scope .tool-controls>.mini-btn{align-self:flex-start}.bth-tool-scope .tool-panel{padding:16px}.bth-tool-scope .tool-app-bar,.bth-tool-scope .tool-meta{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-motion:reduce){.bth-tool-scope .bth-notice,.bth-tool-scope .bth-tool-card,.bth-tool-scope .drop-zone{transition:none}.bth-tool-scope .bth-tool-card:hover{transform:none}}

.bth-tool-scope .bth-contribution{margin:24px 0 12px;padding:19px 22px;border:1px solid var(--bth-line);border-radius:6px;background:#eef2e8}.bth-tool-scope .bth-consent-label{display:flex;gap:10px;align-items:flex-start;font-size:14px;font-weight:600;cursor:pointer}.bth-tool-scope .bth-consent-label input{margin-top:5px;flex-shrink:0;accent-color:var(--bth-accent)}.bth-tool-scope .bth-optional{font-weight:400;color:var(--bth-muted)}.bth-tool-scope .bth-contribution p{font-size:12px;line-height:1.75;color:var(--bth-muted);margin:10px 0 0}.bth-tool-scope .bth-contribution .bth-sharing-control{font-size:11px}.bth-tool-scope #bth-sharing-status:empty{display:none}.bth-tool-scope [hidden]{display:none!important}.bth-tool-scope .bth-usage-note{font-size:11px;line-height:1.8;color:var(--bth-muted);margin:12px 0}.bth-usage-counts{display:flex;gap:24px;flex-wrap:wrap}.bth-usage-counts strong{font-size:1.5em}.bth-usage-counts .bth-usage-note{flex-basis:100%;font-size:12px}

.bth-tool-scope #bth-contribution-editor{margin-top:18px;padding-top:18px;border-top:1px solid var(--bth-line)}.bth-tool-scope .bth-field-label{display:block;font-size:12px;font-weight:600;margin:12px 0 8px}.bth-tool-scope #bth-record-filename{width:100%;box-sizing:border-box;padding:11px 12px;color:var(--bth-ink);background:#fff;border:1px solid var(--bth-line);border-radius:4px;font:inherit;font-size:13px}.bth-tool-scope #bth-record-text{min-height:120px}.bth-tool-scope #bth-contribution-editor .bth-consent-label{margin-top:18px}.bth-tool-scope #bth-preview-contribution{margin-top:18px}.bth-tool-scope .bth-review-preview{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;background:#fff;color:var(--bth-ink);border:1px solid var(--bth-line);border-radius:5px;padding:18px;font-size:12px;line-height:1.8;margin:18px 0}.bth-tool-scope .bth-share-actions{display:flex;flex-wrap:wrap;align-items:center;gap:22px}.bth-tool-scope input:disabled,.bth-tool-scope textarea:disabled{opacity:.6;background:#f6f7f1}
