/* Adly free tools — SaaS product UI */

.public-tools-page {
    --pt-primary: #7c3aed;
    --pt-primary-hover: #6d28d9;
    --pt-primary-soft: #f5f3ff;
    --pt-ink: #0f172a;
    --pt-muted: #64748b;
    --pt-border: #e2e8f0;
    --pt-surface: #ffffff;
    --pt-canvas: #f1f5f9;
    --pt-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    --pt-radius: 20px;
    --pt-radius-sm: 14px;
    /* Status tones (brand-aligned — quiet violet/slate, never Bootstrap green) */
    --pt-ok-bg: #f8fafc;
    --pt-ok-border: #e2e8f0;
    --pt-ok-ink: #334155;
    --pt-ok-accent: #7c3aed;
    --pt-ok-badge: #ede9fe;
    --pt-warn-bg: #faf6f1;
    --pt-warn-border: #e7d3b5;
    --pt-warn-ink: #7c4a1a;
    --pt-warn-badge: #f3e8d9;
    --pt-err-bg: #faf4f6;
    --pt-err-border: #e8c4cf;
    --pt-err-ink: #9f1239;
    --pt-err-badge: #fce7ef;
    --pt-busy-bg: #f5f3ff;
    --pt-busy-border: #ddd6fe;
    --pt-busy-ink: #5b21b6;
    --pt-miss-bg: #f8fafc;
    --pt-miss-border: #e2e8f0;
    --pt-miss-ink: #475569;
    background: var(--pt-canvas);
    font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[lang="en"] .public-tools-page {
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Kill homepage.css `section { padding: 80px 0 }` on tools pages */
.public-tools-page section {
    padding: 0;
}

/* ── Hero ─────────────────────────────────────────────── */
.public-tools-page .public-tools-aurora {
    padding-bottom: 40px;
}

.public-tools-hero-wrap {
    position: relative;
    z-index: 2;
    padding-top: 8px;
    padding-bottom: 8px;
}

.public-tools-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.78);
    margin-bottom: 20px;
}

.public-tools-breadcrumb a {
    color: #ddd6fe;
    text-decoration: none;
    font-weight: 600;
}

.public-tools-breadcrumb a:hover {
    color: #fff;
}

.public-tools-hero {
    max-width: 720px;
}

.public-tools-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4c1d95;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 14px;
}

.public-tools-hero h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    color: #f8fafc;
    margin-bottom: 14px;
}

.public-tools-hero-sub {
    font-size: 1.05rem;
    color: rgba(241, 245, 249, 0.92);
    line-height: 1.7;
    margin-bottom: 12px;
}

.public-tools-trust {
    font-size: 0.92rem;
    color: rgba(196, 181, 253, 0.95);
    margin-bottom: 16px;
}

.public-tools-hero-pills {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 18px 0 0;
}

.public-tools-hero-pills li {
    font-size: 12px;
    font-weight: 600;
    color: #e9d5ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(233, 213, 255, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
}

/* ── Main band ────────────────────────────────────────── */
.public-tools-main {
    position: relative;
    z-index: 1;
    background: var(--pt-canvas);
    padding: 36px 0 64px;
    color: var(--pt-ink);
}

.public-tools-intro {
    margin-bottom: 28px;
    max-width: 820px;
}

.public-tools-intro p {
    margin-bottom: 12px;
    color: #334155;
    line-height: 1.75;
}

.public-tools-intro p:last-child {
    margin-bottom: 0;
}

/* ── Hub cards ────────────────────────────────────────── */
.public-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0 0;
}

.public-tools-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border-radius: var(--pt-radius-sm);
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.public-tools-card:hover {
    transform: translateY(-2px);
    border-color: #c4b5fd;
    box-shadow: var(--pt-shadow);
}

.public-tools-card h2 {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}

.public-tools-card p {
    color: var(--pt-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

.public-tools-card-cta {
    font-weight: 700;
    color: var(--pt-primary);
    font-size: 0.9rem;
}

.public-tools-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--pt-primary-soft);
    color: var(--pt-primary);
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
}

.public-tools-card-icon[data-icon="qr"]::before { content: "QR"; font-size: 11px; }
.public-tools-card-icon[data-icon="palette"]::before { content: "●"; }
.public-tools-card-icon[data-icon="compress"]::before { content: "↓"; }
.public-tools-card-icon[data-icon="convert"]::before { content: "⇄"; }
.public-tools-card-icon[data-icon="resize"]::before { content: "⤢"; }
.public-tools-card-icon[data-icon="bg"]::before { content: "◈"; }
.public-tools-card-icon[data-icon="enhance"]::before { content: "✦"; }
.public-tools-card-icon[data-icon="object"]::before { content: "⌀"; }
.public-tools-card-icon[data-icon="adsize"]::before { content: "▣"; }
.public-tools-card-icon[data-icon="bizcard"]::before { content: "▭"; }
.public-tools-card-icon[data-icon="mp4compress"]::before { content: "▼"; }
.public-tools-card-icon[data-icon="mp4gif"]::before { content: "▶"; }
.public-tools-card-icon[data-icon="gifmp4"]::before { content: "▷"; }
.public-tools-card-icon[data-icon="optgif"]::before { content: "◎"; }
.public-tools-card-icon[data-icon="gifedit"]::before { content: "✎"; }
.public-tools-card-icon[data-icon="acapella"]::before { content: "♪"; }
.public-tools-card-icon[data-icon="extractmusic"]::before { content: "♫"; }
.public-tools-card-icon[data-icon="article"]::before { content: "✍"; }
.public-tools-card-icon[data-icon="translator"]::before { content: "⇋"; }
.public-tools-card-icon[data-icon="seoopt"]::before { content: "⌕"; }

.pt-audio-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.pt-audio-stem {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.pt-audio-stem.is-primary {
  border-color: var(--brand-primary, #0f766e);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}
.pt-audio-stem-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 8px;
}
.pt-audio-stem audio {
  width: 100%;
  display: block;
}
.pt-gif-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 12px 0;
}
.pt-gif-controls label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-muted, #64748b);
}
.pt-gif-controls input,
.pt-gif-controls select {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--brand-border, #e2e8f0);
}
.pt-gif-preview {
  margin-top: 12px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a0a;
  border-radius: 12px;
  overflow: hidden;
}
.pt-gif-preview img,
.pt-gif-preview video {
  max-width: 100%;
  max-height: 360px;
  display: block;
}

.pt-obj-tools {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.pt-obj-brush {
  width: 100%;
  accent-color: #7c3aed;
}
.pt-obj-stage {
  min-height: 280px;
}
.pt-obj-editor {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  user-select: none;
  touch-action: none;
}
.pt-obj-base {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.pt-obj-paint {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  cursor: crosshair;
}

/* ── Workbench (the product surface) ──────────────────── */
.public-tools-workbench {
    background: var(--pt-surface);
    border: 1px solid var(--pt-border);
    border-radius: 24px;
    box-shadow: var(--pt-shadow);
    overflow: hidden;
}

.public-tools-workbench-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--pt-border);
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.public-tools-workbench-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pt-primary);
    margin: 0 0 4px;
}

.public-tools-workbench-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pt-ink);
    margin: 0;
    line-height: 1.35;
    max-width: 48ch;
}

.public-tools-workbench-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pt-primary);
    text-decoration: none;
    white-space: nowrap;
}

.public-tools-workbench-link:hover {
    color: var(--pt-primary-hover);
}

.public-tools-workbench-body {
    padding: 28px;
}

/* Tool shell layout */
.pt-shell {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pt-shell.pt-panel {
    display: grid;
}

.pt-history {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--pt-border);
}

.pt-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pt-history-clear {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
}

.pt-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.pt-history-card {
    position: relative;
    display: grid;
    gap: 6px;
    text-align: start;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-history-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.08);
}

.pt-history-card img,
.pt-history-card-empty {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.pt-history-card-empty {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 1.4rem;
}

.pt-history-card-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pt-history-card-meta strong {
    font-size: 0.78rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-history-card-meta span {
    font-size: 0.7rem;
    color: var(--pt-muted);
}

.pt-history-card-del {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    line-height: 1;
}

.pt-upload {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 48px 28px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pt-dropzone:hover,
.pt-dropzone.is-dragover {
    border-color: var(--pt-primary);
    background: var(--pt-primary-soft);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.12);
}

.pt-dropzone.is-busy {
    border-color: var(--pt-busy-border);
    background: var(--pt-busy-bg);
    cursor: wait;
    pointer-events: none;
}

.pt-dropzone.is-busy,
.pt-dropzone.is-done,
.pt-dropzone.is-error {
    margin-bottom: 16px !important;
}

.pt-dropzone.is-done {
    border-color: #c4b5fd;
    background: var(--pt-primary-soft);
}

.pt-dropzone.is-error {
    border-color: var(--pt-err-border);
    background: var(--pt-err-bg);
}

.pt-upload-spinner,
.pt-adsize-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border-radius: 999px;
    border: 3px solid #ddd6fe;
    border-top-color: var(--pt-primary, #7c3aed);
    animation: pt-upload-spin 0.7s linear infinite;
}

.pt-upload-spinner[hidden],
.pt-adsize-spinner[hidden] {
    display: none !important;
}

@keyframes pt-upload-spin {
    to { transform: rotate(360deg); }
}

@keyframes pt-adsize-spin {
    to { transform: rotate(360deg); }
}

.pt-dropzone strong,
.pt-upload-zone-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-dropzone span,
.pt-upload-zone-sub {
    color: var(--pt-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 36ch;
}

.pt-status.pt-upload-status,
.pt-upload-status,
.pt-adsize-status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

/*
 * Always separate status from the dropzone above it.
 * !important beats later `.pt-status { margin: 0 }` and homepage resets.
 */
.public-tools-page .pt-status.pt-upload-status:not([hidden]),
.public-tools-page .pt-upload-status:not([hidden]),
.public-tools-page .pt-adsize-status:not([hidden]),
.pt-dropzone + .pt-status.pt-upload-status,
.pt-dropzone + input + .pt-status.pt-upload-status,
.pt-upload-zone + .pt-status.pt-upload-status,
.pt-upload-zone + input + .pt-status.pt-upload-status,
.pt-controls > .pt-status.pt-upload-status,
.pt-upload > .pt-status.pt-upload-status {
    margin-top: 16px !important;
}

.pt-upload-status.is-busy,
.pt-adsize-status.is-busy {
    background: var(--pt-busy-bg);
    color: var(--pt-busy-ink);
    border: 1px solid var(--pt-busy-border);
    border-inline-start: 3px solid var(--pt-primary);
}

.public-tools-page .pt-upload-status.is-ok,
.public-tools-page .pt-adsize-status.is-ok,
.pt-upload-status.is-ok,
.pt-adsize-status.is-ok {
    background: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    border-inline-start: 3px solid #7c3aed !important;
}

.pt-upload-status.is-error,
.pt-adsize-status.is-error {
    background: var(--pt-err-bg);
    color: var(--pt-err-ink);
    border: 1px solid var(--pt-err-border);
    border-inline-start: 3px solid var(--pt-err-ink);
}

.pt-upload-progress {
    width: 100%;
    height: 10px;
    margin-top: 16px;
    border-radius: 999px;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    overflow: hidden;
    box-sizing: border-box;
}

.pt-upload-progress[hidden] {
    display: none !important;
}

.pt-upload-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
    transition: width 0.15s ease-out;
}

.pt-upload-progress.is-indeterminate .pt-upload-progress-bar {
    width: 40% !important;
    animation: pt-upload-progress-slide 1.1s ease-in-out infinite;
}

@keyframes pt-upload-progress-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

html[dir="rtl"] .pt-upload-progress.is-indeterminate .pt-upload-progress-bar {
    animation-name: pt-upload-progress-slide-rtl;
}

@keyframes pt-upload-progress-slide-rtl {
    0% { transform: translateX(120%); }
    100% { transform: translateX(-280%); }
}

.pt-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    padding: 22px 24px;
    border-radius: 16px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-settings .pt-field {
    margin-bottom: 0;
}

.pt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.pt-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 28px;
    align-items: start;
}

.pt-controls,
.pt-preview {
    min-width: 0;
}

.pt-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.pt-field {
    margin-bottom: 18px;
}

.pt-input,
.pt-select,
.pt-textarea {
    width: 100%;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 11px 14px;
    font: inherit;
    background: #fff;
    color: var(--pt-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-input:focus,
.pt-select:focus,
.pt-textarea:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-input[type="range"] {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    height: 28px;
    accent-color: var(--pt-primary);
}

.pt-textarea {
    min-height: 96px;
    resize: vertical;
}

.pt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.pt-tab,
.pt-btn {
    border: 1px solid var(--pt-border);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pt-tab:hover,
.pt-btn:hover {
    border-color: #c4b5fd;
    color: var(--pt-primary);
}

.pt-tab.is-active,
.pt-btn.is-active,
.pt-btn-primary {
    background: var(--pt-primary);
    border-color: var(--pt-primary);
    color: #fff;
}

.pt-tab.is-active:hover,
.pt-btn-primary:hover {
    background: var(--pt-primary-hover);
    border-color: var(--pt-primary-hover);
    color: #fff;
}

.pt-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pt-btn-ghost {
    background: var(--pt-primary-soft);
    border-color: #ddd6fe;
    color: var(--pt-primary);
}

.pt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.pt-preview-box {
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    min-height: 320px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-color: #fff;
    padding: 20px;
    overflow: auto;
}

.pt-file-list {
    display: grid;
    gap: 12px;
}

.pt-file-card {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--pt-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pt-file-card:hover {
    border-color: #c4b5fd;
}

.pt-file-card.is-selected {
    border-color: var(--pt-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-file-card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #f1f5f9;
}

.pt-file-meta {
    font-size: 0.85rem;
    color: var(--pt-muted);
    line-height: 1.5;
}

.pt-file-meta strong {
    display: block;
    color: var(--pt-ink);
    font-size: 0.95rem;
    margin-bottom: 4px;
    word-break: break-all;
}

.pt-file-meta-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--pt-primary);
    font-weight: 600;
}

/* Background remover: original vs transparent result */
.pt-bg-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.pt-bg-compare-pane {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.pt-bg-compare-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pt-muted);
}

.pt-bg-compare-media {
    display: grid;
    place-items: center;
    min-height: 220px;
    max-height: 420px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    overflow: hidden;
    padding: 12px;
}

.pt-bg-compare-media.is-solid {
    background: #f8fafc;
}

.pt-bg-compare-media.is-checker {
    background:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: #fff;
}

.pt-bg-compare-media img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.pt-lightbox-trigger,
.pt-bg-compare-media img,
.pt-compare-pane-media img {
    cursor: zoom-in;
}

body.pt-lightbox-open {
    overflow: hidden;
}

.pt-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(15, 23, 42, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pt-lightbox.is-open {
    display: flex;
}

.pt-lightbox-frame {
    position: relative;
    display: grid;
    gap: 10px;
    justify-items: center;
    max-width: min(96vw, 1100px);
    max-height: 88vh;
}

.pt-lightbox-frame img {
    max-width: min(96vw, 1100px);
    max-height: 78vh;
    border-radius: 14px;
    object-fit: contain;
    background: #0f172a;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.pt-lightbox-frame.is-checker img {
    background:
        linear-gradient(45deg, #334155 25%, transparent 25%),
        linear-gradient(-45deg, #334155 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #334155 75%),
        linear-gradient(-45deg, transparent 75%, #334155 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    background-color: #1e293b;
}

.pt-lightbox-caption,
.pt-lightbox-counter {
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.pt-lightbox-counter {
    opacity: 0.8;
    font-weight: 500;
    font-size: 0.8rem;
}

.pt-lightbox-close,
.pt-lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.pt-lightbox-close {
    top: 18px;
    inset-inline-end: 18px;
}

html[dir="rtl"] .pt-lightbox-close,
html[lang="ar"] .pt-lightbox-close,
html[lang="he"] .pt-lightbox-close {
    inset-inline-end: auto;
    inset-inline-start: 18px;
    left: 18px;
    right: auto;
}

.pt-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.pt-lightbox.has-nav .pt-lightbox-nav {
    display: grid;
    place-items: center;
}

.pt-lightbox-nav.prev {
    inset-inline-start: 16px;
}

.pt-lightbox-nav.next {
    inset-inline-end: 16px;
}

@media (max-width: 720px) {
    .pt-bg-compare {
        grid-template-columns: 1fr;
    }

    .pt-lightbox {
        padding: 12px;
    }

    .pt-lightbox-nav.prev {
        inset-inline-start: 8px;
    }

    .pt-lightbox-nav.next {
        inset-inline-end: 8px;
    }
}

/* Converter: clear from → to flow */
.pt-convert-step {
    display: grid;
    gap: 8px;
}

.pt-convert-live {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
    color: var(--pt-ink);
}

.pt-convert-live[hidden] {
    display: none !important;
}

.pt-convert-live.is-busy {
    background: var(--pt-busy-bg);
    border-color: var(--pt-busy-border);
    color: var(--pt-busy-ink);
}

.pt-convert-live.is-ok {
    background: #f8fafc;
    border-color: #c4b5fd;
    border-inline-start: 3px solid var(--pt-primary);
    color: var(--pt-ink);
}

.pt-convert-live.is-error {
    background: var(--pt-err-bg);
    border-color: var(--pt-err-border);
    border-inline-start: 3px solid var(--pt-err-ink);
    color: var(--pt-err-ink);
}

.pt-convert-summary[hidden] {
    display: none !important;
}

.pt-convert-summary-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--pt-border);
    background: #fff;
}

.pt-convert-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.pt-convert-chip {
    flex: 1 1 140px;
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-convert-chip.is-to {
    border-color: #c4b5fd;
    background: var(--pt-primary-soft);
}

.pt-convert-chip-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pt-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pt-convert-chip strong {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pt-ink);
    line-height: 1.2;
}

.pt-convert-chip em {
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pt-muted);
}

.pt-convert-arrow {
    display: grid;
    place-items: center;
    min-width: 28px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pt-primary);
}

.pt-convert-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pt-muted);
}

.pt-convert-path {
    display: inline-block;
    margin: 2px 0 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--pt-primary-soft);
    color: var(--pt-primary);
    font-weight: 800;
    font-size: 0.82rem;
}

.pt-convert-warn {
    color: var(--pt-warn-ink) !important;
}

.pt-convert-settings .pt-btn.is-active {
    background: var(--pt-primary);
    border-color: var(--pt-primary);
    color: #fff;
}

/* Compressor / converter: original vs result + synced zoom */
.pt-compare-host[hidden] {
    display: none !important;
}

.pt-compare {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--pt-border);
    border-radius: 18px;
    background: #fff;
}

.pt-compare-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pt-compare-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pt-compare-stat {
    min-width: 110px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-compare-stat.is-result {
    border-color: #c4b5fd;
    background: var(--pt-primary-soft);
}

.pt-compare-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--pt-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.pt-compare-stat strong {
    font-size: 0.95rem;
    color: var(--pt-ink);
    font-weight: 700;
}

.pt-compare-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pt-compare-pane {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.pt-compare-pane-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.88rem;
}

.pt-compare-pane-label strong {
    color: var(--pt-ink);
    font-weight: 700;
}

.pt-compare-pane-label span {
    color: var(--pt-muted);
    font-weight: 600;
}

.pt-compare-pane-media {
    position: relative;
    height: 260px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background:
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
        linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: #fff;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.pt-compare-pane-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.pt-compare-lens {
    position: absolute;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--pt-primary), 0 8px 20px rgba(15, 23, 42, 0.2);
    pointer-events: none;
    z-index: 2;
}

.pt-compare-lens[hidden] {
    display: none !important;
}

.pt-compare-zoom {
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    padding: 14px;
    min-height: 180px;
}

.pt-compare-zoom.is-active {
    border-style: solid;
    border-color: #c4b5fd;
    background: #fff;
}

.pt-compare-zoom-hint {
    margin: 0;
    text-align: center;
    color: var(--pt-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 48px 12px;
}

.pt-compare-zoom.is-active .pt-compare-zoom-hint {
    display: none;
}

.pt-compare-zoom-grid {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-compare-zoom.is-active .pt-compare-zoom-grid {
    display: grid;
}

.pt-compare-zoom-pane {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.pt-compare-zoom-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pt-muted);
}

.pt-compare-zoom-view {
    height: 180px;
    border-radius: 12px;
    border: 1px solid var(--pt-border);
    background-color: #0f172a;
    background-repeat: no-repeat;
}

@media (max-width: 720px) {
    .pt-compare-stage,
    .pt-compare-zoom.is-active .pt-compare-zoom-grid {
        grid-template-columns: 1fr;
    }

    .pt-compare-pane-media {
        height: 220px;
    }

    .pt-compare-zoom-view {
        height: 160px;
    }
}

.pt-hint,
.pt-status {
    font-size: 0.9rem;
    color: var(--pt-muted);
    margin: 0;
    line-height: 1.5;
}

.pt-status.is-error {
    color: var(--pt-err-ink);
}

.pt-status.is-ok {
    color: var(--pt-ok-ink);
}

.pt-color-bars {
    display: grid;
    gap: 10px;
}

.pt-color-bar {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    cursor: grab;
    min-height: 56px;
}

.pt-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.pt-swatch {
    border: 0;
    border-radius: 10px;
    height: 56px;
    cursor: pointer;
}

/* ── SEO content sections ─────────────────────────────── */
.public-tools-section {
    margin-top: 48px;
}

.public-tools-section > h2 {
    font-size: clamp(1.3rem, 2.1vw, 1.55rem);
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--pt-ink);
    line-height: 1.3;
}

.public-tools-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
}

.public-tools-steps li {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    padding: 18px;
    border-radius: var(--pt-radius-sm);
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
    align-items: start;
}

.public-tools-step-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    background: var(--pt-primary);
}

.public-tools-steps h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
}

.public-tools-steps p,
.public-tools-features p,
.public-tools-usecases p {
    color: var(--pt-muted);
    line-height: 1.6;
    font-size: 0.92rem;
    margin: 0;
}

.public-tools-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-tools-usecases {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.public-tools-features article,
.public-tools-usecases article {
    padding: 18px 20px;
    border-radius: var(--pt-radius-sm);
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
}

.public-tools-features h3,
.public-tools-usecases h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.35;
}

.public-tools-prose p {
    color: #334155;
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 1rem;
}

.public-tools-prose p:last-child {
    margin-bottom: 0;
}

.public-tools-prose ul {
    margin: 0 0 14px 1.15em;
    color: #334155;
    line-height: 1.75;
}

.public-tools-prose li + li {
    margin-top: 6px;
}

.public-tools-faq details {
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    background: var(--pt-surface);
    padding: 14px 16px;
    margin-bottom: 10px;
}

.public-tools-faq details:last-child {
    margin-bottom: 0;
}

.public-tools-faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--pt-ink);
    font-size: 0.98rem;
}

.public-tools-faq p {
    margin-top: 10px;
    color: var(--pt-muted);
    line-height: 1.65;
    font-size: 0.94rem;
}

.public-tools-more {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-tools-more a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--pt-border);
    background: var(--pt-surface);
    color: var(--pt-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.public-tools-more a:hover {
    background: var(--pt-primary-soft);
    border-color: #c4b5fd;
}

.public-tools-page section.public-tools-cta-band {
    text-align: center;
    padding: 40px 32px;
    border-radius: 20px;
    background: var(--pt-primary);
    color: #fff;
    margin-top: 52px;
}

.public-tools-cta-band h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 800;
    margin: 0 0 12px;
}

.public-tools-cta-band p {
    max-width: 560px;
    margin: 0 auto 20px;
    opacity: 0.95;
    line-height: 1.65;
    font-size: 0.98rem;
}

.public-tools-cta-btn {
    display: inline-flex !important;
    background: #fff !important;
    color: #4c1d95 !important;
    font-weight: 800;
    margin: 0;
}

/* Portfolio rails */
.public-tools-page .public-tools-portfolio.portfolio {
    background: #0a0518;
    margin: 40px 0;
    padding: 40px 0 36px;
}

.public-tools-page .public-tools-portfolio .hero-showcase-bridge {
    /* Override homepage .portfolio { direction: ltr } for the label */
    margin-bottom: 24px;
    unicode-bidi: isolate;
}

.public-tools-page .public-tools-portfolio .hero-showcase-bridge__label {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}

.public-tools-page .public-tools-portfolio .portfolio-row {
    margin-bottom: 18px;
}

.public-tools-page .public-tools-portfolio .portfolio-row:last-child {
    margin-bottom: 0;
}

/* Tool-specific Try Adly CTA under showcase rails (same copy as bottom band) */
.public-tools-showcase-cta {
    max-width: 720px;
    margin: 28px auto 0;
    padding: 0 24px 8px;
    text-align: center;
    /* dir set in HTML; isolate so LTR marquee parent cannot reorder Arabic */
    unicode-bidi: isolate;
}

.public-tools-showcase-cta-title {
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin: 0 0 10px;
    unicode-bidi: plaintext;
}

.public-tools-showcase-cta-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(226, 232, 240, 0.88);
    margin: 0 auto 18px;
    max-width: 54ch;
    unicode-bidi: plaintext;
}

.public-tools-showcase-cta-btn {
    display: inline-flex !important;
    background: #fff !important;
    color: #4c1d95 !important;
    font-weight: 800 !important;
    unicode-bidi: plaintext;
}

@media (max-width: 960px) {
    .public-tools-grid,
    .public-tools-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-tools-steps {
        grid-template-columns: 1fr;
    }

    .pt-panel,
    .pt-settings {
        grid-template-columns: 1fr;
    }

    .public-tools-workbench-body {
        padding: 20px;
    }

    .pt-file-card {
        grid-template-columns: 64px 1fr;
    }

    .pt-file-card .pt-actions {
        grid-column: 1 / -1;
    }

    .public-tools-page .public-tools-portfolio.portfolio {
        margin: 32px 0;
        padding: 32px 0 28px;
    }
}

/* Meta ad size checker */
.pt-adsize-summary {
    margin: 4px 0 18px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #334155;
}

.pt-adsize-summary:empty {
    display: none;
}

.pt-adsize-summary.is-ok {
    border-color: var(--pt-ok-border);
    background: var(--pt-ok-bg);
    color: var(--pt-ok-ink);
}

.pt-adsize-summary.is-warn {
    border-color: var(--pt-warn-border);
    background: var(--pt-warn-bg);
    color: var(--pt-warn-ink);
}

.pt-adsize-layout[hidden],
.pt-gate[hidden] {
    display: none;
}

.pt-adsize-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 28px;
    margin-top: 4px;
    align-items: start;
}

.pt-adsize-side {
    display: grid;
    gap: 14px;
}

.pt-adsize-preview {
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
    min-height: 200px;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: hidden;
}

.pt-adsize-thumb {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
}

.pt-adsize-meta,
.pt-adsize-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--pt-muted, #64748b);
}

.pt-adsize-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

.pt-adsize-list {
    display: grid;
    gap: 14px;
}

.pt-adsize-row {
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
    padding: 18px 20px;
    border-inline-start-width: 3px;
}

.pt-adsize-row.is-ok {
    border-color: var(--pt-ok-border);
    border-inline-start-color: var(--pt-primary);
    background: var(--pt-ok-bg);
}

.pt-adsize-row.is-warn {
    border-color: var(--pt-warn-border);
    border-inline-start-color: #c2410c;
    background: var(--pt-warn-bg);
}

.pt-adsize-row.is-miss {
    border-color: var(--pt-miss-border);
    border-inline-start-color: #94a3b8;
    background: var(--pt-miss-bg);
}

.pt-adsize-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pt-adsize-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    white-space: nowrap;
}

.pt-adsize-row.is-ok .pt-adsize-badge {
    background: var(--pt-ok-badge);
    color: var(--pt-ok-ink);
}

.pt-adsize-row.is-warn .pt-adsize-badge {
    background: var(--pt-warn-badge);
    color: var(--pt-warn-ink);
}

.pt-adsize-row.is-miss .pt-adsize-badge {
    background: #e2e8f0;
    color: var(--pt-miss-ink);
}

.pt-adsize-rec,
.pt-adsize-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

.pt-adsize-note {
    margin-top: 6px;
}

.pt-gate {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--pt-border);
    background: #fff;
    display: grid;
    gap: 10px;
}

.pt-gate-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
}

.pt-gate-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
}

.pt-gate .pt-btn {
    justify-self: start;
    text-decoration: none;
}

/* Sticky preview needs visible overflow on workbench ancestors */
body[data-tools-module="bizcard"] .public-tools-workbench {
    overflow: visible;
}

body[data-tools-module="bizcard"] .public-tools-workbench-head {
    border-radius: 24px 24px 0 0;
}

body[data-tools-module="bizcard"] .public-tools-workbench-body {
    border-radius: 0 0 24px 24px;
    overflow: visible;
}

/* Digital business card free preview */
.pt-bizcard-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.15fr);
    gap: 28px;
    align-items: start;
}

.pt-bizcard-form {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.pt-bizcard-section {
    margin-top: 8px;
    padding: 18px 18px 8px;
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
}

.pt-bizcard-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b;
}

.pt-bizcard-hint,
.pt-bizcard-preview-note,
.pt-bizcard-field-hint {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--pt-muted, #64748b);
}

.pt-bizcard-field-hint {
    margin-top: 6px;
    margin-bottom: 0;
}

.pt-bizcard-colors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-bizcard-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.pt-bizcard-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 14px;
}

.pt-bizcard-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--pt-border);
    background: #f8fafc;
}

.pt-bizcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-bizcard-thumb-remove {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.pt-bizcard-gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pt-bizcard-gate-actions .pt-btn {
    text-decoration: none;
}

.pt-bizcard-preview-panel {
    position: sticky;
    top: 88px;
    z-index: 5;
    align-self: start;
}

.pt-bizcard-shell .phone-frame {
    background: #0f1222;
    border-radius: 36px;
    padding: 18px 16px 22px;
    box-shadow: 0 24px 60px rgba(15, 18, 34, 0.35);
    max-width: 380px;
    margin: 0 auto;
}

.pt-bizcard-shell .phone-frame.is-full-screen {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 18px;
}

.pt-bizcard-shell .phone-notch {
    width: 120px;
    height: 16px;
    background: #0f1222;
    border-radius: 0 0 14px 14px;
    margin: 0 auto 10px;
}

.pt-bizcard-shell .phone-screen {
    background: #f5f6fb;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: min(70vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
}

.pt-bizcard-shell .phone-frame.is-full-screen .phone-screen {
    border-radius: 18px;
    border: 1px solid #e5e7f2;
    max-height: none;
}

.pt-bizcard-shell .business-card-preview {
    padding: 6px;
}

.pt-bizcard-shell .business-card {
    border: 1px solid #e5e7f2;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 18, 30, 0.08);
    --brand-on-primary: #fff;
}

.pt-bizcard-shell .business-card-header {
    background: var(--card-header-bg, linear-gradient(120deg, var(--card-brand-primary, #7c3aed), var(--card-brand-secondary, #a78bfa)));
    color: #fff;
    padding: 18px;
    position: relative;
    isolation: isolate;
    text-align: center;
}

.pt-bizcard-shell .business-card-header > :not(.business-card-cover-bg) {
    position: relative;
    z-index: 1;
}

.pt-bizcard-shell .business-card-cover-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.08);
}

.pt-bizcard-shell .business-card.banner-fade .business-card-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.42)),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.28), transparent 58%);
}

.pt-bizcard-shell .business-card-cover {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
}

.pt-bizcard-shell .business-card.cover-layout-full_bleed .business-card-cover {
    width: calc(100% + 36px);
    max-width: none;
    margin: -18px -18px 12px;
    border-radius: 18px 18px 0 0;
    border-inline: 0;
    border-top: 0;
}

.pt-bizcard-shell .business-card-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 10px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.pt-bizcard-shell .business-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-bizcard-shell .business-card-title {
    font-size: 22px;
    font-weight: 700;
}

.pt-bizcard-shell .business-card-subtitle {
    margin-top: 6px;
    opacity: 0.9;
}

.pt-bizcard-shell .business-card-body {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}

.pt-bizcard-shell .business-card .action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 10px;
    justify-content: center;
}

.pt-bizcard-shell .business-card .action-tile {
    box-sizing: border-box;
    flex: 0 1 calc((100% - 20px) / 3);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid #e0e3ef;
    text-decoration: none;
    color: var(--card-button-text, #1e2430);
    background: var(--card-button-bg, #f7f8fd);
    font-weight: 600;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    min-height: 82px;
    justify-content: center;
    cursor: pointer;
    font: inherit;
}

.pt-bizcard-shell .business-card .action-tile.whatsapp {
    background: var(--card-button-bg, #f7f8fd);
    color: var(--card-button-text, #1e2430);
}

.pt-bizcard-shell .business-card .action-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.pt-bizcard-shell .business-card.button-display-icon_only .action-icon,
.pt-bizcard-shell .business-card.button-display-icon-only .action-icon {
    width: 38px;
    height: 38px;
}

.pt-bizcard-shell .business-card .action-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pt-bizcard-shell .business-card.button-display-icon_only .action-icon svg,
.pt-bizcard-shell .business-card.button-display-icon-only .action-icon svg {
    width: 38px;
    height: 38px;
}

.pt-bizcard-shell .business-card .action-text {
    line-height: 1.2;
    word-break: break-word;
}

.pt-bizcard-shell .business-card .card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.pt-bizcard-shell .business-card .card-gallery img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e3e6f2;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.pt-bizcard-shell .business-card .card-footer {
    padding: 10px 16px 14px;
    text-align: center;
    font-size: 11px;
    color: #8a90a5;
    border-top: 1px solid #edf0f7;
}

.pt-bizcard-shell .business-card .card-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

/* Legacy bizcard lightbox classes → shared .pt-lightbox */

@media (max-width: 900px) {
    .pt-adsize-layout {
        grid-template-columns: 1fr;
    }

    .pt-bizcard-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pt-bizcard-preview-panel {
        position: sticky;
        top: 72px;
        order: -1;
        z-index: 6;
        padding-bottom: 8px;
        background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0));
    }

    .pt-bizcard-shell .phone-frame {
        max-width: 280px;
        transform: scale(0.92);
        transform-origin: top center;
    }

    .pt-bizcard-shell .phone-screen {
        max-height: min(42vh, 420px);
    }
}

@media (max-width: 560px) {
    .public-tools-grid,
    .public-tools-features,
    .public-tools-usecases {
        grid-template-columns: 1fr;
    }

    .public-tools-main {
        padding: 24px 0 48px;
    }

    .public-tools-section {
        margin-top: 40px;
    }

    .public-tools-workbench-head {
        padding: 16px 18px;
    }

    .public-tools-workbench-body {
        padding: 18px;
    }

    .pt-dropzone {
        padding: 36px 18px;
        min-height: 150px;
    }

    .pt-settings {
        padding: 18px;
        gap: 16px;
    }

    .public-tools-page section.public-tools-cta-band {
        margin-top: 40px;
        padding: 32px 20px;
    }
}

/* ---------------------------------------------------------------------------
   AI text tools: article writer / translator / SEO optimizer
--------------------------------------------------------------------------- */

.pt-text-tool .pt-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pt-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pt-goal-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: start;
    border: 1px solid var(--pt-border);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pt-goal-chip strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-goal-chip span {
    font-size: 0.78rem;
    color: #64748b;
}

.pt-goal-chip:hover {
    border-color: #c4b5fd;
}

.pt-goal-chip.is-active {
    border-color: var(--pt-primary);
    background: #faf5ff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pt-goal-chip.is-active strong {
    color: var(--pt-primary);
}

.pt-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pt-result-head .pt-label {
    margin-bottom: 0;
}

.pt-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pt-btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
}

.pt-text-output {
    display: block;
    min-height: 260px;
    max-height: 640px;
    overflow-y: auto;
    padding: 22px;
    text-align: start;
    align-items: initial;
    justify-content: initial;
}

.pt-art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    text-align: center;
    color: #64748b;
}

.pt-art-placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #f3e8ff;
    color: var(--pt-primary);
    font-size: 1.5rem;
}

.pt-art-placeholder p {
    max-width: 380px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.pt-art-doc {
    line-height: 1.85;
    color: var(--pt-ink);
    font-size: 0.98rem;
}

.pt-art-doc-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 6px;
}

.pt-art-doc-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0 0 12px;
}

.pt-art-doc-desc {
    font-size: 0.9rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 0 0 18px;
}

.pt-art-doc h2 {
    font-size: 1.12rem;
    font-weight: 800;
    margin: 22px 0 8px;
}

.pt-art-doc h3,
.pt-art-doc h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 18px 0 6px;
}

.pt-art-doc p {
    margin: 0 0 12px;
}

.pt-art-doc ul,
.pt-art-doc ol {
    margin: 0 0 12px;
    padding-inline-start: 22px;
}

.pt-art-doc li {
    margin-bottom: 6px;
}

.pt-tr-source {
    min-height: 200px;
}

.pt-tr-result {
    white-space: pre-wrap;
    line-height: 1.85;
    color: var(--pt-ink);
    font-size: 0.98rem;
    word-break: break-word;
}

.pt-tr-tones {
    margin-bottom: 0;
}

/* SEO optimizer report */

.pt-seo-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pt-seo-urlrow {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.pt-seo-urlrow .pt-input {
    flex: 1;
    min-width: 0;
}

.pt-seo-urlrow .pt-btn {
    white-space: nowrap;
}

.pt-seo-report {
    max-height: none;
}

.pt-seo-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.pt-seo-score-ring {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pt-seo-score-ring::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #fff;
}

.pt-seo-score-ring strong {
    position: relative;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--pt-ink);
}

.pt-seo-score-ring span {
    position: relative;
    font-size: 0.72rem;
    color: #94a3b8;
}

.pt-seo-head-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pt-seo-head-verdict {
    font-size: 1.05rem;
    font-weight: 800;
}

.pt-seo-head-url {
    font-size: 0.8rem;
    color: #64748b;
    word-break: break-all;
}

.pt-seo-head-title {
    font-size: 0.88rem;
    color: var(--pt-ink);
    font-weight: 600;
}

.pt-seo-summary {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    font-size: 0.92rem;
    line-height: 1.8;
    color: #334155;
}

.pt-seo-section {
    margin-top: 24px;
}

.pt-seo-section h3 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--pt-ink);
    margin: 0 0 12px;
}

.pt-seo-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pt-seo-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.pt-seo-check strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-seo-check span:not(.pt-seo-check-icon) {
    font-size: 0.76rem;
    color: #64748b;
}

.pt-seo-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.pt-seo-check.is-pass .pt-seo-check-icon {
    background: #dcfce7;
    color: #16a34a;
}

.pt-seo-check.is-warn .pt-seo-check-icon {
    background: #fef3c7;
    color: #d97706;
}

.pt-seo-check.is-fail .pt-seo-check-icon {
    background: #fee2e2;
    color: #dc2626;
}

.pt-seo-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pt-seo-suggestion {
    border: 1px solid var(--pt-border);
    border-inline-start: 3px solid #d97706;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.pt-seo-suggestion.is-high {
    border-inline-start-color: #dc2626;
}

.pt-seo-suggestion.is-low {
    border-inline-start-color: #16a34a;
}

.pt-seo-suggestion-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pt-seo-suggestion-head strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pt-ink);
}

.pt-seo-severity {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px 10px;
}

.pt-seo-suggestion p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.75;
    color: #334155;
}

.pt-seo-copycards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-seo-copycard {
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.pt-seo-copycard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.pt-seo-copycard-head strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.pt-seo-copycard-body {
    margin: 0 0 4px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--pt-ink);
}

.pt-seo-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pt-seo-keyword {
    border: 1px solid var(--pt-border);
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 7px 14px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.pt-seo-keyword:hover {
    border-color: #c4b5fd;
    color: var(--pt-primary);
}

@media (max-width: 860px) {
    .pt-text-tool .pt-settings,
    .pt-seo-copycards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .pt-goal-grid,
    .pt-seo-checks {
        grid-template-columns: 1fr;
    }

    .pt-seo-urlrow {
        flex-direction: column;
    }

    .pt-text-output {
        padding: 16px;
    }
}
