.tk-shell {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 28px 20px 60px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--itm-tool-text, #f3f3f3);
    box-sizing: border-box;
}

.tk-shell *, .tk-shell *::before, .tk-shell *::after { box-sizing: border-box; }

.tk-hero { margin-bottom: 26px; }

.tk-kicker {
    margin: 0 0 8px;
    color: var(--itm-tool-accent, #fa551e);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.tk-title {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--itm-tool-heading, #fff);
}

.tk-lead {
    margin: 0;
    max-width: 70ch;
    line-height: 1.6;
    color: var(--itm-tool-muted, rgba(255, 255, 255, .66));
}

.tk-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
    gap: 18px;
    align-items: start;
}

.tk-panel {
    border: 1px solid var(--itm-tool-line, rgba(255, 255, 255, .11));
    background: var(--itm-tool-panel, rgba(255, 255, 255, .025));
    padding: 20px;
    border-radius: 6px;
}

.tk-panel h2 {
    margin: 0 0 16px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--itm-tool-heading, #fff);
}

.tk-stack { display: grid; gap: 14px; }

.tk-field { display: grid; gap: 6px; }

.tk-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--itm-tool-muted, rgba(255, 255, 255, .66));
}

.tk-input, .tk-select, .tk-textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--itm-tool-line, rgba(255, 255, 255, .11));
    background: var(--itm-tool-field, #080808);
    color: var(--itm-tool-text, #f3f3f3);
    font-family: inherit;
    font-size: 14px;
    border-radius: 4px;
    outline: none;
}

.tk-textarea { min-height: 190px; resize: vertical; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.tk-input:focus, .tk-select:focus, .tk-textarea:focus { border-color: var(--itm-tool-accent, #fa551e); }

.tk-range { width: 100%; accent-color: var(--itm-tool-accent, #fa551e); }

.tk-check { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.tk-check input { width: 17px; height: 17px; accent-color: var(--itm-tool-accent, #fa551e); }

.tk-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.tk-btn {
    appearance: none;
    border: 1px solid var(--itm-tool-line, rgba(255, 255, 255, .18));
    background: transparent;
    color: var(--itm-tool-text, #f3f3f3);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 11px 18px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color .15s, background .15s, color .15s;
}

.tk-btn:hover:not(:disabled) { border-color: var(--itm-tool-accent, #fa551e); }
.tk-btn:disabled { opacity: .45; cursor: not-allowed; }

.tk-btn-primary {
    background: var(--itm-tool-accent, #fa551e);
    border-color: var(--itm-tool-accent, #fa551e);
    color: #080808;
}
.tk-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.tk-drop {
    display: block;
    border: 2px dashed var(--itm-tool-line, rgba(255, 255, 255, .2));
    background: var(--itm-tool-surface, rgba(255, 255, 255, .02));
    padding: 26px 18px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.tk-drop:hover, .tk-drop.is-over { border-color: var(--itm-tool-accent, #fa551e); }
.tk-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tk-drop-title { display: block; font-weight: 700; margin-bottom: 5px; }
.tk-drop-note { display: block; font-size: 12px; color: var(--itm-tool-muted, rgba(255, 255, 255, .6)); }

.tk-status { margin-top: 12px; font-size: 13px; line-height: 1.5; min-height: 20px; color: var(--itm-tool-muted, rgba(255, 255, 255, .7)); }
.tk-status.is-error { color: #ff6b6b; }
.tk-status.is-ok { color: var(--itm-tool-link, #22d3ee); }

.tk-progress { height: 4px; border-radius: 2px; background: var(--itm-tool-line-soft, rgba(255, 255, 255, .08)); overflow: hidden; margin-top: 12px; display: none; }
.tk-progress span { display: block; height: 100%; width: 0; background: var(--itm-tool-accent, #fa551e); transition: width .12s linear; }

.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.tk-stat { border: 1px solid var(--itm-tool-line-soft, rgba(255, 255, 255, .08)); padding: 10px 12px; border-radius: 4px; }
.tk-stat strong { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--itm-tool-faint, rgba(255, 255, 255, .45)); margin-bottom: 4px; font-weight: 700; }
.tk-stat span { font-size: 15px; font-variant-numeric: tabular-nums; }

.tk-out { display: grid; gap: 10px; }
.tk-big { font-size: clamp(24px, 4vw, 34px); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--itm-tool-heading, #fff); }

.tk-note { margin: 14px 0 0; font-size: 12px; line-height: 1.55; color: var(--itm-tool-faint, rgba(255, 255, 255, .5)); }

.tk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 4px; }
.tk-thumb { border: 1px solid var(--itm-tool-line-soft, rgba(255, 255, 255, .08)); border-radius: 4px; overflow: hidden; background: var(--itm-tool-field, #080808); }
.tk-thumb img, .tk-thumb canvas, .tk-thumb video { display: block; width: 100%; height: auto; }
.tk-thumb figcaption { padding: 7px 9px; font-size: 11px; display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--itm-tool-muted, rgba(255, 255, 255, .6)); }
.tk-thumb a { color: var(--itm-tool-link, #22d3ee); text-decoration: none; font-weight: 700; }
.tk-thumb a:hover { text-decoration: underline; }

.tk-empty { color: var(--itm-tool-faint, rgba(255, 255, 255, .45)); font-size: 13px; padding: 22px 0; text-align: center; }

.tk-preview { max-width: 100%; border-radius: 4px; display: block; }

@media (max-width: 860px) {
    .tk-grid { grid-template-columns: 1fr; }
    .tk-shell { padding: 20px 14px 44px; }
}
