/* 工具页公共样式：与站点现有风格（蓝主色 + 白卡片 + 圆角阴影）保持一致 */
:root {
    --tk-primary: #3B82F6;
    --tk-primary-dark: #2563EB;
    --tk-border: #E5E7EB;
    --tk-text: #1F2937;
    --tk-muted: #6B7280;
}

.tk-main { padding-top: 88px; padding-bottom: 56px; min-height: 70vh; }

.tk-hero { background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%); border-bottom: 1px solid #F1F5F9; }
.tk-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; color: #111827; line-height: 1.3; }
.tk-hero p { margin-top: .5rem; color: var(--tk-muted); font-size: .95rem; line-height: 1.7; max-width: 62rem; }

.tk-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.tk-card { background: #fff; border: 1px solid var(--tk-border); border-radius: 14px; box-shadow: 0 6px 24px rgba(15, 23, 42, .05); }
.tk-card-h { padding: 12px 16px; border-bottom: 1px solid var(--tk-border); background: #FAFAFA; font-size: .88rem; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 8px; border-radius: 14px 14px 0 0; }
.tk-card-b { padding: 16px; }

.tk-label { display: block; font-size: .8rem; font-weight: 600; color: #4B5563; margin-bottom: 6px; }
.tk-input, .tk-select, .tk-textarea {
    width: 100%; border: 1px solid #D1D5DB; border-radius: 8px; padding: 8px 10px;
    font-size: .875rem; color: var(--tk-text); background: #fff; outline: none; transition: .15s;
}
.tk-input:focus, .tk-select:focus, .tk-textarea:focus { border-color: var(--tk-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.tk-textarea { min-height: 160px; line-height: 1.7; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.tk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 8px; padding: 9px 18px; font-size: .875rem; font-weight: 600;
    background: var(--tk-primary); color: #fff; border: 1px solid transparent; cursor: pointer;
    transition: all .15s ease; user-select: none;
}
.tk-btn:hover { background: var(--tk-primary-dark); }
.tk-btn:active { transform: scale(.97); }
.tk-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.tk-btn-ghost { background: #fff; color: #374151; border-color: #D1D5DB; }
.tk-btn-ghost:hover { background: #F9FAFB; }
.tk-btn-sm { padding: 5px 10px; font-size: .78rem; border-radius: 6px; }

.tk-drop {
    border: 2px dashed #CBD5E1; border-radius: 12px; padding: 30px 16px; text-align: center;
    color: var(--tk-muted); background: #F8FAFC; cursor: pointer; transition: .15s;
}
.tk-drop:hover, .tk-drop.dragover { border-color: var(--tk-primary); background: #EFF6FF; color: #2563EB; }
.tk-drop i { font-size: 1.6rem; display: block; margin-bottom: 8px; }

.tk-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tk-hint { font-size: .75rem; color: #9CA3AF; margin-top: 6px; line-height: 1.6; }

.tk-list { border: 1px solid var(--tk-border); border-radius: 10px; overflow: hidden; }
.tk-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #F1F5F9; font-size: .84rem; background: #fff; }
.tk-list-item:last-child { border-bottom: none; }
.tk-list-item:hover { background: #FAFAFA; }

.tk-badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #EFF6FF; color: #2563EB; }

.tk-result { background: #F0F9FF; border: 1px solid #BAE6FD; color: #075985; border-radius: 10px; padding: 12px 14px; font-size: .85rem; line-height: 1.7; }

.tk-toast {
    position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 12px);
    background: #111827; color: #fff; padding: 10px 20px; border-radius: 10px;
    font-size: .85rem; z-index: 9999; opacity: 0; pointer-events: none; transition: .2s; max-width: 86vw;
}
.tk-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tk-toast.err { background: #B91C1C; }

.tk-preview {
    width: 100%; border: 1px solid var(--tk-border); border-radius: 10px; background: #F9FAFB;
    min-height: 180px; display: flex; align-items: center; justify-content: center;
    color: #9CA3AF; font-size: .82rem; overflow: auto;
}
.tk-preview img, .tk-preview canvas { max-width: 100%; display: block; }

@media (max-width: 640px) {
    .tk-main { padding-top: 76px; }
    .tk-card-b { padding: 14px; }
}
