:root { --tk: #dc2626; --tk-dark: #991b1b; --tk-soft: #fef2f2; --tk-line: #fecaca; }

.tk-hero { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); padding: 52px 0 40px; border-bottom: 1px solid var(--tk-line); }
.tk-hero h1 { color: #7f1d1d; 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 #fca5a5; 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 #fca5a5; 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: #fee2e2 !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: #fee2e2; }
.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: #7f1d1d; 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,#fef2f2,#fee2e2); border: 1px solid var(--tk-line); border-radius: 16px; padding: 20px 22px; margin-top: 22px; }
.cta-inline p { margin: 0; color: #7f1d1d; 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(220,38,38,.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: #7f1d1d; box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(220,38,38,.2); }
.final-cta { background: linear-gradient(135deg,#7f1d1d,#991b1b); border-radius: 20px; padding: 40px 28px; text-align: center; color: #fff; margin-top: 32px; }
.final-cta p { color: #fee2e2; }

@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; }
}

/* ── JPG to PDF specifics ── */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px; padding: 14px 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; }
.opt-grid .q-group.is-disabled { opacity: .45; pointer-events: none; }
.opt-block { display: flex; flex-direction: column; gap: 6px; }
.name-row { display: flex; align-items: center; gap: 8px; }
.name-row input { flex: 1; min-width: 0; }
.name-row span { color: #64748b; font-size: .9rem; }
.shrink-row { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; color: #334155; }
.shrink-row input { margin-top: 3px; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; max-height: 520px; overflow-y: auto; }
.pg-card { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px; cursor: grab; transition: box-shadow .15s, border-color .15s; }
.pg-card:hover { border-color: var(--tk-line); box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.pg-card.dragging { opacity: .4; }
.pg-card.drop-before { box-shadow: -4px 0 0 var(--tk); }
.pg-num { position: absolute; top: 6px; left: 6px; z-index: 1; background: var(--tk); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 6px; padding: 1px 7px; }
.pg-thumb { aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.pg-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pg-name { font-size: .72rem; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 6px 2px 4px; }
.pg-tools { display: flex; justify-content: space-between; }
.pg-tools button { background: none; border: none; color: #64748b; padding: 4px 6px; border-radius: 6px; line-height: 1; }
.pg-tools button:hover:not(:disabled) { background: var(--tk-soft); color: var(--tk); }
.pg-tools button:disabled { opacity: .3; }
.pg-tools button[data-act="remove"]:hover { background: #fee2e2; color: #dc2626; }
@media (max-width: 575px) {
  .page-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 8px; }
  .opt-grid { padding: 12px; }
}
