/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #F6F6FB;
  --bg-raise: #ffffff;
  --ink: #15151F;
  --ink-soft: #5B5C72;
  --ink-faint: #8A8BA0;
  --border: #E7E7F1;
  --border-strong: #D6D6E6;

  --accent: #5B4FE9;
  --accent-dark: #4338CA;
  --accent-soft: #EFEDFF;
  --accent-ink: #ffffff;

  --teal: #0EA5A4;
  --teal-soft: #E3F8F7;

  --success: #17A673;
  --success-soft: #E5F8F1;
  --warn: #B5760A;
  --warn-soft: #FFF4DF;
  --danger: #DC3D2E;
  --danger-soft: #FDEAE7;

  --ad-bg: #F0F0F5;
  --ad-border: #D3D3E2;
  --ad-ink: #9494AA;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(20,20,40,.06);
  --shadow: 0 8px 24px rgba(20,20,50,.08);
  --shadow-lg: 0 20px 60px rgba(20,20,50,.16);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101018;
    --bg-soft: #17171F;
    --bg-raise: #1B1B26;
    --ink: #F2F2F8;
    --ink-soft: #B4B4C6;
    --ink-faint: #7C7C90;
    --border: #2A2A38;
    --border-strong: #37374A;
    --accent-soft: #23213F;
    --ad-bg: #1D1D28;
    --ad-border: #33334333;
    --ad-ink: #74748C;
    --success-soft: #133227;
    --warn-soft: #332608;
    --danger-soft: #33191A;
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(1.5rem, 4vw, 2.5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent);
}

.center { text-align: center; }
.muted { color: var(--ink-soft); }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }

.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
.subtitle { color: var(--ink-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 62ch; }
.subtitle.center { margin-inline: auto; }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius-full);
  font-weight: 600; font-size: .96rem;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(91,79,233,.28); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--bg-raise); color: var(--ink); border: 1.5px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Cards */
.card {
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .95rem; flex-shrink: 0;
}
.main-nav { display: none; align-items: center; gap: 1.9rem; }
.main-nav a { font-weight: 600; font-size: .94rem; color: var(--ink-soft); transition: color .15s; }
.main-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.usage-pill {
  display: none; align-items: center; gap: .4rem;
  padding: .4rem .8rem; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.usage-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.usage-pill[data-low] .dot { background: var(--warn); }
.usage-pill[data-empty] .dot { background: var(--danger); }

.nav-toggle {
  display: flex; width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center; border: 1px solid var(--border-strong);
}
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: var(--bg); padding: 1.5rem 20px; display: none; overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: .95rem 0; font-weight: 700; font-size: 1.15rem; border-bottom: 1px solid var(--border); }
.mobile-usage { margin-top: 1.2rem; }

@media (min-width: 720px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .usage-pill { display: inline-flex; }
}

/* Ad slots */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: var(--ad-bg); border: 1.5px dashed var(--ad-border);
  color: var(--ad-ink); border-radius: var(--radius);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-inline: auto; overflow: hidden;
}
.ad-slot small { display: block; font-weight: 500; letter-spacing: 0; text-transform: none; margin-top: .2rem; font-size: .72rem; }
.ad-leaderboard { width: 100%; max-width: 728px; min-height: 90px; }
.ad-incontent { width: 100%; max-width: 300px; min-height: 250px; }

/* Privacy badge / limits */
.tool-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: center;
  margin-top: 1.1rem; font-size: .86rem; color: var(--ink-soft);
}
.tool-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.tool-meta .icon { width: 16px; height: 16px; color: var(--success); }

/* =============================================================
   6. Sections
   ============================================================= */

/* Hero / tool page */
.tool-hero { padding-block: clamp(2rem, 5vw, 3.2rem) 1rem; text-align: center; }
.tool-hero .eyebrow { justify-content: center; width: 100%; }
.tool-hero h1 { margin-top: .6rem; }
.tool-hero .subtitle { margin-top: .7rem; }

/* Tool card shell */
.tool-card {
  max-width: 760px; margin: 1.6rem auto 0;
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.tool-card-tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; background: var(--bg-soft); padding: .3rem; border-radius: var(--radius-full); }
.tool-card-tabs button {
  flex: 1; padding: .6rem 1rem; border-radius: var(--radius-full); font-weight: 700; font-size: .88rem; color: var(--ink-soft);
  transition: all .18s var(--ease-out);
}
.tool-card-tabs button.is-active { background: var(--bg-raise); color: var(--accent); box-shadow: var(--shadow-sm); }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .7rem; text-align: center; padding: clamp(1.8rem, 5vw, 2.8rem) 1.2rem;
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg-soft); cursor: pointer; transition: border-color .18s, background .18s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.dropzone-icon .icon { width: 26px; height: 26px; }
.dropzone strong { font-size: 1.02rem; }
.dropzone span { color: var(--ink-faint); font-size: .84rem; }

/* Generic tool controls */
.field-row { display: grid; gap: .9rem; margin-top: 1rem; }
@media (min-width: 540px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .field-row.cols-3 { grid-template-columns: repeat(3,1fr); } }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.field input[type="text"], .field input[type="url"], .field input[type="password"],
.field input[type="number"], .field select, .field textarea {
  padding: .75rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--bg-raise); font-size: .95rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.field-hint { font-size: .78rem; color: var(--ink-faint); }

.chip-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .5rem 1rem; border-radius: var(--radius-full); border: 1.5px solid var(--border-strong);
  font-size: .84rem; font-weight: 700; color: var(--ink-soft); transition: all .15s;
}
.chip.is-active, .chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.color-swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--border); padding: 0; cursor: pointer; overflow: hidden; }
.color-swatch input[type="color"] { width: 140%; height: 140%; margin: -20%; cursor: pointer; border: 0; }

/* File list rows (merge/split, batch) */
.file-row {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-raise);
  margin-top: .55rem;
}
.file-row .name { flex: 1; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .size { font-size: .78rem; color: var(--ink-faint); }
.file-row .thumb { width: 40px; height: 52px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-soft); }
.file-row button.remove { color: var(--danger); font-size: .8rem; font-weight: 700; }
.file-row .drag-handle { cursor: grab; color: var(--ink-faint); }

/* Progress */
.progress-wrap { margin-top: 1.2rem; }
.progress-bar { height: 8px; border-radius: var(--radius-full); background: var(--bg-soft); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .25s var(--ease-out); }
.progress-label { margin-top: .5rem; font-size: .85rem; color: var(--ink-soft); text-align: center; }

/* Result */
.result-box {
  text-align: center; padding: 1.6rem 1rem; border-radius: var(--radius);
  background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}
.result-box .icon-ok { width: 52px; height: 52px; margin: 0 auto .8rem; color: var(--success); }
.result-stats { display: flex; justify-content: center; gap: 1.6rem; margin: .9rem 0 1.2rem; flex-wrap: wrap; }
.result-stats div { text-align: center; }
.result-stats b { display: block; font-size: 1.3rem; }
.result-stats span { font-size: .78rem; color: var(--ink-soft); }
.result-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.reset-link { display: inline-block; margin-top: 1rem; font-size: .85rem; font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.reset-link:hover { color: var(--accent); }

.error-box {
  text-align: center; padding: 1.4rem 1rem; border-radius: var(--radius);
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger);
  font-weight: 600; font-size: .92rem;
}

/* data-state visibility engine */
[data-state] .state-panel { display: none; }
[data-state="idle"] .state-idle,
[data-state="loading-engine"] .state-loading,
[data-state="painting"] .state-painting,
[data-state="working"] .state-working,
[data-state="done"] .state-done,
[data-state="error"] .state-error { display: block; }

/* How it works */
.steps { display: grid; gap: 1.2rem; margin-top: 2rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 1.5rem; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: .9rem;
}

/* Tool grid (homepage) */
.tool-grid { display: grid; gap: 1rem; margin-top: 1.6rem; }
@media (min-width: 540px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-tile {
  padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem;
  transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s;
  position: relative;
}
.tool-tile:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.tool-tile .tile-icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.tool-tile.is-star .tile-icon { background: linear-gradient(135deg, var(--accent), var(--teal)); color: #fff; }
.tool-tile h3 { font-size: 1.02rem; }
.tool-tile p { font-size: .86rem; color: var(--ink-soft); }
.tile-badge {
  position: absolute; top: 1.1rem; right: 1.1rem; background: var(--teal); color: #fff;
  font-size: .68rem; font-weight: 800; padding: .25rem .55rem; border-radius: var(--radius-full); letter-spacing: .03em;
}
.cat-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }

/* Audience */
.audience-grid { display: grid; gap: 1rem; margin-top: 1.8rem; }
@media (min-width: 720px) { .audience-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .audience-grid { grid-template-columns: repeat(5, 1fr); } }
.audience-card { padding: 1.3rem; text-align: center; }
.audience-card h3 { font-size: .96rem; margin-bottom: .4rem; }
.audience-card p { font-size: .82rem; color: var(--ink-soft); }

/* Related tools */
.related-grid { display: grid; gap: .9rem; margin-top: 1.4rem; }
@media (min-width: 720px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.related-card { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; }
.related-card .tile-icon { width: 38px; height: 38px; border-radius: 10px; }
.related-card .icon { width: 18px; height: 18px; }
.related-card h3 { font-size: .9rem; }

/* FAQ */
.faq-list { max-width: 760px; margin: 1.8rem auto 0; display: flex; flex-direction: column; gap: .7rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-raise); overflow: hidden; }
.faq-item summary {
  padding: 1.05rem 1.2rem; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; flex-shrink: 0; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.2rem 1.1rem; color: var(--ink-soft); font-size: .92rem; }

/* SEO text block */
.prose { max-width: 760px; margin: 0 auto; color: var(--ink-soft); }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6rem; margin-bottom: .6rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.2rem; list-style: disc; }
.prose li { margin-bottom: .4rem; }

/* Privacy badge line under tool */
.privacy-line {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: 1rem; font-size: .84rem; color: var(--success); font-weight: 700;
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-block: 3rem 2rem; margin-top: 4rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-col h4 { font-size: .85rem; margin-bottom: .8rem; }
.footer-col a { display: block; padding: .35rem 0; font-size: .88rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--ink-faint);
}
.footer-credits { font-size: .74rem; color: var(--ink-faint); margin-top: .6rem; max-width: 70ch; }

/* Toast (corner ad) */
.corner-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 200; max-width: 300px;
  background: var(--ad-bg); border: 1.5px dashed var(--ad-border); border-radius: var(--radius);
  padding: .9rem 1rem; display: none; box-shadow: var(--shadow-lg);
}
.corner-toast.is-visible { display: block; animation: toastIn .35s var(--ease-out); }
.corner-toast .toast-close { position: absolute; top: 6px; right: 8px; font-size: 1rem; color: var(--ad-ink); }
.corner-toast .toast-label { font-size: .68rem; font-weight: 800; letter-spacing: .06em; color: var(--ad-ink); text-transform: uppercase; }
.corner-toast .toast-body { font-size: .78rem; color: var(--ad-ink); margin-top: .3rem; min-height: 40px; display: flex; align-items: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Download interstitial modal */
dialog.dl-modal {
  border: none; border-radius: var(--radius-lg); padding: 0; max-width: 380px; width: calc(100% - 2.4rem);
  box-shadow: var(--shadow-lg);
}
dialog.dl-modal::backdrop { background: rgba(10,10,20,.55); backdrop-filter: blur(2px); }
.dl-modal-inner { padding: 1.5rem; text-align: center; position: relative; }
.dl-modal .toast-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-soft); font-size: 1.1rem; }
.dl-modal .ad-slot { min-height: 200px; margin-top: 1rem; }
.dl-modal p.timer { margin-top: 1rem; font-size: .85rem; color: var(--ink-soft); }

/* Paywall modal */
dialog.paywall-modal {
  border: none; border-radius: var(--radius-lg); padding: 0; max-width: 440px; width: calc(100% - 2.4rem);
  box-shadow: var(--shadow-lg);
}
dialog.paywall-modal::backdrop { background: rgba(10,10,20,.6); backdrop-filter: blur(3px); }
.paywall-inner { padding: 2rem; text-align: center; position: relative; }
.paywall-inner .toast-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-soft); font-size: 1.15rem; }
.paywall-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--accent), var(--teal)); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.paywall-icon .icon { width: 30px; height: 30px; }
.paywall-price { font-size: 2.3rem; font-weight: 800; margin: .6rem 0 .2rem; }
.paywall-price span { font-size: 1rem; color: var(--ink-soft); font-weight: 600; }
.paywall-features { text-align: left; max-width: 280px; margin: 1.1rem auto 1.4rem; display: flex; flex-direction: column; gap: .55rem; }
.paywall-features div { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; }
.paywall-features .icon { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 1px; }
.paywall-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: .4rem; }

/* Star tool special hero touch */
.star-flag {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem;
  border-radius: var(--radius-full); background: linear-gradient(135deg, var(--accent-soft), var(--teal-soft));
  color: var(--accent-dark); font-size: .74rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}

/* Viewer 3D */
.viewer3d-wrap {
  position: relative; width: 100%; aspect-ratio: 4/3; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden;
}
.viewer3d-wrap canvas { width: 100% !important; height: 100% !important; display: block; }
.viewer3d-hint { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--ink-faint); background: color-mix(in srgb, var(--bg) 75%, transparent); padding: .2rem .6rem; border-radius: var(--radius-full); }
.viewer3d-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; font-size: .85rem; color: var(--ink-soft); }

.print-warning { display: flex; gap: .5rem; align-items: flex-start; padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .82rem; margin-top: .6rem; }
.print-warning.ok { background: var(--success-soft); color: var(--success); }
.print-warning.bad { background: var(--danger-soft); color: var(--danger); }
.print-warning .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

.tabs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.2rem; }

.credits-line { font-size: .72rem; color: var(--ink-faint); margin-top: 1rem; text-align: center; }

/* =============================================================
   9. Reduced-motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .corner-toast.is-visible { animation: none; }
  .tool-tile:hover { transform: none; }
}

/* JS-disabled notice */
.no-js-note { display: none; }
.no-js .no-js-note { display: block; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-size: .9rem; font-weight: 600; text-align: center; margin: 1rem auto; max-width: 760px; }
.no-js .js-only { display: none !important; }
