:root { --tk: #9333ea; --tk-dark: #6b21a8; --tk-soft: #faf5ff; --tk-line: #e9d5ff; }

.tk-hero { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); padding: 52px 0 40px; border-bottom: 1px solid var(--tk-line); }
.tk-hero h1 { color: #581c87; font-size: 2.35rem; font-weight: 800; letter-spacing: -.5px; }
.tk-hero .lead-copy { max-width: 680px; font-size: 1.08rem; color: #475569; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 100px; background: #fff; border: 1px solid #d8b4fe; font-size: .82rem; font-weight: 600; color: var(--tk); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 18px; font-size: .85rem; color: #334155; }
.hero-facts i { color: var(--tk); margin-right: 4px; }

.tool-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 4px 24px rgba(15,23,42,.06); padding: 28px; max-width: 880px; margin: -28px auto 0; position: relative; }

/* Dropzone */
.dropzone { border: 2px dashed #d8b4fe; background: #f8fafc; border-radius: 16px; padding: 44px 20px; text-align: center; cursor: pointer; transition: background .2s, border-color .2s; }
.dropzone:hover, .dropzone:focus-visible { background: var(--tk-soft); border-color: var(--tk); outline: none; }
.dropzone.dragover, #workspace.dragover { background: #f3e8ff !important; border-color: var(--tk) !important; }
.dropzone .dz-icon { font-size: 2.8rem; color: var(--tk); }
.dropzone h2 { font-size: 1.25rem; font-weight: 800; color: #0f172a; margin: 8px 0 4px; }
.dropzone .dz-sub { color: #64748b; margin: 0; }
.dropzone .dz-limits { font-size: .8rem; color: #94a3b8; margin-top: 10px; }

#workspace { border-radius: 16px; border: 2px solid transparent; transition: background .2s, border-color .2s; }

/* Quality */
.q-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; }
.q-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.q-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.q-btn { border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 9px; cursor: pointer; transition: all .15s; }
.q-btn small { font-weight: 500; color: #94a3b8; margin-left: 3px; }
.q-btn:hover { border-color: var(--tk); color: var(--tk); }
.q-btn.active { background: var(--tk); border-color: var(--tk); color: #fff; }
.q-btn.active small { color: #f3e8ff; }
.q-hint { flex-basis: 100%; font-size: .82rem; color: #64748b; margin: 0; }

/* Queue */
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.queue-head .summary { font-size: .88rem; font-weight: 600; color: #334155; }
.queue { border: 1px solid #e2e8f0; border-radius: 14px; max-height: 420px; overflow-y: auto; }
.q-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.q-row:last-child { border-bottom: none; }
.q-row.q-failed { background: #fef2f2; }
.q-row.q-converting { background: var(--tk-soft); }
.q-thumb { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex-shrink: 0; border: 1px solid #e2e8f0; background: #f1f5f9; }
.q-thumb-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; font-size: 1.1rem; line-height: 1; }
.q-thumb-ph span { font-size: .55rem; font-weight: 800; letter-spacing: .05em; margin-top: 3px; }
.q-info { flex: 1; min-width: 0; }
.q-name { font-weight: 600; font-size: .9rem; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta { font-size: .78rem; color: #64748b; line-height: 1.45; margin-top: 2px; }
.note-pill { display: inline-block; background: #fef9c3; color: #854d0e; border-radius: 6px; padding: 0 6px; font-size: .72rem; font-weight: 600; }
.st { font-size: 1.1rem; flex-shrink: 0; }
.st-queued { color: #94a3b8; }
.st-busy { color: var(--tk); }
.st-done { color: #16a34a; }
.st-failed { color: #dc2626; }
.q-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.q-remove { background: none; border: none; color: #94a3b8; padding: 6px; border-radius: 8px; line-height: 1; }
.q-remove:hover { color: #dc2626; background: #fee2e2; }
.spin { display: inline-block; animation: tkspin 1s linear infinite; }
@keyframes tkspin { to { transform: rotate(360deg); } }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.btn-tk { background: var(--tk); border-color: var(--tk); color: #fff; font-weight: 700; }
.btn-tk:hover, .btn-tk:focus { background: var(--tk-dark); border-color: var(--tk-dark); color: #fff; }
.btn-tk:disabled { background: #94a3b8; border-color: #94a3b8; }
.remaining { margin-left: auto; font-size: .8rem; color: #64748b; }

.progress-wrap { margin-top: 16px; }
.progress { height: 10px; border-radius: 10px; background: #e2e8f0; }
.progress-bar { background: var(--tk); transition: width .25s ease; }
.progress-text { font-size: .82rem; color: #475569; margin-top: 6px; word-break: break-word; }

.skip-notice { margin-top: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 12px; padding: 12px 14px; font-size: .85rem; }
.skip-notice li { word-break: break-word; }

.result-bar { margin-top: 18px; padding: 16px; border-radius: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.result-bar .rt { font-size: .9rem; color: #14532d; }

.privacy-line { font-size: .8rem; color: #64748b; margin: 14px 0 0; text-align: center; }
.privacy-line i { color: #16a34a; }

/* Content sections */
.content-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 36px; margin-top: 32px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.content-card h2 { font-weight: 800; color: #581c87; font-size: 1.6rem; margin-bottom: 14px; }
.content-card h3 { font-weight: 700; font-size: 1.1rem; color: #0f172a; margin-top: 22px; }
.content-card p, .content-card li { color: #475569; line-height: 1.75; }
.content-card code { background: #f1f5f9; color: #0f172a; padding: 1px 6px; border-radius: 5px; font-size: .88em; }
.step-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.step-list li { position: relative; padding: 0 0 18px 52px; }
.step-list li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--tk-soft); color: var(--tk); border: 1px solid var(--tk-line); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.example-box { background: var(--tk-soft); border: 1px solid var(--tk-line); border-radius: 14px; padding: 18px 20px; margin-top: 8px; }
.example-box p:last-child { margin-bottom: 0; }
.tip-grid .tip { height: 100%; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px; }
.tip-grid .tip h3 { margin-top: 0; font-size: 1rem; }
.tip-grid .tip p { font-size: .9rem; margin: 0; }
.cta-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(135deg,#faf5ff,#f3e8ff); border: 1px solid var(--tk-line); border-radius: 16px; padding: 20px 22px; margin-top: 22px; }
.cta-inline p { margin: 0; color: #581c87; font-weight: 600; }
.related-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 14px; text-decoration: none; color: #1e293b; height: 100%; transition: border-color .15s, box-shadow .15s; }
.related-links a:hover { border-color: var(--tk); box-shadow: 0 4px 16px rgba(147,51,234,.12); }
.related-links i { font-size: 1.3rem; color: var(--tk); }
.related-links strong { display: block; font-size: .92rem; }
.related-links span { font-size: .8rem; color: #64748b; }
.accordion-button:not(.collapsed) { background: var(--tk-soft); color: #581c87; box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(147,51,234,.2); }
.final-cta { background: linear-gradient(135deg,#581c87,#6b21a8); border-radius: 20px; padding: 40px 28px; text-align: center; color: #fff; margin-top: 32px; }
.final-cta p { color: #f3e8ff; }

@media (max-width: 575px) {
  .tk-hero { padding: 36px 0 36px; }
  .tk-hero h1 { font-size: 1.7rem; }
  .tool-card { padding: 16px; border-radius: 16px; margin-top: -20px; }
  .dropzone { padding: 32px 14px; }
  .content-card { padding: 22px 18px; border-radius: 16px; }
  .content-card h2 { font-size: 1.35rem; }
  .q-row { gap: 9px; padding: 9px; }
  .q-thumb { width: 44px; height: 44px; }
  .remaining { margin-left: 0; flex-basis: 100%; }
  .result-bar .btn { width: 100%; }
  .action-row .btn-tk { flex: 1; }
}

/* ── Image Resizer specifics ── */
.mode-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mode-tabs .q-btn { padding: 8px 14px; }
.set-panel { padding: 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; }
.dim-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.dim-row .field { display: flex; flex-direction: column; gap: 4px; }
.dim-row .field input { width: 120px; }
.dim-row .x { padding-bottom: 8px; color: #94a3b8; font-weight: 700; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: #334155; padding-bottom: 8px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.preset-row .q-btn { font-size: .78rem; padding: 5px 10px; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; margin-top: 14px; }
.sub-grid .opt-block { display: flex; flex-direction: column; gap: 6px; }
.opt-block.is-disabled { opacity: .45; pointer-events: none; }
.kb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-row input { width: 110px; }
.valid-msg { font-size: .82rem; color: #b91c1c; min-height: 1em; margin: 8px 0 0; }
.pad-color { width: 42px; height: 32px; padding: 2px; border-radius: 8px; border: 1px solid #cbd5e1; }
@media (max-width: 575px) {
  .dim-row .field input { width: 100px; }
  .set-panel { padding: 12px; }
}
