.wst-photo-print-options{grid-template-columns:repeat(3,minmax(0,1fr))}.wst-photo-print-custom span{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wst-photo-print-options input,.wst-photo-print-options select{width:100%}.wst-photo-print-options input[type=color]{min-height:38px;padding:3px}.wst-photo-print-stage{display:flex;align-items:center;justify-content:center;min-height:420px;padding:18px;overflow:auto;background:var(--surface-inset-bg);border:1px solid var(--border-color);border-radius:var(--main-radius)}.wst-photo-print-stage canvas{display:block;max-width:100%;max-height:68vh;background:#fff;box-shadow:0 4px 18px var(--shadow-soft-color)}.wst-photo-print h3 small{margin-left:6px;color:var(--body-muted-color);font-size:12px;font-weight:400}@media(max-width:900px){.wst-photo-print-options{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.wst-photo-print-options{grid-template-columns:1fr}}
.wst-latex-source{display:flex;align-items:center;justify-content:center;min-height:180px;margin-top:12px;padding:12px;border:1px solid var(--border-color);border-radius:var(--main-radius);background:var(--surface-inset-bg)}.wst-latex-source img{display:block;max-width:100%;max-height:320px}.wst-latex-output{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}.wst-latex-output textarea{width:100%;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.wst-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.wst-panel-heading h3{margin:0}.wst-latex-preview-panel{grid-column:1/-1}.wst-latex-preview{display:block;width:100%;min-height:180px;border:1px solid var(--border-color);border-radius:6px;background:#fff}.wst-latex-preview-panel h3 small{margin-left:6px;color:var(--body-muted-color);font-size:12px;font-weight:400}@media(max-width:760px){.wst-latex-output{grid-template-columns:1fr}.wst-latex-preview-panel{grid-column:auto}}
.wst-inspector-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wst-inspector-sections[hidden]{display:none}.wst-inspector-generation-panel{grid-column:1/-1}.wst-inspector-table{display:grid;grid-template-columns:minmax(120px,180px) minmax(0,1fr);margin:0;border:1px solid var(--border-color);border-radius:6px;overflow:hidden}.wst-inspector-table dt,.wst-inspector-table dd{margin:0;padding:9px 11px;border-bottom:1px solid var(--line-color)}.wst-inspector-table dt{color:var(--body-secondary-color);background:var(--surface-bg-soft);font-weight:600}.wst-inspector-table dd{white-space:pre-wrap;overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.wst-inspector-table dt:last-of-type,.wst-inspector-table dd:last-of-type{border-bottom:0}@media(max-width:760px){.wst-inspector-sections{grid-template-columns:1fr}.wst-inspector-generation-panel{grid-column:auto}.wst-inspector-table{grid-template-columns:1fr}.wst-inspector-table dt{border-bottom:0}}
.wst-signature-options{grid-template-columns:repeat(3,minmax(0,1fr))}.wst-signature-options input,.wst-signature-options select{width:100%}.wst-signature-options input[type=color]{min-height:38px;padding:3px}.wst-signature-options .wst-check-option{display:flex;flex-direction:row;align-items:center;gap:7px}.wst-signature-options .wst-check-option input{width:auto}.wst-signature-stage{display:flex;align-items:center;justify-content:center;min-height:360px;padding:14px;overflow:auto;border:1px solid var(--border-color);border-radius:var(--main-radius)}.wst-signature-canvas{display:block;width:100%;height:auto;max-height:65vh;background:transparent;box-shadow:0 4px 18px var(--shadow-soft-color);touch-action:none;cursor:crosshair}@media(max-width:900px){.wst-signature-options{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.wst-signature-options{grid-template-columns:1fr}}
.wst-subtitle-list{display:grid;gap:7px;max-height:330px;margin:12px 0;overflow:auto}.wst-subtitle-item{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:9px;align-items:center;padding:7px;border:1px solid var(--border-color);border-radius:6px;background:var(--surface-bg-soft)}.wst-subtitle-item img{display:block;width:64px;height:44px;object-fit:cover;border-radius:4px}.wst-subtitle-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--body-secondary-color);font-size:13px}.wst-subtitle-item div{display:flex;gap:5px}.wst-subtitle-item button{min-height:30px;padding:4px 8px}.wst-subtitle-options{grid-template-columns:repeat(2,minmax(0,1fr))}.wst-subtitle-options input,.wst-subtitle-options select{width:100%}.wst-subtitle-options input[type=color]{min-height:38px;padding:3px}.wst-subtitle-stage{display:flex;align-items:flex-start;justify-content:center;min-height:420px;max-height:75vh;padding:15px;overflow:auto;background:var(--surface-inset-bg);border:1px solid var(--border-color);border-radius:var(--main-radius)}.wst-subtitle-stage canvas{display:block;max-width:100%;height:auto;background:#000;box-shadow:0 4px 18px var(--shadow-soft-color)}.wst-subtitle-collage h3 small{margin-left:6px;color:var(--body-muted-color);font-size:12px;font-weight:400}@media(max-width:620px){.wst-subtitle-options{grid-template-columns:1fr}.wst-subtitle-item{grid-template-columns:52px minmax(0,1fr)}.wst-subtitle-item img{width:52px}.wst-subtitle-item div{grid-column:1/-1}}
.wst-toolbox {
    --wst-brand: var(--brand-color, #1b39f4);
    --wst-brand-hover: var(--brand-hover-color, #1630cf);
    --wst-text: var(--body-color, #282a2d);
    --wst-strong: var(--body-strong-color, #0d131b);
    --wst-secondary: var(--body-secondary-color, #515c6b);
    --wst-muted: var(--body-muted-color, #777);
    --wst-surface: var(--surface-bg, #fff);
    --wst-soft: var(--surface-bg-soft, #f8fafc);
    --wst-inset: var(--surface-inset-bg, #f1f3f6);
    --wst-border: var(--border-color, rgba(130, 130, 130, .15));
    --wst-border-strong: var(--border-strong-color, rgba(130, 130, 130, .28));
    --wst-radius: var(--main-radius, 8px);
    color: var(--wst-text);
    padding-top: 24px;
    padding-bottom: 36px;
    line-height: 1.65;
}

.wst-toolbox *, .wst-toolbox *::before, .wst-toolbox *::after { box-sizing: border-box; }
.wst-toolbox a { color: var(--wst-text); text-decoration: none; }
.wst-toolbox a:hover, .wst-toolbox a:focus-visible { color: var(--wst-brand-hover); }
.wst-toolbox img { max-width: 100%; }
.wst-toolbox h2 { margin: 24px 0 12px; color: var(--wst-strong); font-size: 20px; line-height: 1.4; }
.wst-toolbox h3 { color: var(--wst-strong); }

.wst-toolbox .wst-page-header {
    margin-bottom: 18px;
    padding: 20px 22px;
    background: var(--wst-surface);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
    box-shadow: 0 5px 18px var(--shadow-soft-color, rgba(0, 0, 0, .04));
}
.wst-toolbox .wst-page-header h1, .wst-toolbox .wst-main > h1 {
    margin: 0 0 6px;
    color: var(--wst-strong);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.3;
    font-weight: 700;
}
.wst-toolbox .wst-page-header p { margin: 5px 0 0; color: var(--wst-secondary); }
.wst-toolbox .wst-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: var(--wst-muted);
    font-size: 13px;
}

.wst-toolbox .wst-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    padding: 14px;
    background: var(--wst-surface);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
}
.wst-toolbox .wst-search label { flex: 0 0 auto; margin: 0; font-weight: 600; }
.wst-toolbox .wst-search input { flex: 1 1 320px; }

.wst-toolbox .wst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
    gap: 13px;
    margin: 12px 0 22px;
}
.wst-toolbox .wst-card {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 128px;
    padding: 16px;
    overflow: hidden;
    color: var(--wst-text);
    background: var(--wst-surface);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
    box-shadow: 0 3px 12px var(--shadow-soft-color, rgba(0, 0, 0, .04));
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.wst-toolbox .wst-card:hover {
    color: var(--wst-text);
    border-color: var(--brand-outline-color, rgba(27, 57, 244, .35));
    box-shadow: 0 8px 22px var(--shadow-color, rgba(158, 158, 158, .1));
    transform: translateY(-2px);
}
.wst-toolbox .wst-card img {
    float: left;
    width: 46px;
    height: 46px;
    margin: 1px 12px 8px 0;
    padding: 5px;
    object-fit: contain;
    background: var(--wst-soft);
    border: 1px solid var(--wst-border);
    border-radius: 8px;
}
.wst-toolbox .wst-card h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.45; }
.wst-toolbox .wst-card p { margin: 0; color: var(--wst-secondary); font-size: 13px; line-height: 1.65; }

.wst-toolbox .wst-layout { display: grid; gap: 18px; }
.wst-toolbox .wst-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 286px; }
.wst-toolbox .wst-main, .wst-toolbox .wst-sidebar {
    min-width: 0;
    background: var(--wst-surface);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
    box-shadow: 0 5px 18px var(--shadow-soft-color, rgba(0, 0, 0, .04));
}
.wst-toolbox .wst-main { padding: 22px; }
.wst-toolbox .wst-sidebar { align-self: start; position: sticky; top: 80px; padding: 17px; }
.wst-toolbox .wst-tool-header { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.wst-toolbox .wst-tool-icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 7px;
    object-fit: contain;
    background: var(--wst-soft);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
}
.wst-toolbox .wst-tool-heading { flex: 1 1 auto; min-width: 0; }
.wst-toolbox .wst-tool-heading h1 { margin: 0 0 4px; color: var(--wst-strong); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; }
.wst-toolbox .wst-tool-heading > p { margin: 4px 0; }
.wst-toolbox .wst-main > section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--wst-border); }
.wst-toolbox .wst-main > section > h2:first-child { margin-top: 0; }
.wst-toolbox .wst-widget { margin: 0 0 18px; }
.wst-toolbox .wst-widget:last-child { margin-bottom: 0; }
.wst-toolbox .wst-widget h2, .wst-toolbox .wst-widget h3 { margin: 0 0 9px; font-size: 16px; }
.wst-toolbox .wst-widget ul { margin: 0; padding: 0; list-style: none; }
.wst-toolbox .wst-widget li { padding: 7px 0; border-bottom: 1px solid var(--wst-border); font-size: 14px; }

.wst-toolbox .wst-runner, .wst-toolbox .wst-reference,
.wst-toolbox .wst-unit-converter, .wst-toolbox .wst-local-tool {
    margin: 16px 0;
    padding: 17px;
    background: var(--wst-soft);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
}
.wst-toolbox .wst-runner h2, .wst-toolbox .wst-runner h3,
.wst-toolbox .wst-reference h2, .wst-toolbox .wst-reference h3 { margin-top: 0; }
.wst-toolbox .wst-time-block + .wst-time-block { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--wst-border); }
.wst-toolbox .wst-time-block h2 { margin-bottom: 9px; font-size: 16px; }
.wst-toolbox .wst-inline-controls, .wst-toolbox .wst-result-line { display: flex; align-items: center; gap: 8px; }
.wst-toolbox .wst-inline-controls input, .wst-toolbox .wst-result-line input { flex: 1 1 240px; }
.wst-toolbox .wst-inline-controls select { flex: 0 0 92px; width: 92px; }
.wst-toolbox .wst-result-line { margin-top: 9px; }
.wst-toolbox .wst-result-line button { flex: 0 0 auto; }
.wst-toolbox label { color: var(--wst-strong); font-size: 13px; font-weight: 600; }
.wst-toolbox label > input, .wst-toolbox label > select, .wst-toolbox label > textarea { margin-top: 5px; }

.wst-toolbox input[type="text"], .wst-toolbox input[type="search"],
.wst-toolbox input[type="number"], .wst-toolbox input[type="url"],
.wst-toolbox input[type="password"], .wst-toolbox input[type="datetime-local"],
.wst-toolbox select, .wst-toolbox textarea {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    color: var(--wst-text);
    background: var(--wst-surface);
    border: 1px solid var(--wst-border-strong);
    border-radius: 6px;
    outline: 0;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.wst-toolbox textarea { min-height: 145px; resize: vertical; font-family: inherit; line-height: 1.6; }
.wst-toolbox input[readonly], .wst-toolbox textarea[readonly] { background: var(--wst-inset); }
.wst-toolbox input::placeholder, .wst-toolbox textarea::placeholder { color: var(--body-comment-color, #999); }
.wst-toolbox input:focus, .wst-toolbox select:focus, .wst-toolbox textarea:focus {
    border-color: var(--wst-brand);
    box-shadow: 0 0 0 3px var(--focus-ring-color, rgba(46, 91, 255, .12));
}
.wst-toolbox :focus-visible { outline: 2px solid var(--wst-brand); outline-offset: 2px; }
.wst-toolbox input[type="checkbox"], .wst-toolbox input[type="radio"] { width: auto; min-height: 0; accent-color: var(--wst-brand); }
.wst-toolbox .wst-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 10px 12px;
    margin: 12px 0;
}
.wst-toolbox .wst-options label { display: block; min-width: 0; }
.wst-toolbox .wst-runner > p, .wst-toolbox .wst-local-tool > p,
.wst-toolbox .wst-unit-converter > p { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.wst-toolbox .wst-unit-formula { min-height: 22px; color: var(--body-secondary-color); font-size: 13px; font-variant-numeric: tabular-nums; }
.wst-toolbox .wst-base-common { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--main-radius); background: var(--surface-bg-soft); color: var(--body-secondary-color); white-space: pre-wrap; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.wst-toolbox .wst-color-preview { min-height: 72px; margin-top: 10px; border: 1px solid var(--border-strong-color); border-radius: var(--main-radius); background: transparent; }

.wst-toolbox button, .wst-toolbox .wst-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 15px;
    color: var(--button-color, #fff);
    background: var(--wst-brand);
    border: 1px solid var(--wst-brand);
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.wst-toolbox button:hover, .wst-toolbox .wst-button:hover {
    color: var(--button-color, #fff);
    background: var(--wst-brand-hover);
    border-color: var(--wst-brand-hover);
}
.wst-toolbox button[class*="clear"], .wst-toolbox button[class*="swap"] {
    color: var(--button-muted-color, #526071);
    background: var(--button-muted-bg, #eef2f7);
    border-color: var(--wst-border);
}
.wst-toolbox button:disabled, .wst-toolbox .wst-button:disabled { opacity: .52; cursor: not-allowed; box-shadow: none; }

.wst-toolbox .wst-message, .wst-toolbox .wst-notice {
    margin: 12px 0;
    padding: 10px 12px;
    color: var(--wst-secondary);
    background: var(--surface-bg-muted, rgba(136, 136, 136, .06));
    border-left: 3px solid var(--info-color, #17a2b8);
    border-radius: 4px;
    font-size: 13px;
}
.wst-toolbox .wst-file-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    margin-bottom: 16px;
    padding: 12px 14px;
    color: var(--wst-secondary);
    background: var(--wst-inset);
    border: 1px dashed var(--wst-border-strong);
    border-radius: var(--wst-radius);
}
.wst-toolbox .wst-file-drop input { max-width: 280px; }
.wst-toolbox .wst-image-preview {
    min-height: 160px;
    padding: 14px;
    background: var(--wst-inset);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
    text-align: center;
}
.wst-toolbox .wst-image-preview[hidden] { display: none; }
.wst-toolbox .wst-image-preview img { display: block; max-width: 100%; max-height: 420px; margin: auto; object-fit: contain; }
.wst-toolbox .wst-usage { color: var(--wst-muted); font-size: 13px; }
.wst-toolbox .wst-category-links { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.wst-toolbox .wst-category-links a {
    padding: 3px 9px;
    color: var(--wst-brand);
    background: var(--brand-subtle-color, rgba(27, 57, 244, .1));
    border-radius: 999px;
    font-size: 12px;
}

.wst-toolbox .table-responsive { width: 100%; overflow-x: auto; border: 1px solid var(--wst-border); border-radius: 6px; }
.wst-toolbox table, .wst-toolbox .table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: var(--wst-text);
    background: var(--wst-surface);
}
.wst-toolbox th, .wst-toolbox td, .wst-toolbox .table th, .wst-toolbox .table td {
    padding: 9px 11px;
    border-bottom: 1px solid var(--wst-border);
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}
.wst-toolbox th, .wst-toolbox .table th {
    color: var(--wst-strong);
    background: var(--wst-inset);
    font-weight: 700;
    white-space: nowrap;
}
.wst-toolbox tr:last-child td { border-bottom: 0; }
.wst-toolbox tbody tr:hover { background: var(--surface-hover-bg, rgba(150, 150, 150, .1)); }

.wst-toolbox .wst-faq { margin-top: 20px; }
.wst-toolbox .wst-faq details { background: var(--wst-surface); border: 1px solid var(--wst-border); border-radius: 6px; }
.wst-toolbox .wst-faq details + details { margin-top: 8px; }
.wst-toolbox .wst-faq summary { padding: 11px 13px; color: var(--wst-strong); font-weight: 600; cursor: pointer; }
.wst-toolbox .wst-faq details > :not(summary) { margin: 0; padding: 0 13px 12px; color: var(--wst-secondary); }

.wst-toolbox .wst-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.wst-toolbox .wst-pagination a, .wst-toolbox .wst-pagination span {
    min-width: 34px;
    padding: 5px 10px;
    text-align: center;
    background: var(--wst-surface);
    border: 1px solid var(--wst-border);
    border-radius: 5px;
}
.wst-toolbox .wst-pagination .current { color: #fff; background: var(--wst-brand); border-color: var(--wst-brand); }

.io-black-mode .wst-toolbox { color-scheme: dark; }
.io-black-mode .wst-toolbox .wst-card, .io-black-mode .wst-toolbox .wst-main,
.io-black-mode .wst-toolbox .wst-sidebar { box-shadow: none; }

/* 图片工具共用高密度工作区 */
.wst-toolbox .wst-image-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.wst-toolbox .wst-image-panel {
    min-width: 0;
    padding: 14px;
    background: var(--wst-surface);
    border: 1px solid var(--wst-border);
    border-radius: var(--wst-radius);
}
.wst-toolbox .wst-image-panel > :first-child { margin-top: 0; }
.wst-toolbox .wst-image-panel > :last-child { margin-bottom: 0; }
.wst-toolbox .wst-image-panel h3 { margin: 0 0 10px; font-size: 15px; }
.wst-toolbox .wst-image-upload {
    display: grid;
    place-items: center;
    min-height: 108px;
    padding: 16px;
    text-align: center;
    color: var(--wst-secondary);
    background: var(--wst-soft);
    border: 1px dashed var(--wst-border-strong);
    border-radius: 7px;
    cursor: pointer;
}
.wst-toolbox .wst-image-upload:hover,
.wst-toolbox .wst-image-upload:focus-within {
    color: var(--wst-brand-hover);
    border-color: var(--brand-outline-color, rgba(27, 57, 244, .35));
    background: var(--brand-subtle-color, rgba(27, 57, 244, .1));
}
.wst-toolbox .wst-image-upload input[type="file"] { max-width: 100%; }
.wst-toolbox .wst-image-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 12px;
    overflow: auto;
    background-color: var(--wst-inset);
    border: 1px solid var(--wst-border);
    border-radius: 7px;
}
.wst-toolbox .wst-image-stage canvas,
.wst-toolbox .wst-image-stage img {
    display: block;
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    box-shadow: 0 3px 14px var(--shadow-medium-color, rgba(0, 0, 0, .15));
}
.wst-toolbox .wst-checkerboard {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23e8ebef' d='M0 0h10v10H0zM10 10h10v10H10z'/%3E%3C/svg%3E");
}
.wst-toolbox .wst-image-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 10px 0;
}
.wst-toolbox .wst-image-toolbar .wst-field { margin: 0; }
.wst-toolbox .wst-image-toolbar .wst-field label { font-size: 12px; }
.wst-toolbox .wst-image-toolbar button,
.wst-toolbox .wst-image-toolbar .wst-button { min-height: 34px; padding: 6px 11px; }
.wst-toolbox .wst-image-message { margin: 9px 0 0; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.wst-toolbox .wst-image-message.is-error { color: var(--danger-color, #dc3545); background: var(--danger-subtle-color, rgba(220, 53, 69, .08)); }
.wst-toolbox .wst-image-message.is-warning { color: #755500; background: rgba(255, 193, 7, .14); }
.wst-toolbox .wst-image-message.is-success { color: var(--success-color, #28a745); background: rgba(40, 167, 69, .1); }
.wst-toolbox .wst-image-result-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.wst-toolbox .wst-image-result-item { min-width: 0; padding: 9px; background: var(--wst-soft); border: 1px solid var(--wst-border); border-radius: 6px; }
.wst-toolbox .wst-image-result-item img,
.wst-toolbox .wst-image-result-item canvas { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--wst-inset); }
.wst-toolbox .wst-image-result-meta { margin: 7px 0; color: var(--wst-secondary); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.wst-toolbox .wst-transform-canvases {
    position: relative;
    max-width: 100%;
    max-height: 72vh;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 3px 14px var(--shadow-medium-color, rgba(0, 0, 0, .15));
}
.wst-toolbox .wst-transform-preview { width: 100%; height: 100%; box-shadow: none; }
.wst-toolbox .wst-transform-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    cursor: crosshair;
    touch-action: none;
    box-shadow: none;
}
.wst-toolbox .wst-annotation-canvases {
    position: relative;
    max-width: 100%;
    max-height: 72vh;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 3px 14px var(--shadow-medium-color, rgba(0, 0, 0, .15));
}
.wst-toolbox .wst-annotation-background { width: 100%; height: 100%; box-shadow: none; }
.wst-toolbox .wst-annotation-marks,
.wst-toolbox .wst-annotation-interaction {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    box-shadow: none;
}
.wst-toolbox .wst-annotation-marks { pointer-events: none; }
.wst-toolbox .wst-annotation-interaction { cursor: crosshair; touch-action: none; }
.wst-toolbox .wst-annotation-text-input {
    position: absolute;
    z-index: 3;
    width: min(260px, 70%);
    min-height: 34px;
    padding: 5px 8px;
    border: 2px solid var(--wst-brand);
    background: var(--wst-surface);
}
.wst-toolbox .wst-annotation-tools button.is-active { color: var(--button-color, #fff); background: var(--wst-brand-active, #1026a8); border-color: var(--wst-brand-active, #1026a8); }
.wst-toolbox button:disabled,
.wst-toolbox .wst-button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

@media (max-width: 991px) {
    .wst-toolbox .wst-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 245px; }
}
@media (max-width: 900px) {
    .wst-toolbox .wst-image-layout { grid-template-columns: 1fr; }
    .wst-toolbox .wst-image-stage { min-height: 300px; }
}
@media (max-width: 767px) {
    .wst-toolbox { padding-top: 16px; padding-bottom: 24px; }
    .wst-toolbox .wst-page-header, .wst-toolbox .wst-main { padding: 17px; }
    .wst-toolbox .wst-layout.has-sidebar { grid-template-columns: 1fr; }
    .wst-toolbox .wst-sidebar { position: static; }
    .wst-toolbox .wst-tool-header { gap: 12px; }
    .wst-toolbox .wst-tool-icon { flex-basis: 52px; width: 52px; height: 52px; padding: 6px; }
    .wst-toolbox .wst-inline-controls, .wst-toolbox .wst-result-line { flex-wrap: wrap; }
    .wst-toolbox .wst-inline-controls input, .wst-toolbox .wst-result-line input { flex-basis: 100%; }
    .wst-toolbox .wst-search { align-items: stretch; flex-wrap: wrap; }
    .wst-toolbox .wst-search label { flex-basis: 100%; }
    .wst-toolbox .wst-search input { flex-basis: calc(100% - 90px); }
    .wst-toolbox .wst-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
    .wst-toolbox .wst-runner, .wst-toolbox .wst-reference,
    .wst-toolbox .wst-unit-converter, .wst-toolbox .wst-local-tool { padding: 14px; }
}
@media (max-width: 480px) {
    .wst-toolbox .wst-grid, .wst-toolbox .wst-options { grid-template-columns: 1fr; }
    .wst-toolbox .wst-search input, .wst-toolbox .wst-search button { flex: 1 1 100%; }
    .wst-toolbox button, .wst-toolbox .wst-button { min-height: 40px; }
}
@media (max-width: 560px) {
    .wst-toolbox .wst-image-panel { padding: 11px; }
    .wst-toolbox .wst-image-stage { min-height: 240px; padding: 8px; }
    .wst-toolbox .wst-image-toolbar > * { flex: 1 1 auto; }
    .wst-toolbox .wst-image-result-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .wst-toolbox *, .wst-toolbox *::before, .wst-toolbox *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
/* PDF tools */
.wst-pdf-summary{display:flex;flex-wrap:wrap;gap:8px 18px;padding:10px 12px;border:1px solid var(--border-color);border-radius:var(--main-radius);background:var(--surface-bg-soft);font-size:13px;color:var(--body-secondary-color)}
.wst-pdf-summary strong{color:var(--body-strong-color)}
.wst-pdf-pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px;margin-top:12px}
.wst-pdf-page-card{position:relative;padding:8px;border:1px solid var(--border-color);border-radius:var(--main-radius);background:var(--surface-bg);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.wst-pdf-page-card:hover{border-color:var(--border-strong-color)}
.wst-pdf-page-card.is-selected{border-color:var(--danger-color);box-shadow:0 0 0 2px var(--danger-subtle-color)}
.wst-pdf-page-card canvas{display:block;width:100%;height:auto;background:#fff}
.wst-pdf-page-number{position:absolute;right:6px;top:6px;padding:2px 6px;border-radius:4px;background:var(--surface-deep-bg);color:var(--text-inverse-color);font-size:12px}
.wst-pdf-progress{height:6px;overflow:hidden;border-radius:6px;background:var(--surface-strong-bg)}
.wst-pdf-progress>span{display:block;height:100%;width:0;background:var(--brand-color);transition:width .2s}
.wst-pdf-result-table{width:100%;min-width:720px;border-collapse:collapse}
.wst-pdf-result-table th,.wst-pdf-result-table td{padding:9px 10px;border-bottom:1px solid var(--line-color);text-align:left;font-size:13px}
.wst-pdf-result-table a{color:var(--body-color)}.wst-pdf-result-table a:hover{color:var(--brand-color)}
@media(max-width:560px){.wst-pdf-pages{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.wst-pdf-page-card{padding:6px}.wst-pdf-summary{gap:6px 12px}}
.wst-ascii-art-output{min-height:180px;overflow:auto;padding:14px;border:1px solid var(--border-color);border-radius:var(--main-radius);background:var(--surface-deep-bg);color:var(--text-inverse-muted-color);font:13px/1.15 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre}
.wst-emoji-categories{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.wst-emoji-categories button.is-active{border-color:var(--brand-color);color:var(--brand-color);background:var(--brand-subtle-color)}
.wst-emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:6px}.wst-emoji-item{min-height:48px;padding:4px;border:1px solid var(--border-color);border-radius:var(--main-radius);background:var(--surface-bg);font-size:26px;line-height:1}.wst-emoji-item:hover{border-color:var(--brand-color);background:var(--surface-hover-bg)}.wst-emoji-detail{min-height:24px;color:var(--body-secondary-color)}
.wst-calculator-input{width:100%;font:600 18px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.wst-calculator-result{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;padding:11px 13px;border:1px solid var(--border-color);border-radius:var(--main-radius);background:var(--surface-bg-soft)}.wst-calculator-result span{color:var(--body-muted-color);font-size:13px}.wst-calculator-result strong{min-width:0;overflow-wrap:anywhere;font:700 22px/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.wst-calculator-keypad{display:grid;grid-template-columns:repeat(6,minmax(52px,1fr));gap:6px}.wst-calculator-keypad button{min-height:38px;padding:6px}.wst-calculator-keypad .wst-calculator-equals{grid-column:span 3;color:var(--button-color);border-color:var(--brand-color);background:var(--brand-color)}.wst-calculator-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.wst-calculator-history{margin-top:14px;padding-top:12px;border-top:1px solid var(--line-color)}.wst-calculator-history ol{display:grid;gap:4px;margin:7px 0 0;padding:0;list-style:none}.wst-calculator-history li button{width:100%;min-height:32px;padding:5px 8px;text-align:left;font:13px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--body-secondary-color);background:var(--surface-bg-soft)}.wst-symbol-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:5px;min-width:260px}.wst-symbol-button{min-width:38px;min-height:38px;padding:4px;font-size:19px;line-height:1;background:var(--surface-bg)}.wst-symbol-button:hover{color:var(--brand-color);border-color:var(--brand-color);background:var(--brand-subtle-color)}
@media(max-width:560px){.wst-calculator-keypad{grid-template-columns:repeat(4,minmax(46px,1fr))}.wst-calculator-keypad .wst-calculator-equals{grid-column:span 2}.wst-symbol-grid{min-width:210px}}
.wst-network-result-grid{display:grid;grid-template-columns:minmax(110px,160px) minmax(0,1fr);margin:12px 0;border:1px solid var(--border-color);border-radius:var(--main-radius);overflow:hidden}.wst-network-result-grid[hidden]{display:none}.wst-network-result-grid dt,.wst-network-result-grid dd{margin:0;padding:9px 11px;border-bottom:1px solid var(--line-color)}.wst-network-result-grid dt{color:var(--body-secondary-color);background:var(--surface-bg-soft)}.wst-network-result-grid dd{overflow-wrap:anywhere}.wst-network-result-grid dt:last-of-type,.wst-network-result-grid dd:last-of-type{border-bottom:0}.wst-currency-controls{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(170px,1fr) 42px minmax(170px,1fr);gap:9px;align-items:end}.wst-currency-controls label{margin:0}.wst-currency-controls input,.wst-currency-controls select{width:100%}.wst-currency-swap{min-width:42px;margin-bottom:1px;padding-inline:6px;font-size:20px}.wst-currency-result{display:grid;gap:4px;margin:12px 0;padding:14px;border:1px solid var(--brand-outline-color);border-radius:var(--main-radius);background:var(--brand-subtle-color)}.wst-currency-result[hidden]{display:none}.wst-currency-result strong{font-size:21px;color:var(--body-strong-color)}.wst-currency-result span{color:var(--body-secondary-color)}.wst-currency-result small{color:var(--body-muted-color)}
@media(max-width:680px){.wst-currency-controls{grid-template-columns:1fr 1fr}.wst-currency-controls label:first-child{grid-column:1/-1}.wst-currency-swap{grid-column:1/-1;width:100%}}
.wst-toolbox .wst-collage-settings,.wst-toolbox .wst-collage-order{margin-top:14px}.wst-toolbox .wst-collage-templates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0}.wst-toolbox .wst-collage-templates button{min-height:36px;padding:6px 8px;color:var(--body-secondary-color);background:var(--surface-bg)}.wst-toolbox .wst-collage-templates button.is-active{color:var(--brand-color);border-color:var(--brand-color);background:var(--brand-subtle-color)}.wst-toolbox .wst-collage-stage canvas{cursor:grab;touch-action:none}.wst-toolbox .wst-collage-stage canvas:active{cursor:grabbing}.wst-toolbox .wst-collage-thumbnails{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px}.wst-toolbox .wst-collage-thumbnails button{position:relative;min-height:76px;padding:4px;overflow:hidden;background:var(--surface-bg);cursor:grab}.wst-toolbox .wst-collage-thumbnails button.is-active{border-color:var(--brand-color);box-shadow:0 0 0 2px var(--focus-ring-color)}.wst-toolbox .wst-collage-thumbnails img{display:block;width:100%;height:68px;object-fit:cover}.wst-toolbox .wst-collage-thumbnails span{position:absolute;right:5px;bottom:5px;min-width:20px;padding:2px 5px;border-radius:4px;color:var(--text-inverse-color);background:var(--surface-deep-bg);font-size:11px}.wst-toolbox .wst-collage-settings .wst-options{grid-template-columns:repeat(auto-fit,minmax(155px,1fr))}
.wst-toolbox .wst-cutout-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}.wst-toolbox .wst-cutout-previews .wst-image-panel{min-width:0}.wst-toolbox .wst-cutout-previews .wst-image-stage{min-height:300px}.wst-toolbox .wst-cutout-previews canvas,.wst-toolbox .wst-cutout-previews img{max-height:55vh}.wst-toolbox .wst-cutout-custom-field input[type=color]{width:100%;min-height:38px;padding:3px}.wst-toolbox .wst-cutout>.wst-notice{margin-top:0}
@media(max-width:900px){.wst-toolbox .wst-cutout-previews{grid-template-columns:1fr}}
.wst-drawing-board{display:grid;gap:14px}.wst-board-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px;background:var(--surface-bg-soft);border:1px solid var(--border-color);border-radius:var(--main-radius)}.wst-board-tool-group{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.wst-board-tool-group+.wst-board-tool-group{padding-left:10px;border-left:1px solid var(--line-color)}.wst-board-toolbar button,.wst-board-pagebar button{min-height:36px;padding:7px 12px;border:1px solid var(--border-strong-color);border-radius:6px;background:var(--surface-bg);color:var(--body-color);cursor:pointer}.wst-board-toolbar button:hover,.wst-board-pagebar button:hover,.wst-board-toolbar button.is-active,.wst-board-pagebar button.is-active{border-color:var(--brand-color);color:var(--brand-color);background:var(--brand-subtle-color)}.wst-board-toolbar button:disabled,.wst-board-pagebar button:disabled{opacity:.45;cursor:not-allowed}.wst-board-settings label{display:flex;align-items:center;gap:7px;color:var(--body-secondary-color);font-size:13px}.wst-board-settings input[type=color]{width:38px;height:32px;padding:2px}.wst-board-settings input[type=range]{width:92px}.wst-board-settings output{min-width:20px}.wst-board-file-actions{margin-left:auto}.wst-board-stage-wrap{overflow:auto;padding:14px;background:var(--surface-inset-bg);border:1px solid var(--border-color);border-radius:var(--main-radius)}.wst-board-canvas{display:block;width:100%;height:auto;max-height:72vh;margin:auto;background:#fff;box-shadow:0 4px 18px var(--shadow-soft-color);touch-action:none;cursor:crosshair}.wst-board-pagebar{display:flex;align-items:center;gap:8px;overflow-x:auto}.wst-board-pages{display:flex;gap:6px}.wst-board-tip{margin:0;color:var(--body-muted-color);font-size:13px}.wst-upscaler-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}.wst-upscaler-previews .wst-image-panel{min-width:0}.wst-upscaler-previews .wst-image-stage{min-height:300px}.wst-upscaler-previews canvas,.wst-upscaler-previews img{max-height:58vh}.wst-upscaler-previews h3 small{margin-left:6px;color:var(--body-muted-color);font-size:12px;font-weight:400}@media(max-width:900px){.wst-upscaler-previews{grid-template-columns:1fr}}@media(max-width:782px){.wst-board-tool-group+.wst-board-tool-group{padding-left:0;border-left:0}.wst-board-file-actions{margin-left:0}.wst-board-stage-wrap{padding:6px}}
